OpenJPA
  1. OpenJPA
  2. OPENJPA-1452

OpenJPA 2.0.0-M3 attempts to mutate unmodifiable map in Glassfish

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-M3
    • Fix Version/s: 2.0.0-beta
    • Component/s: jpa
    • Labels:
      None
    • Environment:
      Ubuntu-karmic koala
      SLES 10.2

      Using sailfin v1 b60g (based on glassfish v2.1)

      Description

      OpenJPA Attempts to modiy an umodifiable map in Glassfish.

      Similar issue to:
      https://issues.apache.org/jira/browse/OPENJPA-498

      To reproduce:
      + Place the open jpa libs in [glassfish]/domain/domains1/lib
      + Deploy any app or jar using openjpa as the persistence provider
      <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>

      trace:
      [#|2010-01-02T19:42:27.581+0100|INFO|sun-glassfish-comms-server1.5|javax.enterprise.system.tools.deployment|_ThreadID=17;_ThreadName=Timer-12;|deployed with moduleid = gs-apps_EJB|#]

      [#|2010-01-02T19:42:27.834+0100|WARNING|sun-glassfish-comms-server1.5|javax.enterprise.system.core.classloading|_ThreadID=17;_ThreadName=Timer-12;_RequestID=68741cc4-049e-4f05-a6f5-fab7d336f48e;|The log message is null.
      java.lang.UnsupportedOperationException
      at java.util.Collections$UnmodifiableMap.remove(Collections.java:1288)
      at org.apache.openjpa.lib.conf.Configurations.removeProperty(Configurations.java:681)
      at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:157)
      at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:59)
      at com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:149)
      at com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:84)
      at com.sun.enterprise.server.AbstractLoader.loadPersistenceUnits(AbstractLoader.java:895)
      at com.sun.enterprise.server.EJBModuleLoader.doLoad(EJBModuleLoader.java:165)
      at com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java:238)
      at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:233)
      at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:188)
      at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:420)
      at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:1005)
      at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:992)
      at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:470)
      at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:182)
      at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308)
      at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:231)
      at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:298)
      at com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:132)
      at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
      at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:966)
      at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:280)
      at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:298)
      at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:584)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:381)
      at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:364)
      at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:477)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
      at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
      at $Proxy1.invoke(Unknown Source)
      at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
      at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
      at com.sun.enterprise.deployment.autodeploy.AutoDeployer.invokeDeploymentService(AutoDeployer.java:583)
      at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployJavaEEArchive(AutoDeployer.java:564)
      at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:495)
      at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:270)
      at com.sun.enterprise.deployment.autodeploy.AutoDeployControllerImpl$AutoDeployTask.run(AutoDeployControllerImpl.java:374)
      at java.util.TimerThread.mainLoop(Timer.java:512)
      at java.util.TimerThread.run(Timer.java:462)

      #]

      [#|2010-01-02T19:42:27.837+0100|WARNING|sun-glassfish-comms-server1.5|javax.enterprise.system.core|_ThreadID=17;_ThreadName=Timer-12;_RequestID=68741cc4-049e-4f05-a6f5-fab7d336f48e;|CORE5020: Error while loading ejb module|#]

      1. Configurations.java
        27 kB
        seyvet@yahoo.com

        Activity

        Hide
        Pinaki Poddar added a comment -

        > Glassfish 2.1 does not support EE6/JPA 2.0.
        > So no openJPA for us then... I would have thought that OpenJPA 2 would be backward compatible with JPA 2

        To run OpenJPA 2.0 (or possibly other JPA 2.0 compliant JPA provider, my observations/experiments are based on OpenJPA only), please try the following

        1. Grab a JPA 2.0 Specification JAR from somewhere. JPA 2.0 specifcation jar is not only a set of interface classes but also has concrete implementation classes.
        The errors reported in this issue can be traced to the fact that
        a) Glassfish V2.x includes EclipseLink library which in turn includes JPA spec classes
        b) those spec classes are JPA 1.0

        2. Place that jar (say jpa-spec-2.0.jar) into <root>/domains/domain1/lib/ext
        where <root> is glassfish v2.x install point
        domain1 is the name of the domain

        That lib/ext directory is also a good place for common libraries such as JDBC driver

        3. Place openjpa 2.x libraries into <root>/domains/domain1/applibs.

        4. Deploy your application with --libraries option. The options should specify openjpa 2.x library name(s). You can do the same from the web-based admin console on the page
        (Web Applications -> Deploy) and fill-in 'Libraries' field.

        Show
        Pinaki Poddar added a comment - > Glassfish 2.1 does not support EE6/JPA 2.0. > So no openJPA for us then... I would have thought that OpenJPA 2 would be backward compatible with JPA 2 To run OpenJPA 2.0 (or possibly other JPA 2.0 compliant JPA provider, my observations/experiments are based on OpenJPA only), please try the following 1. Grab a JPA 2.0 Specification JAR from somewhere. JPA 2.0 specifcation jar is not only a set of interface classes but also has concrete implementation classes. The errors reported in this issue can be traced to the fact that a) Glassfish V2.x includes EclipseLink library which in turn includes JPA spec classes b) those spec classes are JPA 1.0 2. Place that jar (say jpa-spec-2.0.jar) into <root>/domains/domain1/lib/ext where <root> is glassfish v2.x install point domain1 is the name of the domain That lib/ext directory is also a good place for common libraries such as JDBC driver 3. Place openjpa 2.x libraries into <root>/domains/domain1/applibs. 4. Deploy your application with --libraries option. The options should specify openjpa 2.x library name(s). You can do the same from the web-based admin console on the page (Web Applications -> Deploy) and fill-in 'Libraries' field.
        Hide
        seyvet@yahoo.com added a comment -

        Verified with latest nightly build.

        Show
        seyvet@yahoo.com added a comment - Verified with latest nightly build.
        Hide
        Jeremy Bauer added a comment -

        OpenJPA 2.0 is backward compatible with OpenJPA 1.0 from an application standpoint (ie. your apps that run on OpenJPA 1.x will continue to run on OpenJPA 2.0), but not from an environment perspective. Your runtime environment must have the correct libraries and versions of those libraries required by OpenJPA 2.0. This typically isn't a problem in JSE environments since you just include the required jars in your classpath and run the app. However, it is often a problem in JEE environments since the app server vendors provide the libraries for whatever JEE spec level they support and typically don't provide a way to plug in a newer spec level of those libraries. Thus, you need to pick up a new release of the app server with support for the newer spec level. OpenJPA 2.0 should work with the JEE6 version of Glassfish. (But, I haven't tried it) There's also a WebSphere JPA 2.0 alpha[1] available that is based on OpenJPA 2.0.

        [1] https://www14.software.ibm.com/iwm/web/cc/earlyprograms/websphere/wsasjpaoa/

        Show
        Jeremy Bauer added a comment - OpenJPA 2.0 is backward compatible with OpenJPA 1.0 from an application standpoint (ie. your apps that run on OpenJPA 1.x will continue to run on OpenJPA 2.0), but not from an environment perspective. Your runtime environment must have the correct libraries and versions of those libraries required by OpenJPA 2.0. This typically isn't a problem in JSE environments since you just include the required jars in your classpath and run the app. However, it is often a problem in JEE environments since the app server vendors provide the libraries for whatever JEE spec level they support and typically don't provide a way to plug in a newer spec level of those libraries. Thus, you need to pick up a new release of the app server with support for the newer spec level. OpenJPA 2.0 should work with the JEE6 version of Glassfish. (But, I haven't tried it) There's also a WebSphere JPA 2.0 alpha [1] available that is based on OpenJPA 2.0. [1] https://www14.software.ibm.com/iwm/web/cc/earlyprograms/websphere/wsasjpaoa/
        Hide
        seyvet@yahoo.com added a comment -

        Glassfish 2.1 does not support EE6/JPA 2.0.
        So no openJPA for us then... I would have thought that OpenJPA 2 would be backward compatible with JPA 2

        Show
        seyvet@yahoo.com added a comment - Glassfish 2.1 does not support EE6/JPA 2.0. So no openJPA for us then... I would have thought that OpenJPA 2 would be backward compatible with JPA 2
        Hide
        Jeremy Bauer added a comment -

        Does the version of Glassfish you are using support JPA 2.0/EE6? It looks like you are trying to use OpenJPA 2.0 with JPA 1.0 level spec API. The 2.0 level spec API jar (either from Geronimo or a version provided by Sun) is required to run OpenJPA 2.0.

        Note: The OpenJPA M3 release does not match the final JPA 2.0 specification, but the most current trunk level code does. If you get an EE6 version of Glassfish, be sure to use the most current OpenJPA trunk level code.

        Show
        Jeremy Bauer added a comment - Does the version of Glassfish you are using support JPA 2.0/EE6? It looks like you are trying to use OpenJPA 2.0 with JPA 1.0 level spec API. The 2.0 level spec API jar (either from Geronimo or a version provided by Sun) is required to run OpenJPA 2.0. Note: The OpenJPA M3 release does not match the final JPA 2.0 specification, but the most current trunk level code does. If you get an EE6 version of Glassfish, be sure to use the most current OpenJPA trunk level code.
        Hide
        seyvet@yahoo.com added a comment -

        Tried tp download the latest svn repository files and build from there. The original problem is gone. But I still get:
        [#|2010-01-24T22:00:56.608+0100|WARNING|sun-glassfish-comms-server1.5|javax.enterprise.system.stream.err|_ThreadID=16;_ThreadName=Timer-7;_RequestID=ac39b253-89d1-4910-b76b-a305b28e5877;|java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;
        at org.apache.openjpa.persistence.PersistenceUnitInfoImpl.toOpenJPAProperties(PersistenceUnitInfoImpl.java:457)
        at org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:313)
        at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:158)
        at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:62)
        at com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:149)
        at com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:84)
        at com.sun.enterprise.server.AbstractLoader.loadPersistenceUnits(AbstractLoader.java:895)
        at com.sun.enterprise.server.EJBModuleLoader.doLoad(EJBModuleLoader.java:165)
        at com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java:238)
        at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:233)
        at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:188)
        at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:420)
        at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:1005)
        at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:992)
        at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:470)
        at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:182)
        at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308)
        at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:231)
        at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:298)
        at com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:132)
        at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:966)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:280)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:298)
        at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:584)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:381)
        at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:364)
        at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:477)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
        at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
        at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
        at $Proxy1.invoke(Unknown Source)
        at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
        at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
        at com.sun.enterprise.deployment.autodeploy.AutoDeployer.invokeDeploymentService(AutoDeployer.java:583)
        at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployJavaEEArchive(AutoDeployer.java:564)
        at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:495)
        at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:270)
        at com.sun.enterprise.deployment.autodeploy.AutoDeployControllerImpl$AutoDeployTask.run(AutoDeployControllerImpl.java:374)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)

        #]

        Raise new issue?

        Show
        seyvet@yahoo.com added a comment - Tried tp download the latest svn repository files and build from there. The original problem is gone. But I still get: [#|2010-01-24T22:00:56.608+0100|WARNING|sun-glassfish-comms-server1.5|javax.enterprise.system.stream.err|_ThreadID=16;_ThreadName=Timer-7;_RequestID=ac39b253-89d1-4910-b76b-a305b28e5877;|java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode; at org.apache.openjpa.persistence.PersistenceUnitInfoImpl.toOpenJPAProperties(PersistenceUnitInfoImpl.java:457) at org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:313) at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:158) at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:62) at com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:149) at com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:84) at com.sun.enterprise.server.AbstractLoader.loadPersistenceUnits(AbstractLoader.java:895) at com.sun.enterprise.server.EJBModuleLoader.doLoad(EJBModuleLoader.java:165) at com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java:238) at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:233) at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:188) at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:420) at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:1005) at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:992) at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:470) at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:182) at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308) at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:231) at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:298) at com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:132) at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108) at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:966) at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:280) at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:298) at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:584) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:381) at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:364) at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:477) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761) at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90) at $Proxy1.invoke(Unknown Source) at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304) at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174) at com.sun.enterprise.deployment.autodeploy.AutoDeployer.invokeDeploymentService(AutoDeployer.java:583) at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployJavaEEArchive(AutoDeployer.java:564) at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:495) at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:270) at com.sun.enterprise.deployment.autodeploy.AutoDeployControllerImpl$AutoDeployTask.run(AutoDeployControllerImpl.java:374) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) #] Raise new issue?
        Hide
        seyvet@yahoo.com added a comment -

        I tired again with the latest nightly build and the error is still there.
        Apache svn revision: 422266:897056

        java.lang.UnsupportedOperationException
        at java.util.Collections$UnmodifiableMap.remove(Collections.java:1288)
        at org.apache.openjpa.lib.conf.Configurations.removeProperty(Configurations.java:681)
        at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:157)
        at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:59)
        at com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:149)
        at com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:84)
        at com.sun.enterprise.server.AbstractLoader.loadPersistenceUnits(AbstractLoader.java:895)
        at com.sun.enterprise.server.EJBModuleLoader.doLoad(EJBModuleLoader.java:165)
        at com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java:238)
        at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:233)

        Should I reopen this?

        Show
        seyvet@yahoo.com added a comment - I tired again with the latest nightly build and the error is still there. Apache svn revision: 422266:897056 java.lang.UnsupportedOperationException at java.util.Collections$UnmodifiableMap.remove(Collections.java:1288) at org.apache.openjpa.lib.conf.Configurations.removeProperty(Configurations.java:681) at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:157) at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:59) at com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:149) at com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:84) at com.sun.enterprise.server.AbstractLoader.loadPersistenceUnits(AbstractLoader.java:895) at com.sun.enterprise.server.EJBModuleLoader.doLoad(EJBModuleLoader.java:165) at com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java:238) at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:233) Should I reopen this?
        Hide
        Donald Woods added a comment -

        Returned code back to what was in 1.2/1.3, which called containsProperty()

        Show
        Donald Woods added a comment - Returned code back to what was in 1.2/1.3, which called containsProperty()
        Hide
        Donald Woods added a comment -

        Testing the patch now against trunk.

        As far as the ValidationMode problem, the M3 release used the JPA 2.0 PFD2 APIs, which there were some changes to the API dealing with the location of the validation interfaces in the final spec. Maybe your level of Glassfish is using the final JPA2 spec apis? If so, you'll have to grab a nightly 2.0.0-SNAPSHOT build from trunk, which uses the final JPA2 APIs.

        Show
        Donald Woods added a comment - Testing the patch now against trunk. As far as the ValidationMode problem, the M3 release used the JPA 2.0 PFD2 APIs, which there were some changes to the API dealing with the location of the validation interfaces in the final spec. Maybe your level of Glassfish is using the final JPA2 spec apis? If so, you'll have to grab a nightly 2.0.0-SNAPSHOT build from trunk, which uses the final JPA2 APIs.
        Hide
        seyvet@yahoo.com added a comment -

        Updated Configurations,java, fixes the unmodifiable exception but triggers another....

        java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode

        Show
        seyvet@yahoo.com added a comment - Updated Configurations,java, fixes the unmodifiable exception but triggers another.... java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode
        Hide
        seyvet@yahoo.com added a comment -

        Hi,

        I took a subversion snapshot of the source code and reintroduced the change in Configurations.java:
        Index: Configurations.java
        ===================================================================
        — Configurations.java (revision 895268)
        +++ Configurations.java (working copy)
        @@ -677,8 +677,10 @@
        public static Object removeProperty(String partialKey, Map props)

        { if (partialKey == null || props == null || props.isEmpty()) return null; - String fullKey = ProductDerivations.getConfigurationKey(partialKey, props); - return props.remove(fullKey); + if (containsProperty(partialKey, props)) + return props.remove(ProductDerivations.getConfigurationKey(partialKey, props)); + else + return null; }

        /**

        Recompile the project and used the new open-jpa jar generated.

        Now I get this:
        [#|2010-01-02T21:15:39.566+0100|WARNING|sun-glassfish-comms-server2.0|javax.enterprise.system.stream.err|_ThreadID=16;_ThreadName=Timer-7;_RequestID=e78ed0fe-72e4-4798-8ab5-1430c502d733;|
        java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;
        at org.apache.openjpa.persistence.PersistenceUnitInfoImpl.toOpenJPAProperties(PersistenceUnitInfoImpl.java:457)
        at org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:260)
        at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:158)
        at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:59)
        at com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:149)
        at com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:84)
        at com.sun.enterprise.server.AbstractLoader.loadPersistenceUnits(AbstractLoader.java:915)
        at com.sun.enterprise.server.EJBModuleLoader.doLoad(EJBModuleLoader.java:165)
        at com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java:240)
        at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:233)
        at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:188)
        at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:420)
        at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:1005)
        at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:992)
        at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:470)
        at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:182)
        at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308)
        at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:231)
        at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:298)
        at com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:132)
        at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:966)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:280)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:298)
        at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:584)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:390)
        at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:373)
        at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:477)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
        at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
        at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
        at $Proxy1.invoke(Unknown Source)
        at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
        at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:170)
        at com.sun.enterprise.deployment.autodeploy.AutoDeployer.invokeDeploymentService(AutoDeployer.java:583)
        at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployJavaEEArchive(AutoDeployer.java:564)
        at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:495)
        at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:270)
        at com.sun.enterprise.deployment.autodeploy.AutoDeployControllerImpl$AutoDeployTask.run(AutoDeployControllerImpl.java:374)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)

        #]

        Seems there are lots of problem running openJPA 2 on glassfish...

        Show
        seyvet@yahoo.com added a comment - Hi, I took a subversion snapshot of the source code and reintroduced the change in Configurations.java: Index: Configurations.java =================================================================== — Configurations.java (revision 895268) +++ Configurations.java (working copy) @@ -677,8 +677,10 @@ public static Object removeProperty(String partialKey, Map props) { if (partialKey == null || props == null || props.isEmpty()) return null; - String fullKey = ProductDerivations.getConfigurationKey(partialKey, props); - return props.remove(fullKey); + if (containsProperty(partialKey, props)) + return props.remove(ProductDerivations.getConfigurationKey(partialKey, props)); + else + return null; } /** Recompile the project and used the new open-jpa jar generated. Now I get this: [#|2010-01-02T21:15:39.566+0100|WARNING|sun-glassfish-comms-server2.0|javax.enterprise.system.stream.err|_ThreadID=16;_ThreadName=Timer-7;_RequestID=e78ed0fe-72e4-4798-8ab5-1430c502d733;| java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode; at org.apache.openjpa.persistence.PersistenceUnitInfoImpl.toOpenJPAProperties(PersistenceUnitInfoImpl.java:457) at org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:260) at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:158) at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:59) at com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:149) at com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:84) at com.sun.enterprise.server.AbstractLoader.loadPersistenceUnits(AbstractLoader.java:915) at com.sun.enterprise.server.EJBModuleLoader.doLoad(EJBModuleLoader.java:165) at com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java:240) at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:233) at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:188) at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:420) at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:1005) at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:992) at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:470) at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:182) at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308) at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:231) at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:298) at com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:132) at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108) at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:966) at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:280) at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:298) at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:584) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:390) at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:373) at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:477) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761) at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90) at $Proxy1.invoke(Unknown Source) at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304) at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:170) at com.sun.enterprise.deployment.autodeploy.AutoDeployer.invokeDeploymentService(AutoDeployer.java:583) at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployJavaEEArchive(AutoDeployer.java:564) at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:495) at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:270) at com.sun.enterprise.deployment.autodeploy.AutoDeployControllerImpl$AutoDeployTask.run(AutoDeployControllerImpl.java:374) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) #] Seems there are lots of problem running openJPA 2 on glassfish...
        Hide
        seyvet@yahoo.com added a comment -

        list of jars added to the [GLASFFISH]/domains/domain1/lib directory:
        commons-collections-3.2.1.jar
        commons-pool-1.5.2.jar ext
        openjpa-all-2.0.0-M3.jar
        commons-lang-2.1.jar
        serp-1.13.1.jar

        Note that I had to put the openjpa-all jar and not openjpa-2.0.0-M3, otherwise I was getting a Exception in thread "main" java.lang.NoClassDefFoundError: javax/persistence/spi/ProviderUtil. That is the case even if I deploy the libs in the [GLASSFISH]/lib directory.

        Show
        seyvet@yahoo.com added a comment - list of jars added to the [GLASFFISH] /domains/domain1/lib directory: commons-collections-3.2.1.jar commons-pool-1.5.2.jar ext openjpa-all-2.0.0-M3.jar commons-lang-2.1.jar serp-1.13.1.jar Note that I had to put the openjpa-all jar and not openjpa-2.0.0-M3, otherwise I was getting a Exception in thread "main" java.lang.NoClassDefFoundError: javax/persistence/spi/ProviderUtil. That is the case even if I deploy the libs in the [GLASSFISH] /lib directory.

          People

          • Assignee:
            Donald Woods
            Reporter:
            seyvet@yahoo.com
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development