Thread: [Squirrel-sql-users] Problems with hibernate/hibernate spatial
A Java SQL client for any JDBC compliant database
Brought to you by:
colbell,
gerdwagner
From: <new...@pu...> - 2008-10-14 15:48:25
|
Hi, I installed squirrel to access on my postgres/postgis database. The access via SQL statements is no problem. But if I try to connect via hibernate I get "java.lang.RuntimeException: java.lang.reflect.InvocationTargetException" . I use annotations for mapping (not the hibernate.cfg.xml). The other config settings are in the properties file (like db conneciton, dialect, ...) Don't know what I can do to get it running and send hql statements to the db. Thanks for help in advance, Jo -- GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen! Jetzt dabei sein: http://www.shortview.de/wasistshortview.php?mc=sv_ext_mf@gmx |
From: Johannes L. <Joh...@gm...> - 2008-10-14 15:21:40
|
Hi, I installed squirrel to access on my postgres/postgis database. The access via SQL statements is no problem. But if I try to connect via hibernate I get "java.lang.RuntimeException: java.lang.reflect.InvocationTargetException" . I use annotations for mapping (not the hibernate.cfg.xml). The other config settings are in the properties file (like db conneciton, dialect, ...) Don't know what I can do to get it running and send hql statements to the db. Thanks for help in advance, Jo -- Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger |
From: Gerd W. <ger...@t-...> - 2008-10-15 00:57:37
|
new...@pu... wrote: > Hi, > > I installed squirrel to access on my postgres/postgis database. > The access via SQL statements is no problem. But if I try to connect > via hibernate I get "java.lang.RuntimeException: java.lang.reflect.InvocationTargetException" . After you see the exception in SQuirreL's meesage panel please look at the status bar at the bottom of the Window. In the logs section there are two little buttons. The left one will provide a full message and stack trace of the exception. Note, have a detailed look at the "caused by"s of your stack trace. Mostly the real interesting parts are at the bottom of the trace. Gerd |
From: Jo_ <new...@pu...> - 2008-10-15 09:29:43
|
Gerd Wagner-3 wrote: > > new...@pu... wrote: >> Hi, >> >> I installed squirrel to access on my postgres/postgis database. >> The access via SQL statements is no problem. But if I try to connect >> via hibernate I get "java.lang.RuntimeException: >> java.lang.reflect.InvocationTargetException" . > After you see the exception in SQuirreL's meesage panel please look at the > status bar at the bottom of the Window. In the logs section there are two > little > buttons. The left one will provide a full message and stack trace of the > exception. > > Note, have a detailed look at the "caused by"s of your stack trace. Mostly > the > real interesting parts are at the bottom of the trace. > > Gerd > > > That's my stack trace: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at net.sourceforge.squirrel_sql.plugins.hibernate.ReflectionCaller.callMethod(ReflectionCaller.java:88) at net.sourceforge.squirrel_sql.plugins.hibernate.HibnerateConnector.doConnect(HibnerateConnector.java:61) at net.sourceforge.squirrel_sql.plugins.hibernate.HibnerateConnector.access$000(HibnerateConnector.java:12) at net.sourceforge.squirrel_sql.plugins.hibernate.HibnerateConnector$1.run(HibnerateConnector.java:27) at java.lang.Thread.run(Unknown Source) at net.sourceforge.squirrel_sql.plugins.hibernate.HibnerateConnector$2.run(HibnerateConnector.java:40) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at net.sourceforge.squirrel_sql.client.Application$1.dispatchEvent(Application.java:180) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.sourceforge.squirrel_sql.plugins.hibernate.ReflectionCaller.callMethod(ReflectionCaller.java:84) ... 14 more Caused by: java.lang.NoClassDefFoundError: javax/persistence/JoinTable at org.hibernate.cfg.AnnotationConfiguration.addPackage(AnnotationConfiguration.java:177) at database.model.HibernateSessionFactory.addClassStructure(HibernateSessionFactory.java:167) at database.model.HibernateSessionFactory.getSessionFactoryImpl(HibernateSessionFactory.java:53) ... 19 more Caused by: java.lang.ClassNotFoundException: javax.persistence.JoinTable at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 22 more In the squirrel-sql.log file: 1588031 [AWT-EventQueue-1] ERROR net.sourceforge.squirrel_sql.plugins.hibernate.HibernateTabController - java.lang.RuntimeException: java.lang.reflect.InvocationTargetException But I've no idea how to solve the error. Jo -- View this message in context: http://www.nabble.com/Problems-with-hibernate-hibernate-spatial-tp19976421p19989174.html Sent from the squirrel-sql-users mailing list archive at Nabble.com. |
From: Gerd W. <ger...@t-...> - 2008-10-15 13:10:12
|
Jo_ wrote: > Caused by: java.lang.ClassNotFoundException: javax.persistence.JoinTable > at java.net.URLClassLoader$1.run(Unknown Source) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(Unknown Source) > at java.lang.ClassLoader.loadClass(Unknown Source) > at java.lang.ClassLoader.loadClass(Unknown Source) > at java.lang.ClassLoader.loadClassInternal(Unknown Source) > ... 22 more > > In the squirrel-sql.log file: > 1588031 [AWT-EventQueue-1] ERROR > net.sourceforge.squirrel_sql.plugins.hibernate.HibernateTabController - > java.lang.RuntimeException: java.lang.reflect.InvocationTargetException > > But I've no idea how to solve the error. The Java Persitence Api (JPA) classes are not in your SQuirreL-Hibernate classpath. Please add the appropriate Jar to the class path in your SQuirreL-Hibernate configuration. Note: If you you are able to run your Hibernate application at all you must already have these classes in your application class path. Gerd |