Using a resource name of
"file:/META-INF/database.xml" does not make sense
as this is asking for the file located at the
absolute path /META-INF/database.xml.
I created a test of loading a resource from a
service start and parsing the resulting
xml doc using a contruct like:
URL url0 =
loader.getResource("META-INF/config.xml");
if( url0 != null ) { InputStream is = url0.openStream(); SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParser parser = factory.newSAXParser(); parser.parse(is, new DefaultHandler()); log.debug("Successfully parsed url0"); is.close(); } where loader could be either the service class
ClassLoader or the thread
context ClassLoader. I did find a problem when
multiple services are included
in a deployment and use the same config file name
even though it is located
in distinct paths. See Bug #558525 for more info on
that but this not the
issue you are seeing with the
FileNotFoundException.
xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark Chief Technology Officer JBoss Group, LLC xxxxxxxxxxxxxxxxxxxxxxxx
|
- Re: [JBoss-dev] Castor MBean in a JBoss 3.0 .sar David Jencks
- Re: [JBoss-dev] Castor MBean in a JBoss 3.0 .s... Frederick N. Brier
- Re: [JBoss-dev] Castor MBean in a JBoss 3.... David Jencks
- [JBoss-dev] MBean ClassLoader ?revisited? Frederick N. Brier
- Re: [JBoss-dev] MBean ClassLoader ?rev... David Jencks
- Re: [JBoss-dev] MBean ClassLoader... Frederick N. Brier
- Re: [JBoss-dev] MBean ClassLo... David Jencks
- Re: [JBoss-dev] MBean ClassLo... Frederick N. Brier
- Re: [JBoss-dev] MBean ClassLo... Jason Dillon
- Re: [JBoss-dev] MBean ClassLo... Frederick N. Brier
- Re: [JBoss-dev] MBean ClassLo... Scott M Stark
- Re: [JBoss-dev] MBean ClassLo... Frederick N. Brier
- Re: [JBoss-dev] MBean ClassLo... Scott M Stark
- Re: [JBoss-dev] Castor MBean in a JBoss 3.0 .sar Scott M Stark
- Re: [JBoss-dev] JDJ Best App-Server Ignacio Coloma
- RE: [JBoss-dev] JDJ Best App-Server Sacha Labourey
- RE: [JBoss-dev] JDJ Best App-Server marc fleury
- Re: [JBoss-dev] JDJ Best App-Server Dain Sundstrom