You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by madhavb <bh...@gmail.com> on 2012/09/27 14:37:01 UTC

WAR file deployment causes FileNotFound exception.

I trying to deploy a war file, it gives the loffowing FileNotFound exception, 
I gave the following command in shell:

karaf@root> install
war:file:///root/exist/exist-code/dist/exist-2.1-dev-rev.war?Webapp-Context=exist
karaf@root> start 180


I also notice that 'null' prefixed in file path, I guess it should ./WEB-INF 
instead of null/WEB-INF, right?


Exception Snippet:

Exception: de.betterform.xml.config.XFormsConfigException:
java.io.FileNotFoundException: null/WEB-INF/betterform-config.xml (No such
file or directory)
12:40:42,989 | ERROR | l Console Thread | RegisterWebAppVisitorWC          |
124 - org.ops4j.pax.web.pax-web-extender-war - 1.0.7 | Registration
exception. Skipping.
java.lang.RuntimeException: javax.servlet.ServletException:
de.betterform.xml.config.XFormsConfigException:
java.io.FileNotFoundException: null/WEB-INF/betterform-config.xml (No such
file or directory)




--
View this message in context: http://servicemix.396122.n5.nabble.com/WAR-file-deployment-causes-FileNotFound-exception-tp5714539.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.

Re: WAR file deployment causes FileNotFound exception.

Posted by Freeman Fang <fr...@gmail.com>.
Hi,
try with
http://localhost:8181/your_app_context.

Btw, this question should be sent to users maillinglist .
-------------
Freeman Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042

On 2012-9-28, at 下午2:35, madhavb wrote:

> Thanks, I could resolve this NullPointer Exception after dropping the war
> file inside deploy folder.
> 
> 
> But when I try to access the app by  http://localhost/myapp (is it right?)
> it says Http 404 Not Found
> 
> 
> Problem accessing /. Reason:
> 
> 
> Powered by Jetty://
> 
> 
> Here is how my Manifest file looks: 
> 
> 
> Manifest-Version: 2.0
> Bundle-SymbolicName: myapp
> Bundle-Version: 2.1-dev
> Bundle-Name: Jetty.myapp
> Bundle-Vendor: eXistDB
> Bundle-ClassPath:
> Created-By: 1.6.0_25-b06 (Sun Microsystems Inc.)
> Bundle-ClassPath: .,WEB-INF/lib, WEB-INF/classes, xforms/xsltforms
> Web-ContextPath: myapp
> Import-Package: javax.servlet
> Built-By: root
> Project-Name: myapp
> Project-Version: 2.1-dev
> Project-Build: ${DSTAMP}
> SVN-Revision: ${svn.revision}
> 
> 
> 
> 
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/WAR-file-deployment-causes-FileNotFound-exception-tp5714539p5714548.html
> Sent from the ServiceMix - Dev mailing list archive at Nabble.com.


Re: WAR file deployment causes FileNotFound exception.

Posted by Freeman Fang <fr...@gmail.com>.
Hi,
try with
http://localhost:8181/your_app_context.

Btw, this question should be sent to users maillinglist .
-------------
Freeman Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042

On 2012-9-28, at 下午2:35, madhavb wrote:

> Thanks, I could resolve this NullPointer Exception after dropping the war
> file inside deploy folder.
> 
> 
> But when I try to access the app by  http://localhost/myapp (is it right?)
> it says Http 404 Not Found
> 
> 
> Problem accessing /. Reason:
> 
> 
> Powered by Jetty://
> 
> 
> Here is how my Manifest file looks: 
> 
> 
> Manifest-Version: 2.0
> Bundle-SymbolicName: myapp
> Bundle-Version: 2.1-dev
> Bundle-Name: Jetty.myapp
> Bundle-Vendor: eXistDB
> Bundle-ClassPath:
> Created-By: 1.6.0_25-b06 (Sun Microsystems Inc.)
> Bundle-ClassPath: .,WEB-INF/lib, WEB-INF/classes, xforms/xsltforms
> Web-ContextPath: myapp
> Import-Package: javax.servlet
> Built-By: root
> Project-Name: myapp
> Project-Version: 2.1-dev
> Project-Build: ${DSTAMP}
> SVN-Revision: ${svn.revision}
> 
> 
> 
> 
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/WAR-file-deployment-causes-FileNotFound-exception-tp5714539p5714548.html
> Sent from the ServiceMix - Dev mailing list archive at Nabble.com.


Re: WAR file deployment causes FileNotFound exception.

Posted by madhavb <bh...@gmail.com>.
Thanks, I could resolve this NullPointer Exception after dropping the war
file inside deploy folder.


But when I try to access the app by  http://localhost/myapp (is it right?)
it says Http 404 Not Found


Problem accessing /. Reason:

   
Powered by Jetty://


Here is how my Manifest file looks: 


Manifest-Version: 2.0
Bundle-SymbolicName: myapp
Bundle-Version: 2.1-dev
Bundle-Name: Jetty.myapp
Bundle-Vendor: eXistDB
Bundle-ClassPath:
Created-By: 1.6.0_25-b06 (Sun Microsystems Inc.)
Bundle-ClassPath: .,WEB-INF/lib, WEB-INF/classes, xforms/xsltforms
Web-ContextPath: myapp
Import-Package: javax.servlet
Built-By: root
Project-Name: myapp
Project-Version: 2.1-dev
Project-Build: ${DSTAMP}
SVN-Revision: ${svn.revision}




--
View this message in context: http://servicemix.396122.n5.nabble.com/WAR-file-deployment-causes-FileNotFound-exception-tp5714539p5714548.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.

Re: WAR file deployment causes FileNotFound exception.

Posted by madhavb <bh...@gmail.com>.
Hi Freeman,

Thanks for the pointers, I could move to some extent but still I am seeing
some exceptions as below


05:57:17,067 | INFO  | l Console Thread | HttpServiceFactoryImpl           |
115 - org.ops4j.pax.web.pax-web-runtime - 1.0.7 | Binding bundle: [[188]] to
http service
05:57:17,079 | INFO  | l Console Thread | log                              |
110 - org.eclipse.jetty.util - 7.4.5.v20110725 | started
HttpServiceContext{httpContext=org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@1d85ab9}
05:57:17,079 | ERROR | l Console Thread | JettyServerWrapper               |
113 - org.ops4j.pax.web.pax-web-jetty - 1.0.7 | Could not start the servlet
context for http context
[org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@1d85ab9]
java.lang.NullPointerException
    at java.util.Hashtable.put(Hashtable.java:394)[:1.6.0_25]
    at
org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.addContext(JettyServerWrapper.java:190)[113:org.ops4j.pax.web.pax-web-jetty:1.0.7]
    at
org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:112)[113:org.ops4j.pax.web.pax-web-jetty:1.0.7]
    at
org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.addServlet(JettyServerImpl.java:139)[113:org.ops4j.pax.web.pax-web-jetty:1.0.7]
    at
org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Started.addServlet(ServerControllerImpl.java:266)[113:org.ops4j.pax.web.pax-web-jetty:1.0.7]
    at
org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.addServlet(ServerControllerImpl.java:107)[113:org.ops4j.pax.web.pax-web-jetty:1.0.7]
    at
org.ops4j.pax.web.service.internal.HttpServiceStarted.registerResources(HttpServiceStarted.java:180)[115:org.ops4j.pax.web.pax-web-runtime:1.0.7]
    at
org.ops4j.pax.web.service.internal.HttpServiceProxy.registerResources(HttpServiceProxy.java:66)[115:org.ops4j.pax.web.pax-web-runtime:1.0.7]
    at
org.ops4j.pax.web.extender.war.internal.RegisterWebAppVisitorWC.visit(RegisterWebAppVisitorWC.java:138)[124:org.ops4j.pax.web.pax-web-extender-war:1.0.7]
    at
org.ops4j.pax.web.extender.war.internal.model.WebApp.accept(WebApp.java:558)[124:org.ops4j.pax.web.pax-web-extender-war:1.0.7]
    at
org.ops4j.pax.web.extender.war.internal.WebAppPublisher$HttpServiceListener.register(WebAppPublisher.java:170)[124:org.ops4j.pax.web.pax-web-extender-war:1.0.7]
    at
org.ops4j.pax.web.extender.war.internal.WebAppPublisher$HttpServiceListener.serviceChanged(WebAppPublisher.java:155)[124:org.ops4j.pax.web.pax-web-extender-war:1.0.7]




--
View this message in context: http://servicemix.396122.n5.nabble.com/WAR-file-deployment-causes-FileNotFound-exception-tp5714539p5714547.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.

Re: WAR file deployment causes FileNotFound exception.

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

It means OSGi-fy a war, adding OSGi metadata header to the war, take a look at [1] &[2] to get more details

[1]http://team.ops4j.org/wiki/display/ops4j/Pax+Web+Extender+-+War+-+OSGi-fy
[2]http://karaf.apache.org/manual/2.2.7/users-guide/web-applications.html

Freeman
-------------
Freeman Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042

On 2012-9-27, at 下午9:29, madhavb wrote:

> Can you be more clear, what do you mean by  "install a OSGi ready War (a
> WAB)", how do I do that?
> 
> If I do not give war: prefix, 
> 
> I get the following error: How do I proceed?
> 
> 13:36:33,275 | ERROR | l Console Thread | JettyServerWrapper               |
> 113 - org.ops4j.pax.web.pax-web-jetty - 1.0.7 | Could not start the servlet
> context for http context
> [org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@c51ce4]
> java.lang.NullPointerException
>    at java.util.Hashtable.put(Hashtable.java:394)[:1.6.0_25]
>    at
> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.addContext(JettyServerWrapper.java:190)[113:org.ops4j.pax.web.pax-web-jetty:1.0.7]
>    at
> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:112)[113:org.ops4j.pax.web.pax-web-jetty:1.0.7]
>    at
> org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.addServlet(JettyServerImpl.java:139)[113:org.ops4j.pax.web.pax-web-jetty:1.0.7]
>    at
> org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Started.addServlet(ServerControllerImpl.java:266)[113:org.ops4j.pax.web.pax-web-jetty:1.0.7]
>    at
> org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.addServlet(ServerControllerImpl.java:107)[113:org.ops4j.pax.web.pax-web-jetty:1.0.7]
>    at
> org.ops4j.pax.web.service.internal.HttpServiceStarted.registerResources(HttpServiceStarted.java:180)[115:org.ops4j.pax.web.pax-web-runtime:1.0.7]
>    at
> org.ops4j.pax.web.service.internal.HttpServiceProxy.registerResources(HttpServiceProxy.java:66)[115:org.ops4j.pax.web.pax-web-runtime:1.0.7]
>    at
> org.ops4j.pax.web.extender.war.internal.RegisterWebAppVisitorWC.visit(RegisterWebAppVisitorWC.java:138)[124:org.ops4j.pax.web.pax-web-extender-war:1.0.7]
>    at
> org.ops4j.pax.web.extender.war.internal.model.WebApp.accept(WebApp.java:558)[124:org.ops4j.pax.web.pax-web-extender-war:1.0.7]
>    at
> org.ops4j.pax.web.extender.war.internal.WebAppPublisher$HttpServiceListener.register(WebAppPublisher.java:170)[124:org.ops4j.pax.web.pax-web-extender-war:1.0.7]
>    at
> org.ops4j.pax.web.extender.war.internal.WebAppPublisher$HttpServiceListener.serviceChanged(WebAppPublisher.java:155)[124:org.ops4j.pax.web.pax-web-extender-war:1.0.7]
>    at
> org.ops4j.pax.web.extender.war.internal.WebAppPublisher$HttpServiceListener.serviceChanged(WebAppPublisher.java:119)[124:org.ops4j.pax.web.pax-web-extender-war:1.0.7]
> 
> 
> ----
> 
> 
> 
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/WAR-file-deployment-causes-FileNotFound-exception-tp5714539p5714544.html
> Sent from the ServiceMix - Dev mailing list archive at Nabble.com.


Re: WAR file deployment causes FileNotFound exception.

Posted by madhavb <bh...@gmail.com>.
Can you be more clear, what do you mean by  "install a OSGi ready War (a
WAB)", how do I do that?

If I do not give war: prefix, 

I get the following error: How do I proceed?

13:36:33,275 | ERROR | l Console Thread | JettyServerWrapper               |
113 - org.ops4j.pax.web.pax-web-jetty - 1.0.7 | Could not start the servlet
context for http context
[org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@c51ce4]
java.lang.NullPointerException
    at java.util.Hashtable.put(Hashtable.java:394)[:1.6.0_25]
    at
org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.addContext(JettyServerWrapper.java:190)[113:org.ops4j.pax.web.pax-web-jetty:1.0.7]
    at
org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:112)[113:org.ops4j.pax.web.pax-web-jetty:1.0.7]
    at
org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.addServlet(JettyServerImpl.java:139)[113:org.ops4j.pax.web.pax-web-jetty:1.0.7]
    at
org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Started.addServlet(ServerControllerImpl.java:266)[113:org.ops4j.pax.web.pax-web-jetty:1.0.7]
    at
org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.addServlet(ServerControllerImpl.java:107)[113:org.ops4j.pax.web.pax-web-jetty:1.0.7]
    at
org.ops4j.pax.web.service.internal.HttpServiceStarted.registerResources(HttpServiceStarted.java:180)[115:org.ops4j.pax.web.pax-web-runtime:1.0.7]
    at
org.ops4j.pax.web.service.internal.HttpServiceProxy.registerResources(HttpServiceProxy.java:66)[115:org.ops4j.pax.web.pax-web-runtime:1.0.7]
    at
org.ops4j.pax.web.extender.war.internal.RegisterWebAppVisitorWC.visit(RegisterWebAppVisitorWC.java:138)[124:org.ops4j.pax.web.pax-web-extender-war:1.0.7]
    at
org.ops4j.pax.web.extender.war.internal.model.WebApp.accept(WebApp.java:558)[124:org.ops4j.pax.web.pax-web-extender-war:1.0.7]
    at
org.ops4j.pax.web.extender.war.internal.WebAppPublisher$HttpServiceListener.register(WebAppPublisher.java:170)[124:org.ops4j.pax.web.pax-web-extender-war:1.0.7]
    at
org.ops4j.pax.web.extender.war.internal.WebAppPublisher$HttpServiceListener.serviceChanged(WebAppPublisher.java:155)[124:org.ops4j.pax.web.pax-web-extender-war:1.0.7]
    at
org.ops4j.pax.web.extender.war.internal.WebAppPublisher$HttpServiceListener.serviceChanged(WebAppPublisher.java:119)[124:org.ops4j.pax.web.pax-web-extender-war:1.0.7]


----



--
View this message in context: http://servicemix.396122.n5.nabble.com/WAR-file-deployment-causes-FileNotFound-exception-tp5714539p5714544.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.

Re: WAR file deployment causes FileNotFound exception.

Posted by Achim Nierbeck <bc...@googlemail.com>.
yeah, that WEB-INF thing looks awkward.
Do you install a OSGi ready War (a WAB) if so
you should omit the war: url-prefix.

regards, Achim

2012/9/27 madhavb <bh...@gmail.com>:
> I trying to deploy a war file, it gives the loffowing FileNotFound exception,
> I gave the following command in shell:
>
> karaf@root> install
> war:file:///root/exist/exist-code/dist/exist-2.1-dev-rev.war?Webapp-Context=exist
> karaf@root> start 180
>
>
> I also notice that 'null' prefixed in file path, I guess it should ./WEB-INF
> instead of null/WEB-INF, right?
>
>
> Exception Snippet:
>
> Exception: de.betterform.xml.config.XFormsConfigException:
> java.io.FileNotFoundException: null/WEB-INF/betterform-config.xml (No such
> file or directory)
> 12:40:42,989 | ERROR | l Console Thread | RegisterWebAppVisitorWC          |
> 124 - org.ops4j.pax.web.pax-web-extender-war - 1.0.7 | Registration
> exception. Skipping.
> java.lang.RuntimeException: javax.servlet.ServletException:
> de.betterform.xml.config.XFormsConfigException:
> java.io.FileNotFoundException: null/WEB-INF/betterform-config.xml (No such
> file or directory)
>
>
>
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/WAR-file-deployment-causes-FileNotFound-exception-tp5714539.html
> Sent from the ServiceMix - Dev mailing list archive at Nabble.com.



-- 

Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
Committer & Project Lead
OPS4J Pax for Vaadin
<http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project
Lead
blog <http://notizblog.nierbeck.de/>