Re: [Resin-interest] IllegalAccessError with Resin-Professional4.0.20 and EclipseLink 2.2

2011-09-02 Thread BUSCH Steffen
Hi Scott,

I've seen you've filed a bug #4722 after my last email from 19th of
August.
http://bugs.caucho.com/view.php?id=4722

It's already closed and marked as fixed in 4.0.21 so I've downloaded
Resin-Pro-4.0.22 and deployed the WAR file
(http://www.wmaccess.com/public/others/testapp-EclipseLink-2.2.war) with
included EclipseLink 2.2 again.

I did two tests, both failed:

1.) Unchanged 4.0.22 installation ($RESIN_HOME/lib/eclipselink.jar is
present):

[11-09-02 10:04:38.668] {main} 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@aea5cd
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:3542)
at
com.caucho.env.deploy.DeployController.startImpl(DeployController.java:6
79)
at
com.caucho.env.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAut
oRedeployAutoStrategy.java:77)
at
com.caucho.env.deploy.DeployController.startOnInit(DeployController.java
:529)
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
79)
at
com.caucho.env.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAut
oRedeployAutoStrategy.java:77)
at
com.caucho.env.deploy.DeployController.startOnInit(DeployController.java
:529)
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:1234)
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:1031)
at com.caucho.server.resin.Resin.initMain(Resin.java:1167)
at com.caucho.server.resin.Resin.main(Resin.java:1469)
[11-09-02 10:04:39.151] {main}
WebApp[production/webapp/default/testapp-EclipseLink-2.2] active


= Still the $RESIN_HOME/lib/eclipselink.jar (2.1.2.v20101206-r8635)
seems to be used instead of 2.2.0.v20110202-r8913 in our WAR file.



2.) Workaround removing $RESIN_HOME/lib/eclipselink.jar

[11-09-02 10:23:25.271] {main} In-place class redefinition (HotSwap) is
available.
[11-09-02 10:23:25.489] {main}
WebApp[production/webapp/default/testapp-EclipseLink-2.2] fail
[11-09-02 10:23:25.505] {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:1506)
  at
com.caucho.loader.SystemClassLoader.loadClassImpl(SystemClassLoader.java
:237)
  at
com.caucho.loader.DynamicClassLoader.loadClassImpl(DynamicClassLoader.ja
va:1504)
  at
com.caucho.loader.DynamicClassLoader.loadClassImpl(DynamicClassLoader.ja
va:1504)
  at
com.caucho.loader.DynamicClassLoader.loadClassImpl(DynamicClassLoader.ja
va:1504)
  at

Re: [Resin-interest] IllegalAccessError with Resin-Professional4.0.20 and EclipseLink 2.2

2011-09-02 Thread Scott Ferguson
On 09/02/2011 10:35 AM, BUSCH Steffen wrote:
 Hi Scott,

 I've seen you've filed a bug #4722 after my last email from 19th of
 August.
 http://bugs.caucho.com/view.php?id=4722

 It's already closed and marked as fixed in 4.0.21 so I've downloaded
 Resin-Pro-4.0.22 and deployed the WAR file
 (http://www.wmaccess.com/public/others/testapp-EclipseLink-2.2.war) with
 included EclipseLink 2.2 again.

If you're replacing/removing the eclipselink.jar, you also need to move 
the resin-eclipselink.jar from the resin/lib into the same classloader 
as your eclipselink override. (Or put it into the project-jars so it's 
automatically copied.)

-- Scott

 I did two tests, both failed:

 1.) Unchanged 4.0.22 installation ($RESIN_HOME/lib/eclipselink.jar is
 present):

 [11-09-02 10:04:38.668] {main} 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@aea5cd
 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:3542)
   at
 com.caucho.env.deploy.DeployController.startImpl(DeployController.java:6
 79)
   at
 com.caucho.env.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAut
 oRedeployAutoStrategy.java:77)
   at
 com.caucho.env.deploy.DeployController.startOnInit(DeployController.java
 :529)
   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
 79)
   at
 com.caucho.env.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAut
 oRedeployAutoStrategy.java:77)
   at
 com.caucho.env.deploy.DeployController.startOnInit(DeployController.java
 :529)
   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:1234)
   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:1031)
   at com.caucho.server.resin.Resin.initMain(Resin.java:1167)
   at com.caucho.server.resin.Resin.main(Resin.java:1469)
 [11-09-02 10:04:39.151] {main}
 WebApp[production/webapp/default/testapp-EclipseLink-2.2] active


 =  Still the $RESIN_HOME/lib/eclipselink.jar (2.1.2.v20101206-r8635)
 seems to be used instead of 2.2.0.v20110202-r8913 in our WAR file.



 2.) Workaround removing $RESIN_HOME/lib/eclipselink.jar

 [11-09-02 10:23:25.271] {main} In-place class redefinition (HotSwap) is
 available.
 [11-09-02 10:23:25.489] {main}
 WebApp[production/webapp/default/testapp-EclipseLink-2.2] fail
 [11-09-02 10:23:25.505] {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:1506)
at
 

Re: [Resin-interest] IllegalAccessError with Resin-Professional4.0.20 and EclipseLink 2.2

2011-09-02 Thread BUSCH Steffen
 On 09/02/2011 10:35 AM, BUSCH Steffen wrote:
  Hi Scott,
 
  I've seen you've filed a bug #4722 after my last email from 19th of 
  August.
  http://bugs.caucho.com/view.php?id=4722
 
  It's already closed and marked as fixed in 4.0.21 so I've downloaded
  Resin-Pro-4.0.22 and deployed the WAR file
  (http://www.wmaccess.com/public/others/testapp-EclipseLink-2.2.war) 
  with included EclipseLink 2.2 again.
 
 If you're replacing/removing the eclipselink.jar, you also 
 need to move the resin-eclipselink.jar from the resin/lib 
 into the same classloader as your eclipselink override. (Or 
 put it into the project-jars so it's automatically copied.)
 

That's doesn't seems to be working here. Now there are ClassNotFound
exceptions for
org.eclipse.persistence.platform.server.resin.ResinPlatform 
That's a step-by-step list what I did based on your recommendation:

unzip resin-pro-4.0.22.zip
cd resin-pro-4.0.22
rm lib/eclipselink.jar
mv lib/resin-eclipselink.jar project-jars/
cd webapps
wget --no-verbose
http://www.wmaccess.com/public/others/testapp-EclipseLink-2.2.war
cd ..
resin.exe


And this is the output:

[11-09-02 20:30:56.653] {main} resin.conf =
D:\WMACCESS-4.0\container-testing\resin-pro-4.0.22\conf\resin.xml
[11-09-02 20:30:56.653] {main}
[11-09-02 20:30:56.653] {main} server= 127.0.0.1:6800
(app-tier:default)
[11-09-02 20:30:56.653] {main} stage  = production
[11-09-02 20:30:56.933] {main} WebApp[production/webapp/default/ROOT]
active
[11-09-02 20:30:57.073] {main}
WebApp[production/webapp/default/resin-admin] active
[11-09-02 20:30:57.494] {main}
WebApp[production/webapp/default/resin-doc] active
[11-09-02 20:31:07.641] {main} In-place class redefinition (HotSwap) is
available.
[11-09-02 20:31:07.968] {main} javax.persistence.PersistenceException:
Exception [EclipseLink-28018] (Eclipse Persistence Services -
2.2.0.v20110202-r8913):
org.eclipse.persistence.exceptions.EntityManagerSetupException
   Exception Description: Predeployment of
PersistenceUnit [JPA_TEST] failed.
   Internal Exception: Exception
[EclipseLink-28006] (Eclipse Persistence Services -
2.2.0.v20110202-r8913):
org.eclipse.persistence.exceptions.EntityManagerSetupException
   Exception Description: ClassNotFound:
[org.eclipse.persistence.platform.server.resin.ResinPlatform] specified
in [eclipselink.target-server] property.
   Internal Exception:
java.lang.ClassNotFoundException:
org.eclipse.persistence.platform.server.resin.ResinPlatform in
EnvironmentClassLoader[web-app:production/webapp/default/testapp-Eclipse
Link-2.2,STARTING]
[11-09-02 20:31:07.968] {main} javax.persistence.PersistenceException:
Exception [EclipseLink-28018] (Eclipse Persistence Services -
2.2.0.v20110202-r8913):
org.eclipse.persistence.exceptions.EntityManagerSetupException
   Exception Description: Predeployment of
PersistenceUnit [JPA_TEST] failed.
   Internal Exception: Exception
[EclipseLink-28006] (Eclipse Persistence Services -
2.2.0.v20110202-r8913):
org.eclipse.persistence.exceptions.EntityManagerSetupException
   Exception Description: ClassNotFound:
[org.eclipse.persistence.platform.server.resin.ResinPlatform] specified
in [eclipselink.target-server] property.
   Internal Exception:
java.lang.ClassNotFoundException:
org.eclipse.persistence.platform.server.resin.ResinPlatform in
EnvironmentClassLoader[web-app:production/webapp/default/testapp-Eclipse
Link-2.2,STARTING]
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@9d2f26
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:
EnvironmentClassLoader[web-app:production/webapp/default/testapp-Eclipse
Link-2.2]
context /testapp-EclipseLink-2.2: Invoking EclipseLink 2.2 constructor.
context /testapp-EclipseLink-2.2: Creating EntityManager
SLF4J: Failed to load class org.slf4j.impl.StaticLoggerBinder.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for
further details.
[EL Info]: 2011-09-02 20:31:08.794--ServerSession(508556)--EclipseLink,
version: Eclipse Persistence Services - 2.2.0.v20110202-r8913
[EL Info]: 2011-09-02
20:31:09.308--ServerSession(508556)--file:/D:/WMACCESS-4.0/container-tes
ting/resin-pro-4.0.22/webapps/testapp-EclipseLink-2.2/WEB-INF/classes/_J

Re: [Resin-interest] IllegalAccessError with Resin-Professional4.0.20 and EclipseLink 2.2

2011-09-02 Thread Scott Ferguson
On 09/02/2011 11:39 AM, BUSCH Steffen wrote:
 On 09/02/2011 10:35 AM, BUSCH Steffen wrote:
 Hi Scott,

 I've seen you've filed a bug #4722 after my last email from 19th of
 August.
 http://bugs.caucho.com/view.php?id=4722

 It's already closed and marked as fixed in 4.0.21 so I've downloaded
 Resin-Pro-4.0.22 and deployed the WAR file
 (http://www.wmaccess.com/public/others/testapp-EclipseLink-2.2.war)
 with included EclipseLink 2.2 again.
 If you're replacing/removing the eclipselink.jar, you also
 need to move the resin-eclipselink.jar from the resin/lib
 into the same classloader as your eclipselink override. (Or
 put it into the project-jars so it's automatically copied.)

 That's doesn't seems to be working here. Now there are ClassNotFound
 exceptions for
 org.eclipse.persistence.platform.server.resin.ResinPlatform
 That's a step-by-step list what I did based on your recommendation:

 unzip resin-pro-4.0.22.zip
 cd resin-pro-4.0.22
 rm lib/eclipselink.jar
 mv lib/resin-eclipselink.jar project-jars/
 cd webapps
 wget --no-verbose
 http://www.wmaccess.com/public/others/testapp-EclipseLink-2.2.war
 cd ..
 resin.exe

Try webapp-jars instead. That just worked for me.

-- Scott


 And this is the output:

 [11-09-02 20:30:56.653] {main} resin.conf =
 D:\WMACCESS-4.0\container-testing\resin-pro-4.0.22\conf\resin.xml
 [11-09-02 20:30:56.653] {main}
 [11-09-02 20:30:56.653] {main} server= 127.0.0.1:6800
 (app-tier:default)
 [11-09-02 20:30:56.653] {main} stage  = production
 [11-09-02 20:30:56.933] {main} WebApp[production/webapp/default/ROOT]
 active
 [11-09-02 20:30:57.073] {main}
 WebApp[production/webapp/default/resin-admin] active
 [11-09-02 20:30:57.494] {main}
 WebApp[production/webapp/default/resin-doc] active
 [11-09-02 20:31:07.641] {main} In-place class redefinition (HotSwap) is
 available.
 [11-09-02 20:31:07.968] {main} javax.persistence.PersistenceException:
 Exception [EclipseLink-28018] (Eclipse Persistence Services -
 2.2.0.v20110202-r8913):
 org.eclipse.persistence.exceptions.EntityManagerSetupException
 Exception Description: Predeployment of
 PersistenceUnit [JPA_TEST] failed.
 Internal Exception: Exception
 [EclipseLink-28006] (Eclipse Persistence Services -
 2.2.0.v20110202-r8913):
 org.eclipse.persistence.exceptions.EntityManagerSetupException
 Exception Description: ClassNotFound:
 [org.eclipse.persistence.platform.server.resin.ResinPlatform] specified
 in [eclipselink.target-server] property.
 Internal Exception:
 java.lang.ClassNotFoundException:
 org.eclipse.persistence.platform.server.resin.ResinPlatform in
 EnvironmentClassLoader[web-app:production/webapp/default/testapp-Eclipse
 Link-2.2,STARTING]
 [11-09-02 20:31:07.968] {main} javax.persistence.PersistenceException:
 Exception [EclipseLink-28018] (Eclipse Persistence Services -
 2.2.0.v20110202-r8913):
 org.eclipse.persistence.exceptions.EntityManagerSetupException
 Exception Description: Predeployment of
 PersistenceUnit [JPA_TEST] failed.
 Internal Exception: Exception
 [EclipseLink-28006] (Eclipse Persistence Services -
 2.2.0.v20110202-r8913):
 org.eclipse.persistence.exceptions.EntityManagerSetupException
 Exception Description: ClassNotFound:
 [org.eclipse.persistence.platform.server.resin.ResinPlatform] specified
 in [eclipselink.target-server] property.
 Internal Exception:
 java.lang.ClassNotFoundException:
 org.eclipse.persistence.platform.server.resin.ResinPlatform in
 EnvironmentClassLoader[web-app:production/webapp/default/testapp-Eclipse
 Link-2.2,STARTING]
 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@9d2f26
 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:
 EnvironmentClassLoader[web-app:production/webapp/default/testapp-Eclipse
 Link-2.2]
 context /testapp-EclipseLink-2.2: Invoking EclipseLink 2.2 constructor.
 context /testapp-EclipseLink-2.2: Creating EntityManager
 SLF4J: Failed to load class org.slf4j.impl.StaticLoggerBinder.
 SLF4J: Defaulting to no-operation (NOP) logger implementation
 SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for
 further details.
 [EL Info]: 2011-09-02 20:31:08.794--ServerSession(508556)--EclipseLink,
 version: Eclipse Persistence Services -