groovy + spring integration jpa: linkage error -


using spring integration jpa + groovy

i got following error:

could not instantiate bean class [org.springframework.integration.jpa.core.jpaexecutor]: constructor threw exception; nested exception java.lang.linkageerror: loader constraint violation: loader (instance of groovy/lang/groovyclassloader) initiated loading different type name "javax/persistence/lockmodetype"

here dependencies :

dependencies {

compile 'org.springframework.integration:spring-integration-jpa:3.0.4.release' compile 'org.apache.openjpa:openjpa:2.3.0' compile group: 'hsqldb', name: 'hsqldb', version: '1.8.0.10'     compile 'org.codehaus.groovy:groovy-all:2.3.6' 

}

here spring context :

<int-jpa:inbound-channel-adapter                 channel="jpainboundchannel"                 entity-manager="entitymanagerfactory"                 jpa-query="select p person p"                 auto-startup="true" >     <int:poller fixed-rate="2000">     </int:poller> </int-jpa:inbound-channel-adapter>  <bean id="transactionmanager" class="org.springframework.orm.jpa.jpatransactionmanager">     <constructor-arg ref="entitymanagerfactory" /> </bean>  <bean id="entitymanagerfactory"     class="org.springframework.orm.jpa.localcontainerentitymanagerfactorybean">     <property name="datasource"          ref="datasource" />     <property name="jpavendoradapter"    ref="vendoradaptor" />     <property name="packagestoscan"      value="com.univ"/>      </bean>  <jdbc:embedded-database id="datasource" type="hsql" />  <bean id="vendoradaptor" class="org.springframework.orm.jpa.vendor.openjpavendoradapter"     parent="abstractvendoradaptor"> </bean>   <bean id="abstractvendoradaptor" abstract="true">     <property name="generateddl" value="true" />     <property name="database"    value="hsql" />     <property name="showsql"     value="false"/> </bean>  <int:service-activator input-channel="jpainboundchannel" ref="service" method="method"></int:service-activator>  <bean id="service" class="com.univ.service" /> 

the groovy main programs contains :

applicationcontext ctx = new classpathxmlapplicationcontext("classpath:meta-inf/applicationcontext.xml")

what can ? thank you.


Comments