gwt-maven-plugin and hibernate -
gwt-maven-plugin and hibernate -
i'm having bit of weird issue here, basically, im using hibernate gwt, maven , gwt maven plugin.
however, hibernate fails during initialization next message:
[error] initial sessionfactory creation failed.org.hibernate.hibernateexception: not instantiate querytranslatorfactory: org.hibernate.hql.internal.ast.astquerytranslatorfactory
googling around shows me apparently related hibernate.jar beingness on classpath twice.
i don't exclusively understand how gwt plugin configures classpath. tried setting hibernate-core scope->provided , makes not include in /lib directory of package, but, still passes puts in classpath when running jetty?
this output mvn gwt:run -x
c:\program files\java\jdk1.6.0_27\jre\bin\java -xmx512m -classpath c:\develop\git-repositories\promocms\promocms\src\man\java; c:\develop\git-repositories\promocms\promocms\src\main\resources; c:\develop\git-repositories\promocms\promocms\target\promocms-1.0-snapshot\web-inf\classes; c:\users\secretusershyy\.m2\repository\com\google\gwt\gwt-servlet\2.4.0\gwt-servet-2.4.0.jar; c:\users\secretusershyy\.m2\repository\com\google\gwt\gwt-user\2.4.0\gwt-user-2.4.0.jar; c:\users\secretusershyy\.m\repository\org\hsqldb\hsqldb\2.2.6\hsqldb-2.2.6.jar; c:\users\secretusershyy\.m2\repository\org\hibernate\hibernate-core\4..1.final\hibernate-core-4.0.1.final.jar; c:\users\secretusershyy\.m2\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar; c:\users\secretusershyy\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar; c:\users\secretusershyy.m2\repository\org\jboss\spec\javax\transaction\jboss-transaction-api_1.1_spec\1.0.0.final\jboss-transaction-api_1.1_spc-1.0.0.final.jar; c:\users\secretusershyy\.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar; c:\users\secretusershyy\.m2\repositoy\xml-apis\xml-apis\1.0.b2\xml-apis-1.0.b2.jar; c:\users\secretusershyy\.m2\repository\org\hibernate\javax\persistence\hiberate-jpa-2.0-api\1.0.1.final\hibernate-jpa-2.0-api-1.0.1.final.jar; c:\users\secretusershyy\.m2\repository\org\jboss\logging\boss-logging\3.1.0.cr2\jboss-logging-3.1.0.cr2.jar; c:\users\secretusershyy\.m2\repository\org\javassist\javassist\3.15.0-gajavassist-3.15.0-ga.jar; c:\users\secretusershyy\.m2\repository\org\hibernate\common\hibernate-commons-annotations\4.0.1.finl\hibernate-commons-annotations-4.0.1.final.jar; c:\users\secretusershyy\.m2\repository\org\slf4j\slf4j-api\1.6.4\slf4j-api-.6.4.jar; c:\users\secretusershyy\.m2\repository\log4j\log4j\1.2.16\log4j-1.2.16.jar;c:\users\secretusershyy\.m2\repository\com\google\gwt\gwt-user\2.4.0\gwt-user-2.4.0.jar; c:\users\secretusershyy\.m2\repository\javax\validation\validation-api\1.0.0.gavalidation-api-1.0.0.ga.jar; c:\users\secretusershyy\.m2\repository\javax\validation\validation-api\1.0.0.ga\validation-api-1.0.0.ga-sources.jar; c:\users\secretusershyy\.m2\repository\com\google\gwt\gwt-dev\2.4.0\gwt-dev-2.4.0.jar com.google.gwt.de.devmode -war c:\develop\git-repositories\promocms\promocms\target\promocms-1.0-snapshot -gen c:\develop\git-repositoris\promocms\promocms\target\.generated -loglevel info -port 8888 -startupurl promocms.html mrkt.promocms.gwt.promocms
any help on 1 appreciated if have managed gwt , maven , hibernate play nice together.
update think i'm going wrong way this, meaning, don't think due duplicate jar files on class path anyway.
basically, added hibernate-core 4.0.1 dependency, if downgrade 3.6.0 , works fine.
depending on selection of hql parser implementation. alter property name follows:
<property name="hibernate.query.factory_class">org.hibernate.hql.internal.classic.classicquerytranslatorfactory</property>
or
<property name="hibernate.query.factory_class">org.hibernate.hql.internal.ast.astquerytranslatorfactory</property>
see 6th point in whats's new? section hibernate 4.0 link
hibernate gwt maven gwt-maven-plugin
Comments
Post a Comment