[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] java.lang.IllegalArgumentException

Hi
I have got the exception which is so strange for me.
Here is the log:

Exception Description: Trying to set value [ejb3.Oebskeyfields@ff00ff0] for
instance variable [oebsId] of type [java.lang.String] in the object.  The
specified object is not an instance of the class or interface declaring the
underlying field, or an unwrapping conversion has failed.
Internal Exception: java.lang.IllegalArgumentException
Mapping: org.eclipse.persistence.mappings.OneToOneMapping[oebsId]
Descriptor: RelationalDescriptor(ejb3.OebsView -->
[DatabaseTable(OEBS_VIEW)])

The ejb3.Oebskeyfields has not got the oebsId attribute.
This is truth but my code is trying to get the instance of another class
ejb3.OebsView by invoking the next() method of cursor.
These classes are joined as one to one by the oebsId attribute.

Here is my code:

...
ReadAllQuery queryByTime = new ReadAllQuery(OebsView.class, where);
queryByTime.useScrollableCursor();
...
cursorByTimeAndOrganizationId = (ScrollableCursor)
uow.executeQuery(queryByTime);
...
Vector<ejb3.OebsView> oebsList = new Vector<ejb3.OebsView>();
oebsList = cursorByTimeAndOrganizationId.next(q);
...

I can not understand at all why does it try to set value of the
ejb3.Oebskeyfields class?


Regards
Dmitry



-- 
View this message in context: http://www.nabble.com/java.lang.IllegalArgumentException-tp19488247p19488247.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.