OpenJPA
  1. OpenJPA
  2. OPENJPA-211

CLONE -java.lang.VerifyError on websphere 6.1 with Spring 2.0.3 and OpenJpa 0.96/0.97

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Cannot Reproduce
    • Affects Version/s: 0.9.6
    • Fix Version/s: 1.0.2
    • Component/s: kernel
    • Labels:
      None
    • Environment:
      Using OpenJPA (openjpa-all-0.9.6-incubating.jar) in Rational Developer 7 ( Websphere 6.1 test environment ) connected to DB2 V9.1.
      OS: WinXP SP2

      Description

      Hi, if I use the OpenJPA shipped with Spring 2.0.3, I got the following error when start application:
      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.VerifyError: class loading constraint violated (class: org/apache/openjpa/kernel/BrokerImpl method: newQueryImpl(Ljava/lang/String;Lorg/apache/openjpa/kernel/StoreQuery;)Lorg/apache/openjpa/kernel/QueryImpl at pc: 0
      Caused by:
      java.lang.VerifyError: class loading constraint violated (class: org/apache/openjpa/kernel/BrokerImpl method: newQueryImpl(Ljava/lang/String;Lorg/apache/openjpa/kernel/StoreQuery;)Lorg/apache/openjpa/kernel/QueryImpl at pc: 0
      at java.lang.J9VMInternals.verifyImpl(Native Method)
      at java.lang.J9VMInternals.verify(J9VMInternals.java:59)
      at java.lang.J9VMInternals.initialize(J9VMInternals.java:120)
      at java.lang.Class.forNameImpl(Native Method)
      at java.lang.Class.forName(Class.java:131)
      at org.apache.openjpa.conf.OpenJPAConfigurationImpl.class$(OpenJPAConfigurationImpl.java:65)
      at org.apache.openjpa.conf.OpenJPAConfigurationImpl.<init>(OpenJPAConfigurationImpl.java:182)
      at org.apache.openjpa.conf.OpenJPAConfigurationImpl.<init>(OpenJPAConfigurationImpl.java:154)
      at org.apache.openjpa.conf.OpenJPAConfigurationImpl.<init>(OpenJPAConfigurationImpl.java:145)
      at org.apache.openjpa.persistence.PersistenceProviderImpl$ClassTransformerImpl.<init>(PersistenceProviderImpl.java:114)
      at org.apache.openjpa.persistence.PersistenceProviderImpl$ClassTransformerImpl.<init>(PersistenceProviderImpl.java:106)
      at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:92)
      at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:214)
      at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:251)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1143)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1110)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:431)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:254)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:144)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:251)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:163)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:244)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:233)
      at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:205)
      at org.springframework.beans.factory.BeanFactoryUtils.beanOfTypeIncludingAncestors(BeanFactoryUtils.java:292)
      at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findDefaultEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:411)
      at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:374)
      at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$AnnotatedMember.resolveEntityManager(PersistenceAnnotationBeanPostProcessor.java:541)
      at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$AnnotatedMember.resolve(PersistenceAnnotationBeanPostProcessor.java:512)
      at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$AnnotatedMember.inject(PersistenceAnnotationBeanPostProcessor.java:449)
      at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessAfterInstantiation(PersistenceAnnotationBeanPostProcessor.java:239)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:418)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:254)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:144)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:251)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:163)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
      at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:241)
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
      at com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:621)
      at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:275)
      at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:273)
      at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:88)
      at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157)
      at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:655)
      at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:608)
      at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:333)
      at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:549)
      at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1312)
      at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1129)
      at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:569)
      at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:814)
      at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:965)
      at com.ibm.ws.runtime.component.ApplicationMgrImpl$1.run(ApplicationMgrImpl.java:1495)
      at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:3874)
      at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:3951)
      at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:245)
      at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1500)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:62)
      at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:265)
      at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1089)
      at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:971)
      at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231)
      at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802)
      at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1080)
      at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
      at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:973)
      at com.ibm.ws.management.application.sync.StartDeploymentTask.startDeployment(StartDeploymentTask.java:196)
      at com.ibm.ws.management.application.sync.StartDeploymentTask.fullAppUpdate(StartDeploymentTask.java:92)
      at com.ibm.ws.management.application.sync.StartDeploymentTask.performTask(StartDeploymentTask.java:81)
      at com.ibm.ws.management.application.sync.AppBinaryProcessor$AppBinThread.run(AppBinaryProcessor.java:840)
      at com.ibm.ws.management.application.sync.AppBinaryProcessor.postProcess(AppBinaryProcessor.java:603)
      at com.ibm.ws.management.application.sync.AppBinaryProcessor._onChangeCompletion(AppBinaryProcessor.java:413)
      at com.ibm.ws.management.application.sync.AppBinaryProcessor$2.run(AppBinaryProcessor.java:385)
      at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
      at com.ibm.ws.management.application.sync.AppBinaryProcessor.onChangeCompletion(AppBinaryProcessor.java:372)
      at com.ibm.ws.management.repository.FileRepository.postNotify(FileRepository.java:1722)
      at com.ibm.ws.management.repository.FileRepository.update(FileRepository.java:1268)
      at com.ibm.ws.management.repository.client.LocalConfigRepositoryClient.update(LocalConfigRepositoryClient.java:189)
      at com.ibm.ws.sm.workspace.impl.WorkSpaceMasterRepositoryAdapter.update(WorkSpaceMasterRepositoryAdapter.java:578)
      at com.ibm.ws.sm.workspace.impl.RepositoryContextImpl.update(RepositoryContextImpl.java:1778)
      at com.ibm.ws.sm.workspace.impl.RepositoryContextImpl.synch(RepositoryContextImpl.java:1724)
      at com.ibm.ws.sm.workspace.impl.WorkSpaceImpl.synch(WorkSpaceImpl.java:470)
      at com.ibm.ws.management.application.task.ConfigRepoHelper.removeWorkSpace(ConfigRepoHelper.java:152)
      at com.ibm.ws.management.application.SchedulerImpl.cleanup(SchedulerImpl.java:378)
      at com.ibm.ws.management.application.SchedulerImpl.run(SchedulerImpl.java:284)
      at java.lang.Thread.run(Thread.java:797)

      If I change to the latest openjpa 0.96 or 0.97 jar files downloaded from openjpa, I got the following error:

      12:18:11,140 ERROR ContextLoader:200 - Context initialization failed
      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is <0.9.7-incubating-SNAPSHOT fatal user error> org.apache.openjpa.persistence.ArgumentException: Could not invoke the static newInstance method on the named factory class "org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory".
      Caused by:
      <0.9.7-incubating-SNAPSHOT fatal user error> org.apache.openjpa.persistence.ArgumentException: Could not invoke the static newInstance method on the named factory class "org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory".
      at org.apache.openjpa.kernel.Bootstrap.newBrokerFactory(Bootstrap.java:65)
      at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:105)
      at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:214)
      at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:251)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1143)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1110)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:431)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:254)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:144)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:251)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:163)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:244)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:233)
      at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:205)
      at org.springframework.beans.factory.BeanFactoryUtils.beanOfTypeIncludingAncestors(BeanFactoryUtils.java:292)
      at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findDefaultEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:411)
      at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:374)
      at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$AnnotatedMember.resolveEntityManager(PersistenceAnnotationBeanPostProcessor.java:541)
      at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$AnnotatedMember.resolve(PersistenceAnnotationBeanPostProcessor.java:512)
      at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$AnnotatedMember.inject(PersistenceAnnotationBeanPostProcessor.java:449)
      at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessAfterInstantiation(PersistenceAnnotationBeanPostProcessor.java:239)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:418)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:254)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:144)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:251)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:163)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
      at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:241)
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
      at com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:621)
      at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:275)
      at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:273)
      at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:88)
      at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157)
      at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:655)
      at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:608)
      at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:333)
      at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:549)
      at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1312)
      at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1129)
      at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:569)
      at com.ibm.ws.runtime.component.ApplicationMgrImpl.startModule(ApplicationMgrImpl.java:1779)
      at com.ibm.ws.runtime.component.ApplicationMgrImpl._startModule(ApplicationMgrImpl.java:1727)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:62)
      at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:265)
      at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1089)
      at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:971)
      at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231)
      at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802)
      at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1080)
      at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
      at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:973)
      at com.ibm.ws.management.application.sync.StartDeploymentTask.startDeployment(StartDeploymentTask.java:196)
      at com.ibm.ws.management.application.sync.StartDeploymentTask.fineGrainUpdate(StartDeploymentTask.java:149)
      at com.ibm.ws.management.application.sync.StartDeploymentTask.performTask(StartDeploymentTask.java:79)
      at com.ibm.ws.management.application.sync.AppBinaryProcessor$AppBinThread.run(AppBinaryProcessor.java:840)
      at com.ibm.ws.management.application.sync.AppBinaryProcessor.postProcess(AppBinaryProcessor.java:603)
      at com.ibm.ws.management.application.sync.AppBinaryProcessor._onChangeCompletion(AppBinaryProcessor.java:413)
      at com.ibm.ws.management.application.sync.AppBinaryProcessor$2.run(AppBinaryProcessor.java:385)
      at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
      at com.ibm.ws.management.application.sync.AppBinaryProcessor.onChangeCompletion(AppBinaryProcessor.java:372)
      at com.ibm.ws.management.repository.FileRepository.postNotify(FileRepository.java:1722)
      at com.ibm.ws.management.repository.FileRepository.update(FileRepository.java:1268)
      at com.ibm.ws.management.repository.client.LocalConfigRepositoryClient.update(LocalConfigRepositoryClient.java:189)
      at com.ibm.ws.sm.workspace.impl.WorkSpaceMasterRepositoryAdapter.update(WorkSpaceMasterRepositoryAdapter.java:578)
      at com.ibm.ws.sm.workspace.impl.RepositoryContextImpl.update(RepositoryContextImpl.java:1778)
      at com.ibm.ws.sm.workspace.impl.RepositoryContextImpl.synch(RepositoryContextImpl.java:1724)
      at com.ibm.ws.sm.workspace.impl.WorkSpaceImpl.synch(WorkSpaceImpl.java:470)
      at com.ibm.ws.management.application.task.ConfigRepoHelper.removeWorkSpace(ConfigRepoHelper.java:152)
      at com.ibm.ws.management.application.SchedulerImpl.cleanup(SchedulerImpl.java:378)
      at com.ibm.ws.management.application.SchedulerImpl.run(SchedulerImpl.java:284)
      at java.lang.Thread.run(Thread.java:797)
      Caused by:
      java.lang.IllegalArgumentException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at org.apache.openjpa.kernel.Bootstrap.invokeFactory(Bootstrap.java:117)
      at org.apache.openjpa.kernel.Bootstrap.newBrokerFactory(Bootstrap.java:57)
      ... 82 more

      1. persistence.xml
        1 kB
        david zhang
      2. persistence.xml
        2 kB
        david zhang
      3. mytestdata.jar
        10 kB
        david zhang
      4. applicationContext.xml
        4 kB
        david zhang
      5. applicationContext.xml
        4 kB
        david zhang

        Issue Links

          Activity

          Hide
          david zhang added a comment -

          It's blocking my development, please help ASAP, please.

          Show
          david zhang added a comment - It's blocking my development, please help ASAP, please.
          Hide
          david zhang added a comment -

          In org.apache.openjpa.kernel.Bootstrap.java, line 117: return (BrokerFactory) meth.invoke(null, new Object[]

          { conf }

          );
          very curious how it works. The null will return every call back as exception. the first parameter should be a non-null instance, which make sense.

          Correct me if I'm wrong.

          Show
          david zhang added a comment - In org.apache.openjpa.kernel.Bootstrap.java, line 117: return (BrokerFactory) meth.invoke(null, new Object[] { conf } ); very curious how it works. The null will return every call back as exception. the first parameter should be a non-null instance, which make sense. Correct me if I'm wrong.
          Hide
          Patrick Linskey added a comment -

          Provided that meth is a static method, this method should run with no problem.

          The code here is bootstrapping code to create new BrokerFactories; one (woefully-underdocumented) part of the BrokerFactory contract is that implementations must have static newInstance() and getInstance() methods.

          Show
          Patrick Linskey added a comment - Provided that meth is a static method, this method should run with no problem. The code here is bootstrapping code to create new BrokerFactories; one (woefully-underdocumented) part of the BrokerFactory contract is that implementations must have static newInstance() and getInstance() methods.
          Hide
          david zhang added a comment -

          Sorry, forget my previous comment. Yes, the first parameter can be null if it is a static method. But I still get the same exception.

          Show
          david zhang added a comment - Sorry, forget my previous comment. Yes, the first parameter can be null if it is a static method. But I still get the same exception.
          Hide
          david zhang added a comment -

          the JDBCBrokerFactory.newInstance method need argument type ConfigurationProvider, howerver, the actual instance is new Object(){PersistenceProductDerivation.ConfigurationProviderImpl is a static inner class. Is this the problem.

          Show
          david zhang added a comment - the JDBCBrokerFactory.newInstance method need argument type ConfigurationProvider, howerver, the actual instance is new Object(){PersistenceProductDerivation.ConfigurationProviderImpl is a static inner class. Is this the problem.
          Hide
          david zhang added a comment -

          I've posted my config files. I'm using JTA, why I get a JDBCBrokerFactory? Is there some config I can change to other working BrokerFactory?

          Show
          david zhang added a comment - I've posted my config files. I'm using JTA, why I get a JDBCBrokerFactory? Is there some config I can change to other working BrokerFactory?
          Hide
          david zhang added a comment -

          Run out of ideas, the problem still is there:
          [4/9/07 21:57:26:593 EDT] 00000013 SystemOut O 21:57:26,593 DEBUG Runtime:69 - Setting the following properties from "?" into configuration:

          {openjpa.ConnectionFactory=com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource@ca9624d5, openjpa.MetaDataFactory=Types=com.dztest.jpa.domain.Address;com.dztest.jpa.domain.Entree;com.dztest.jpa.domain.Restaurant, openjpa.jdbc.DBDictionary=db2, javax.persistence.provider=org.apache.openjpa.persistence.PersistenceProviderImpl, openjpa.Log=log4j, openjpa.BrokerImpl=default, openjpa.LockManager=pessimistic(VersionCheckOnReadLock=true,VersionUpdateOnWriteLock=true), openjpa.TransactionMode=managed, openjpa.ConnectionFactory2=com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource@ca9624d5, openjpa.ConnectionFactoryMode=managed, openjpa.ClassResolver=org.apache.openjpa.persistence.PersistenceUnitInfoImpl$ClassResolverImpl@71647164}

          [4/9/07 21:57:26:843 EDT] 00000013 SystemOut O 21:57:26,828 ERROR ContextLoader:200 - Context initialization failed
          org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is <4|true|0.0.0> org.apache.openjpa.persistence.ArgumentException: Could not invoke the static newInstance method on the named factory class "org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory".
          Caused by:
          <4|true|0.0.0> org.apache.openjpa.persistence.ArgumentException: Could not invoke the static newInstance method on the named factory class "org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory".
          at org.apache.openjpa.kernel.Bootstrap.newBrokerFactory(Bootstrap.java:65)
          at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:95)
          at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:214)
          at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:251)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1143)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1110)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:431)
          at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:254)
          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:144)
          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:251)
          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:163)
          at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:281)
          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
          at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:241)
          at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
          at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
          at com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:621)
          at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:275)
          at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:273)
          at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:88)
          at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157)
          at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:655)
          at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:608)
          at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:333)
          at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:549)
          at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1312)
          at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1129)
          at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:569)
          at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:814)
          at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:965)
          at com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(ApplicationMgrImpl.java:2131)
          at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:340)
          at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
          Caused by:
          java.lang.IllegalArgumentException
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:615)
          at org.apache.openjpa.kernel.Bootstrap.invokeFactory(Bootstrap.java:117)
          at org.apache.openjpa.kernel.Bootstrap.newBrokerFactory(Bootstrap.java:57)
          ... 32 more

          Show
          david zhang added a comment - Run out of ideas, the problem still is there: [4/9/07 21:57:26:593 EDT] 00000013 SystemOut O 21:57:26,593 DEBUG Runtime:69 - Setting the following properties from "?" into configuration: {openjpa.ConnectionFactory=com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource@ca9624d5, openjpa.MetaDataFactory=Types=com.dztest.jpa.domain.Address;com.dztest.jpa.domain.Entree;com.dztest.jpa.domain.Restaurant, openjpa.jdbc.DBDictionary=db2, javax.persistence.provider=org.apache.openjpa.persistence.PersistenceProviderImpl, openjpa.Log=log4j, openjpa.BrokerImpl=default, openjpa.LockManager=pessimistic(VersionCheckOnReadLock=true,VersionUpdateOnWriteLock=true), openjpa.TransactionMode=managed, openjpa.ConnectionFactory2=com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource@ca9624d5, openjpa.ConnectionFactoryMode=managed, openjpa.ClassResolver=org.apache.openjpa.persistence.PersistenceUnitInfoImpl$ClassResolverImpl@71647164} [4/9/07 21:57:26:843 EDT] 00000013 SystemOut O 21:57:26,828 ERROR ContextLoader:200 - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml] : Invocation of init method failed; nested exception is <4|true|0.0.0> org.apache.openjpa.persistence.ArgumentException: Could not invoke the static newInstance method on the named factory class "org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory". Caused by: <4|true|0.0.0> org.apache.openjpa.persistence.ArgumentException: Could not invoke the static newInstance method on the named factory class "org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory". at org.apache.openjpa.kernel.Bootstrap.newBrokerFactory(Bootstrap.java:65) at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:95) at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:214) at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:251) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1143) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1110) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:431) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:254) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:144) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:251) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:163) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:281) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:241) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) at com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:621) at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:275) at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:273) at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:88) at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157) at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:655) at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:608) at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:333) at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:549) at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1312) at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1129) at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:569) at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:814) at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:965) at com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(ApplicationMgrImpl.java:2131) at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:340) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469) Caused by: java.lang.IllegalArgumentException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.apache.openjpa.kernel.Bootstrap.invokeFactory(Bootstrap.java:117) at org.apache.openjpa.kernel.Bootstrap.newBrokerFactory(Bootstrap.java:57) ... 32 more
          Hide
          david zhang added a comment -
          Show
          david zhang added a comment - Resolved referring http://issues.apache.org/jira/browse/OPENJPA-40 .
          Hide
          david zhang added a comment -

          Hi, Patrick, do you have any working persistence.xml with DB2 on WebSphere 6.1 using DataSource? Getting all kind of IllegalArgumentException really frustrate me.

          Show
          david zhang added a comment - Hi, Patrick, do you have any working persistence.xml with DB2 on WebSphere 6.1 using DataSource? Getting all kind of IllegalArgumentException really frustrate me.
          Hide
          david zhang added a comment -

          After fix all the problem, now the application get this error:
          [4/10/07 17:56:26:046 EDT] 00000026 Runtime I org.apache.openjpa.lib.log.CommonsLogFactory$LogAdapter info Starting OpenJPA 0.0.0
          [4/10/07 17:56:26:109 EDT] 00000026 JDBC I org.apache.openjpa.lib.log.CommonsLogFactory$LogAdapter info Using dictionary class "org.apache.openjpa.jdbc.sql.DB2Dictionary".
          [4/10/07 17:56:26:171 EDT] 00000026 ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the service methods of the servlet: mytest. Exception thrown : org.springframework.web.util.NestedServletException: Request processing failed; nested exception is <4|false|0.0.0> org.apache.openjpa.persistence.TransactionRequiredException: Unable to determine identity of the current WebSphere managed transaction. Please ensure that your are running the application from within WebSphere Application Server (version 5.0.2 or newer).
          Caused by: <4|false|0.0.0> org.apache.openjpa.persistence.TransactionRequiredException: Unable to determine identity of the current WebSphere managed transaction. Please ensure that your are running the application from within WebSphere Application Server (version 5.0.2 or newer).
          at org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getStatus(WASManagedRuntime.java:106)
          at org.apache.openjpa.kernel.AbstractBrokerFactory.syncWithManagedTransaction(AbstractBrokerFactory.java:601)
          at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:292)
          at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:165)
          at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:139)
          at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:187)
          at com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:17)
          at com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:8)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:615)
          at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean$ManagedEntityManagerFactoryInvocationHandler.invoke(AbstractEntityManagerFactoryBean.java:376)
          at $Proxy25.createEntityManager(Unknown Source)
          at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:168)
          at $Proxy26.find(Unknown Source)
          at com.dztest.jpa.dao.JpaRestaurantDao.findById(JpaRestaurantDao.java:29)
          at com.dztest.services.RestaurantServiceImpl.getRestaurant(RestaurantServiceImpl.java:15)
          at com.dztest.web.actions.TestAction.showRestaurant(TestAction.java:19)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:615)
          at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:434)
          at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:372)
          at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
          at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
          at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:819)
          at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:754)
          at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:399)
          at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:354)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
          at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989)
          at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:501)
          at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
          at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3168)
          at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:254)
          at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
          at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
          at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:96)
          at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
          at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
          at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)
          at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
          at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
          at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
          at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
          at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
          at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
          at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
          at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
          at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
          at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
          Caused by: <4|false|0.0.0> org.apache.openjpa.persistence.InvalidStateException: An error occured reflecting WebSphere proprietary interfaces. Please ensure that you are running the application from within WebSphere Application Server (version 5.0.2 or newer).
          at org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getGlobalId(WASManagedRuntime.java:154)
          at org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getStatus(WASManagedRuntime.java:100)
          ... 53 more
          Caused by: java.lang.IllegalArgumentException
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:615)
          at org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getGlobalId(WASManagedRuntime.java:152)
          ... 54 more
          ---- Begin backtrace for Nested Throwables
          <4|false|0.0.0> org.apache.openjpa.persistence.TransactionRequiredException: Unable to determine identity of the current WebSphere managed transaction. Please ensure that your are running the application from within WebSphere Application Server (version 5.0.2 or newer).
          at org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getStatus(WASManagedRuntime.java:106)
          at org.apache.openjpa.kernel.AbstractBrokerFactory.syncWithManagedTransaction(AbstractBrokerFactory.java:601)
          at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:292)
          at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:165)
          at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:139)
          at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:187)
          at com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:17)
          at com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:8)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:615)
          at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean$ManagedEntityManagerFactoryInvocationHandler.invoke(AbstractEntityManagerFactoryBean.java:376)
          at $Proxy25.createEntityManager(Unknown Source)
          at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:168)
          at $Proxy26.find(Unknown Source)
          at com.dztest.jpa.dao.JpaRestaurantDao.findById(JpaRestaurantDao.java:29)
          at com.dztest.services.RestaurantServiceImpl.getRestaurant(RestaurantServiceImpl.java:15)
          at com.dztest.web.actions.TestAction.showRestaurant(TestAction.java:19)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:615)
          at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:434)
          at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:372)
          at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
          at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
          at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:819)
          at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:754)
          at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:399)
          at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:354)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
          at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989)
          at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:501)
          at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
          at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3168)
          at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:254)
          at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
          at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
          at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:96)
          at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
          at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
          at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)
          at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
          at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
          at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
          at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
          at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
          at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
          at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
          at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
          at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
          at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
          Caused by: <4|false|0.0.0> org.apache.openjpa.persistence.InvalidStateException: An error occured reflecting WebSphere proprietary interfaces. Please ensure that you are running the application from within WebSphere Application Server (version 5.0.2 or newer).
          at org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getGlobalId(WASManagedRuntime.java:154)
          at org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getStatus(WASManagedRuntime.java:100)
          ... 53 more
          Caused by: java.lang.IllegalArgumentException
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:615)
          at org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getGlobalId(WASManagedRuntime.java:152)
          ... 54 more

          [4/10/07 17:56:26:265 EDT] 00000026 WebApp E [Servlet Error]-[mytest]: <4|false|0.0.0> org.apache.openjpa.persistence.TransactionRequiredException: Unable to determine identity of the current WebSphere managed transaction. Please ensure that your are running the application from within WebSphere Application Server (version 5.0.2 or newer).
          at org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getStatus(WASManagedRuntime.java:106)
          at org.apache.openjpa.kernel.AbstractBrokerFactory.syncWithManagedTransaction(AbstractBrokerFactory.java:601)
          at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:292)
          at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:165)
          at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:139)
          at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:187)
          at com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:17)
          at com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:8)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:615)
          at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean$ManagedEntityManagerFactoryInvocationHandler.invoke(AbstractEntityManagerFactoryBean.java:376)
          at $Proxy25.createEntityManager(Unknown Source)
          at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:168)
          at $Proxy26.find(Unknown Source)
          at com.dztest.jpa.dao.JpaRestaurantDao.findById(JpaRestaurantDao.java:29)
          at com.dztest.services.RestaurantServiceImpl.getRestaurant(RestaurantServiceImpl.java:15)
          at com.dztest.web.actions.TestAction.showRestaurant(TestAction.java:19)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:615)
          at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:434)
          at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:372)
          at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
          at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
          at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:819)
          at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:754)
          at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:399)
          at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:354)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
          at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989)
          at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:501)
          at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
          at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3168)
          at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:254)
          at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
          at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
          at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:96)
          at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
          at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
          at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)
          at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
          at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
          at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
          at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
          at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
          at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
          at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
          at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
          at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
          at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
          Caused by: <4|false|0.0.0> org.apache.openjpa.persistence.InvalidStateException: An error occured reflecting WebSphere proprietary interfaces. Please ensure that you are running the application from within WebSphere Application Server (version 5.0.2 or newer).
          at org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getGlobalId(WASManagedRuntime.java:154)
          at org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getStatus(WASManagedRuntime.java:100)
          ... 53 more
          Caused by: java.lang.IllegalArgumentException
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:615)
          at org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getGlobalId(WASManagedRuntime.java:152)
          ... 54 more

          Show
          david zhang added a comment - After fix all the problem, now the application get this error: [4/10/07 17:56:26:046 EDT] 00000026 Runtime I org.apache.openjpa.lib.log.CommonsLogFactory$LogAdapter info Starting OpenJPA 0.0.0 [4/10/07 17:56:26:109 EDT] 00000026 JDBC I org.apache.openjpa.lib.log.CommonsLogFactory$LogAdapter info Using dictionary class "org.apache.openjpa.jdbc.sql.DB2Dictionary". [4/10/07 17:56:26:171 EDT] 00000026 ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the service methods of the servlet: mytest. Exception thrown : org.springframework.web.util.NestedServletException: Request processing failed; nested exception is <4|false|0.0.0> org.apache.openjpa.persistence.TransactionRequiredException: Unable to determine identity of the current WebSphere managed transaction. Please ensure that your are running the application from within WebSphere Application Server (version 5.0.2 or newer). Caused by: <4|false|0.0.0> org.apache.openjpa.persistence.TransactionRequiredException: Unable to determine identity of the current WebSphere managed transaction. Please ensure that your are running the application from within WebSphere Application Server (version 5.0.2 or newer). at org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getStatus(WASManagedRuntime.java:106) at org.apache.openjpa.kernel.AbstractBrokerFactory.syncWithManagedTransaction(AbstractBrokerFactory.java:601) at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:292) at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:165) at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:139) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:187) at com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:17) at com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:8) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean$ManagedEntityManagerFactoryInvocationHandler.invoke(AbstractEntityManagerFactoryBean.java:376) at $Proxy25.createEntityManager(Unknown Source) at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:168) at $Proxy26.find(Unknown Source) at com.dztest.jpa.dao.JpaRestaurantDao.findById(JpaRestaurantDao.java:29) at com.dztest.services.RestaurantServiceImpl.getRestaurant(RestaurantServiceImpl.java:15) at com.dztest.web.actions.TestAction.showRestaurant(TestAction.java:19) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:434) at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:372) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:819) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:754) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:399) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:354) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:501) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3168) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:254) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:96) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213) at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469) Caused by: <4|false|0.0.0> org.apache.openjpa.persistence.InvalidStateException: An error occured reflecting WebSphere proprietary interfaces. Please ensure that you are running the application from within WebSphere Application Server (version 5.0.2 or newer). at org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getGlobalId(WASManagedRuntime.java:154) at org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getStatus(WASManagedRuntime.java:100) ... 53 more Caused by: java.lang.IllegalArgumentException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getGlobalId(WASManagedRuntime.java:152) ... 54 more ---- Begin backtrace for Nested Throwables <4|false|0.0.0> org.apache.openjpa.persistence.TransactionRequiredException: Unable to determine identity of the current WebSphere managed transaction. Please ensure that your are running the application from within WebSphere Application Server (version 5.0.2 or newer). at org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getStatus(WASManagedRuntime.java:106) at org.apache.openjpa.kernel.AbstractBrokerFactory.syncWithManagedTransaction(AbstractBrokerFactory.java:601) at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:292) at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:165) at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:139) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:187) at com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:17) at com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:8) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean$ManagedEntityManagerFactoryInvocationHandler.invoke(AbstractEntityManagerFactoryBean.java:376) at $Proxy25.createEntityManager(Unknown Source) at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:168) at $Proxy26.find(Unknown Source) at com.dztest.jpa.dao.JpaRestaurantDao.findById(JpaRestaurantDao.java:29) at com.dztest.services.RestaurantServiceImpl.getRestaurant(RestaurantServiceImpl.java:15) at com.dztest.web.actions.TestAction.showRestaurant(TestAction.java:19) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:434) at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:372) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:819) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:754) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:399) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:354) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:501) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3168) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:254) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:96) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213) at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469) Caused by: <4|false|0.0.0> org.apache.openjpa.persistence.InvalidStateException: An error occured reflecting WebSphere proprietary interfaces. Please ensure that you are running the application from within WebSphere Application Server (version 5.0.2 or newer). at org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getGlobalId(WASManagedRuntime.java:154) at org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getStatus(WASManagedRuntime.java:100) ... 53 more Caused by: java.lang.IllegalArgumentException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getGlobalId(WASManagedRuntime.java:152) ... 54 more [4/10/07 17:56:26:265 EDT] 00000026 WebApp E [Servlet Error] - [mytest] : <4|false|0.0.0> org.apache.openjpa.persistence.TransactionRequiredException: Unable to determine identity of the current WebSphere managed transaction. Please ensure that your are running the application from within WebSphere Application Server (version 5.0.2 or newer). at org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getStatus(WASManagedRuntime.java:106) at org.apache.openjpa.kernel.AbstractBrokerFactory.syncWithManagedTransaction(AbstractBrokerFactory.java:601) at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:292) at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:165) at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:139) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:187) at com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:17) at com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:8) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean$ManagedEntityManagerFactoryInvocationHandler.invoke(AbstractEntityManagerFactoryBean.java:376) at $Proxy25.createEntityManager(Unknown Source) at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:168) at $Proxy26.find(Unknown Source) at com.dztest.jpa.dao.JpaRestaurantDao.findById(JpaRestaurantDao.java:29) at com.dztest.services.RestaurantServiceImpl.getRestaurant(RestaurantServiceImpl.java:15) at com.dztest.web.actions.TestAction.showRestaurant(TestAction.java:19) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:434) at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:372) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:819) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:754) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:399) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:354) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:501) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3168) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:254) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:96) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213) at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469) Caused by: <4|false|0.0.0> org.apache.openjpa.persistence.InvalidStateException: An error occured reflecting WebSphere proprietary interfaces. Please ensure that you are running the application from within WebSphere Application Server (version 5.0.2 or newer). at org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getGlobalId(WASManagedRuntime.java:154) at org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getStatus(WASManagedRuntime.java:100) ... 53 more Caused by: java.lang.IllegalArgumentException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.apache.openjpa.ee.WASManagedRuntime$WASTransaction.getGlobalId(WASManagedRuntime.java:152) ... 54 more
          Hide
          Patrick Linskey added a comment -

          Sadly, I'm not really up-to-speed on the WebSphere integration stuff in OpenJPA. Maybe Mike or David or Kevin have some suggestions?

          Show
          Patrick Linskey added a comment - Sadly, I'm not really up-to-speed on the WebSphere integration stuff in OpenJPA. Maybe Mike or David or Kevin have some suggestions?
          Hide
          Michael Dick added a comment -

          It looks like WASManagedRuntime is having trouble finding the WebSphere specific transaction classes.

          Are you still running in the embedded test environment in RAD or does the problem occur on a standalone WebSphere server? RAD handles the classpath a little differently (or at least it used to back in version 5) and that might contribute to the problem. Have you changed any of the classloader settings (ie PARENT_LAST)?

          Show
          Michael Dick added a comment - It looks like WASManagedRuntime is having trouble finding the WebSphere specific transaction classes. Are you still running in the embedded test environment in RAD or does the problem occur on a standalone WebSphere server? RAD handles the classpath a little differently (or at least it used to back in version 5) and that might contribute to the problem. Have you changed any of the classloader settings (ie PARENT_LAST)?
          Hide
          david zhang added a comment -

          Yes, I'm running within embeded WAS server and change to PARENT_LAST.

          Show
          david zhang added a comment - Yes, I'm running within embeded WAS server and change to PARENT_LAST.
          Hide
          david zhang added a comment -

          It seems WAS has no problem finding the implementation class: com.ibm.ws.jtaextensions.ExtendedJTATransactionImpl@3940394.
          This code:
          InitialContext ic = null;
          try

          { ic = new InitialContext(); ExtendedJTATransaction tran = (ExtendedJTATransaction) ic.lookup("java:comp/websphere/ExtendedJTATransaction"); System.out.println(tran.getClass()); System.out.println(tran.getGlobalId()); System.out.println(tran.getLocalId()); }

          catch(Exception e)

          { e.printStackTrace(); }

          has no problem return class name, with global trans id with null and local tran id with 0.
          However, in WASManagerRuntime, the method
          rval = (byte[]) _getGlobalId.invoke(_extendedTransaction, null);
          return IllegalArgumentException.
          Now I create a DB2 XA datasource, change the application CL to parent_last, then parent_first. Copy ibm was 6.1_runtime.jar in ear and java and web projects depend on this jar. Still doesn't work.
          However, this happened when Spring want to call OpenJPA transactionManager to start a transaction. However, the global transaction is not there. So the globalId is null and localId is 0. Am I missing something? I have a WAS DataSource connect to DB2 without problem. And the resource reference within the web application has no problem. (tested). So Why there's no transaction withing this thread?

          Show
          david zhang added a comment - It seems WAS has no problem finding the implementation class: com.ibm.ws.jtaextensions.ExtendedJTATransactionImpl@3940394. This code: InitialContext ic = null; try { ic = new InitialContext(); ExtendedJTATransaction tran = (ExtendedJTATransaction) ic.lookup("java:comp/websphere/ExtendedJTATransaction"); System.out.println(tran.getClass()); System.out.println(tran.getGlobalId()); System.out.println(tran.getLocalId()); } catch(Exception e) { e.printStackTrace(); } has no problem return class name, with global trans id with null and local tran id with 0. However, in WASManagerRuntime, the method rval = (byte[]) _getGlobalId.invoke(_extendedTransaction, null); return IllegalArgumentException. Now I create a DB2 XA datasource, change the application CL to parent_last, then parent_first. Copy ibm was 6.1_runtime.jar in ear and java and web projects depend on this jar. Still doesn't work. However, this happened when Spring want to call OpenJPA transactionManager to start a transaction. However, the global transaction is not there. So the globalId is null and localId is 0. Am I missing something? I have a WAS DataSource connect to DB2 without problem. And the resource reference within the web application has no problem. (tested). So Why there's no transaction withing this thread?
          Hide
          david zhang added a comment -

          No use, test on both WAS test environment and WAS standalone server, change the web classloader both to parent_first, parent_last. Still got the java.lang.IllegalArgumentException from code: rval = (byte[]) _getGlobalId.invoke(_extendedTransaction, null);.
          WAS: 6.0.3 with EJB Alpha, Spring 2.0.3(the latest release), OpenJPA 0.96.
          please take look at my applicationContext.xml and persistence.xml, please.

          Show
          david zhang added a comment - No use, test on both WAS test environment and WAS standalone server, change the web classloader both to parent_first, parent_last. Still got the java.lang.IllegalArgumentException from code: rval = (byte[]) _getGlobalId.invoke(_extendedTransaction, null);. WAS: 6.0.3 with EJB Alpha, Spring 2.0.3(the latest release), OpenJPA 0.96. please take look at my applicationContext.xml and persistence.xml, please.
          Hide
          david zhang added a comment -

          Please take a look at the latest applicationContext.xml and persistence.xml.
          BTW, Hibernate use the same concept, but it works on every environment, OpenJPA doesn't work on my environment.

          Show
          david zhang added a comment - Please take a look at the latest applicationContext.xml and persistence.xml. BTW, Hibernate use the same concept, but it works on every environment, OpenJPA doesn't work on my environment.
          Hide
          Michael Dick added a comment -

          Have you started a UserTransaction? That's the only other thing that I can think of that would cause the problem.

          We're using a WebSphere proprietary API to register for synchronization with the transaction service. The WebSphere API doesn't allow OpenJPA to start a new transaction automatically. I believe Hibernate uses the same API though and suffers the same restrictions.

          I'm sorry to say I have no experience with Spring. I'll try to reproduce the problem without Spring and see if that sheds any light. Sorry I can't give you a more definite answer right now.

          Show
          Michael Dick added a comment - Have you started a UserTransaction? That's the only other thing that I can think of that would cause the problem. We're using a WebSphere proprietary API to register for synchronization with the transaction service. The WebSphere API doesn't allow OpenJPA to start a new transaction automatically. I believe Hibernate uses the same API though and suffers the same restrictions. I'm sorry to say I have no experience with Spring. I'll try to reproduce the problem without Spring and see if that sheds any light. Sorry I can't give you a more definite answer right now.
          Hide
          david zhang added a comment -

          Even I put openJPA, all the dependant jars in WAS 6.1 plugins directory, which for sure should be under the same classloader for ExntendedJTATransaction. but the WASManagedRuntime$WASTransaction still get IllegalArgumentException when getGlobalId and registerSynchronization use reflection calling ExtendedJTATransaction. For getGlobalId(), I can use UserTransaction to start a transaction then lookup "java:comp/websphere/ExtendedJTATransaction" and call getGlobalId() directly without reflection, which is working without any problem. However, the registerSynchronization doesn't know the SynchronizationCallback until runtime, so run out of idea again on how to work around and what's the cause of this exception.
          What I'm doing now is try to use declarative transaction. So if I use Spring to define the tranactionAdvice, suppose the Spring will call JpavendorTransactionManager to create transaction automatically, which is working for Spring use Hibernate as transactionManager and persistence layer.
          Now, let me try to use Spring call Hibernate as JPA vendor to see what's the behavior.
          I'm sorry to say Hibernate on this forum, but I really want to use OpenJPA and fix the problem.

          Show
          david zhang added a comment - Even I put openJPA, all the dependant jars in WAS 6.1 plugins directory, which for sure should be under the same classloader for ExntendedJTATransaction. but the WASManagedRuntime$WASTransaction still get IllegalArgumentException when getGlobalId and registerSynchronization use reflection calling ExtendedJTATransaction. For getGlobalId(), I can use UserTransaction to start a transaction then lookup "java:comp/websphere/ExtendedJTATransaction" and call getGlobalId() directly without reflection, which is working without any problem. However, the registerSynchronization doesn't know the SynchronizationCallback until runtime, so run out of idea again on how to work around and what's the cause of this exception. What I'm doing now is try to use declarative transaction. So if I use Spring to define the tranactionAdvice, suppose the Spring will call JpavendorTransactionManager to create transaction automatically, which is working for Spring use Hibernate as transactionManager and persistence layer. Now, let me try to use Spring call Hibernate as JPA vendor to see what's the behavior. I'm sorry to say Hibernate on this forum, but I really want to use OpenJPA and fix the problem.
          Hide
          david zhang added a comment -

          By the way, I'm using openjpa code enhancer during development time, not using Spring for the code enhance at deployment time. I think this may be the problem. But how configure Spring to enhance code, I haven't got succeed. Do you have some sample configuration for this?

          Show
          david zhang added a comment - By the way, I'm using openjpa code enhancer during development time, not using Spring for the code enhance at deployment time. I think this may be the problem. But how configure Spring to enhance code, I haven't got succeed. Do you have some sample configuration for this?
          Hide
          Kevin Sutter added a comment -

          David,
          Are you still experiencing this problem? We're trying to clean up some old Issues in preparation for the 1.0.0 release and it doesn't look like much has happened with this Issue since April (my apologies!). Since this Issue was originally written, we have updated the WASManagedRuntime to use the public WebSphere Transaction API's instead of the IBM-internal Transaction interfaces. We have also updated the OpenJPA runtime to use the TransactionSynchronizationRegistry, if you are running in a Java EE 5 application server environment. Due to these fairly extensive changes and the testing that goes along with them, there's a good chance that your problem has been resolved. Or, at the least, the symptoms would have changed. So, if you still have interest, we would appreciate some additional feedback on this problem.

          Thanks,
          Kevin

          Show
          Kevin Sutter added a comment - David, Are you still experiencing this problem? We're trying to clean up some old Issues in preparation for the 1.0.0 release and it doesn't look like much has happened with this Issue since April (my apologies!). Since this Issue was originally written, we have updated the WASManagedRuntime to use the public WebSphere Transaction API's instead of the IBM-internal Transaction interfaces. We have also updated the OpenJPA runtime to use the TransactionSynchronizationRegistry, if you are running in a Java EE 5 application server environment. Due to these fairly extensive changes and the testing that goes along with them, there's a good chance that your problem has been resolved. Or, at the least, the symptoms would have changed. So, if you still have interest, we would appreciate some additional feedback on this problem. Thanks, Kevin
          Hide
          Marc Prud'hommeaux added a comment -

          Bumping to release 1.0.1 since 1.0.0 is being released.

          Show
          Marc Prud'hommeaux added a comment - Bumping to release 1.0.1 since 1.0.0 is being released.
          Hide
          Albert Lee added a comment -

          Defer to next release.

          Show
          Albert Lee added a comment - Defer to next release.
          Hide
          Patrick Linskey added a comment -

          Marking as resolved since it's been a while and a number of changes have been made to OpenJPA and to WebSphere that probably make this issue obsolete.

          Show
          Patrick Linskey added a comment - Marking as resolved since it's been a while and a number of changes have been made to OpenJPA and to WebSphere that probably make this issue obsolete.

            People

            • Assignee:
              Unassigned
              Reporter:
              david zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development