[jboss-user] [Beginner's Corner] - JBOSS 6: Exploded War - path not found

oakleyx do-not-reply at jboss.com
Tue Sep 13 17:41:06 EDT 2011


oakleyx [http://community.jboss.org/people/oakleyx] created the discussion

"JBOSS 6: Exploded War - path not found"

To view the discussion, visit: http://community.jboss.org/message/626344#626344

--------------------------------------------------------------
Hello,

Here is my situation:  I'm using JBoss 6 and when I try and deploy my war, the war explodes and is stored in the Virtual File System. I have code thay when the application starts up, it tries to read an xml file in the the WEB-INF directory. I'm getting the following runtime exception:
  
ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/].[ActionServlet]] Servlet.service() for servlet ActionServlet threw exception: 

####
java.lang.RuntimeException  C:\jboss-6.0.0\server\default\deploy\test.war\WEB-INF\classes\security.xml (The system cannot find the path specified)

Now if I just explode the war manually and drop the contents in the deploy directory, the application works perfectly.

So I think what i need to do, is some how figure out how to access the file in the VFS.

Currently this is the code that i'm calling to return the path:
  
ClassLoader loader = Thread.+currentThread+().getContextClassLoader();
URL url = loader.getResource(*this*.filename);
..
.. 
String path = url.getPath();
repos = *new*  File(path);

..

Any Ideas on how I can find out how to get the virtual path?

Could it be a configuration issue?

Thanks
-Dan
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/626344#626344]

Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110913/e5e39738/attachment.html 


More information about the jboss-user mailing list