Announcement Announcement Module
Collapse
No announcement yet.
Spring JPA in Websphere - Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring JPA in Websphere -

    Hi,

    I am using this configuration and I am getting an error like this below.. I am not sure why this is error occuring

    java.lang.IllegalArgumentException: methods with same signature createEntityManager()



    <bean id="entityManagerFactory"
    class="org.springframework.orm.jpa.LocalEntityMana gerFactoryBean">
    <property name="persistenceUnitName" value="org.jbpm.persistence.jpa"/>
    </bean>



    <bean id="questionDaoImpl" class="com.att.scripting.ui.temp.QuestionDAOImpl"/>

    <bean class="org.springframework.orm.jpa.support.Persist enceAnnotationBeanPostProcessor"/>

    <bean class="org.springframework.dao.annotation.Persiste nceExceptionTranslationPostProcessor"/>


    <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionM anager">
    <property name="entityManagerFactory" ref="entityManagerFactory"/>
    </bean>

    <tx:annotation-driven />


    </beans>



    <persistence-unit name="org.jbpm.persistence.jpa" transaction-type="RESOURCE_LOCAL">

    <provider>org.hibernate.ejb.HibernatePersistence </provider>
    <jta-data-source>jdbc/Scripting</jta-data-source>

    <!-- <class>org.drools.persistence.info.SessionInfo</class>
    <class>org.jbpm.persistence.processinstance.Proces sInstanceInfo</class>
    <class>org.drools.persistence.info.WorkItemInfo</class>-->
    <class>classes.com.att.scripting.ui.temp.Questio n</class>
    <properties>
    <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
    <property name="hibernate.max_fetch_depth" value="3"/>
    <property name="hibernate.show_sql" value="true"/>
    <property name="hibernate.format_sql" value="false" />
    <property name="hibernate.hbm2ddl.auto" value="update" />
    <property name="hibernate.show_sql" value="true"/>
    <property name="hibernate.connection.pool_size" value="0"/>

    </properties>

    </persistence-unit>



    6/9/11 13:27:09:263 PDT] 00014cde ContextLoader E org.springframework.web.context.ContextLoader initWebApplicationContext Context initialization failed
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.dao.annotation.PersistenceExc eptionTranslationPostProcessor#0' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: methods with same signature createEntityManager() but incompatible return types: [interface com.ibm.websphere.persistence.WsJpaEntityManager, interface org.apache.openjpa.persistence.OpenJPAEntityManage rSPI]
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:527)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 95)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:292 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:198)
    at org.springframework.context.support.AbstractApplic ationContext.registerBeanPostProcessors(AbstractAp plicationContext.java:715)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:440)
    at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:294)
    at org.sp


    aused by: java.lang.IllegalArgumentException: methods with same signature createEntityManager() but incompatible return types: [interface com.ibm.websphere.persistence.WsJpaEntityManager, interface org.apache.openjpa.persistence.OpenJPAEntityManage rSPI]


    6/9/11 13:27:09:263 PDT] 00014cde webapp E com.ibm.ws.webcontainer.webapp.WebApp notifyServletContextCreated SRVE0283E: Exception caught while initializing context: {0}
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.dao.annotation.PersistenceExc eptionTranslationPostProcessor#0' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: methods with same signature createEntityManager() but incompatible return types: [interface com.ibm.websphere.persistence.WsJpaEntityManager, interface org.apache.openjpa.persistence.OpenJPAEntityManage rSPI]
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:527)aused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: methods with same signature createEntityManager() but incompatible return types: [interface com.ibm.websphere.persistence.WsJpaEntityManager, interface org.apache.openjpa.persistence.OpenJPAEntityManage rSPI]
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1420)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:519)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:456)
    aused by: java.lang.IllegalArgumentException: methods with same signature createEntityManager() but incompatible return types: [interface com.ibm.websphere.persistence.WsJpaEntityManager, interface org.apache.openjpa.persistence.OpenJPAEntityManage rSPI]
    at sun.misc.ProxyGenerator.checkReturnTypes(ProxyGene rator.java:669)
    at sun.misc.ProxyGenerator.generateClassFile(ProxyGen erator.java:420)


    at sun.misc.ProxyGenerator.checkReturnTypes(ProxyGene rator.java:669)
    at sun.misc.ProxyGenerator.generateClassFile(ProxyGen erator.java:420)
Working...
X