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...