Hi!
I am using SQLiteDialect from code.google.com/p/hibernate-sqlite/.
This works perfectly from within the project. However when I use the Hibernate Tools I get
Code:
java.lang.NoSuchFieldError: INSTANCE
at org.hibernate.type.StandardBasicTypes.<clinit>(StandardBasicTypes.java:54)
at com.customlbs.persistence.SQLiteDialect.<init>(SQLiteDialect.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at org.hibernate.dialect.resolver.DialectFactory.constructDialect(DialectFactory.java:157)
at org.hibernate.dialect.resolver.DialectFactory.buildDialect(DialectFactory.java:109)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:146)
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2163)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2159)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1383)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954)
at org.hibernate.console.ConsoleConfiguration$5.execute(ConsoleConfiguration.java:278)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:107)
at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:273)
at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:43)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:100)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:106)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:235)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
I checked that the maven dependencies are added to the classpath of the "Console Configuration".
I see that there is in fact a " INSTANCE = new BooleanType();" in the BooleanType class in hibernate-core-4.1.4.Final.jar so I don't understand why it won't find that field. As far as I can tell there is no other hibernate-core jar.
Could this be a bug in Hibernate Tools?
Cheers, Markus
PS: Please be aware that I also posted this question at Stack Overflow
http://stackoverflow.com/questions/11089609/dialect-class-loading-issue-with-hibernate-tool