[ 
https://issues.apache.org/jira/browse/OPENJPA-1452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12861975#action_12861975
 ] 

Pinaki Poddar commented on OPENJPA-1452:
----------------------------------------

> 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.  


> OpenJPA 2.0.0-M3 attempts to mutate unmodifiable map in Glassfish
> -----------------------------------------------------------------
>
>                 Key: OPENJPA-1452
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1452
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 2.0.0-M3
>         Environment: Ubuntu-karmic koala
> SLES 10.2
> Using sailfin v1 b60g (based on glassfish v2.1)
>            Reporter: [email protected]
>            Assignee: Donald Woods
>             Fix For: 2.0.0-beta
>
>         Attachments: Configurations.java
>
>
> 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|#]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to