> On 08/19/2011 10:23 AM, BUSCH Steffen wrote:
> > The next evolution of our product (see also
> > 
> http://www.caucho.com/resin/press/wmaccess-delivers-data-services-usin
> > g-
> > resin/) has been quite successfully tested with most recent 
> Resin Pro 
> > 4.0.x versions as long as we were using EclipseLink version 2.1.x.
> >
> > Before heading into the next stage we needed to upgrade to 
> EclipseLink 
> > version 2.2 and perform various tests on different 
> Application Servers.
> > Tomcat 6 passed, Websphere passed, but we have troubles with Resin 
> > 4.0.20.
> > Even EclipseLink 2.2 is packaged in the WAR, Resin's own 
> EclipseLink 
> > Version 2.1.2.v20101206-r8635 from 
> $RESIN_HOME/lib/eclipselink.jar is 
> > used.
> > Our Application uses a Constructor of EclipseLink 2.2 which 
> causes the 
> > IllegalAccessError.
> 
> Try removing/replacing the eclipselink.jar from resin/lib. 
> Resin itself doesn't depend on eclipselink, so it's safe to 
> remove or replace.
> 
> -- Scott
> 

It's very likely that we need some time to run two versions of our
software in parallel. Therefore I've chosen the "remove
$RESIN_HOME/lib/eclipselink.jar option" in order to allow each Web-App
our software to use the eclipselink version included in their individual
WARs.

However, when the $RESIN_HOME/lib/eclipselink.jar is removed, a
NoClassDefFoundError is thrown. This is the output / stack trace.


[11-08-19 19:40:10.379] {main} resin.home =
D:\WMACCESS-4.0\container-testing\resin-pro-4.0.20
[11-08-19 19:40:10.379] {main} resin.root =
D:\WMACCESS-4.0\container-testing\resin-pro-4.0.20
[11-08-19 19:40:10.379] {main} resin.conf =
D:\WMACCESS-4.0\container-testing\resin-pro-4.0.20\conf\resin.xml
[11-08-19 19:40:10.379] {main}
[11-08-19 19:40:10.379] {main} server    = 127.0.0.1:6800
(app-tier:default)
[11-08-19 19:40:10.379] {main} stage      = production
[11-08-19 19:40:10.706] {main} WebApp[production/webapp/default/ROOT]
active
[11-08-19 19:40:10.831] {main}
WebApp[production/webapp/default/resin-admin] active
[11-08-19 19:40:11.189] {main}
WebApp[production/webapp/default/resin-doc] active
[11-08-19 19:40:11.766] {main} In-place class redefinition (HotSwap) is
available.
[11-08-19 19:40:11.968] {main}
WebApp[production/webapp/default/testapp-EclipseLink-2.2] fail
[11-08-19 19:40:11.984] {main} java.lang.NoClassDefFoundError:
org/eclipse/persistence/platform/server/ServerPlatformBase
                                at
java.lang.ClassLoader.defineClass1(Native Method)
                                at
java.lang.ClassLoader.defineClass(ClassLoader.java:620)
                                at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
                                at
java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
                                at
java.net.URLClassLoader.access$000(URLClassLoader.java:56)
                                at
java.net.URLClassLoader$1.run(URLClassLoader.java:195)
                                at
java.security.AccessController.doPrivileged(Native Method)
                                at
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
                                at
java.lang.ClassLoader.loadClass(ClassLoader.java:306)
                                at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
                                at
java.lang.ClassLoader.loadClass(ClassLoader.java:251)
                                at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
                                at java.lang.Class.forName0(Native
Method)
                                at
java.lang.Class.forName(Class.java:247)
                                at
com.caucho.loader.DynamicClassLoader.loadClassImpl(DynamicClassLoader.ja
va:1456)
                                at
com.caucho.loader.SystemClassLoader.loadClassImpl(SystemClassLoader.java
:237)
                                at
com.caucho.loader.DynamicClassLoader.loadClassImpl(DynamicClassLoader.ja
va:1454)
                                at
com.caucho.loader.DynamicClassLoader.loadClassImpl(DynamicClassLoader.ja
va:1454)
                                at
com.caucho.loader.DynamicClassLoader.loadClassImpl(DynamicClassLoader.ja
va:1454)
                                at
com.caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:1
392)
                                at
com.caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:1
373)
                                at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
                                at java.lang.Class.forName0(Native
Method)
                                at
java.lang.Class.forName(Class.java:247)
                                at
org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClas
sForName(PrivilegedAccessHelper.java:93)
                                at
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.findClass(En
tityManagerSetupImpl.java:697)
                                at
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.findClassFor
Property(EntityManagerSetupImpl.java:703)
                                at
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.updateServer
Platform(EntityManagerSetupImpl.java:532)
                                at
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(En
tityManagerSetupImpl.java:985)
                                at
org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityMan
agerFactory(PersistenceProvider.java:187)
                                at
com.caucho.env.jpa.PersistenceUnitManager.createDelegate(PersistenceUnit
Manager.java:422)
                                at
com.caucho.env.jpa.PersistenceUnitManager.start(PersistenceUnitManager.j
ava:383)
                                at
com.caucho.env.jpa.PersistenceManager.startPersistenceUnits(PersistenceM
anager.java:363)
                                at
com.caucho.env.jpa.PersistenceManager.environmentConfigureEnhancer(Persi
stenceManager.java:634)
                                at
com.caucho.loader.EnvironmentClassLoader.config(EnvironmentClassLoader.j
ava:866)
                                at
com.caucho.loader.EnvironmentClassLoader.bind(EnvironmentClassLoader.jav
a:884)
                                at
com.caucho.loader.EnvironmentClassLoader.start(EnvironmentClassLoader.ja
va:911)
                                at
com.caucho.server.webapp.WebApp.start(WebApp.java:3486)
                                at
com.caucho.env.deploy.DeployController.startImpl(DeployController.java:6
70)
                                at
com.caucho.env.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAut
oRedeployAutoStrategy.java:77)
                                at
com.caucho.env.deploy.DeployController.startOnInit(DeployController.java
:523)
                                at
com.caucho.env.deploy.DeployContainer.start(DeployContainer.java:170)
                                at
com.caucho.server.webapp.WebAppContainer.start(WebAppContainer.java:713)
                                at
com.caucho.server.host.Host.start(Host.java:676)
                                at
com.caucho.env.deploy.DeployController.startImpl(DeployController.java:6
70)
                                at
com.caucho.env.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAut
oRedeployAutoStrategy.java:77)
                                at
com.caucho.env.deploy.DeployController.startOnInit(DeployController.java
:523)
                                at
com.caucho.env.deploy.DeployContainer.start(DeployContainer.java:170)
                                at
com.caucho.server.host.HostContainer.start(HostContainer.java:542)
                                at
com.caucho.server.cluster.Server.start(Server.java:1231)
                                at
com.caucho.server.cluster.ServletSystem.start(ServletSystem.java:72)
                                at
com.caucho.env.service.ResinSystem.startServices(ResinSystem.java:515)
                                at
com.caucho.env.service.ResinSystem.start(ResinSystem.java:483)
                                at
com.caucho.server.resin.Resin.start(Resin.java:1029)
                                at
com.caucho.server.resin.Resin.initMain(Resin.java:1156)
                                at
com.caucho.server.resin.Resin.main(Resin.java:1458)
[11-08-19 19:40:11.984] {main} Host[production/host/default] active


-- Steffen

> >
> > When checking the logging output of the EclipseLink 2.1 test WAR
> > (testapp-EclipseLink-2.1.war) it seems that it is working 
> because of 
> > the fact that packaged EclipseLink and used one from 
> > $RESIN_HOME/lib/eclipselink.jar have the same major/minor version 
> > respectivly both are similar enough to properly startup.
> >
> > ...
> > context /testapp-EclipseLink-2.1: initializing EntityManagerFactory.
> > context /testapp-EclipseLink-2.1: EclipseLink version 
> packaged in .war
> > file: 2.1.1.v20100817-r8050
> > context /testapp-EclipseLink-2.1: Loaded EclipseLink version:
> > 2.1.2.v20101206-r8635
> > context /testapp-EclipseLink-2.1: Using EntityManagerFactory 
> > org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl@76438d
> > context /testapp-EclipseLink-2.1: Application classloader:
> > 
> EnvironmentClassLoader[web-app:production/webapp/default/testapp-Eclip
> > se
> > Link-2.1]
> > context /testapp-EclipseLink-2.1: EntityManagerFactory classloader:
> > sun.misc.Launcher$AppClassLoader@1a7bf11
> > context /testapp-EclipseLink-2.1: Creating EntityManager [EL Info]: 
> > 2011-08-19 11:36:33.961--ServerSession(5181335)--EclipseLink,
> > version: Eclipse Persistence Services - 2.1.2.v20101206-r8635 [EL 
> > Info]: 2011-08-19 
> > 
> 11:36:34.554--ServerSession(5181335)--file:/D:/WMACCESS-4.0/container-
> > te 
> > 
> sting/resin-pro-4.0.20/webapps/testapp-EclipseLink-2.1/WEB-INF/classes
> > /_
> > JPA_TEST login successful
> > context /testapp-EclipseLink-2.1: Persisting an entity.
> > context /testapp-EclipseLink-2.1:  metamodel instance:
> > MetamodelImpl@18521651 [ 2 Types: , 1 ManagedTypes: , 1 
> EntityTypes: , 
> > 0
> > MappedSuperclassTypes: , 0 EmbeddableTypes: ] context 
> > /testapp-EclipseLink-2.1: Closing EntityManager context 
> > /testapp-EclipseLink-2.1:  context listener finished.
> > [11-08-19 11:36:34.647] {resin-56}
> > WebApp[production/webapp/default/testapp-EclipseLink-2.1] active ...
> >
> >
> >
> >
> > However, our app required EclipseLink 2.2 now and with all other 
> > tested servlet containers this issue does not appear 
> (logging output 
> > from Tomcat 6 below).
> > Any advice how to solve this issue?
> >
> >
> > Thanks,
> > Steffen
> >
> >
> >
> >
> > Just for the records - Tomcat 6 output:
> >
> > INFO: Deploying web application archive testapp-EclipseLink-2.2.war 
> > context /testapp-EclipseLink-2.2: context listener entry point.
> > context /testapp-EclipseLink-2.2: initializing EntityManagerFactory.
> > context /testapp-EclipseLink-2.2: EclipseLink version 
> packaged in .war
> > file: 2.2.0.v20110202-r8913
> > context /testapp-EclipseLink-2.2: Loaded EclipseLink version:
> > 2.2.0.v20110202-r8913
> > context /testapp-EclipseLink-2.2: Using EntityManagerFactory
> > 
> org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl@1762027
> > context /testapp-EclipseLink-2.2: Application classloader:
> > WebappClassLoader
> >    context: /testapp-EclipseLink-2.2
> >    delegate: false
> >    repositories:
> >      /WEB-INF/classes/
> > ---------->  Parent Classloader:
> > org.apache.catalina.loader.StandardClassLoader@5329c5
> >
> > context /testapp-EclipseLink-2.2: EntityManagerFactory classloader:
> > WebappClassLoader
> >    context: /testapp-EclipseLink-2.2
> >    delegate: false
> >    repositories:
> >      /WEB-INF/classes/
> > ---------->  Parent Classloader:
> > org.apache.catalina.loader.StandardClassLoader@5329c5
> >
> > context /testapp-EclipseLink-2.2: Invoking EclipseLink 2.2 
> constructor.
> > context /testapp-EclipseLink-2.2: Creating EntityManager [EL Info]: 
> > 2011-08-19 12:28:14.456--ServerSession(13685038)--EclipseLink, 
> > version: Eclipse Persistence Services - 2.2.0.v20110202-r8913 [EL 
> > Info]: 2011-08-19 
> > 
> 12:28:14.918--ServerSession(13685038)--file:/D:/WMACCESS-4.0/container
> > -t 
> > 
> esting/apache-tomcat-6.0.33/webapps/testapp-EclipseLink-2.2/WEB-INF/cl
> > as
> > ses/_JPA_TEST login successful
> > context /testapp-EclipseLink-2.2: Persisting an entity.
> > context /testapp-EclipseLink-2.2:  metamodel instance:
> > MetamodelImpl@15703940 [ 2 Types: , 1 ManagedTypes: , 1 
> EntityTypes: , 
> > 0
> > MappedSuperclassTypes: , 0 EmbeddableTypes: ] context 
> > /testapp-EclipseLink-2.2: Closing EntityManager context 
> > /testapp-EclipseLink-2.2:  context listener finished.
> >
> >
> >
> > _______________________________________________
> > resin-interest mailing list
> > resin-interest@caucho.com
> > http://maillist.caucho.com/mailman/listinfo/resin-interest
> >
> 
> 
> 
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest
> 
> 



_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to