Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] RE: NoSuchMethodException when using XMLProjectReader.read()

Problem solved. I just noticed that I have a version mismatch. 
Incubation1_0M1 and M2 have this method defined. It is deprecated in
Oracle TopLink (11.1.1.0.0).
 
-----Original Message-----
From: eclipselink-users-bounces@xxxxxxxxxxx
[mailto:eclipselink-users-bounces@xxxxxxxxxxx] On Behalf Of
eclipselink-users-request@xxxxxxxxxxx
Sent: Tuesday, 22 April 2008 12:33 PM
To: eclipselink-users@xxxxxxxxxxx
Subject: eclipselink-users Digest, Vol 8, Issue 32

Send eclipselink-users mailing list submissions to
	eclipselink-users@xxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
	https://dev.eclipse.org/mailman/listinfo/eclipselink-users
or, via email, send a message with subject or body 'help' to
	eclipselink-users-request@xxxxxxxxxxx

You can reach the person managing the list at
	eclipselink-users-owner@xxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of eclipselink-users digest..."


Today's Topics:

   1. NoSuchMethodException when using	XMLProjectReader.read()
      (Tim Bruton)


----------------------------------------------------------------------

Message: 1
Date: Mon, 21 Apr 2008 21:38:41 -0500
From: "Tim Bruton" <tbruton@xxxxxxxxxxxxxxxxxx>
Subject: [eclipselink-users] NoSuchMethodException when using
	XMLProjectReader.read()
To: <eclipselink-users@xxxxxxxxxxx>
Message-ID:
	
<5A9CAAC47E2C5542A1D137FD514EB8140A197129@xxxxxxxxxx.chicago.hostway>
Content-Type: text/plain; charset="us-ascii"

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.ja
va: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)

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
https://dev.eclipse.org/mailman/private/eclipselink-users/attachments/20
080421/3b9e93a9/attachment.html

------------------------------

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


End of eclipselink-users Digest, Vol 8, Issue 32
************************************************


Back to the top