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.rudo...@t-systems.com <mailto:mdirk.rudo...@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 

 

 

Reply via email to