OneToOne Mapping Exception [message #1265845] |
Thu, 06 March 2014 11:28  |
Eclipse User |
|
|
|
Hello,
I am using a Workbench project and getting one deployment-xml exported, to use in a Web-Application.
The below error is a recurring one, which is blocking the functional testing.
To set the context, it is a non-JPA project and a migration attempt from TopLink 9.0.4
For this particular issues, two tables are involved:
Vista_Rule and Vista_Rule_Applicability
The first table refers to the second one, with a One-to-One relational mapping.
The Data-mapping objects are Rule.java [for Vista_Rule] & Applicability.java [Vista_Rule_Applicability]. These are again non-JPA types. A custom framework (quite a old one), maps the resp. results with these objects.
When I mapped the descriptors of these tables, using the WorkBench, I found that Rule has an attribute & one-to-one mapping for Applicability.
Again, Applicability, has an attribute & one-to-one mapping for Rule. So, when a sql query is executed, to fetch a Rule-record, the below exception occurs.
Ideally, it should bear with a NoContainerPolicy whereas due to unknown reason it is receiving ContainerIndirectionPolicy [as if it is a one-to-many]
====
Exception Description: The operation [buildContainer constructor (null) Failed: java.lang.NullPointerException] is invalid for this indirection policy [org.eclipse.persistence.internal.indirection.ContainerIndirectionPolicy@ebc1f0ed].
Mapping: org.eclipse.persistence.mappings.OneToOneMapping[applicabilityHolder]
Descriptor: RelationalDescriptor(com.vista.business.ruleengine.rules.Rule --> [DatabaseTable(VISTA_RULE)])
====
Please suggest. It is quite urgent for the testing of this project.
|
|
|
|
|
|
Re: OneToOne Mapping Exception [message #1386813 is a reply to message #1386756] |
Fri, 20 June 2014 13:51  |
Eclipse User |
|
|
|
I'm surprised that is needed since it should be initialized when the mapping is initialized, which again occurs when the descriptor is initialized. How is the session being created and when are the mappings being added to the project?
|
|
|
Powered by
FUDForum. Page generated in 0.06684 seconds