The next evolution of our product (see also
http://www.caucho.com/resin/press/wmaccess-delivers-data-services-using-
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.

A collegue of mine was able to isolate the issue and produced two very
simple, basic and standalone runable WAR's to reproduce it:
http://www.wmaccess.com/public/others/testapp-EclipseLink-2.1.war (6,59
MB)
http://www.wmaccess.com/public/others/testapp-EclipseLink-2.2.war (6,96
MB)

testapp-EclipseLink-2.1.war is packaged with EclipseLink Library version
2.1.1.v20100817-r8050
testapp-EclipseLink-2.2.war is packaged with EclipseLink Library version
2.2.0.v20110202-r8913

Both WAR files are using an in-memory HSQLDB as data source, so they can
be deployed without any other prerequisites. BTW: The .java source files
are included in both WARs. The WAR uses the contextPath as prefix in its
logging statements.


As already mentioned, the WAR with EclipseLink 2.1.1.v20100817-r8050
starts up properly. 
But the WAR with EclipseLink 2.2.0.v20110202-r8913 throws an
IllegalAccessError. Please find below the Output including the complete
Stack Trace of the IllegalAccessError:


Resin Professional 4.0.20 (built Fri, 15 Jul 2011 01:17:29 PDT)
Copyright(c) 1998-2010 Caucho Technology.  All rights reserved.
 
  1013253.license -- 2 Resin servers CPB Software
 
Starting Resin Professional on Fri, 19 Aug 2011 11:37:23 +0200 (CEST)
 
[11-08-19 11:37:24.368] {main} Proxy Cache disk-size=1024M
memory-size=64M
[11-08-19 11:37:24.571] {main} 
[11-08-19 11:37:24.571] {main} Windows XP 5.1 x86
[11-08-19 11:37:24.571] {main} Java(TM) SE Runtime Environment
1.6.0_03-b05, Cp1252, de
[11-08-19 11:37:24.571] {main} Java HotSpot(TM) Client VM 1.6.0_03-b05,
32, mixed mode, Sun Microsystems Inc.
[11-08-19 11:37:24.571] {main} 
[11-08-19 11:37:24.571] {main} user.name  = stbu
[11-08-19 11:37:25.257] {main} 
[11-08-19 11:37:25.272] {main} server listening to localhost:6800
[11-08-19 11:37:25.272] {main} 
[11-08-19 11:37:25.459] {main} 
[11-08-19 11:37:25.459] {main} resin.home =
D:\WMACCESS-4.0\container-testing\resin-pro-4.0.20
[11-08-19 11:37:25.459] {main} resin.root =
D:\WMACCESS-4.0\container-testing\resin-pro-4.0.20
[11-08-19 11:37:25.459] {main} resin.conf =
D:\WMACCESS-4.0\container-testing\resin-pro-4.0.20\conf\resin.xml
[11-08-19 11:37:25.459] {main} 
[11-08-19 11:37:25.459] {main} server    = 127.0.0.1:6800
(app-tier:default)
[11-08-19 11:37:25.459] {main} stage      = production
[11-08-19 11:37:25.787] {main} WebApp[production/webapp/default/ROOT]
active
[11-08-19 11:37:25.911] {main}
WebApp[production/webapp/default/resin-admin] active
[11-08-19 11:37:26.254] {main}
WebApp[production/webapp/default/resin-doc] active
[11-08-19 11:37:26.270] {main} Host[production/host/default] active
[11-08-19 11:37:26.270] {main} ProServer[id=default,cluster=app-tier]
active
[11-08-19 11:37:26.270] {main}   JNI keepalive: not available on Windows
[11-08-19 11:37:26.270] {main}   JNI: file, socket
[11-08-19 11:37:26.270] {main} 
[11-08-19 11:37:26.270] {main} 
[11-08-19 11:37:26.270] {main} http listening to *:8080
[11-08-19 11:37:26.426] {main} https listening to *:8443
[11-08-19 11:37:26.426] {main} 
[11-08-19 11:37:26.457] {main} ProResin[id=default] started in 2744ms
[11-08-19 11:37:39.476] {resin-51} In-place class redefinition (HotSwap)
is available.
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.1.2.v20101206-r8635
context /testapp-EclipseLink-2.2: Using EntityManagerFactory
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl@143691d
context /testapp-EclipseLink-2.2: Application classloader:
EnvironmentClassLoader[web-app:production/webapp/default/testapp-Eclipse
Link-2.2]
context /testapp-EclipseLink-2.2: EntityManagerFactory classloader:
sun.misc.Launcher$AppClassLoader@1a7bf11
context /testapp-EclipseLink-2.2: Invoking EclipseLink 2.2 constructor.
java.lang.IllegalAccessError: tried to access method
org.eclipse.persistence.internal.jpa.metadata.tables.TableMetadata.<init
>(Ljava/lang/String;)V from class servlet.Listener
 at servlet.Listener.contextInitialized(Listener.java:51)
 at com.caucho.server.webapp.WebApp.start(WebApp.java:3520)
 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.update(DeployContainer.java:241)
 at
com.caucho.env.deploy.ExpandDeployGenerator.update(ExpandDeployGenerator
.java:599)
 at
com.caucho.env.deploy.ExpandDeployGenerator.updateIfModified(ExpandDeplo
yGenerator.java:545)
 at
com.caucho.env.deploy.ExpandDeployGenerator.alarm(ExpandDeployGenerator.
java:889)
 at
com.caucho.env.deploy.ExpandDeployGenerator.handleAlarm(ExpandDeployGene
rator.java:876)
 at com.caucho.util.Alarm.handleAlarm(Alarm.java:448)
 at com.caucho.util.Alarm.run(Alarm.java:420)
 at com.caucho.env.thread.ResinThread.runTasks(ResinThread.java:164)
 at com.caucho.env.thread.ResinThread.run(ResinThread.java:130)
[11-08-19 11:37:40.224] {resin-51}
WebApp[production/webapp/default/testapp-EclipseLink-2.2] active
[11-08-19 11:37:51.512] {resin-main-link} ProResin[id=default] stop
request from watchdog 'watchdog@admin.resin.caucho'
WarningService: Resin shutdown from watchdog stop
'watchdog@admin.resin.caucho'
[11-08-19 11:37:51.528] {resin-main-link} WarningService: Resin shutdown
from watchdog stop 'watchdog@admin.resin.caucho'
[11-08-19 11:37:54.444] {resin-shutdown}
ProServer[id=default,cluster=app-tier] stopping
[11-08-19 11:37:54.444] {resin-shutdown} Host[production/host/default]
stopping
[11-08-19 11:37:54.444] {resin-shutdown}
WebApp[production/webapp/default/testapp-EclipseLink-2.2] stopping
[11-08-19 11:37:54.459] {resin-shutdown}
WebApp[production/webapp/default/resin-doc] stopping
[11-08-19 11:37:54.475] {resin-shutdown}
WebApp[production/webapp/default/resin-admin] stopping
[11-08-19 11:37:54.475] {resin-shutdown}
WebApp[production/webapp/default/ROOT] stopping
[11-08-19 11:37:54.490] {resin-shutdown} ClusterServer[id=default]
notify-heartbeat-stop
 
Shutdown Resin reason: OK
 
[11-08-19 11:38:02.754] {resin-shutdown} Shutdown Resin reason: OK



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.


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-Eclipse
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/clas
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

Reply via email to