You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Ivan Mikushin <iv...@vismech.ru> on 2001/02/15 22:45:56 UTC

[C1] classloading problem

Hi!

I encountered the following problem developing an XSP application with
Cocoon 1.x:

my XSP page instantiates classes that need to construct
java.util.ResourceBundle objects form .properties files with a standard
mechanism:

    ResourceBundle myRes = ResourceBundle.getBundle( "MyRes" );

In order for this to work, MyRes.properties file must be located in a
directory or in a JAR on the classpath, otherwise
java.util.MissingResourceException is thrown.

I have put the .properties files into WEB-INF/classes directory but Cocoon
seems not to search the local classpath for the web application.

When I put the files into $TOMCAT_HOME/classes everything worked fine. But I
only need to load these files into my particular web application and
actually to use Cocoon as a servlet in an isolated web application.

Furthermore, when I tried to put cocoon.jar and all Cocoon-related jars into
WEB-INF/lib for my app (with no Cocoon-related jars on Tomcat's classpath),
Cocoon threw an exception, saying it couldn't find some class (which was
actually packaged in cocoon.jar). I got this situation with Cocoon 1.7.4
thru 1.8.2.

Thanks in advance,

Ivan