On 8 March 2012 10:01, Boblitz John <[email protected]> wrote:
> Hello Steve,
>
> You wrote orignally that your were migrating away from Hibernate, yet, in you 
> most recent
> Posting, you have a Link to "audit/orm/HibernateServerDetail".
>
> Maybe this is part of the problem?
>

Not unless openJPA is reading class names ;). But seriously yes, this
used to be a class persisted by hibernate, but I've moved it over to
JPA annotations I just haven't renamed the class yet as I have enough
changes with the hibernate removal without doing name refactors at the
same time.

Having done lots of debugging through openJPA code I now know *why*
the openJPA code blows up, but how to fix it is a mystery.

The problem is that the PersistenceCapable interface appears to be
being loaded by two different class loaders, in the openJPA code there
is then a check to see if that class is assignable from the entity
class that has been loaded. Now despite the fact that the entity class
does implement the PersistenceCapable interface (I've checked using
the debugger) it's not the same one from the same class loader (or
parents) and so the check fails, which takes the code down the run
time enhancer route.

So my mission now is to figure out why this is the case and try and
stop that happening. Probably something to do with spring getting in
the way, I might try creating all the openJPA stack myself without
spring to see if that helps.

Any other suggestions welcome!

Reply via email to