Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347520 - Static weaving fails on app. server in case persistence unit uses sessions.xml
Summary: Static weaving fails on app. server in case persistence unit uses sessions.xml
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-27 16:51 EDT by Andrei Ilitchev CLA
Modified: 2022-06-09 10:08 EDT (History)
0 users

See Also:


Attachments
Suggested patch. (1.80 KB, patch)
2011-05-27 16:56 EDT, Andrei Ilitchev CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Ilitchev CLA 2011-05-27 16:51:58 EDT
Hi Andrei,
Our one JPA server test suite (server-test-jpaadvancedproperties) failed on static weaving testing on all servers, it seems related to your trans (revision 9336), the following is the static trace during on JBoss-5.1.0.GA:

run-weaver-server-test:
Warning: Reference run.classpath has not been set at runtime, but was found during
build file parsing, attempting to resolve. Future versions of Ant may support
 referencing ids defined in non-executed targets.
    [weave] [EL Severe]: 2011-05-10 04:33:57.198--javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.3.0.v20110510-r9336): org.eclipse.persistence.exceptions.EntityManagerSetupException
    [weave] Exception Description: Predeployment of PersistenceUnit [JPAADVProperties] failed.
    [weave] Internal Exception: Exception [EclipseLink-28007] (Eclipse Persistence Services - 2.3.0.v20110510-r9336): org.eclipse.persistence.exceptions.EntityManagerSetupException
    [weave] Exception Description: Failed to instantiate ServerPlatform of type [org.eclipse.persistence.platform.server.jboss.JBossPlatform] specified in [eclipselink.target-server] property.
    [weave] Internal Exception: java.lang.NoSuchMethodException: org.eclipse.persistence.platform.server.jboss.JBossPlatform.<init>(org.eclipse.persistence.sessions.DatabaseSession)
    [weave] 	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1359)
    [weave] 	at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveClassTransformer.buildClassTransformers(StaticWeaveClassTransformer.java:126)
    [weave] 	at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveClassTransformer.<init>(StaticWeaveClassTransformer.java:76)
    [weave] 	at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveProcessor.process(StaticWeaveProcessor.java:250)
    [weave] 	at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveProcessor.performWeaving(StaticWeaveProcessor.java:174)
    [weave] 	at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveAntTask.start(StaticWeaveAntTask.java:215)
    [weave] 	at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveAntTask.execute(StaticWeaveAntTask.java:177)
    [weave] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    [weave] 	at sun.reflect.GeneratedMethodAccessor505.invoke(Unknown Source)
    [weave] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [weave] 	at java.lang.reflect.Method.invoke(Method.java:597)
    [weave] 	at sun.reflect.GeneratedMethodAccessor505.invoke(Unknown Source)
    [weave] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [weave] 	at java.lang.reflect.Method.invoke(Method.java:597)
    [weave] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    [weave] 	at sun.reflect.GeneratedMethodAccessor505.invoke(Unknown Source)
    [weave] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [weave] 	at java.lang.reflect.Method.invoke(Method.java:597)
    [weave] 	at sun.reflect.GeneratedMethodAccessor505.invoke(Unknown Source)
    [weave] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [weave] 	at java.lang.reflect.Method.invoke(Method.java:597)
    [weave] 	at sun.reflect.GeneratedMethodAccessor505.invoke(Unknown Source)
    [weave] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [weave] 	at java.lang.reflect.Method.invoke(Method.java:597)
    [weave] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    [weave] 	at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
    [weave] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    [weave] 	at sun.reflect.GeneratedMethodAccessor505.invoke(Unknown Source)
    [weave] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [weave] 	at java.lang.reflect.Method.invoke(Method.java:597)
    [weave] Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.3.0.v20110510-r9336): org.eclipse.persistence.exceptions.EntityManagerSetupException
    [weave] Exception Description: Predeployment of PersistenceUnit [JPAADVProperties] failed.
    [weave] Internal Exception: Exception [EclipseLink-28007] (Eclipse Persistence Services - 2.3.0.v20110510-r9336): org.eclipse.persistence.exceptions.EntityManagerSetupException
    [weave] Exception Description: Failed to instantiate ServerPlatform of type [org.eclipse.persistence.platform.server.jboss.JBossPlatform] specified in [eclipselink.target-server] property.
    [weave] Internal Exception: java.lang.NoSuchMethodException: org.eclipse.persistence.platform.server.jboss.JBossPlatform.<init>(org.eclipse.persistence.sessions.DatabaseSession)
    [weave] 	at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:221)
    [weave] 	... 88 more
    [weave] Caused by: Exception [EclipseLink-28007] (Eclipse Persistence Services - 2.3.0.v20110510-r9336): org.eclipse.persistence.exceptions.EntityManagerSetupException
    [weave] Exception Description: Failed to instantiate ServerPlatform of type [org.eclipse.persistence.platform.server.jboss.JBossPlatform] specified in [eclipselink.target-server] property.
    [weave] Internal Exception: java.lang.NoSuchMethodException: org.eclipse.persistence.platform.server.jboss.JBossPlatform.<init>(org.eclipse.persistence.sessions.DatabaseSession)
    [weave] 	at org.eclipse.persistence.exceptions.EntityManagerSetupException.failedToInstantiateServerPlatform(EntityManagerSetupException.java:141)
    [weave] 	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.updateServerPlatform(EntityManagerSetupImpl.java:638)
    [weave] 	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1186)
    [weave] 	... 87 more
    [weave] Caused by: java.lang.NoSuchMethodException: org.eclipse.persistence.platform.server.jboss.JBossPlatform.<init>(org.eclipse.persistence.sessions.DatabaseSession)
    [weave] 	at java.lang.Class.getConstructor0(Class.java:2706)
    [weave] 	at java.lang.Class.getConstructor(Class.java:1657)
    [weave] 	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.updateServerPlatform(EntityManagerSetupImpl.java:616)
    [weave] 	... 88 more
Comment 1 Andrei Ilitchev CLA 2011-05-27 16:56:21 EDT
Created attachment 196811 [details]
Suggested patch.

Static weaving does not call updateServerPlatform and updateLoggers methods if sessions.xml is not used.
Neither these methods should be called by static weaving in sessions.xml case.
Comment 2 Andrei Ilitchev CLA 2011-05-27 17:02:11 EDT
Checked the patch into trunk (rev.9473)
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:08:18 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink