openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Sutter <kwsut...@gmail.com>
Subject Re: ClassNotFoundExceptions for Entity classes after bundle redeployment
Date Thu, 26 Sep 2013 12:57:20 GMT
Hi Dirk,
Are you using container-managed persistence or application-managed
persistence?  That is, who is controlling the lifecycle of your EMFs and
EMs?  If the PCRegistry is continuing to grow and grow and grow, this
sounds like an EMF or EM leak where they are not getting properly closed.

What version of OpenJPA is in use?  In 2.2.0, OpenJPA put a feature in
place [1] that helps with resolving memory issues when failing to close
EMFs.

Another thing to look at is how you are enhancing your Entities for OpenJPA
monitoring.  Are you doing build-time enhancement or some type of runtime
enhancement?  Posting your persistence.xml would also be good.

-- Kevin

[1]  https://issues.apache.org/jira/browse/OPENJPA-2042


On Thu, Sep 26, 2013 at 3:52 AM, Rudolph, Dirk
<Dirk.Rudolph@t-systems.com>wrote:

> Hi all,
>
>
>
> we are using OpenJPA in our osgi environment (Apache Felix) and got some
> (non-deterministic ) ClassNotFoundExceptions caused by already closed jars.
> This occurs only when the persistence bundle we are using is redeployed.
>
>
>
> We mentioned that the PCRegistry.register method is invoked when our
> Entity-classes get instantiated. This works as expected. The meta data map
> of the Registry is filled and successfully passed through the
> MetadataRepository. After a redeployment this happens again and again so
> the map of registered metas in the PCRegistry grows and grows and contains
> classes referencing already disposed classloaders. When the registered
> metadata get used this can cause ClassNotFoundExceptions when an outdated
> classloader is access. I assume that this happens non-deterministic because
> the order of the data to iterate over isn't predictable. Is this diagnostic
> right?
>
>
>
> Should PCRegistry.deRegister be called when a bundle is stopped before
> update? Can this be done by any configuration?
>
>
>
> Thank's so far,
>
>
>
>
> Dirk Rudolph
>
>
>
>
> T-Systems Multimedia Solutions GmbH
> Organisationseinheit CCS
> Dirk Rudolph
> Software-Entwicklung, OCJP
>
> Hausanschrift: Riesaer Straße 5, 01129 Dresden
> Postanschrift: Postfach 10 02 24, 01072 Dresden
> +49 351 2820-5363       (Tel)
> E-Mail: Dirk.Rudolph@t-systems.com <mailto:mDirk.Rudolph@t-systems-mms.com
> >
> Internet: http://www.t-systems-mms.com <http://www.t-systems-mms.de/>
>
> T-Systems Multimedia Solutions GmbH
>
> Aufsichtsrat: Klaus Werner (Vorsitzender)
> Geschäftsführung: Peter Klingenburg, Dr. Jens Nebendahl
> Handelsregister: Amtsgericht Dresden HRB 11433
> Sitz der Gesellschaft: Dresden
> Ust-IdNr.: DE 811 807 949
>
>
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message