Bug 297612 - jpa.jpaadvancedproperties.JPAAdvPropertiesJUnitTestCase failed on static weaving against WLS
Summary: jpa.jpaadvancedproperties.JPAAdvPropertiesJUnitTestCase failed on static weav...
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: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2009-12-11 13:39 EST by Kevin Yuan CLA
Modified: 2022-06-09 10:26 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Yuan CLA 2009-12-11 13:39:00 EST
Test Env:
    - EclipseLink: trunk
    - DB: Oracle 11.1.0.7
    - Application Server: WLS 10.3.2

Test Analysis: This suite failed on run-weaver against ejb jar, because of wls not support JPA2.0, cause this test suite failed.

Stack Trace:
run-weaver-server-test:
Warning: Reference run.classpath has not been set at runtime, but was found duri
ng
build file parsing, attempting to resolve. Future versions of Ant may support
 referencing ids defined in non-executed targets.
    [weave] [EL Severe]: 2009-12-11 13:27:03.87--Local Exception Stack: 
    [weave] Exception [EclipseLink-7305] (Eclipse Persistence Services - 2.1.0.q
ualifier): org.eclipse.persistence.exceptions.ValidationException
    [weave] Exception Description: An exception was thrown while processing the 
mapping file from URL: [jar:file:/scratch/kyuan/eclipselink/trunk/jpa/eclipselin
k.jpa.test/./build/unwoven-eclipselink-jpaadvancedproperties-model_ejb.jar!/META
-INF/RelationshipProject.xml],
    [weave] error using JPA 1.0 orm.xsd was [Exception [EclipseLink-25008] (Ecli
pse Persistence Services - 2.1.0.qualifier): org.eclipse.persistence.exceptions.
XMLMarshalException
    [weave] Exception Description: A descriptor with default root element {http:
//www.eclipse.org/eclipselink/xsds/persistence}object-persistence was not found 
in the project],
    [weave] error using eclipselink-orm.xsd was [Exception [EclipseLink-25008] (
Eclipse Persistence Services - 2.1.0.qualifier): org.eclipse.persistence.excepti
ons.XMLMarshalException
    [weave] Exception Description: A descriptor with default root element {http:
//www.eclipse.org/eclipselink/xsds/persistence}object-persistence was not found 
in the project],
    [weave] error using JPA 2.0 orm.xsd is in cause.
    [weave] Internal Exception: Exception [EclipseLink-25008] (Eclipse Persisten
ce Services - 2.1.0.qualifier): org.eclipse.persistence.exceptions.XMLMarshalExc
eption
    [weave] Exception Description: A descriptor with default root element {http:
//www.eclipse.org/eclipselink/xsds/persistence}object-persistence was not found 
in the project
    [weave]     at org.eclipse.persistence.exceptions.ValidationException.errorP
arsingMappingFile(ValidationException.java:774)
    [weave]     at org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMa
ppingsReader.read(XMLEntityMappingsReader.java:100)
    [weave]     at org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMa
ppingsReader.read(XMLEntityMappingsReader.java:143)
    [weave]     at org.eclipse.persistence.internal.jpa.metadata.MetadataProcess
or.loadSpecifiedMappingFiles(MetadataProcessor.java:326)
    [weave]     at org.eclipse.persistence.internal.jpa.metadata.MetadataProcess
or.loadMappingFiles(MetadataProcessor.java:292)
    [weave]     at org.eclipse.persistence.internal.jpa.deployment.PersistenceUn
itProcessor.processORMetadata(PersistenceUnitProcessor.java:381)
    [weave]     at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveClassTra
nsformer.buildTransformer(StaticWeaveClassTransformer.java:160)
    [weave]     at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveClassTra
nsformer.buildClassTransformers(StaticWeaveClassTransformer.java:123)
    [weave]     at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveClassTra
nsformer.<init>(StaticWeaveClassTransformer.java:81)
    [weave]     at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveProcesso
r.process(StaticWeaveProcessor.java:237)
    [weave]     at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveProcesso
r.performWeaving(StaticWeaveProcessor.java:161)
    [weave]     at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveAntTask.
start(StaticWeaveAntTask.java:203)
    [weave]     at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveAntTask.
execute(StaticWeaveAntTask.java:168)
    [weave]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
va:288)
    [weave]     at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
    [weave]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
    [weave]     at java.lang.reflect.Method.invoke(Method.java:597)
    [weave]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchU
tils.java:105)
    [weave]     at org.apache.tools.ant.Task.perform(Task.java:348)
    [weave]     at org.apache.tools.ant.Target.execute(Target.java:357)
    [weave]     at org.apache.tools.ant.Target.performTasks(Target.java:385)
    [weave]     at org.apache.tools.ant.Project.executeSortedTargets(Project.jav
a:1329)
    [weave]     at org.apache.tools.ant.helper.SingleCheckExecutor.executeTarget
s(SingleCheckExecutor.java:38)

How to Reproduce:
    - Just change "server.weaving" to "server.weaving=static" in trunk\jpa\eclipselink.jpa.test\test.properties;
    - start wls server;
    - execute "ant server-test-jpaadvancedproperties"
Comment 1 Kevin Yuan CLA 2010-01-05 15:34:34 EST
The old project xml file shouldn't be added in persistence.xml (<mapping-file>META-INF/RelationshipProject.xml</mapping-file>). It will be treated as orm xml file. This project xml file can only be referenced by sessions.xml.
The fix is removing this element in persistence.xml.

Code reviewed by James Sutherland.
Comment 2 Kevin Yuan CLA 2010-01-06 11:30:34 EST
backport to 2.0.1, 1.1.3, 1.2.x stream.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:15:48 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:26:15 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink