{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"milestone":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/08f140ba54eba9079d0e5620b06e286e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"08f140ba54eba9079d0e5620b06e286e","url":"https://api.github.com/users/lbihanic","login":"lbihanic","id":1193557},"labels":[],"assignee":null,"updated_at":"2011-11-14T13:07:18Z","comments":0,"closed_at":null,"url":"https://api.github.com/repos/mhgrove/Empire/issues/65","body":"In case of connection error (ConnectException) while accessing a remote repository, EntityManagerFactory.newEntityManager() does not include the cause exception when throwing an IllegalStateException which make debugging network/firewall issues difficult.\r\n\r\nThe following patch fixed the issue:\r\n\r\ndiff --git a/core/src/com/clarkparsia/empire/impl/EntityManagerFactoryImpl.java b/core/src/com/clarkparsia/empire/impl/EntityManagerFactoryImpl.java\r\nindex 1c04936..4763604 100644\r\n--- a/core/src/com/clarkparsia/empire/impl/EntityManagerFactoryImpl.java\r\n+++ b/core/src/com/clarkparsia/empire/impl/EntityManagerFactoryImpl.java\r\n@@ -111,7 +111,7 @@ public class EntityManagerFactoryImpl implements EntityManagerFactory {\r\n \t\t\treturn new EntityManagerImpl( (MutableDataSource) aSource);\r\n \t\t}\r\n \t\tcatch (ConnectException e) {\r\n-\t\t\tthrow new IllegalStateException(\"Could not connect to the data source\");\r\n+\t\t\tthrow new IllegalStateException(\"Could not connect to the data source\", e);\r\n \t\t}\r\n \t\tcatch (DataSourceException e) {\r\n \t\t\tthrow new IllegalArgumentException(\"There was an error creating the data source for the new EntityManager\", e);\r\n","html_url":"https://github.com/mhgrove/Empire/issues/65","title":"EntityManagerFactory should provide connection error cause exception","number":65,"id":2230289,"created_at":"2011-11-14T13:07:18Z"},"action":"opened"}