You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by mikeg <ga...@yahoo.com> on 2015/01/09 22:11:09 UTC

using SerializationUtils with Tomee is throwing NoClassFoundException

Hello,

I'm running Tomee 1.6 and in my code I'm using
org.apache.commons.lang.SerializationUtils

At run time I get ClassNotFoundException for the class I'm trying to clone.
looking at catalina.properties file I noticed that 'commons-lang*' is on the
'jarToSkip' list, so jar containing 
SerializationUtils is loaded by the parent class loader of my war class
loader and that is probably why I get the above mentioned exception. 

How do I fix this problem, can force it to load that jar from my WEB-INF/lib
?
(I'm not allowed to modify catalina.properties file)

       Thanks, Michael



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/using-SerializationUtils-with-Tomee-is-throwing-NoClassFoundException-tp4673353.html
Sent from the TomEE Dev mailing list archive at Nabble.com.

Re: using SerializationUtils with Tomee is throwing NoClassFoundException

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

set as system property
openejb.classloader.forced-load=org.apache.commons.lang or something
more precise if you can


Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau


2015-01-09 22:11 GMT+01:00 mikeg <ga...@yahoo.com>:
> Hello,
>
> I'm running Tomee 1.6 and in my code I'm using
> org.apache.commons.lang.SerializationUtils
>
> At run time I get ClassNotFoundException for the class I'm trying to clone.
> looking at catalina.properties file I noticed that 'commons-lang*' is on the
> 'jarToSkip' list, so jar containing
> SerializationUtils is loaded by the parent class loader of my war class
> loader and that is probably why I get the above mentioned exception.
>
> How do I fix this problem, can force it to load that jar from my WEB-INF/lib
> ?
> (I'm not allowed to modify catalina.properties file)
>
>        Thanks, Michael
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/using-SerializationUtils-with-Tomee-is-throwing-NoClassFoundException-tp4673353.html
> Sent from the TomEE Dev mailing list archive at Nabble.com.