File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
REST with Spring (video course)
this week in the
How to refer properties file in Jboss?
Joined: Apr 25, 2010
Jun 02, 2011 05:41:50
I am having some properties files, that is used by my application, so i keep those files in server/default/conf. In my
class i refer them as
URI uri = Thread.currentThread().getContextClassLoader().getResource(strConfigFileName).toURI(); File file = new File(uri);
But, i get the exception as
2011-06-02 08:53:07,747 INFO [STDOUT] (http-127.0.0.1-8080-1) URI for config file name : vfsfile:/D:/Software-Extracts/jboss-5.1.0.GA/server/default/conf/Procedures.xml 2011-06-02 08:53:07,982 ERROR [STDERR] (http-127.0.0.1-8080-1) java.lang.IllegalArgumentException: URI scheme is not "file" 2011-06-02 08:53:08,216 ERROR [STDERR] (http-127.0.0.1-8080-1) at java.io.File.<init>(File.java:366)
Can anyone please tell me where should i keep my properties/xml file in
? By the way, I am using Jboss5.1.0..
It is sorta covered in the
JavaRanch Style Guide
subject: How to refer properties file in Jboss?
RRS_SEVERE : jdbc not bound exception in jboss
JBoss 5.1.0 won't start as a service but will do so when you run it from the command prompt
how to get multiple data sources in jboss
Unable to connect to read-only Embedded Derby database from within EAR file deployed on JBoss server
No connection properties specified
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015