Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » does not return a ValueHolderInterface, but the mapping uses indirection
does not return a ValueHolderInterface, but the mapping uses indirection [message #535615] Mon, 24 May 2010 22:03 Go to next message
Chris Mathrusse is currently offline Chris MathrusseFriend
Messages: 24
Registered: July 2009
Junior Member
I'm pulling my hair out over this exception. (And I really can't spare any..)

I've got my build running in Maven and I'm attempting to launch my application inside of the Glassfish-embedded plugin, but every time EclipseLink loads it starts by dumping a huge number of exceptions. Below is an excerpt from the stack trace.

[EL Info]: 2010-05-24 14:50:19.926--ServerSession(2147220473)--Thread(Thread[main,5,main])--EclipseLink, version: Eclipse Persistence Services - 2.0.0.v20091127-r5931
May 24, 2010 2:50:20 PM com.sun.jts.CosTransactions.DefaultTransactionService identify_ORB
INFO: jts.startup_msg
[EL Fine]: 2010-05-24 14:50:20.906--Thread(Thread[main,5,main])--Detected Vendor platform: org.eclipse.persistence.platform.database.JavaDBPlatform
[EL Config]: 2010-05-24 14:50:20.922--ServerSession(2147220473)--Connection(1559064333)--Thread(Thread[main,5,main])--connecting(DatabaseLogin(
	platform=>JavaDBPlatform
	user name=> ""
	connector=>JNDIConnector datasource name=>null
))
[EL Config]: 2010-05-24 14:50:20.923--ServerSession(2147220473)--Connection(1746267684)--Thread(Thread[main,5,main])--Connected: jdbc:derby:memory:test
	User: APP
	Database: Apache Derby  Version: 10.5.3.0 - (802917)
	Driver: Apache Derby Embedded JDBC Driver  Version: 10.5.3.0 - (802917)
[EL Config]: 2010-05-24 14:50:20.924--ServerSession(2147220473)--Connection(2009445086)--Thread(Thread[main,5,main])--connecting(DatabaseLogin(
	platform=>JavaDBPlatform
	user name=> ""
	connector=>JNDIConnector datasource name=>null
))
[EL Config]: 2010-05-24 14:50:20.924--ServerSession(2147220473)--Connection(1415727680)--Thread(Thread[main,5,main])--Connected: jdbc:derby:memory:test
	User: APP
	Database: Apache Derby  Version: 10.5.3.0 - (802917)
	Driver: Apache Derby Embedded JDBC Driver  Version: 10.5.3.0 - (802917)
[EL Severe]: 2010-05-24 14:50:21.003--ServerSession(2147220473)--Thread(Thread[main,5,main])--Local Exception Stack: 
Exception [EclipseLink-0] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.IntegrityException
Descriptor Exceptions: 
---------------------------------------------------------

Exception [EclipseLink-127] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The get method for the attribute [country] does not return a ValueHolderInterface, but the mapping uses indirection.
Mapping: org.eclipse.persistence.mappings.OneToOneMapping[country]
Descriptor: RelationalDescriptor(com.intraxinc.core.persistence.entity.EmbassyContact --> [DatabaseTable(EmbassyContact)])



My entities are mapped as follows:
public class EmbassyContact  {
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "CountryID")
    private Country country;
}


public class Country {
    @OneToMany(mappedBy = "country")
    private Set<EmbassyContact> embassyContacts;
}


This is only one of many of these types of exceptions. So what have I got incorrect? I've added static weaving to my maven script and I verified that the entities are weaved statically, so why am I getting this exception?

Thanks for the help...
Re: does not return a ValueHolderInterface, but the mapping uses indirection [message #535783 is a reply to message #535615] Tue, 25 May 2010 15:48 Go to previous message
Chris Mathrusse is currently offline Chris MathrusseFriend
Messages: 24
Registered: July 2009
Junior Member
I resolved the problem. It appears to be an issue with the way that I had the EntityManagerFactory configured within Spring. I had the following property specified:
<property name="loadTimeWeaver">
	<bean	 class="org.springframework.instrument.classloading.SimpleLoadTimeWeaver" />
</property>


Once I removed this everything worked as expected. (Foolish copy-and-paste mistake)
Previous Topic:Why join on pk for IN SELECT?
Next Topic:EclipseLink 1.2.0 Workbench usage
Goto Forum:
  


Current Time: Fri Mar 29 11:51:41 GMT 2024

Powered by FUDForum. Page generated in 0.02459 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top