OW2 Consortium
Search OW2 Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | jotm List | Febuary 2003 Index

<--  Date Index  --> <--  Thread Index  -->

Re: [carol] Re: [jotm] Re: Jetty/JOTM integration continues


Hi,

The problems I am encountering is that Carol cannot find carol.properties
and jndi.properties. The strange thing is that all the files are on
classpath and I can verify that, because trace.properties are being foung.
I am getting following exception

I had the same problem (and the same exception) with JOTM in Tomcat.

I think the problem is in CommunicationConfiguration.java in the following
code

    public static void loadCarolConfiguration() throws
RMIConfigurationException {
     Properties rmiProps = new Properties();
     Properties jndiProps = new Properties();
     // load the configuration files
     try {
         // load the rmi configuration file
         InputStream rmiFileInputStream  =
ClassLoader.getSystemResourceAsStream(CAROL_FILE_NAME);

Miro is right: I've checked out CAROL and replace

InputStream rmiFileInputStream  =
ClassLoader.getSystemResourceAsStream(CAROL_FILE_NAME);

by

InputStream rmiFileInputStream  =
Thread.currentThread().getContextClassLoader().getResourceAsStream(CAROL_FILE_NAME);

and the exception is no more thrown (see diff at the end of my mail).

cheers,
jeff

RCS file: /cvsroot/carol/carol/src/org/objectweb/carol/util/configuration/CommunicationConfiguration.java,v
retrieving revision 1.8
diff -r1.8 CommunicationConfiguration.java
147c147
< InputStream rmiFileInputStream = ClassLoader.getSystemResourceAsStream(CAROL_FILE_NAME);
---
> InputStream rmiFileInputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(CAROL_FILE_NAME);


155c155
< InputStream jndiFileInputStream = ClassLoader.getSystemResourceAsStream(JNDI_FILE_NAME);
---
> InputStream jndiFileInputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(JNDI_FILE_NAME);


--
Jeff Mesnil     INRIA - ObjectWeb Consortium
email: jmesnil at inrialpes.fr
homepage: http://sardes.inrialpes.fr/people/jmesnil/perso.html




<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 2006-2007, OW2 Consortium | contact | webmaster.