Hello,
I am in need of some help. I have a relational project mapped
in Toplink Workbench 10g Release 3 (10.1.3.3.0).
When I use workbench to export a project.xml file, then
attempt to use Eclipselink to read the project (using XMLProjectReader to read
the file), EclipseLink throws a NoSuchMethodException when it attempts to
invoke OneToOneMapping.shouldUseJoining().
I am using Incubation1_0M6, and have Incubation1_0M6\eclipselink\jlibeclipselink.jar
and \Incubation1_0M6\eclipselink\jlib\jpersistence.jar on the class path.
I did try including Incubation1_0M6\eclipselink\workbench\jlib\eclipselinkmw.jar
and elmwcore.jar, and then all Jars that come with Incubation1_0M6, but it did
not help. Maybe I am missing some other Jar?
I have noticed that OneToOneMapping.shouldUseJoining() is
present in Oracle’s Toplink JavaDoc, and is not deprecated, but it is not
present in Eclipselink’s version of this class.
In addition if I use the Oracle Work Bench to generate the
project.java, and then use the package rename utility on that file, I can then compile
that java file and continue with my build using EclipseLink. However I was
under the impression that Eclipselink could read a Toplink 10 project file, and
that fits naturally with out build process (the above workaround is far from
ideal).
The Toplink project does not report any warnings or errors.
I hope someone can help, and thanks in advance.
Cheers Tim.
[java] Exception in thread
"main" Local Exception Stack:
[java] Exception [EclipseLink-0]
(Eclipse Persistence Services - 1.0 (Build
SNAPSHOT - 20080409)):
org.eclipse.persistence.exceptions.IntegrityException
[java] Descriptor Exceptions:
[java]
---------------------------------------------------------
[java] Exception [EclipseLink-60]
(Eclipse Persistence Services - 1.0 (Buil
d SNAPSHOT - 20080409)):
org.eclipse.persistence.exceptions.DescriptorException
[java] Exception Description: The
method [setUsesJoining] or [shouldUseJoin
ing] is not defined in the object
[org.eclipse.persistence.mappings.OneToOneMapp
ing].
[java] Internal Exception:
java.lang.NoSuchMethodException: org.eclipse.per
sistence.mappings.OneToOneMapping.shouldUseJoining()
[java] Mapping:
org.eclipse.persistence.oxm.mappings.XMLDirectMapping[usesJ
oiningMapping-->toplink:joining/text()]
[java] Descriptor:
XMLDescriptor(org.eclipse.persistence.mappings.OneToOneM
apping --> [])
[java] Runtime Exceptions:
[java]
---------------------------------------------------------
[java]
java.lang.NullPointerException
[java]
java.lang.NullPointerException
[java] at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl
.initializeDescriptors(DatabaseSessionImpl.java:472)
[java] at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl
.initializeDescriptors(DatabaseSessionImpl.java:404)
[java] at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl
.postConnectDatasource(DatabaseSessionImpl.java:649)
[java] at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl
.login(DatabaseSessionImpl.java:615)
[java] at
org.eclipse.persistence.oxm.XMLContext.<init>(XMLContext.java
:173)
[java] at
org.eclipse.persistence.oxm.XMLContext.<init>(XMLContext.java
:154)
[java] at
org.eclipse.persistence.sessions.factories.XMLProjectReader.r
eadObjectPersistenceRuntimeFormat(XMLProjectReader.java:255)
[java] at
org.eclipse.persistence.sessions.factories.XMLProjectReader.r
ead1013Format(XMLProjectReader.java:226)
[java] at
org.eclipse.persistence.sessions.factories.XMLProjectReader.r
ead(XMLProjectReader.java:138)
[java] at
org.eclipse.persistence.sessions.factories.XMLProjectReader.r
ead(XMLProjectReader.java:207)
[java] at
org.eclipse.persistence.sessions.factories.XMLProjectReader.r
ead(XMLProjectReader.java:77)
[java] at
com.ot.cix.resource.schema.SchemaClassGenerator.create(Schema
ClassGenerator.java:76)
[java] at
com.ot.cix.resource.schema.SchemaClassGenerator.main(SchemaCl
assGenerator.java:40)
[java] Descriptor
Exceptions:
[java]
---------------------------------------------------------
[java] Local Exception Stack:
[java] Exception [EclipseLink-60]
(Eclipse Persistence Services - 1.0 (Buil
d SNAPSHOT - 20080409)): org.eclipse.persistence.exceptions.DescriptorException
[java] Exception Description: The
method [setUsesJoining] or [shouldUseJoin
ing] is not defined in the object
[org.eclipse.persistence.mappings.OneToOneMapp
ing].
[java] Internal Exception:
java.lang.NoSuchMethodException: org.eclipse.per
sistence.mappings.OneToOneMapping.shouldUseJoining()
[java] Mapping:
org.eclipse.persistence.oxm.mappings.XMLDirectMapping[usesJ
oiningMapping-->toplink:joining/text()]
[java] Descriptor:
XMLDescriptor(org.eclipse.persistence.mappings.OneToOneM
apping --> [])
[java] at
org.eclipse.persistence.exceptions.DescriptorException.noSuch
MethodWhileInitializingAttributesInMethodAccessor(DescriptorException.java:1139)
[java] at
org.eclipse.persistence.internal.descriptors.MethodAttributeA
ccessor.initializeAttributes(MethodAttributeAccessor.java:151)
[java] at
org.eclipse.persistence.mappings.DatabaseMapping.preInitializ
e(DatabaseMapping.java:1046)
[java] at
org.eclipse.persistence.mappings.foundation.AbstractDirectMap
ping.preInitialize(AbstractDirectMapping.java:571)
[java] at
org.eclipse.persistence.oxm.XMLDescriptor.preInitialize(XMLDe
scriptor.java:426)
[java] at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl
.initializeDescriptors(DatabaseSessionImpl.java:424)
[java] at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl
.initializeDescriptors(DatabaseSessionImpl.java:404)
[java] at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl
.postConnectDatasource(DatabaseSessionImpl.java:649)
[java] at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl
.login(DatabaseSessionImpl.java:615)
[java] at
org.eclipse.persistence.oxm.XMLContext.<init>(XMLContext.java
:173)
[java] at
org.eclipse.persistence.oxm.XMLContext.<init>(XMLContext.java
:154)
[java] at
org.eclipse.persistence.sessions.factories.XMLProjectReader.r
eadObjectPersistenceRuntimeFormat(XMLProjectReader.java:255)
[java] at
org.eclipse.persistence.sessions.factories.XMLProjectReader.r
ead1013Format(XMLProjectReader.java:226)
[java] at
org.eclipse.persistence.sessions.factories.XMLProjectReader.r
ead(XMLProjectReader.java:138)
[java] at
org.eclipse.persistence.sessions.factories.XMLProjectReader.r
ead(XMLProjectReader.java:207)
[java] at
org.eclipse.persistence.sessions.factories.XMLProjectReader.r
ead(XMLProjectReader.java:77)
[java] at
com.ot.cix.resource.schema.SchemaClassGenerator.create(Schema
ClassGenerator.java:76)
[java] at
com.ot.cix.resource.schema.SchemaClassGenerator.main(SchemaCl
assGenerator.java:40)
[java] Caused by:
java.lang.NoSuchMethodException: org.eclipse.persistence.
mappings.OneToOneMapping.shouldUseJoining()
[java] at
java.lang.Class.getDeclaredMethod(Class.java:1909)
[java] at
org.eclipse.persistence.internal.security.PrivilegedAccessHel
per.findMethod(PrivilegedAccessHelper.java:57)
[java] at
org.eclipse.persistence.internal.security.PrivilegedAccessHel
per.getMethod(PrivilegedAccessHelper.java:228)
[java] at
org.eclipse.persistence.internal.helper.Helper.getDeclaredMet
hod(Helper.java:886)
[java] at
org.eclipse.persistence.internal.descriptors.MethodAttributeA
ccessor.initializeAttributes(MethodAttributeAccessor.java:144)
[java] ...
16 more
[java] Runtime Exceptions:
[java]
---------------------------------------------------------
[java]
java.lang.NullPointerException
[java] at
java.lang.Class.isAssignableFrom(Native Method)
[java] at
org.eclipse.persistence.mappings.foundation.AbstractDirectMap
ping.preInitialize(AbstractDirectMapping.java:586)
[java] at
org.eclipse.persistence.oxm.XMLDescriptor.preInitialize(XMLDe
scriptor.java:426)
[java] at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl
.initializeDescriptors(DatabaseSessionImpl.java:424)
[java] at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl
.initializeDescriptors(DatabaseSessionImpl.java:404)
[java] at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl
.postConnectDatasource(DatabaseSessionImpl.java:649)
[java] at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl
.login(DatabaseSessionImpl.java:615)
[java] at
org.eclipse.persistence.oxm.XMLContext.<init>(XMLContext.java
:173)
[java] at
org.eclipse.persistence.oxm.XMLContext.<init>(XMLContext.java
:154)
[java] at
org.eclipse.persistence.sessions.factories.XMLProjectReader.r
eadObjectPersistenceRuntimeFormat(XMLProjectReader.java:255)
[java] at
org.eclipse.persistence.sessions.factories.XMLProjectReader.r
ead1013Format(XMLProjectReader.java:226)
[java] at
org.eclipse.persistence.sessions.factories.XMLProjectReader.r
ead(XMLProjectReader.java:138)
[java] at
org.eclipse.persistence.sessions.factories.XMLProjectReader.r
ead(XMLProjectReader.java:207)
[java] at
org.eclipse.persistence.sessions.factories.XMLProjectReader.r
ead(XMLProjectReader.java:77)
[java] at
com.ot.cix.resource.schema.SchemaClassGenerator.create(Schema
ClassGenerator.java:76)
[java] at
com.ot.cix.resource.schema.SchemaClassGenerator.main(SchemaCl
assGenerator.java:40)
[java]
java.lang.NullPointerException
[java] at
org.eclipse.persistence.oxm.XMLDescriptor.initialize(XMLDescr
iptor.java:545)
[java] at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl
.initializeDescriptors(DatabaseSessionImpl.java:443)
[java] at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl
.initializeDescriptors(DatabaseSessionImpl.java:404)
[java] at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl
.postConnectDatasource(DatabaseSessionImpl.java:649)
[java] at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl
.login(DatabaseSessionImpl.java:615)
[java] at
org.eclipse.persistence.oxm.XMLContext.<init>(XMLContext.java
:173)
[java] at
org.eclipse.persistence.oxm.XMLContext.<init>(XMLContext.java
:154)
[java] at
org.eclipse.persistence.sessions.factories.XMLProjectReader.r
eadObjectPersistenceRuntimeFormat(XMLProjectReader.java:255)
[java] at
org.eclipse.persistence.sessions.factories.XMLProjectReader.r
ead1013Format(XMLProjectReader.java:226)
[java] at
org.eclipse.persistence.sessions.factories.XMLProjectReader.r
ead(XMLProjectReader.java:138)
[java] at
org.eclipse.persistence.sessions.factories.XMLProjectReader.r
ead(XMLProjectReader.java:207)
[java] at
org.eclipse.persistence.sessions.factories.XMLProjectReader.r
ead(XMLProjectReader.java:77)