You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Freeman Fang <fr...@gmail.com> on 2013/05/06 12:55:52 UTC

Re: Facing issues while deploying a WAR file

Hi,

First of all you should ensure you've already installed war feature.

Also, the error 
Caused by: java.net.MalformedURLException: invalid url: camel-example-servlet-tomcat-2.10.4.war!/ (java.net.MalformedURLException: no protocol: camel-example-servlet-tomcat-2.10.4.war) 
here indicate that you should provide valid url for the path where can find the camel-example-servlet-tomcat-2.10.4.war

As the camel-example-servlet-tomcat-2.10.4.war is in the maven, so you should give a valid maven url here, something like
mvn:groupID/artifactsID/version etc.

And this kind issue should be in user mailing list
-------------
Freeman(Yue) 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: @Freeman小屋

On 2013-5-6, at 下午6:37, kasthuri rajan wrote:

> Hi All,
> 
> Im facing some issues while deploying a WAR file in Karaf 2.2.8. I have
> placed the war file under the deploy folder & executing the below command.
> 
> karaf@root> osgi:install -s
> webbundle:camel-example-servlet-tomcat-2.10.4.war?Bu
> ndle-SymbolicName=org.apache.camel.camel-example-servlet-tomcat&Webapp-Context=/
> camel
> 
> Im getting the below execption while executing the above command
> 
> java.net.MalformedURLException: Stream handler unavailable due to: invalid
> url:
> camel-example-servlet-tomcat-2.10.4.war!/ (java.net.MalformedURLException:
> no pr
> otocol: camel-example-servlet-tomcat-2.10.4.war)
> 
> Also, pls let me know whether the above command is correct or not.
> 
> Pls find below the log details for the same.
> #############################
> 
> java.lang.NoClassDefFoundError:
> org/osgi/service/deploymentadmin/DeploymentException
> 	at java.lang.Class.getDeclaredConstructors0(Native Method)[:1.6.0_41]
> 	at
> java.lang.Class.privateGetDeclaredConstructors(Class.java:2398)[:1.6.0_41]
> 	at java.lang.Class.getConstructor0(Class.java:2708)[:1.6.0_41]
> 	at java.lang.Class.newInstance0(Class.java:328)[:1.6.0_41]
> 	at java.lang.Class.newInstance(Class.java:310)[:1.6.0_41]
> 	at
> org.apache.felix.webconsole.internal.servlet.PluginHolder$InternalPlugin.doGetConsolePlugin(PluginHolder.java:761)[76:org.apache.karaf.webconsole.console:2.2.8]
> 	at
> org.apache.felix.webconsole.internal.servlet.PluginHolder$Plugin.getConsolePlugin(PluginHolder.java:532)[76:org.apache.karaf.webconsole.console:2.2.8]
> 	at
> org.apache.felix.webconsole.internal.servlet.PluginHolder.getLocalizedLabelMap(PluginHolder.java:242)[76:org.apache.karaf.webconsole.console:2.2.8]
> 	at
> org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:420)[76:org.apache.karaf.webconsole.console:2.2.8]
> 	at
> org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:384)[76:org.apache.karaf.webconsole.console:2.2.8]
> 	at
> org.apache.felix.webconsole.internal.KarafOsgiManager.doService(KarafOsgiManager.java:67)[76:org.apache.karaf.webconsole.console:2.2.8]
> 	at
> org.apache.felix.webconsole.internal.KarafOsgiManager$1.run(KarafOsgiManager.java:47)[76:org.apache.karaf.webconsole.console:2.2.8]
> 	at java.security.AccessController.doPrivileged(Native Method)[:1.6.0_41]
> 	at javax.security.auth.Subject.doAs(Subject.java:396)[:1.6.0_41]
> 	at
> org.apache.felix.webconsole.internal.KarafOsgiManager.service(KarafOsgiManager.java:45)[76:org.apache.karaf.webconsole.console:2.2.8]
> 	at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:547)[63:org.eclipse.jetty.servlet:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:480)[63:org.eclipse.jetty.servlet:7.5.4.v20111024]
> 	at
> org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[73:org.ops4j.pax.web.pax-web-jetty:1.0.11]
> 	at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)[61:org.eclipse.jetty.server:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:520)[62:org.eclipse.jetty.security:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)[61:org.eclipse.jetty.server:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:941)[61:org.eclipse.jetty.server:7.5.4.v20111024]
> 	at
> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:117)[73:org.ops4j.pax.web.pax-web-jetty:1.0.11]
> 	at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:409)[63:org.eclipse.jetty.servlet:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)[61:org.eclipse.jetty.server:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:875)[61:org.eclipse.jetty.server:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)[61:org.eclipse.jetty.server:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)[61:org.eclipse.jetty.server:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)[61:org.eclipse.jetty.server:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.server.Server.handle(Server.java:349)[61:org.eclipse.jetty.server:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)[61:org.eclipse.jetty.server:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:919)[61:org.eclipse.jetty.server:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:582)[57:org.eclipse.jetty.http:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)[57:org.eclipse.jetty.http:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51)[61:org.eclipse.jetty.server:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586)[56:org.eclipse.jetty.io:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44)[56:org.eclipse.jetty.io:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)[55:org.eclipse.jetty.util:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)[55:org.eclipse.jetty.util:7.5.4.v20111024]
> 	at java.lang.Thread.run(Thread.java:662)[:1.6.0_41]
> Caused by: java.lang.ClassNotFoundException:
> org.osgi.service.deploymentadmin.DeploymentException not found by
> org.apache.karaf.webconsole.console [76]
> 	at
> org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787)
> 	at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
> 	at
> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_41]
> 	... 40 more
> 2013-05-06 15:41:52,660 | INFO  | qtp7717566-76    | AdminPlugin                     
> | 77 - org.apache.karaf.webconsole.admin - 2.2.8 | Admin plugin activated
> 2013-05-06 15:41:52,662 | WARN  | qtp7717566-76    | /                               
> | 55 - org.eclipse.jetty.util - 7.5.4.v20111024 |
> org.ops4j.pax.web.service.spi.model.ServletModel-5: Failed to instantiate
> plugin org.apache.felix.webconsole.internal.compendium.ComponentsServlet
> java.lang.NoClassDefFoundError: org.apache.felix.scr.ScrService not found by
> org.apache.karaf.webconsole.console [76]
> 	at
> org.apache.felix.webconsole.internal.compendium.ComponentsServlet.class$(ComponentsServlet.java:74)[76:org.apache.karaf.webconsole.console:2.2.8]
> 	at
> org.apache.felix.webconsole.internal.compendium.ComponentsServlet.<clinit>(ComponentsServlet.java:74)[76:org.apache.karaf.webconsole.console:2.2.8]
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)[:1.6.0_41]
> 	at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)[:1.6.0_41]
> 	at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)[:1.6.0_41]
> 	at
> java.lang.reflect.Constructor.newInstance(Constructor.java:513)[:1.6.0_41]
> 	at java.lang.Class.newInstance0(Class.java:357)[:1.6.0_41]
> 	at java.lang.Class.newInstance(Class.java:310)[:1.6.0_41]
> 	at
> org.apache.felix.webconsole.internal.servlet.PluginHolder$InternalPlugin.doGetConsolePlugin(PluginHolder.java:761)[76:org.apache.karaf.webconsole.console:2.2.8]
> 	at
> org.apache.felix.webconsole.internal.servlet.PluginHolder$Plugin.getConsolePlugin(PluginHolder.java:532)[76:org.apache.karaf.webconsole.console:2.2.8]
> 	at
> org.apache.felix.webconsole.internal.servlet.PluginHolder.getLocalizedLabelMap(PluginHolder.java:242)[76:org.apache.karaf.webconsole.console:2.2.8]
> 	at
> org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:420)[76:org.apache.karaf.webconsole.console:2.2.8]
> 	at
> org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:384)[76:org.apache.karaf.webconsole.console:2.2.8]
> 	at
> org.apache.felix.webconsole.internal.KarafOsgiManager.doService(KarafOsgiManager.java:67)[76:org.apache.karaf.webconsole.console:2.2.8]
> 	at
> org.apache.felix.webconsole.internal.KarafOsgiManager$1.run(KarafOsgiManager.java:47)[76:org.apache.karaf.webconsole.console:2.2.8]
> 	at java.security.AccessController.doPrivileged(Native Method)[:1.6.0_41]
> 	at javax.security.auth.Subject.doAs(Subject.java:396)[:1.6.0_41]
> 	at
> org.apache.felix.webconsole.internal.KarafOsgiManager.service(KarafOsgiManager.java:45)[76:org.apache.karaf.webconsole.console:2.2.8]
> 	at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:547)[63:org.eclipse.jetty.servlet:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:480)[63:org.eclipse.jetty.servlet:7.5.4.v20111024]
> 	at
> org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[73:org.ops4j.pax.web.pax-web-jetty:1.0.11]
> 	at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)[61:org.eclipse.jetty.server:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:520)[62:org.eclipse.jetty.security:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)[61:org.eclipse.jetty.server:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:941)[61:org.eclipse.jetty.server:7.5.4.v20111024]
> 	at
> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:117)[73:org.ops4j.pax.web.pax-web-jetty:1.0.11]
> 	at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:409)[63:org.eclipse.jetty.servlet:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)[61:org.eclipse.jetty.server:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:875)[61:org.eclipse.jetty.server:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)[61:org.eclipse.jetty.server:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)[61:org.eclipse.jetty.server:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)[61:org.eclipse.jetty.server:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.server.Server.handle(Server.java:349)[61:org.eclipse.jetty.server:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)[61:org.eclipse.jetty.server:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:919)[61:org.eclipse.jetty.server:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:582)[57:org.eclipse.jetty.http:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)[57:org.eclipse.jetty.http:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51)[61:org.eclipse.jetty.server:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586)[56:org.eclipse.jetty.io:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44)[56:org.eclipse.jetty.io:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)[55:org.eclipse.jetty.util:7.5.4.v20111024]
> 	at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)[55:org.eclipse.jetty.util:7.5.4.v20111024]
> 
> Regards,
> 
> Kasthuri rajan.k
> 
> 
> 
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Facing-issues-while-deploying-a-WAR-file-tp4028568.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.


Re: Facing issues while deploying a WAR file

Posted by kasthuri rajan <ka...@yahoo.com>.
Thanks for sharing the URL samples..

But looking at the documentation [1] & [2] i could see the steps for
deploying a WAR file as web bundle.

Still have few questions from the below command

If you want to deploy a sample web application into Karaf, you could use the
following command:

karaf@root> osgi:install -s
webbundle:http://tomcat.apache.org/tomcat-5.5-doc/appdev/sample/sample.war?Bundle-SymbolicName=tomcat-sample&Webapp-Context=/sample
Then open your web browser and point to
http://localhost:8181/sample/index.html.

what does tomcat.apache.org/tomcat-5.5-doc/appdev/sample refers in the
example.

For my example pls find below the manifest file details

Bundle-Name: camel-example-servlet-tomcat
Bundle-SymbolicName: org.apache.camel.camel-example-servlet-tomcat
Bundle-Version: 2.10.4
War file name - camel-example-servlet-tomcat-2.10.4.war

Still i couldn't understand how to deploy that WAR file similar to the
sample web application. Im getting an exception whenever trying to execute
the below command.

osgi:install -s
webbundle:mvn:org.apache.camel/examples/2.10.4/camel-example-servlet-tomcat-2.10.4.war?Bundle-SymbolicName=camel-example-servlet-tomcat&Webapp-Context=/examples 

Pls correct me if im wrong & im doing a POC using karaf to deploy a WAR or
JAR file and then access the application.

Regards,

K.Rajan






--
View this message in context: http://karaf.922171.n3.nabble.com/Facing-issues-while-deploying-a-WAR-file-tp4028568p4028602.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Facing issues while deploying a WAR file

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,

well your issue is in the logs, there is no
JndiCamelServletContextListener, cause there is no such thing in the
OSGi-World.

Well to test the war abilities it's quite simple, take a look at the
documentation [1] and [2].
And there are tons of samples about how to use Pax-Web at the Pax-Web
samples [3],
and how to deploy them in the Pax-Web iTests [4].

regards, Achim

[1] - http://karaf.apache.org/manual/latest-2.3.x/users-guide/http.html
[2] -
http://karaf.apache.org/manual/latest-2.3.x/users-guide/web-applications.html
[3] - https://github.com/ops4j/org.ops4j.pax.web/blob/master/samples/
[4] -
https://github.com/ops4j/org.ops4j.pax.web/blob/master/itest/src/test/java/org/ops4j/pax/web/itest/WarIntegrationTest.java

2013/5/8 kasthuri rajan <ka...@yahoo.com>

> Yes the bundle is started with the bundle ID : 268
>
> pls find below the log details
>
> org.ops4j.pax.web.pax-web-extender-war - 1.1.12 | Registration exception.
> Skipping.
> java.lang.ClassNotFoundException:
> org.apache.camel.component.servletlistener.JndiCamelServletContextListener
>         at
>
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)[osgi-3.8.0.v20120529-1548.jar:]
>         at
>
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)[osgi-3.8.0.v20120529-1548.jar:]
>         at
>
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)[osgi-3.8.0.v20120529-1548.jar:]
>         at
>
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)[osgi-3.8.0.v20120529-1548.jar:]
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_41]
>         at
>
> org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:340)[osgi-3.8.0.v20120529-1548.jar:]
>         at
>
> org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)[osgi-3.8.0.v20120529-1548.jar:]
>         at
>
> org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1212)[osgi-3.8.0.v20120529-1548.jar:]
>         at
>
> org.ops4j.pax.swissbox.core.BundleClassLoader.findClass(BundleClassLoader.java:176)[81:org.ops4j.pax.web.pax-web-extender-war:1.1.12]
>         at
>
> org.ops4j.pax.swissbox.core.BundleClassLoader.loadClass(BundleClassLoader.java:194)[81:org.ops4j.pax.web.pax-web-extender-war:1.1.12]
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_41]
>
> Actually im trying to deploy any WAR file inside karaf 2.3.1 & to test the
> same whether it is working or not.
>
> So pls let me know if there is any docs or tutorial regarding the same.
>
> Regards,
>
> Kasthuri rajan.k
>
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Facing-issues-while-deploying-a-WAR-file-tp4028568p4028597.html
> Sent from the Karaf - 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/>

Re: Facing issues while deploying a WAR file

Posted by kasthuri rajan <ka...@yahoo.com>.
Yes the bundle is started with the bundle ID : 268

pls find below the log details

org.ops4j.pax.web.pax-web-extender-war - 1.1.12 | Registration exception.
Skipping. 
java.lang.ClassNotFoundException:
org.apache.camel.component.servletlistener.JndiCamelServletContextListener 
        at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)[osgi-3.8.0.v20120529-1548.jar:] 
        at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)[osgi-3.8.0.v20120529-1548.jar:] 
        at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)[osgi-3.8.0.v20120529-1548.jar:] 
        at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)[osgi-3.8.0.v20120529-1548.jar:] 
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_41] 
        at
org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:340)[osgi-3.8.0.v20120529-1548.jar:] 
        at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)[osgi-3.8.0.v20120529-1548.jar:] 
        at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1212)[osgi-3.8.0.v20120529-1548.jar:] 
        at
org.ops4j.pax.swissbox.core.BundleClassLoader.findClass(BundleClassLoader.java:176)[81:org.ops4j.pax.web.pax-web-extender-war:1.1.12] 
        at
org.ops4j.pax.swissbox.core.BundleClassLoader.loadClass(BundleClassLoader.java:194)[81:org.ops4j.pax.web.pax-web-extender-war:1.1.12] 
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_41] 

Actually im trying to deploy any WAR file inside karaf 2.3.1 & to test the
same whether it is working or not.

So pls let me know if there is any docs or tutorial regarding the same.

Regards,

Kasthuri rajan.k





--
View this message in context: http://karaf.922171.n3.nabble.com/Facing-issues-while-deploying-a-WAR-file-tp4028568p4028597.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Facing issues while deploying a WAR file

Posted by Achim Nierbeck <bc...@googlemail.com>.
what does the log say?
is your bundle actually stared?
what does web:list give you for an information at the command line?
Again, I don't think it's a good idea to use this war sample inside Karaf.
There are better samples without being a war around, which much better fit
the way Karaf and Camel work together.

regards, Achim


2013/5/8 kasthuri rajan <ka...@yahoo.com>

> Hi,
>
> Thanks for the information. Now im able to successfully deploy the WAR file
> inside the Karaf 2.3.1.
>
> But when i try to access the below URL im getting the HTTP 404 error
>
> http://localhost:8181/camel-example-servlet-tomcat/camel/
>
> Bundle-Name: camel-example-servlet-tomcat & Web-app content =/camel
>
> HTTP ERROR: 404
> Problem accessing /camel-example-servlet-tomcat/camel/. Reason:
> Not Found
>
> Pls let me know what might be the issue since i need to access the page.
>
> Regards,
>
> Kasthuri rajan.k
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Facing-issues-while-deploying-a-WAR-file-tp4028568p4028593.html
> Sent from the Karaf - 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/>

Re: Facing issues while deploying a WAR file

Posted by kasthuri rajan <ka...@yahoo.com>.
Hi,

Thanks for the information. Now im able to successfully deploy the WAR file
inside the Karaf 2.3.1.

But when i try to access the below URL im getting the HTTP 404 error

http://localhost:8181/camel-example-servlet-tomcat/camel/

Bundle-Name: camel-example-servlet-tomcat & Web-app content =/camel

HTTP ERROR: 404
Problem accessing /camel-example-servlet-tomcat/camel/. Reason: 
Not Found

Pls let me know what might be the issue since i need to access the page.

Regards,

Kasthuri rajan.k



--
View this message in context: http://karaf.922171.n3.nabble.com/Facing-issues-while-deploying-a-WAR-file-tp4028568p4028593.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Facing issues while deploying a WAR file

Posted by Achim Nierbeck <bc...@googlemail.com>.
Ok,
again don't know what you are actually doing here, but!

First of all just install the war feature, everything else will be
installed with it!
Second, only choose one way of installing:
1a) Install by shell console with install -s
mvn:groupId/artifactId/version/war if it's a OSGi-Ready war !
1b) Install non-osgi war by shell command with install -s
webbundle:mvn:groupId/artifactId/version/war?Webapp-Context=webApp
2) Drop it in the deploy folder!

Now, one more thing, I think one did write this already.
DON'T USE THE CAMEL-WAR as it's not going to work!
If you want to use Camel inside Karaf there are far more easier samples
around, there is even a maven-archetype for creating camel-blueprint
bundles.

regards, Achim


2013/5/7 kasthuri rajan <ka...@yahoo.com>

> Hi,
>
> Im still getting the below exception while trying to deploy the WAR file.
>
> org.apache.karaf.shell.console.MultiException: Error installing bundles:
>         Unable to install bundle
>
> war:mvn:org.apache.camel/camel-example-servlet-tomcat-2.10.4.war?Bundle-SymbolicName=org.apache.camel.camel-example-servlet-tomcat&Webapp-Context=/camel
>         at
>
> org.apache.karaf.shell.console.MultiException.throwIf(MultiException.java:91)
>         at
>
> org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:70)[24:org.apache.karaf.shell.osgi:2.3.1]
>         at
>
> org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[14:org.apache.karaf.shell.console:2.3.1]
>         at
>
> org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[14:org.apache.karaf.shell.console:2.3.1]
>         at
>
> org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[14:org.apache.karaf.shell.console:2.3.1]
>
> Can you pls let me know what is the exact command used for deploying a WAR
> file in Karaf & also i have already installed the WAR features.
>
> Installing feature war 2.3.1
> Installing feature http-whiteboard 2.3.1
> Found installed bundle: org.apache.karaf.shell.web_2.3.1 [78]
> Found installed bundle: org.apache.karaf.management.mbeans.web_2.3.1 [79]
> Found installed bundle: org.ops4j.pax.web.pax-web-jsp_1.1.12 [80]
> Found installed bundle: org.ops4j.pax.web.pax-web-extender-war_1.1.12 [81]
> Found installed bundle: org.ops4j.pax.web.pax-web-deployer_1.1.12 [82]
> Found installed bundle: org.ops4j.pax.url.war_1.3.5 [83]
> karaf@root> osgi:list |grep -i war
> karaf@root> la|grep -i wrap
> [   2] [Active     ] [            ] [       ] [    5] OPS4J Pax Url - wrap:
> (1.3
> .5)
> [  44] [Active     ] [Created     ] [       ] [   30] Apache Karaf ::
> Deployer :
> : Wrap Non OSGi Jar (2.3.1)
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Facing-issues-while-deploying-a-WAR-file-tp4028568p4028574.html
> Sent from the Karaf - 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/>

Re: Facing issues while deploying a WAR file

Posted by kasthuri rajan <ka...@yahoo.com>.
Hi,

Im still getting the below exception while trying to deploy the WAR file.

org.apache.karaf.shell.console.MultiException: Error installing bundles:
	Unable to install bundle
war:mvn:org.apache.camel/camel-example-servlet-tomcat-2.10.4.war?Bundle-SymbolicName=org.apache.camel.camel-example-servlet-tomcat&Webapp-Context=/camel
	at
org.apache.karaf.shell.console.MultiException.throwIf(MultiException.java:91)
	at
org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:70)[24:org.apache.karaf.shell.osgi:2.3.1]
	at
org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[14:org.apache.karaf.shell.console:2.3.1]
	at
org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[14:org.apache.karaf.shell.console:2.3.1]
	at
org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[14:org.apache.karaf.shell.console:2.3.1]

Can you pls let me know what is the exact command used for deploying a WAR
file in Karaf & also i have already installed the WAR features.

Installing feature war 2.3.1
Installing feature http-whiteboard 2.3.1
Found installed bundle: org.apache.karaf.shell.web_2.3.1 [78]
Found installed bundle: org.apache.karaf.management.mbeans.web_2.3.1 [79]
Found installed bundle: org.ops4j.pax.web.pax-web-jsp_1.1.12 [80]
Found installed bundle: org.ops4j.pax.web.pax-web-extender-war_1.1.12 [81]
Found installed bundle: org.ops4j.pax.web.pax-web-deployer_1.1.12 [82]
Found installed bundle: org.ops4j.pax.url.war_1.3.5 [83]
karaf@root> osgi:list |grep -i war
karaf@root> la|grep -i wrap
[   2] [Active     ] [            ] [       ] [    5] OPS4J Pax Url - wrap:
(1.3
.5)
[  44] [Active     ] [Created     ] [       ] [   30] Apache Karaf ::
Deployer :
: Wrap Non OSGi Jar (2.3.1)



--
View this message in context: http://karaf.922171.n3.nabble.com/Facing-issues-while-deploying-a-WAR-file-tp4028568p4028574.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.