Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] ClassCastException when exeuting query

From looking at the stacktrace, there might be some code in your application like:

List<Event> newEvents = new ArrayList<>();
newEvents.add(...);
aTrip.setEvents(newEvents);

In this case, the error-condition might be avoided by a pattern like this:

List<Event> newEvents = new ArrayList<>();
newEvents.add(...);
aTrip.getEvents().clear();
aTrip.getEvents().addAll(newEvents);

It also might be worth a try to use the EclipseLink javaagent for dynamic weaving (ELUG #Using_Weaving).

Or if this all does not help, try to temporarily switch off the shared cache.

<property name="eclipselink.cache.shared.default" value="false" />

Please note that this is all pure speculation and might not be related to the actual bug.

HTH,
Frank

Michael Simons wrote:
Hello James, is there a work-around? Do You know what causes the bug "to bite"? Is it the combination of hints, we're using? - Michael


View this message in context: Re: ClassCastException when exeuting query
Sent from the EclipseLink - Users mailing list archive at Nabble.com.

Back to the top