On Mon, Jan 14, 2002 at 12:24:10PM +0100, Jan Stary wrote:
> Hello druzja,
> 
> the following code in ContainerComponent
> (copied from the white paper) ...
> 
> -- cut ----------------
> public void initialize() throws Exception {
>       DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
>       Configuration sysConfig = builder.buildFromFile(
>               "/home/hans/casopis/system.xml");
>       Configuration roleConfig =
>               builder.build(this.getClass().getClassLoader().
>               getResourceAsStream("/home/hans/casopis/roles.xml"));

This might be the problem. A "resource" is a file or class accessible
from a JVM classloader. File resources are searched for relative to
paths listed in the classpath. So unless you have '/' in your classpath,
you won't be able to find '/home/hans//..'.

The code then becomes "builder.build(this.getClass().getClassLoader(),
null);", hence the 'File "null" not found' error.

--Jeff

 
> Why does this happen? Which file can't be found? Or should I provide
> a filename somewhere (and I don't)? All the files mentioned in code
> exist and are readable.
> 
> In fact, I believe it's not related to Avalon...
> 
> Thanks for any ideas
> 
> Jan
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to