Geert Bevin wrote:
Hi Eddy,

not that I recall. Care to expand on this?

Best regards,

Geert

Geert,

After our online conversation yesterday, I did some more tests to try and pinpoint the exact source of the problem. I think I've managed to establish that the problem is related to the RIFE classloader in some way.

But first, here is some background information for the others on the mailing list.

I am using JPOX, a JDO implementation, to persist objects to a database. In JDO, JDOHelper.getPersistenceManagerFactory(Properties properties) is used to instantiate the PersistenceManagerFactory implementation that is specified in the properties (that is, introspection is used to locate and instantiate the correct class).

In my tests, when that method is called from a console application or a JSP page (RIFE not involved), no exception is thrown; all classes are loaded and instantiated successfully. However, when the same method is called from a RIFE Element, a LinkageError exception is thrown for the Level class from the Log4j package. That exception triggers a chain of other exceptions that prevent the PersistenceManagerFactory from being instantiated.

After much fiddling around (until 2am to be exact), I tried instantiating the PersistenceManagerFactory class with a classloader specified. I called the variant method JDOHelper.getPersistenceManagerFactory(<properties>, <classloader>), passing 1) the current thread context classloader and 2) the parent classloader of the current thread context classloader.

In case 1) the classloader is the RIFE classloader. That caused the LinkageError exception to be thrown.

In case 2) the classloader is the Catalina WebappClassloader (I am using Tomcat), and with that, the PersistenceManagerFactory class was instantiated successfully.

This is as far as I reached in my investigation. I wanted to share this here in order to get your feedback on it. If you have encountered this problem in a differnet scenario, please let me know. As you rightly pointed out, such conflict errors are very hard to trace, so I would be very grateful if you could help in any way.

If my analysis is wrong (again!), I apologise; as I said, I stayed up until quite late to try and sort this out.

Regards,
Eddy

--
http://coding.mu
http://priscimon.com/blog
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users

Reply via email to