You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by PJR69 <pe...@insta.fi> on 2012/11/05 14:12:31 UTC
How to debug non-working war-deployment?
I have a WAR-packaged application that runs fine on Tomcat.
Now I'm trying to get it to run on Karaf with jetty. I've installed jetty +
war features and I see jetty running on 8181 and get the page not found
error when browsing the root.
I've osgified my manifest as instructed here:
http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me it
looks ok.
But when I drop the WAR into the deploy-folder, nothing much really happens.
I do see the installer writing "installed... .war" -text and list shows that
the application is there in Installed-state. But nothing else happens.
The application should be bound to /portal-endpoint but navigating there
with a browser just gives the same page not found error and nothing gets
output on the log.
Any ideas how to proceed with debugging the problem?
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
Sent from the Karaf - User mailing list archive at Nabble.com.
RE: How to debug non-working war-deployment?
Posted by PJR69 <pe...@insta.fi>.
Hi,
This is 2.3.0. I think I found the first issue: Maven-plugin generates Import-Package entry bsh to the manifest, which remains unresolved on the log.
I have no clue what that is, I tried to find that string from our java-sources but it wasn’t there. I didn’t see the error before, but I just started on a fresh new karaf installation and now I get that error on the log.
So I need to resolve that issue first before I have any chance of proceeding.
- Petri
From: Achim Nierbeck [via Karaf] [mailto:ml-node+s922171n4026686h4@n3.nabble.com]
Sent: 5. marraskuuta 2012 15:50
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
Hi,
which version of Karaf do you use?
Second, what does the karaf.log say?
How does your war look like, did you add the required OSGi-Manifest entries to it?
if not, you need to install it with
install -s webbundle:mvn:url
What does the web:list command list when used?
Besides that if you want to debug, you should start Karaf in debug mode by using
"karaf.sh debug" (or "karaf.bat debug" on windows) on comandline.
The sources for the web-extender can be found at OPS4j Pax-Web, see [1] to [3]
regards, Achim
[1] - http://team.ops4j.org/wiki/display/ops4j/Open+Participation+Software+for+Java
[2] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
[3] - https://github.com/ops4j/org.ops4j.pax.web
2012/11/5 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026686&i=0>>
I have a WAR-packaged application that runs fine on Tomcat.
Now I'm trying to get it to run on Karaf with jetty. I've installed jetty +
war features and I see jetty running on 8181 and get the page not found
error when browsing the root.
I've osgified my manifest as instructed here:
http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me it
looks ok.
But when I drop the WAR into the deploy-folder, nothing much really happens.
I do see the installer writing "installed... .war" -text and list shows that
the application is there in Installed-state. But nothing else happens.
The application should be bound to /portal-endpoint but navigating there
with a browser just gives the same page not found error and nothing gets
output on the log.
Any ideas how to proceed with debugging the problem?
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
Sent from the Karaf - User 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/>
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026686.html
To start a new topic under Karaf - User, email ml-node+s922171n930749h57@n3.nabble.com<ma...@n3.nabble.com>
To unsubscribe from Karaf - User, click here<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8OTMwNzQ5fDU5NTY5OTMzOA==>.
NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026687.html
Sent from the Karaf - User mailing list archive at Nabble.com.
RE: How to debug non-working war-deployment?
Posted by PJR69 <pe...@insta.fi>.
Hello,
No problem, but I’m using Karaf 2.3.0 -> Can you give me a short advice how to test the new Pax-Web snapshot on it?
- Petri
From: Achim Nierbeck [via Karaf] [mailto:ml-node+s922171n4026701h69@n3.nabble.com]
Sent: 6. marraskuuta 2012 21:31
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
Hi,
do you mind to test with the latest 2.3.1-SNAPSHOT, cause there had been an issue with Pax-Web [1]
which should be fixed by now.
regards, Achim
[1] - http://team.ops4j.org/browse/PAXWEB-426
2012/11/6 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=0>>
Hi,
Thanks for the advice, that helped me to progress a lot. Now it seems that my servlet looks to be deployed ok, but the context-mapping isn’t working for some reason or other.
web:list shows one entry:
State = Active
Web-State = Deployed
Web-ContextPath = /portal
But when I try to browse http://localhost:8181/portal I get HTTP error 404, not found.
When I look at the log, I always get these kinds of entries:
Path [/portal] does not match any context.
I’ve tried numerous different URL combinations there (like /portal/portal and /portal1/portal as portal1 is the name of the Karaf instance where the war is deployed) but nothing seems to work.
In the manifest I have Web-ContextPath: portal so AFAIU, the application should be on the above URL.
I’m trying to follow the infor here http://leshazlewood.com/2010/09/08/osgi-maven-pax-and-web-applications/ as much as possible, but I don’t have any jsp-pages there. The main servlet is mapped just on /
So, AFAIU, Karaf + Pax seem to deploy my OSGIfied WAR-bundle ok, no errors on log at least, but for some reason the main servlet inside the war just can’t be reached via the URL that I’d assume it should be.
Any ideas how to proceed would be greatly appreciated…
- Petri
From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=1>]
Sent: 5. marraskuuta 2012 15:50
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
Hi,
which version of Karaf do you use?
Second, what does the karaf.log say?
How does your war look like, did you add the required OSGi-Manifest entries to it?
if not, you need to install it with
install -s webbundle:mvn:url
What does the web:list command list when used?
Besides that if you want to debug, you should start Karaf in debug mode by using
"karaf.sh debug" (or "karaf.bat debug" on windows) on comandline.
The sources for the web-extender can be found at OPS4j Pax-Web, see [1] to [3]
regards, Achim
[1] - http://team.ops4j.org/wiki/display/ops4j/Open+Participation+Software+for+Java
[2] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
[3] - https://github.com/ops4j/org.ops4j.pax.web
2012/11/5 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026686&i=0>>
I have a WAR-packaged application that runs fine on Tomcat.
Now I'm trying to get it to run on Karaf with jetty. I've installed jetty +
war features and I see jetty running on 8181 and get the page not found
error when browsing the root.
I've osgified my manifest as instructed here:
http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me it
looks ok.
But when I drop the WAR into the deploy-folder, nothing much really happens.
I do see the installer writing "installed... .war" -text and list shows that
the application is there in Installed-state. But nothing else happens.
The application should be bound to /portal-endpoint but navigating there
with a browser just gives the same page not found error and nothing gets
output on the log.
Any ideas how to proceed with debugging the problem?
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
Sent from the Karaf - User 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/>
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026686.html
To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=2><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=3>>
To unsubscribe from Karaf - User, click here< NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026700.html
Sent from the Karaf - User 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/>
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026701.html
To start a new topic under Karaf - User, email ml-node+s922171n930749h57@n3.nabble.com<ma...@n3.nabble.com>
To unsubscribe from Karaf - User, click here<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8OTMwNzQ5fDU5NTY5OTMzOA==>.
NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026702.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: How to debug non-working war-deployment?
Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,
at this point it's probably best you show us your manifest.
It has to be something in there that it doesn't work.
regards, Achim
2012/11/26 PJR69 <pe...@insta.fi>
> Hi,
>
> For some reason it looks like the jars inside WEB-INF/lib are indeed
> ignored. Because when I have a package in the Import-Package-section (like
> org.joda.time) and it definitely is inside WEB-INF/lib, the deployment
> complaints about not being able to resolve it. However, if I deploy
> joda-time-2.0.jar directly to the Karaf deploy folder and then deploy my
> WAR there, it won’t complain about org.joda.time!
>
> All jars are listed in the Bundle-Classpath section and all the jars are
> inside the WEB-INF/lib and servlet-jar-stuff has been omitted from the
> WEB-INF/lib (I tried to omit all jars that have clashing packages with
> those already inside Karaf).
>
> Hmm…. OSGi should be able to use the embedded jars, shouldn’t it? Now it
> seems that it won’t.
>
>
> - Petri
>
> From: Achim Nierbeck [via Karaf] [mailto:
> ml-node+s922171n4026855h43@n3.nabble.com]
> Sent: 22. marraskuuta 2012 11:42
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
>
> Hi,
>
> for the embedded jars, you need to make sure all those dependencies are
> configured correctly in the Bundle-Classpath section. This means you need
> to list all of the jars that are needed.
> Oh and by the way a servlet.jar that might have slipped in there will
> screw everything :)
>
> regards, Achim
>
> 2012/11/22 PJR69 <[hidden
> email]</user/SendEmail.jtp?type=node&node=4026855&i=0>>
> Hi again,
>
> Ok, I think that the problem is actually a dependency issue. But I can’t
> figure out what is the reason for this. I have lots of 3rd party jars that
> my servlet uses. All these jars have been embedded into the war inside the
> WEB-INF/lib-folder.
>
> For example, in my WEB-INF/lib there is joda-time-2.0.jar which is a
> proper OSGi-bundle. In the manifest of my WAR-bundle I have the following
> entries (not complete, left out other libs):
> Bundle-ClassPath: WEB-INF/classes;.;WEB-INF/lib/joda-time-2.0.jar
> Import-Package: org.joda.time (was not here earlier but just added it)
> …
>
> When I now deploy the bundle, org.joda.time is not resolved, filainstall
> complaints about it.
>
> So, I guess the dependency issue is the final problem as this would prolly
> result in invalid servlet-stuff and Jetty being unable to process anything.
> However, I can’t understand why doesn’t the embedded jar become properly
> importable as it is listed on the Bundle-Classpath and the jar is
> definitely embedded…?!? And with joda-time specifically, there shouldn’t be
> any transitive dependencies either, not that it should matter as all maven
> dependencies are included in the WEB-INF/lib-folder.
>
>
> - Petri
>
>
> From: Achim Nierbeck [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026855&i=1>]
> Sent: 21. marraskuuta 2012 17:12
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
> You shouldn't worry about the skipping cause the wardeployer takes care of
> non-osgi wars placed inside the deploy folder. For OSGi ready wars the std.
> FileInstall Deployer is sufficient enough since it does have all needed
> Information inside the Manifest.
>
> I'm more worried about this part:
>
> TRACE-level log when trying to access localhost : 8181 / portal:
> qtp9890336-70 | HttpParser | rg.eclipse.jetty.http.HttpParser 281 |
> 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | filled 294/294
> 336-70 - /portal | Server | org.eclipse.jetty.server.Server 358 |
> 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | REQUEST /portal on
> BlockingHttpConnection@1154edd
> ,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=-5,l=10,c=0},r=1
> 336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 269 |
> 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Matching [/portal]...
> 336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 297 |
> 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Path [/portal] does not match
> any context
> 336-70 - /portal | Server | org.eclipse.jetty.server.Server 360 |
> 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | RESPONSE /portal 200
> handled=false
>
> I wonder if your servlet did actually get installed correctly.
>
> You might want to debug into that.
> Right now all my itests at pax-web do work so it's something inside your
> war that makes this special.
>
> regards, Achim
> 2012/11/21 PJR69 <[hidden
> email]</user/SendEmail.jtp?type=node&node=4026845&i=0>>
> Hi,
>
> I took some log snippets (sorry about them being a bit hard toi read),
> maybe you can spot some issue on them.
>
> --------------------------------------------------
> First a TRACE-level log on Karaf when deploying:
>
> -SNAPSHOT/deploy | WarDeployer | eb.deployer.internal.WarDeployer
> 59 | 90 - org.ops4j.pax.web.pax-web-deployer - 1.1.7 | This artifact has
> OSGi Manifest Header skipping: myportal-1.9.0.war
> lixDispatchQueue | myportal | ?
> ? | 126 - fi.mycomp.myportal - 1.9.0.SNAPSHOT | BundleEvent INSTALLED -
> fi.mycomp.myportal
> -SNAPSHOT/deploy | fileinstall | ?
> ? | 6 - org.apache.felix.fileinstall - 3.2.6 | Installed
> C:\opt\apache-karaf-2.3.1-SNAPSHOT\deploy\myportal-1.9.0.war
> lixDispatchQueue | framework | ?
> ? | 0 - org.apache.felix.framework - 4.0.3 | FrameworkEvent PACKAGES
> REFRESHED - org.apache.felix.framework
> -SNAPSHOT/deploy | BlueprintExtender | rint.container.BlueprintExtender
> 252 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Scanning bundle
> fi.mycomp.myportal for blueprint application
> lixDispatchQueue | myportal | ?
> ? | 126 - fi.mycomp.myportal - 1.9.0.SNAPSHOT | BundleEvent RESOLVED -
> fi.mycomp.myportal
> -SNAPSHOT/deploy | BlueprintExtender | rint.container.BlueprintExtender
> 325 | 7 - org.apache.aries.blueprint.core - 1.0.1 | No blueprint
> application found in bundle fi.mycomp.myportal
> lixDispatchQueue | myportal | ?
> ? | 126 - fi.mycomp.myportal - 1.9.0.SNAPSHOT | BundleEvent STARTED -
> fi.mycomp.myportal
> Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver
> 120 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Using [portal]
> as web application context name
> -SNAPSHOT/deploy | fileinstall | ?
> ? | 6 - org.apache.felix.fileinstall - 3.2.6 | Started bundle:
> file:/C:/opt/apache-karaf-2.3.1-SNAPSHOT/deploy/myportal-1.9.0.war
> Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver
> 138 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Parsing a web
> application from [bundle://126.0:0/WEB-INF/web.xml]
> Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver
> 316 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | No
> 'Webapp-Root' manifest attribute specified
> Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver
> 141 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Using [] as
> web application root path
> Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver
> 150 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Parsed web app
> [WebApp{displayName=null,contextName=null}]
> Executor: 1 | WebEventDispatcher | .war.internal.WebEventDispatcher
> 130 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Sending web
> event WebEvent [replay=false, type=1, bundle=fi.mycomp.myportal [126],
> extenderBundle=org.ops4j.pax.web.pax-web-extender-war [89], cause=null,
> timestamp=1353502744594, contextPath=/portal, collisionIds=null] for bundle
> fi.mycomp.myportal
> Executor: 1 | WebAppPublisher | der.war.internal.WebAppPublisher
> 72 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Publishing web
> application [WebApp{displayName=null,contextName=portal}]
> tenerExecutor: 2 | pax-web-extender-war | ?
> ? | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 |
> org/osgi/service/web/DEPLOYING
> Executor: 1 | WebEventDispatcher | .war.internal.WebEventDispatcher
> 130 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Sending web
> event WebEvent [replay=false, type=2, bundle=fi.mycomp.myportal [126],
> extenderBundle=org.ops4j.pax.web.pax-web-extender-war [89], cause=null,
> timestamp=1353502744594, contextPath=/portal, collisionIds=null] for bundle
> fi.mycomp.myportal
> tenerExecutor: 2 | pax-web-extender-war | ?
> ? | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 |
> org/osgi/service/web/DEPLOYED
>
> TRACE-level log when trying to access localhost : 8181 / portal:
> qtp9890336-70 | HttpParser | rg.eclipse.jetty.http.HttpParser 281 |
> 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | filled 294/294
> 336-70 - /portal | Server | org.eclipse.jetty.server.Server 358 |
> 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | REQUEST /portal on
> BlockingHttpConnection@1154edd
> ,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=-5,l=10,c=0},r=1
> 336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 269 |
> 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Matching [/portal]...
> 336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 297 |
> 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Path [/portal] does not match
> any context
> 336-70 - /portal | Server | org.eclipse.jetty.server.Server 360 |
> 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | RESPONSE /portal 200
> handled=false
>
> What does this entry mean:
> 14:59:03,315 | DEBUG | -SNAPSHOT/deploy | WarDeployer |
> eb.deployer.internal.WarDeployer 59 | 90 -
> org.ops4j.pax.web.pax-web-deployer - 1.1.7 | This artifact has OSGi
> Manifest Header skipping: myportal-1.9.0.war
>
> Why is it "skipping" the war?
>
> Can you see anything there that could explain why my WAR-servlet is not
> being accessible on localhost : 8181 / portal ?
>
>
> - Petri
>
> From: Achim Nierbeck [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026845&i=1>]
> Sent: 21. marraskuuta 2012 12:54
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
> The messages you get are OK,
> the first one does tell you the Web-Application context, which is portal.
> the Second does help you to declare where the War-Extender is supposed to
> look at inside the War for WebContent and at this point it tells you it
> looks at the usual place.
> This feature was added a long time ago for certain cases where the "root"
> folder for your web-content isn't set to the root folder inside the war but
> somewhere else (I think eclipse-rap does something the likes)
>
> regards, Achim
> 2012/11/21 PJR69 <[hidden
> email]</user/SendEmail.jtp?type=node&node=4026842&i=0>>
> Hi,
>
> I tested this with the latest snapshot
> (apache-karaf-2.3.1-20121121.004041-63) and again I have the same issue as
> I originally reported: The WAR seems to be deployed just fine (judging from
> log and from webconsole (so webconsole works now on localhost : 8181 /
> system / console) events; no errors) and it is installed into context
> /portal (according to web:list) but I still can’t see the app from
> localhost : 8181 / portal
>
> So IMO it looks like the earlier mentioned doesn’t seem to fix the issue
> in my case.
>
> The pax-web-extender 1.1.7 says on the log:
> … Using [portal] as web application context name …
> and
> … Using [] as web application root path ..
>
> Hmm…. Is there any way to see what contexts are actually running in a
> given Jetty instance?
>
>
> - Petri
>
> [1] - http://team.ops4j.org/browse/PAXWEB-426
> From: jbonofre [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026842&i=1>]
> Sent: 7. marraskuuta 2012 15:20
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
> Hi Petri,
>
> thanks for the update, I'm not able to reproduce that on my machine. I
> try with another SNAPSHOT.
>
> Regards
> JB
>
> On 11/07/2012 02:16 PM, PJR69 wrote:
>
> > This is what I get an then it just hangs…
> >
> > karaf@root> features:install -v webconsole
> > Installing feature webconsole 2.3.1-SNAPSHOT
> > Installing feature webconsole-base 2.3.1-SNAPSHOT
> > Installing feature http 2.3.1-SNAPSHOT
> > Installing feature jetty 7.6.7.v20120910
> > Installing bundle
> mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/2.2-SNAPSHOT
> > Installing bundle
> mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2
> > Installing bundle mvn:javax.mail/mail/1.4.5
> > Installing bundle
> mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
> > Installing bundle mvn:org.eclipse.jetty/jetty-util/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-io/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-http/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-client/7.6.7.v20120910
> > Installing bundle
> mvn:org.eclipse.jetty/jetty-continuation/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-jmx/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-server/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-security/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-servlet/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-servlets/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-xml/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-webapp/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-jndi/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-plus/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-websocket/7.6.7.v20120910
> > Checking configuration file
> mvn:org.apache.karaf/apache-karaf/2.3.1-SNAPSHOT/xml/jettyconfig
> > Installing bundle mvn:org.ops4j.pax.web/pax-web-api/1.1.5
> > Installing bundle mvn:org.ops4j.pax.web/pax-web-spi/1.1.5
> > Installing bundle mvn:org.ops4j.pax.web/pax-web-runtime/1.1.5
> > Installing bundle mvn:org.ops4j.pax.web/pax-web-jetty/1.1.5
> > Installing bundle mvn:org.apache.felix/org.apache.felix.metatype/1.0.4
> > Installing bundle
> mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.branding/2.3.1-SNAPSHOT
> > Installing bundle
> mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.console/2.3.1-SNAPSHOT
> > Installing bundle
> mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.admin/2.3.1-SNAPSHOT
> > Installing bundle
> mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.features/2.3.1-SNAPSHOT
> > Installing bundle
> mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.gogo/2.3.1-SNAPSHOT
> > Installing bundle
> mvn:org.apache.felix/org.apache.felix.webconsole.plugins.event/1.0.2
> >
> > (waited about 2 minutes and no progression)
> >
> >
> > - Petri
> >
> > From: jbonofre [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026711&i=0>]
> > Sent: 7. marraskuuta 2012 11:53
> > To: Riipinen Petri
> > Subject: Re: How to debug non-working war-deployment?
> >
> > Could you try:
> >
> > features:install -v webconsole
> >
> > to see which bundle resolution takes time.
> >
> > Thanks,
> > Regards
> > JB
> >
> > On 11/07/2012 10:45 AM, PJR69 wrote:
> >
> >> That doesn’t seem to be working all all…. I used the Nov 06 snapshot,
> unzipped the staff and started karaf.bat. Then I just typed
> features:install webconsole and nyt it’s just running there for 5 minutes
> and nothing happens…
> >>
> >> IIRC, installing JUST the webconsole directly seems to be a bit iffy; I
> usually install at least jetty and war support before webconsole and after
> those the webconsole installed ok and took only few seconds.
> >>
> >>
> >> - Petri
> >>
> >> From: jbonofre [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026709&i=0>]
> >> Sent: 7. marraskuuta 2012 11:36
> >> To: Riipinen Petri
> >> Subject: Re: How to debug non-working war-deployment?
> >>
> >> I guess that you try:
> >> features:install war
> >> features:install webconsole
> >>
> >> Could you try to install directly the webconsole (without previous http
> >> or war features installed):
> >>
> >> features:install webconsole
> >>
> >> I suspect an issue that I saw before.
> >>
> >> Regards
> >> JB
> >>
> >> On 11/07/2012 08:01 AM, PJR69 wrote:
> >>
> >>> Hi,
> >>>
> >>> Heh… ;) Ok, I feel a bit embarrassed now.. ;)
> >>>
> >>> Which snapshot would you recommend? I tried the two latest ones (Nov
> 06 and Nov 07) and the 07 one doesn’t seem to even start and the 06 has
> some issues with deploying the war, i.e. it won’t trigger Pax Web at all
> (there is no Web-State for my war and nothing gets dumped into the log even
> with DEBUG level set) and the Web Console doesn’t work at all. Not really
> keen on trying out every one of them… ;)
> >>>
> >>>
> >>> - Petri
> >>>
> >>> From: jbonofre [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026707&i=0>]
> >>> Sent: 7. marraskuuta 2012 8:07
> >>> To: Riipinen Petri
> >>> Subject: Re: How to debug non-working war-deployment?
> >>>
> >>> Hi,
> >>>
> >>> Achim talked about Karaf 2.3.1-SNAPSHOT (which use Pax Web 1.1.5 (1.1.6
> >>> soon, I'm updating ;))).
> >>>
> >>> You can find Karaf 2.3.1-SNAPSHOT here:
> >>>
> >>>
> https://repository.apache.org/content/groups/snapshots/org/apache/karaf/apache-karaf/2.3.1-SNAPSHOT/
> >>>
> >>> Regards
> >>> JB
> >>>
> >>> On 11/07/2012 06:27 AM, PJR69 wrote:
> >>>
> >>>> Hi again,
> >>>>
> >>>> Ok, I’m prolly being a bit slow here but I’m trying to find
> 2.3.1-SNAPSHOT here:
> https://oss.sonatype.org/content/repositories/ops4j-snapshots/org/ops4j/pax/web/and can’t see it… Where do I find it?
> >>>>
> >>>>
> >>>> - Petri
> >>>>
> >>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026704&i=0>]
> >>>> Sent: 6. marraskuuta 2012 21:31
> >>>> To: Riipinen Petri
> >>>> Subject: Re: How to debug non-working war-deployment?
> >>>>
> >>>> Hi,
> >>>>
> >>>> do you mind to test with the latest 2.3.1-SNAPSHOT, cause there had
> been an issue with Pax-Web [1]
> >>>> which should be fixed by now.
> >>>>
> >>>> regards, Achim
> >>>>
> >>>> [1] - http://team.ops4j.org/browse/PAXWEB-426
> >>>>
> >>>> 2012/11/6 PJR69 <[hidden
> email]</user/SendEmail.jtp?type=node&node=4026701&i=0>>
> >>>> Hi,
> >>>>
> >>>> Thanks for the advice, that helped me to progress a lot. Now it seems
> that my servlet looks to be deployed ok, but the context-mapping isn’t
> working for some reason or other.
> >>>>
> >>>> web:list shows one entry:
> >>>> State = Active
> >>>> Web-State = Deployed
> >>>> Web-ContextPath = /portal
> >>>>
> >>>> But when I try to browse http://localhost:8181/portal I get HTTP
> error 404, not found.
> >>>>
> >>>> When I look at the log, I always get these kinds of entries:
> >>>> Path [/portal] does not match any context.
> >>>>
> >>>> I’ve tried numerous different URL combinations there (like
> /portal/portal and /portal1/portal as portal1 is the name of the Karaf
> instance where the war is deployed) but nothing seems to work.
> >>>>
> >>>> In the manifest I have Web-ContextPath: portal so AFAIU, the
> application should be on the above URL.
> >>>>
> >>>> I’m trying to follow the infor here
> http://leshazlewood.com/2010/09/08/osgi-maven-pax-and-web-applications/as much as possible, but I don’t have any jsp-pages there. The main servlet
> is mapped just on /
> >>>>
> >>>> So, AFAIU, Karaf + Pax seem to deploy my OSGIfied WAR-bundle ok, no
> errors on log at least, but for some reason the main servlet inside the war
> just can’t be reached via the URL that I’d assume it should be.
> >>>>
> >>>> Any ideas how to proceed would be greatly appreciated…
> >>>>
> >>>>
> >>>> - Petri
> >>>>
> >>>>
> >>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026701&i=1>]
> >>>> Sent: 5. marraskuuta 2012 15:50
> >>>> To: Riipinen Petri
> >>>> Subject: Re: How to debug non-working war-deployment?
> >>>> Hi,
> >>>>
> >>>> which version of Karaf do you use?
> >>>> Second, what does the karaf.log say?
> >>>>
> >>>> How does your war look like, did you add the required OSGi-Manifest
> entries to it?
> >>>> if not, you need to install it with
> >>>> install -s webbundle:mvn:url
> >>>>
> >>>> What does the web:list command list when used?
> >>>>
> >>>> Besides that if you want to debug, you should start Karaf in debug
> mode by using
> >>>> "karaf.sh debug" (or "karaf.bat debug" on windows) on comandline.
> >>>>
> >>>> The sources for the web-extender can be found at OPS4j Pax-Web, see
> [1] to [3]
> >>>>
> >>>> regards, Achim
> >>>>
> >>>> [1] -
> http://team.ops4j.org/wiki/display/ops4j/Open+Participation+Software+for+Java
> >>>> [2] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
> >>>> [3] - https://github.com/ops4j/org.ops4j.pax.web
> >>>> 2012/11/5 PJR69 <[hidden
> email]</user/SendEmail.jtp?type=node&node=4026686&i=0>>
> >>>> I have a WAR-packaged application that runs fine on Tomcat.
> >>>>
> >>>> Now I'm trying to get it to run on Karaf with jetty. I've installed
> jetty +
> >>>> war features and I see jetty running on 8181 and get the page not
> found
> >>>> error when browsing the root.
> >>>>
> >>>> I've osgified my manifest as instructed here:
> >>>> http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me
> it
> >>>> looks ok.
> >>>>
> >>>> But when I drop the WAR into the deploy-folder, nothing much really
> happens.
> >>>> I do see the installer writing "installed... .war" -text and list
> shows that
> >>>> the application is there in Installed-state. But nothing else happens.
> >>>>
> >>>> The application should be bound to /portal-endpoint but navigating
> there
> >>>> with a browser just gives the same page not found error and nothing
> gets
> >>>> output on the log.
> >>>>
> >>>> Any ideas how to proceed with debugging the problem?
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> View this message in context:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
> >>>> Sent from the Karaf - User mailing list archive at Nabble.com.
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026711.html
> To start a new topic under Karaf - User, email [hidden
> email]</user/SendEmail.jtp?type=node&node=4026842&i=2><mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026842&i=3<mailto:
> [hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026842&i=3<mailto:
> [hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026842&i=3%3cmailto:%5bhidden%20email%5d%3c/user/SendEmail.jtp?type=node&node=4026842&i=3>>>>
> To unsubscribe from Karaf - User, click here< NAML<
> http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026841.html
> Sent from the Karaf - User 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/>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026842.html
> To start a new topic under Karaf - User, email [hidden
> email]</user/SendEmail.jtp?type=node&node=4026845&i=2>
> To unsubscribe from Karaf - User, click here< NAML<
> http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026843.html
> Sent from the Karaf - User 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/>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026845.html
> To start a new topic under Karaf - User, email [hidden
> email]</user/SendEmail.jtp?type=node&node=4026855&i=2><mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026855&i=3>>
> To unsubscribe from Karaf - User, click here< NAML<
> http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026853.html
> Sent from the Karaf - User 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/>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026855.html
> To start a new topic under Karaf - User, email
> ml-node+s922171n930749h57@n3.nabble.com<mailto:
> ml-node+s922171n930749h57@n3.nabble.com>
> To unsubscribe from Karaf - User, click here<
> http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8OTMwNzQ5fDU5NTY5OTMzOA==
> >.
> NAML<
> http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026884.html
> Sent from the Karaf - User 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: How to debug non-working war-deployment?
Posted by PJR69 <pe...@insta.fi>.
Hi,
For some reason it looks like the jars inside WEB-INF/lib are indeed ignored. Because when I have a package in the Import-Package-section (like org.joda.time) and it definitely is inside WEB-INF/lib, the deployment complaints about not being able to resolve it. However, if I deploy joda-time-2.0.jar directly to the Karaf deploy folder and then deploy my WAR there, it won’t complain about org.joda.time!
All jars are listed in the Bundle-Classpath section and all the jars are inside the WEB-INF/lib and servlet-jar-stuff has been omitted from the WEB-INF/lib (I tried to omit all jars that have clashing packages with those already inside Karaf).
Hmm…. OSGi should be able to use the embedded jars, shouldn’t it? Now it seems that it won’t.
- Petri
From: Achim Nierbeck [via Karaf] [mailto:ml-node+s922171n4026855h43@n3.nabble.com]
Sent: 22. marraskuuta 2012 11:42
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
Hi,
for the embedded jars, you need to make sure all those dependencies are configured correctly in the Bundle-Classpath section. This means you need to list all of the jars that are needed.
Oh and by the way a servlet.jar that might have slipped in there will screw everything :)
regards, Achim
2012/11/22 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026855&i=0>>
Hi again,
Ok, I think that the problem is actually a dependency issue. But I can’t figure out what is the reason for this. I have lots of 3rd party jars that my servlet uses. All these jars have been embedded into the war inside the WEB-INF/lib-folder.
For example, in my WEB-INF/lib there is joda-time-2.0.jar which is a proper OSGi-bundle. In the manifest of my WAR-bundle I have the following entries (not complete, left out other libs):
Bundle-ClassPath: WEB-INF/classes;.;WEB-INF/lib/joda-time-2.0.jar
Import-Package: org.joda.time (was not here earlier but just added it)
…
When I now deploy the bundle, org.joda.time is not resolved, filainstall complaints about it.
So, I guess the dependency issue is the final problem as this would prolly result in invalid servlet-stuff and Jetty being unable to process anything. However, I can’t understand why doesn’t the embedded jar become properly importable as it is listed on the Bundle-Classpath and the jar is definitely embedded…?!? And with joda-time specifically, there shouldn’t be any transitive dependencies either, not that it should matter as all maven dependencies are included in the WEB-INF/lib-folder.
- Petri
From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026855&i=1>]
Sent: 21. marraskuuta 2012 17:12
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
You shouldn't worry about the skipping cause the wardeployer takes care of non-osgi wars placed inside the deploy folder. For OSGi ready wars the std. FileInstall Deployer is sufficient enough since it does have all needed Information inside the Manifest.
I'm more worried about this part:
TRACE-level log when trying to access localhost : 8181 / portal:
qtp9890336-70 | HttpParser | rg.eclipse.jetty.http.HttpParser 281 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | filled 294/294
336-70 - /portal | Server | org.eclipse.jetty.server.Server 358 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | REQUEST /portal on BlockingHttpConnection@1154edd,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=-5,l=10,c=0},r=1
336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 269 | 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Matching [/portal]...
336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 297 | 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Path [/portal] does not match any context
336-70 - /portal | Server | org.eclipse.jetty.server.Server 360 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | RESPONSE /portal 200 handled=false
I wonder if your servlet did actually get installed correctly.
You might want to debug into that.
Right now all my itests at pax-web do work so it's something inside your war that makes this special.
regards, Achim
2012/11/21 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026845&i=0>>
Hi,
I took some log snippets (sorry about them being a bit hard toi read), maybe you can spot some issue on them.
--------------------------------------------------
First a TRACE-level log on Karaf when deploying:
-SNAPSHOT/deploy | WarDeployer | eb.deployer.internal.WarDeployer 59 | 90 - org.ops4j.pax.web.pax-web-deployer - 1.1.7 | This artifact has OSGi Manifest Header skipping: myportal-1.9.0.war
lixDispatchQueue | myportal | ? ? | 126 - fi.mycomp.myportal - 1.9.0.SNAPSHOT | BundleEvent INSTALLED - fi.mycomp.myportal
-SNAPSHOT/deploy | fileinstall | ? ? | 6 - org.apache.felix.fileinstall - 3.2.6 | Installed C:\opt\apache-karaf-2.3.1-SNAPSHOT\deploy\myportal-1.9.0.war
lixDispatchQueue | framework | ? ? | 0 - org.apache.felix.framework - 4.0.3 | FrameworkEvent PACKAGES REFRESHED - org.apache.felix.framework
-SNAPSHOT/deploy | BlueprintExtender | rint.container.BlueprintExtender 252 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Scanning bundle fi.mycomp.myportal for blueprint application
lixDispatchQueue | myportal | ? ? | 126 - fi.mycomp.myportal - 1.9.0.SNAPSHOT | BundleEvent RESOLVED - fi.mycomp.myportal
-SNAPSHOT/deploy | BlueprintExtender | rint.container.BlueprintExtender 325 | 7 - org.apache.aries.blueprint.core - 1.0.1 | No blueprint application found in bundle fi.mycomp.myportal
lixDispatchQueue | myportal | ? ? | 126 - fi.mycomp.myportal - 1.9.0.SNAPSHOT | BundleEvent STARTED - fi.mycomp.myportal
Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver 120 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Using [portal] as web application context name
-SNAPSHOT/deploy | fileinstall | ? ? | 6 - org.apache.felix.fileinstall - 3.2.6 | Started bundle: file:/C:/opt/apache-karaf-2.3.1-SNAPSHOT/deploy/myportal-1.9.0.war
Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver 138 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Parsing a web application from [bundle://126.0:0/WEB-INF/web.xml]
Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver 316 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | No 'Webapp-Root' manifest attribute specified
Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver 141 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Using [] as web application root path
Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver 150 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Parsed web app [WebApp{displayName=null,contextName=null}]
Executor: 1 | WebEventDispatcher | .war.internal.WebEventDispatcher 130 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Sending web event WebEvent [replay=false, type=1, bundle=fi.mycomp.myportal [126], extenderBundle=org.ops4j.pax.web.pax-web-extender-war [89], cause=null, timestamp=1353502744594, contextPath=/portal, collisionIds=null] for bundle fi.mycomp.myportal
Executor: 1 | WebAppPublisher | der.war.internal.WebAppPublisher 72 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Publishing web application [WebApp{displayName=null,contextName=portal}]
tenerExecutor: 2 | pax-web-extender-war | ? ? | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | org/osgi/service/web/DEPLOYING
Executor: 1 | WebEventDispatcher | .war.internal.WebEventDispatcher 130 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Sending web event WebEvent [replay=false, type=2, bundle=fi.mycomp.myportal [126], extenderBundle=org.ops4j.pax.web.pax-web-extender-war [89], cause=null, timestamp=1353502744594, contextPath=/portal, collisionIds=null] for bundle fi.mycomp.myportal
tenerExecutor: 2 | pax-web-extender-war | ? ? | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | org/osgi/service/web/DEPLOYED
TRACE-level log when trying to access localhost : 8181 / portal:
qtp9890336-70 | HttpParser | rg.eclipse.jetty.http.HttpParser 281 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | filled 294/294
336-70 - /portal | Server | org.eclipse.jetty.server.Server 358 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | REQUEST /portal on BlockingHttpConnection@1154edd,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=-5,l=10,c=0},r=1
336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 269 | 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Matching [/portal]...
336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 297 | 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Path [/portal] does not match any context
336-70 - /portal | Server | org.eclipse.jetty.server.Server 360 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | RESPONSE /portal 200 handled=false
What does this entry mean:
14:59:03,315 | DEBUG | -SNAPSHOT/deploy | WarDeployer | eb.deployer.internal.WarDeployer 59 | 90 - org.ops4j.pax.web.pax-web-deployer - 1.1.7 | This artifact has OSGi Manifest Header skipping: myportal-1.9.0.war
Why is it "skipping" the war?
Can you see anything there that could explain why my WAR-servlet is not being accessible on localhost : 8181 / portal ?
- Petri
From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026845&i=1>]
Sent: 21. marraskuuta 2012 12:54
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
The messages you get are OK,
the first one does tell you the Web-Application context, which is portal.
the Second does help you to declare where the War-Extender is supposed to look at inside the War for WebContent and at this point it tells you it looks at the usual place.
This feature was added a long time ago for certain cases where the "root" folder for your web-content isn't set to the root folder inside the war but somewhere else (I think eclipse-rap does something the likes)
regards, Achim
2012/11/21 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026842&i=0>>
Hi,
I tested this with the latest snapshot (apache-karaf-2.3.1-20121121.004041-63) and again I have the same issue as I originally reported: The WAR seems to be deployed just fine (judging from log and from webconsole (so webconsole works now on localhost : 8181 / system / console) events; no errors) and it is installed into context /portal (according to web:list) but I still can’t see the app from localhost : 8181 / portal
So IMO it looks like the earlier mentioned doesn’t seem to fix the issue in my case.
The pax-web-extender 1.1.7 says on the log:
… Using [portal] as web application context name …
and
… Using [] as web application root path ..
Hmm…. Is there any way to see what contexts are actually running in a given Jetty instance?
- Petri
[1] - http://team.ops4j.org/browse/PAXWEB-426
From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026842&i=1>]
Sent: 7. marraskuuta 2012 15:20
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
Hi Petri,
thanks for the update, I'm not able to reproduce that on my machine. I
try with another SNAPSHOT.
Regards
JB
On 11/07/2012 02:16 PM, PJR69 wrote:
> This is what I get an then it just hangs…
>
> karaf@root> features:install -v webconsole
> Installing feature webconsole 2.3.1-SNAPSHOT
> Installing feature webconsole-base 2.3.1-SNAPSHOT
> Installing feature http 2.3.1-SNAPSHOT
> Installing feature jetty 7.6.7.v20120910
> Installing bundle mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/2.2-SNAPSHOT
> Installing bundle mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2
> Installing bundle mvn:javax.mail/mail/1.4.5
> Installing bundle mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
> Installing bundle mvn:org.eclipse.jetty/jetty-util/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-io/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-http/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-client/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-continuation/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-jmx/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-server/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-security/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-servlet/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-servlets/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-xml/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-webapp/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-jndi/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-plus/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-websocket/7.6.7.v20120910
> Checking configuration file mvn:org.apache.karaf/apache-karaf/2.3.1-SNAPSHOT/xml/jettyconfig
> Installing bundle mvn:org.ops4j.pax.web/pax-web-api/1.1.5
> Installing bundle mvn:org.ops4j.pax.web/pax-web-spi/1.1.5
> Installing bundle mvn:org.ops4j.pax.web/pax-web-runtime/1.1.5
> Installing bundle mvn:org.ops4j.pax.web/pax-web-jetty/1.1.5
> Installing bundle mvn:org.apache.felix/org.apache.felix.metatype/1.0.4
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.branding/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.console/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.admin/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.features/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.gogo/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.felix/org.apache.felix.webconsole.plugins.event/1.0.2
>
> (waited about 2 minutes and no progression)
>
>
> - Petri
>
> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026711&i=0>]
> Sent: 7. marraskuuta 2012 11:53
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
>
> Could you try:
>
> features:install -v webconsole
>
> to see which bundle resolution takes time.
>
> Thanks,
> Regards
> JB
>
> On 11/07/2012 10:45 AM, PJR69 wrote:
>
>> That doesn’t seem to be working all all…. I used the Nov 06 snapshot, unzipped the staff and started karaf.bat. Then I just typed features:install webconsole and nyt it’s just running there for 5 minutes and nothing happens…
>>
>> IIRC, installing JUST the webconsole directly seems to be a bit iffy; I usually install at least jetty and war support before webconsole and after those the webconsole installed ok and took only few seconds.
>>
>>
>> - Petri
>>
>> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026709&i=0>]
>> Sent: 7. marraskuuta 2012 11:36
>> To: Riipinen Petri
>> Subject: Re: How to debug non-working war-deployment?
>>
>> I guess that you try:
>> features:install war
>> features:install webconsole
>>
>> Could you try to install directly the webconsole (without previous http
>> or war features installed):
>>
>> features:install webconsole
>>
>> I suspect an issue that I saw before.
>>
>> Regards
>> JB
>>
>> On 11/07/2012 08:01 AM, PJR69 wrote:
>>
>>> Hi,
>>>
>>> Heh… ;) Ok, I feel a bit embarrassed now.. ;)
>>>
>>> Which snapshot would you recommend? I tried the two latest ones (Nov 06 and Nov 07) and the 07 one doesn’t seem to even start and the 06 has some issues with deploying the war, i.e. it won’t trigger Pax Web at all (there is no Web-State for my war and nothing gets dumped into the log even with DEBUG level set) and the Web Console doesn’t work at all. Not really keen on trying out every one of them… ;)
>>>
>>>
>>> - Petri
>>>
>>> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=0>]
>>> Sent: 7. marraskuuta 2012 8:07
>>> To: Riipinen Petri
>>> Subject: Re: How to debug non-working war-deployment?
>>>
>>> Hi,
>>>
>>> Achim talked about Karaf 2.3.1-SNAPSHOT (which use Pax Web 1.1.5 (1.1.6
>>> soon, I'm updating ;))).
>>>
>>> You can find Karaf 2.3.1-SNAPSHOT here:
>>>
>>> https://repository.apache.org/content/groups/snapshots/org/apache/karaf/apache-karaf/2.3.1-SNAPSHOT/
>>>
>>> Regards
>>> JB
>>>
>>> On 11/07/2012 06:27 AM, PJR69 wrote:
>>>
>>>> Hi again,
>>>>
>>>> Ok, I’m prolly being a bit slow here but I’m trying to find 2.3.1-SNAPSHOT here: https://oss.sonatype.org/content/repositories/ops4j-snapshots/org/ops4j/pax/web/ and can’t see it… Where do I find it?
>>>>
>>>>
>>>> - Petri
>>>>
>>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=0>]
>>>> Sent: 6. marraskuuta 2012 21:31
>>>> To: Riipinen Petri
>>>> Subject: Re: How to debug non-working war-deployment?
>>>>
>>>> Hi,
>>>>
>>>> do you mind to test with the latest 2.3.1-SNAPSHOT, cause there had been an issue with Pax-Web [1]
>>>> which should be fixed by now.
>>>>
>>>> regards, Achim
>>>>
>>>> [1] - http://team.ops4j.org/browse/PAXWEB-426
>>>>
>>>> 2012/11/6 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=0>>
>>>> Hi,
>>>>
>>>> Thanks for the advice, that helped me to progress a lot. Now it seems that my servlet looks to be deployed ok, but the context-mapping isn’t working for some reason or other.
>>>>
>>>> web:list shows one entry:
>>>> State = Active
>>>> Web-State = Deployed
>>>> Web-ContextPath = /portal
>>>>
>>>> But when I try to browse http://localhost:8181/portal I get HTTP error 404, not found.
>>>>
>>>> When I look at the log, I always get these kinds of entries:
>>>> Path [/portal] does not match any context.
>>>>
>>>> I’ve tried numerous different URL combinations there (like /portal/portal and /portal1/portal as portal1 is the name of the Karaf instance where the war is deployed) but nothing seems to work.
>>>>
>>>> In the manifest I have Web-ContextPath: portal so AFAIU, the application should be on the above URL.
>>>>
>>>> I’m trying to follow the infor here http://leshazlewood.com/2010/09/08/osgi-maven-pax-and-web-applications/ as much as possible, but I don’t have any jsp-pages there. The main servlet is mapped just on /
>>>>
>>>> So, AFAIU, Karaf + Pax seem to deploy my OSGIfied WAR-bundle ok, no errors on log at least, but for some reason the main servlet inside the war just can’t be reached via the URL that I’d assume it should be.
>>>>
>>>> Any ideas how to proceed would be greatly appreciated…
>>>>
>>>>
>>>> - Petri
>>>>
>>>>
>>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=1>]
>>>> Sent: 5. marraskuuta 2012 15:50
>>>> To: Riipinen Petri
>>>> Subject: Re: How to debug non-working war-deployment?
>>>> Hi,
>>>>
>>>> which version of Karaf do you use?
>>>> Second, what does the karaf.log say?
>>>>
>>>> How does your war look like, did you add the required OSGi-Manifest entries to it?
>>>> if not, you need to install it with
>>>> install -s webbundle:mvn:url
>>>>
>>>> What does the web:list command list when used?
>>>>
>>>> Besides that if you want to debug, you should start Karaf in debug mode by using
>>>> "karaf.sh debug" (or "karaf.bat debug" on windows) on comandline.
>>>>
>>>> The sources for the web-extender can be found at OPS4j Pax-Web, see [1] to [3]
>>>>
>>>> regards, Achim
>>>>
>>>> [1] - http://team.ops4j.org/wiki/display/ops4j/Open+Participation+Software+for+Java
>>>> [2] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
>>>> [3] - https://github.com/ops4j/org.ops4j.pax.web
>>>> 2012/11/5 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026686&i=0>>
>>>> I have a WAR-packaged application that runs fine on Tomcat.
>>>>
>>>> Now I'm trying to get it to run on Karaf with jetty. I've installed jetty +
>>>> war features and I see jetty running on 8181 and get the page not found
>>>> error when browsing the root.
>>>>
>>>> I've osgified my manifest as instructed here:
>>>> http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me it
>>>> looks ok.
>>>>
>>>> But when I drop the WAR into the deploy-folder, nothing much really happens.
>>>> I do see the installer writing "installed... .war" -text and list shows that
>>>> the application is there in Installed-state. But nothing else happens.
>>>>
>>>> The application should be bound to /portal-endpoint but navigating there
>>>> with a browser just gives the same page not found error and nothing gets
>>>> output on the log.
>>>>
>>>> Any ideas how to proceed with debugging the problem?
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
>>>> Sent from the Karaf - User mailing list archive at Nabble.com.
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026711.html
To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026842&i=2><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026842&i=3<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026842&i=3<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026842&i=3%3cmailto:%5bhidden%20email%5d%3c/user/SendEmail.jtp?type=node&node=4026842&i=3>>>>
To unsubscribe from Karaf - User, click here< NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026841.html
Sent from the Karaf - User 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/>
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026842.html
To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026845&i=2>
To unsubscribe from Karaf - User, click here< NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026843.html
Sent from the Karaf - User 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/>
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026845.html
To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026855&i=2><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026855&i=3>>
To unsubscribe from Karaf - User, click here< NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026853.html
Sent from the Karaf - User 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/>
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026855.html
To start a new topic under Karaf - User, email ml-node+s922171n930749h57@n3.nabble.com<ma...@n3.nabble.com>
To unsubscribe from Karaf - User, click here<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8OTMwNzQ5fDU5NTY5OTMzOA==>.
NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026884.html
Sent from the Karaf - User mailing list archive at Nabble.com.
RE: How to debug non-working war-deployment?
Posted by PJR69 <pe...@insta.fi>.
Good morning,
Well, the only thing that’s puzzling me a bit is my Import-Package definition. In my maven-bundle-plugin I have the definition
<Import-Package>javax.servlet,javax,servlet.http,javax.servlet.resources,!*</Import-Package>
The !* is the one that’s puzzling me a bit. If I have it * then the Import-Package gets all sorts of transitive packages which I don’t have (like bsh which I mentioned earlier in my posting). As I don’t get any bundle deployment errors, I’m thinking that the manifest is correct wrt to imports, but I wonder if there still could be some issue when deploying the servlet even though the OSGi-dependencies do seem to get resolved.
As the servlet does work properly when deployed to standalone Tomcat, the basic structure of it must be correct, so I’m guessing that it’s something with the OSGi-stuff that’s causing the problem. All the other manifest-stuff is more or less copied from the pax-web wiki instructions.
- Petri
From: Achim Nierbeck [via Karaf] [mailto:ml-node+s922171n4026845h33@n3.nabble.com]
Sent: 21. marraskuuta 2012 17:12
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
You shouldn't worry about the skipping cause the wardeployer takes care of non-osgi wars placed inside the deploy folder. For OSGi ready wars the std. FileInstall Deployer is sufficient enough since it does have all needed Information inside the Manifest.
I'm more worried about this part:
TRACE-level log when trying to access localhost : 8181 / portal:
qtp9890336-70 | HttpParser | rg.eclipse.jetty.http.HttpParser 281 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | filled 294/294
336-70 - /portal | Server | org.eclipse.jetty.server.Server 358 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | REQUEST /portal on BlockingHttpConnection@1154edd,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=-5,l=10,c=0},r=1
336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 269 | 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Matching [/portal]...
336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 297 | 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Path [/portal] does not match any context
336-70 - /portal | Server | org.eclipse.jetty.server.Server 360 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | RESPONSE /portal 200 handled=false
I wonder if your servlet did actually get installed correctly.
You might want to debug into that.
Right now all my itests at pax-web do work so it's something inside your war that makes this special.
regards, Achim
2012/11/21 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026845&i=0>>
Hi,
I took some log snippets (sorry about them being a bit hard toi read), maybe you can spot some issue on them.
--------------------------------------------------
First a TRACE-level log on Karaf when deploying:
-SNAPSHOT/deploy | WarDeployer | eb.deployer.internal.WarDeployer 59 | 90 - org.ops4j.pax.web.pax-web-deployer - 1.1.7 | This artifact has OSGi Manifest Header skipping: myportal-1.9.0.war
lixDispatchQueue | myportal | ? ? | 126 - fi.mycomp.myportal - 1.9.0.SNAPSHOT | BundleEvent INSTALLED - fi.mycomp.myportal
-SNAPSHOT/deploy | fileinstall | ? ? | 6 - org.apache.felix.fileinstall - 3.2.6 | Installed C:\opt\apache-karaf-2.3.1-SNAPSHOT\deploy\myportal-1.9.0.war
lixDispatchQueue | framework | ? ? | 0 - org.apache.felix.framework - 4.0.3 | FrameworkEvent PACKAGES REFRESHED - org.apache.felix.framework
-SNAPSHOT/deploy | BlueprintExtender | rint.container.BlueprintExtender 252 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Scanning bundle fi.mycomp.myportal for blueprint application
lixDispatchQueue | myportal | ? ? | 126 - fi.mycomp.myportal - 1.9.0.SNAPSHOT | BundleEvent RESOLVED - fi.mycomp.myportal
-SNAPSHOT/deploy | BlueprintExtender | rint.container.BlueprintExtender 325 | 7 - org.apache.aries.blueprint.core - 1.0.1 | No blueprint application found in bundle fi.mycomp.myportal
lixDispatchQueue | myportal | ? ? | 126 - fi.mycomp.myportal - 1.9.0.SNAPSHOT | BundleEvent STARTED - fi.mycomp.myportal
Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver 120 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Using [portal] as web application context name
-SNAPSHOT/deploy | fileinstall | ? ? | 6 - org.apache.felix.fileinstall - 3.2.6 | Started bundle: file:/C:/opt/apache-karaf-2.3.1-SNAPSHOT/deploy/myportal-1.9.0.war
Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver 138 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Parsing a web application from [bundle://126.0:0/WEB-INF/web.xml]
Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver 316 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | No 'Webapp-Root' manifest attribute specified
Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver 141 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Using [] as web application root path
Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver 150 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Parsed web app [WebApp{displayName=null,contextName=null}]
Executor: 1 | WebEventDispatcher | .war.internal.WebEventDispatcher 130 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Sending web event WebEvent [replay=false, type=1, bundle=fi.mycomp.myportal [126], extenderBundle=org.ops4j.pax.web.pax-web-extender-war [89], cause=null, timestamp=1353502744594, contextPath=/portal, collisionIds=null] for bundle fi.mycomp.myportal
Executor: 1 | WebAppPublisher | der.war.internal.WebAppPublisher 72 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Publishing web application [WebApp{displayName=null,contextName=portal}]
tenerExecutor: 2 | pax-web-extender-war | ? ? | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | org/osgi/service/web/DEPLOYING
Executor: 1 | WebEventDispatcher | .war.internal.WebEventDispatcher 130 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Sending web event WebEvent [replay=false, type=2, bundle=fi.mycomp.myportal [126], extenderBundle=org.ops4j.pax.web.pax-web-extender-war [89], cause=null, timestamp=1353502744594, contextPath=/portal, collisionIds=null] for bundle fi.mycomp.myportal
tenerExecutor: 2 | pax-web-extender-war | ? ? | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | org/osgi/service/web/DEPLOYED
TRACE-level log when trying to access localhost : 8181 / portal:
qtp9890336-70 | HttpParser | rg.eclipse.jetty.http.HttpParser 281 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | filled 294/294
336-70 - /portal | Server | org.eclipse.jetty.server.Server 358 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | REQUEST /portal on BlockingHttpConnection@1154edd,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=-5,l=10,c=0},r=1
336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 269 | 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Matching [/portal]...
336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 297 | 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Path [/portal] does not match any context
336-70 - /portal | Server | org.eclipse.jetty.server.Server 360 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | RESPONSE /portal 200 handled=false
What does this entry mean:
14:59:03,315 | DEBUG | -SNAPSHOT/deploy | WarDeployer | eb.deployer.internal.WarDeployer 59 | 90 - org.ops4j.pax.web.pax-web-deployer - 1.1.7 | This artifact has OSGi Manifest Header skipping: myportal-1.9.0.war
Why is it "skipping" the war?
Can you see anything there that could explain why my WAR-servlet is not being accessible on localhost : 8181 / portal ?
- Petri
From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026845&i=1>]
Sent: 21. marraskuuta 2012 12:54
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
The messages you get are OK,
the first one does tell you the Web-Application context, which is portal.
the Second does help you to declare where the War-Extender is supposed to look at inside the War for WebContent and at this point it tells you it looks at the usual place.
This feature was added a long time ago for certain cases where the "root" folder for your web-content isn't set to the root folder inside the war but somewhere else (I think eclipse-rap does something the likes)
regards, Achim
2012/11/21 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026842&i=0>>
Hi,
I tested this with the latest snapshot (apache-karaf-2.3.1-20121121.004041-63) and again I have the same issue as I originally reported: The WAR seems to be deployed just fine (judging from log and from webconsole (so webconsole works now on localhost : 8181 / system / console) events; no errors) and it is installed into context /portal (according to web:list) but I still can’t see the app from localhost : 8181 / portal
So IMO it looks like the earlier mentioned doesn’t seem to fix the issue in my case.
The pax-web-extender 1.1.7 says on the log:
… Using [portal] as web application context name …
and
… Using [] as web application root path ..
Hmm…. Is there any way to see what contexts are actually running in a given Jetty instance?
- Petri
[1] - http://team.ops4j.org/browse/PAXWEB-426
From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026842&i=1>]
Sent: 7. marraskuuta 2012 15:20
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
Hi Petri,
thanks for the update, I'm not able to reproduce that on my machine. I
try with another SNAPSHOT.
Regards
JB
On 11/07/2012 02:16 PM, PJR69 wrote:
> This is what I get an then it just hangs…
>
> karaf@root> features:install -v webconsole
> Installing feature webconsole 2.3.1-SNAPSHOT
> Installing feature webconsole-base 2.3.1-SNAPSHOT
> Installing feature http 2.3.1-SNAPSHOT
> Installing feature jetty 7.6.7.v20120910
> Installing bundle mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/2.2-SNAPSHOT
> Installing bundle mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2
> Installing bundle mvn:javax.mail/mail/1.4.5
> Installing bundle mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
> Installing bundle mvn:org.eclipse.jetty/jetty-util/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-io/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-http/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-client/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-continuation/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-jmx/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-server/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-security/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-servlet/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-servlets/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-xml/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-webapp/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-jndi/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-plus/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-websocket/7.6.7.v20120910
> Checking configuration file mvn:org.apache.karaf/apache-karaf/2.3.1-SNAPSHOT/xml/jettyconfig
> Installing bundle mvn:org.ops4j.pax.web/pax-web-api/1.1.5
> Installing bundle mvn:org.ops4j.pax.web/pax-web-spi/1.1.5
> Installing bundle mvn:org.ops4j.pax.web/pax-web-runtime/1.1.5
> Installing bundle mvn:org.ops4j.pax.web/pax-web-jetty/1.1.5
> Installing bundle mvn:org.apache.felix/org.apache.felix.metatype/1.0.4
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.branding/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.console/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.admin/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.features/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.gogo/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.felix/org.apache.felix.webconsole.plugins.event/1.0.2
>
> (waited about 2 minutes and no progression)
>
>
> - Petri
>
> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026711&i=0>]
> Sent: 7. marraskuuta 2012 11:53
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
>
> Could you try:
>
> features:install -v webconsole
>
> to see which bundle resolution takes time.
>
> Thanks,
> Regards
> JB
>
> On 11/07/2012 10:45 AM, PJR69 wrote:
>
>> That doesn’t seem to be working all all…. I used the Nov 06 snapshot, unzipped the staff and started karaf.bat. Then I just typed features:install webconsole and nyt it’s just running there for 5 minutes and nothing happens…
>>
>> IIRC, installing JUST the webconsole directly seems to be a bit iffy; I usually install at least jetty and war support before webconsole and after those the webconsole installed ok and took only few seconds.
>>
>>
>> - Petri
>>
>> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026709&i=0>]
>> Sent: 7. marraskuuta 2012 11:36
>> To: Riipinen Petri
>> Subject: Re: How to debug non-working war-deployment?
>>
>> I guess that you try:
>> features:install war
>> features:install webconsole
>>
>> Could you try to install directly the webconsole (without previous http
>> or war features installed):
>>
>> features:install webconsole
>>
>> I suspect an issue that I saw before.
>>
>> Regards
>> JB
>>
>> On 11/07/2012 08:01 AM, PJR69 wrote:
>>
>>> Hi,
>>>
>>> Heh… ;) Ok, I feel a bit embarrassed now.. ;)
>>>
>>> Which snapshot would you recommend? I tried the two latest ones (Nov 06 and Nov 07) and the 07 one doesn’t seem to even start and the 06 has some issues with deploying the war, i.e. it won’t trigger Pax Web at all (there is no Web-State for my war and nothing gets dumped into the log even with DEBUG level set) and the Web Console doesn’t work at all. Not really keen on trying out every one of them… ;)
>>>
>>>
>>> - Petri
>>>
>>> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=0>]
>>> Sent: 7. marraskuuta 2012 8:07
>>> To: Riipinen Petri
>>> Subject: Re: How to debug non-working war-deployment?
>>>
>>> Hi,
>>>
>>> Achim talked about Karaf 2.3.1-SNAPSHOT (which use Pax Web 1.1.5 (1.1.6
>>> soon, I'm updating ;))).
>>>
>>> You can find Karaf 2.3.1-SNAPSHOT here:
>>>
>>> https://repository.apache.org/content/groups/snapshots/org/apache/karaf/apache-karaf/2.3.1-SNAPSHOT/
>>>
>>> Regards
>>> JB
>>>
>>> On 11/07/2012 06:27 AM, PJR69 wrote:
>>>
>>>> Hi again,
>>>>
>>>> Ok, I’m prolly being a bit slow here but I’m trying to find 2.3.1-SNAPSHOT here: https://oss.sonatype.org/content/repositories/ops4j-snapshots/org/ops4j/pax/web/ and can’t see it… Where do I find it?
>>>>
>>>>
>>>> - Petri
>>>>
>>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=0>]
>>>> Sent: 6. marraskuuta 2012 21:31
>>>> To: Riipinen Petri
>>>> Subject: Re: How to debug non-working war-deployment?
>>>>
>>>> Hi,
>>>>
>>>> do you mind to test with the latest 2.3.1-SNAPSHOT, cause there had been an issue with Pax-Web [1]
>>>> which should be fixed by now.
>>>>
>>>> regards, Achim
>>>>
>>>> [1] - http://team.ops4j.org/browse/PAXWEB-426
>>>>
>>>> 2012/11/6 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=0>>
>>>> Hi,
>>>>
>>>> Thanks for the advice, that helped me to progress a lot. Now it seems that my servlet looks to be deployed ok, but the context-mapping isn’t working for some reason or other.
>>>>
>>>> web:list shows one entry:
>>>> State = Active
>>>> Web-State = Deployed
>>>> Web-ContextPath = /portal
>>>>
>>>> But when I try to browse http://localhost:8181/portal I get HTTP error 404, not found.
>>>>
>>>> When I look at the log, I always get these kinds of entries:
>>>> Path [/portal] does not match any context.
>>>>
>>>> I’ve tried numerous different URL combinations there (like /portal/portal and /portal1/portal as portal1 is the name of the Karaf instance where the war is deployed) but nothing seems to work.
>>>>
>>>> In the manifest I have Web-ContextPath: portal so AFAIU, the application should be on the above URL.
>>>>
>>>> I’m trying to follow the infor here http://leshazlewood.com/2010/09/08/osgi-maven-pax-and-web-applications/ as much as possible, but I don’t have any jsp-pages there. The main servlet is mapped just on /
>>>>
>>>> So, AFAIU, Karaf + Pax seem to deploy my OSGIfied WAR-bundle ok, no errors on log at least, but for some reason the main servlet inside the war just can’t be reached via the URL that I’d assume it should be.
>>>>
>>>> Any ideas how to proceed would be greatly appreciated…
>>>>
>>>>
>>>> - Petri
>>>>
>>>>
>>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=1>]
>>>> Sent: 5. marraskuuta 2012 15:50
>>>> To: Riipinen Petri
>>>> Subject: Re: How to debug non-working war-deployment?
>>>> Hi,
>>>>
>>>> which version of Karaf do you use?
>>>> Second, what does the karaf.log say?
>>>>
>>>> How does your war look like, did you add the required OSGi-Manifest entries to it?
>>>> if not, you need to install it with
>>>> install -s webbundle:mvn:url
>>>>
>>>> What does the web:list command list when used?
>>>>
>>>> Besides that if you want to debug, you should start Karaf in debug mode by using
>>>> "karaf.sh debug" (or "karaf.bat debug" on windows) on comandline.
>>>>
>>>> The sources for the web-extender can be found at OPS4j Pax-Web, see [1] to [3]
>>>>
>>>> regards, Achim
>>>>
>>>> [1] - http://team.ops4j.org/wiki/display/ops4j/Open+Participation+Software+for+Java
>>>> [2] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
>>>> [3] - https://github.com/ops4j/org.ops4j.pax.web
>>>> 2012/11/5 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026686&i=0>>
>>>> I have a WAR-packaged application that runs fine on Tomcat.
>>>>
>>>> Now I'm trying to get it to run on Karaf with jetty. I've installed jetty +
>>>> war features and I see jetty running on 8181 and get the page not found
>>>> error when browsing the root.
>>>>
>>>> I've osgified my manifest as instructed here:
>>>> http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me it
>>>> looks ok.
>>>>
>>>> But when I drop the WAR into the deploy-folder, nothing much really happens.
>>>> I do see the installer writing "installed... .war" -text and list shows that
>>>> the application is there in Installed-state. But nothing else happens.
>>>>
>>>> The application should be bound to /portal-endpoint but navigating there
>>>> with a browser just gives the same page not found error and nothing gets
>>>> output on the log.
>>>>
>>>> Any ideas how to proceed with debugging the problem?
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
>>>> Sent from the Karaf - User mailing list archive at Nabble.com.
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026711.html
To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026842&i=2><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026842&i=3<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026842&i=3>>>
To unsubscribe from Karaf - User, click here< NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026841.html
Sent from the Karaf - User 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/>
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026842.html
To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026845&i=2>
To unsubscribe from Karaf - User, click here< NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026843.html
Sent from the Karaf - User 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/>
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026845.html
To start a new topic under Karaf - User, email ml-node+s922171n930749h57@n3.nabble.com<ma...@n3.nabble.com>
To unsubscribe from Karaf - User, click here<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8OTMwNzQ5fDU5NTY5OTMzOA==>.
NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026852.html
Sent from the Karaf - User mailing list archive at Nabble.com.
RE: How to debug non-working war-deployment?
Posted by PJR69 <pe...@insta.fi>.
Hi,
Yep, they are all listed there as generated by the maven-bundle-plugin.
But now that you mention servlet.jar, obviously I have ALL the maven dependencies there related to servlet development (like javax.servlet-geronimo bundles) as well as spring-stuff etc that I have also installed as features on my Karaf-instance.
Ok, so that might explain the hiccups.
- Peri
From: Achim Nierbeck [via Karaf] [mailto:ml-node+s922171n4026855h43@n3.nabble.com]
Sent: 22. marraskuuta 2012 11:42
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
Hi,
for the embedded jars, you need to make sure all those dependencies are configured correctly in the Bundle-Classpath section. This means you need to list all of the jars that are needed.
Oh and by the way a servlet.jar that might have slipped in there will screw everything :)
regards, Achim
2012/11/22 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026855&i=0>>
Hi again,
Ok, I think that the problem is actually a dependency issue. But I can’t figure out what is the reason for this. I have lots of 3rd party jars that my servlet uses. All these jars have been embedded into the war inside the WEB-INF/lib-folder.
For example, in my WEB-INF/lib there is joda-time-2.0.jar which is a proper OSGi-bundle. In the manifest of my WAR-bundle I have the following entries (not complete, left out other libs):
Bundle-ClassPath: WEB-INF/classes;.;WEB-INF/lib/joda-time-2.0.jar
Import-Package: org.joda.time (was not here earlier but just added it)
…
When I now deploy the bundle, org.joda.time is not resolved, filainstall complaints about it.
So, I guess the dependency issue is the final problem as this would prolly result in invalid servlet-stuff and Jetty being unable to process anything. However, I can’t understand why doesn’t the embedded jar become properly importable as it is listed on the Bundle-Classpath and the jar is definitely embedded…?!? And with joda-time specifically, there shouldn’t be any transitive dependencies either, not that it should matter as all maven dependencies are included in the WEB-INF/lib-folder.
- Petri
From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026855&i=1>]
Sent: 21. marraskuuta 2012 17:12
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
You shouldn't worry about the skipping cause the wardeployer takes care of non-osgi wars placed inside the deploy folder. For OSGi ready wars the std. FileInstall Deployer is sufficient enough since it does have all needed Information inside the Manifest.
I'm more worried about this part:
TRACE-level log when trying to access localhost : 8181 / portal:
qtp9890336-70 | HttpParser | rg.eclipse.jetty.http.HttpParser 281 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | filled 294/294
336-70 - /portal | Server | org.eclipse.jetty.server.Server 358 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | REQUEST /portal on BlockingHttpConnection@1154edd,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=-5,l=10,c=0},r=1
336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 269 | 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Matching [/portal]...
336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 297 | 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Path [/portal] does not match any context
336-70 - /portal | Server | org.eclipse.jetty.server.Server 360 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | RESPONSE /portal 200 handled=false
I wonder if your servlet did actually get installed correctly.
You might want to debug into that.
Right now all my itests at pax-web do work so it's something inside your war that makes this special.
regards, Achim
2012/11/21 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026845&i=0>>
Hi,
I took some log snippets (sorry about them being a bit hard toi read), maybe you can spot some issue on them.
--------------------------------------------------
First a TRACE-level log on Karaf when deploying:
-SNAPSHOT/deploy | WarDeployer | eb.deployer.internal.WarDeployer 59 | 90 - org.ops4j.pax.web.pax-web-deployer - 1.1.7 | This artifact has OSGi Manifest Header skipping: myportal-1.9.0.war
lixDispatchQueue | myportal | ? ? | 126 - fi.mycomp.myportal - 1.9.0.SNAPSHOT | BundleEvent INSTALLED - fi.mycomp.myportal
-SNAPSHOT/deploy | fileinstall | ? ? | 6 - org.apache.felix.fileinstall - 3.2.6 | Installed C:\opt\apache-karaf-2.3.1-SNAPSHOT\deploy\myportal-1.9.0.war
lixDispatchQueue | framework | ? ? | 0 - org.apache.felix.framework - 4.0.3 | FrameworkEvent PACKAGES REFRESHED - org.apache.felix.framework
-SNAPSHOT/deploy | BlueprintExtender | rint.container.BlueprintExtender 252 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Scanning bundle fi.mycomp.myportal for blueprint application
lixDispatchQueue | myportal | ? ? | 126 - fi.mycomp.myportal - 1.9.0.SNAPSHOT | BundleEvent RESOLVED - fi.mycomp.myportal
-SNAPSHOT/deploy | BlueprintExtender | rint.container.BlueprintExtender 325 | 7 - org.apache.aries.blueprint.core - 1.0.1 | No blueprint application found in bundle fi.mycomp.myportal
lixDispatchQueue | myportal | ? ? | 126 - fi.mycomp.myportal - 1.9.0.SNAPSHOT | BundleEvent STARTED - fi.mycomp.myportal
Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver 120 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Using [portal] as web application context name
-SNAPSHOT/deploy | fileinstall | ? ? | 6 - org.apache.felix.fileinstall - 3.2.6 | Started bundle: file:/C:/opt/apache-karaf-2.3.1-SNAPSHOT/deploy/myportal-1.9.0.war
Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver 138 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Parsing a web application from [bundle://126.0:0/WEB-INF/web.xml]
Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver 316 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | No 'Webapp-Root' manifest attribute specified
Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver 141 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Using [] as web application root path
Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver 150 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Parsed web app [WebApp{displayName=null,contextName=null}]
Executor: 1 | WebEventDispatcher | .war.internal.WebEventDispatcher 130 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Sending web event WebEvent [replay=false, type=1, bundle=fi.mycomp.myportal [126], extenderBundle=org.ops4j.pax.web.pax-web-extender-war [89], cause=null, timestamp=1353502744594, contextPath=/portal, collisionIds=null] for bundle fi.mycomp.myportal
Executor: 1 | WebAppPublisher | der.war.internal.WebAppPublisher 72 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Publishing web application [WebApp{displayName=null,contextName=portal}]
tenerExecutor: 2 | pax-web-extender-war | ? ? | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | org/osgi/service/web/DEPLOYING
Executor: 1 | WebEventDispatcher | .war.internal.WebEventDispatcher 130 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Sending web event WebEvent [replay=false, type=2, bundle=fi.mycomp.myportal [126], extenderBundle=org.ops4j.pax.web.pax-web-extender-war [89], cause=null, timestamp=1353502744594, contextPath=/portal, collisionIds=null] for bundle fi.mycomp.myportal
tenerExecutor: 2 | pax-web-extender-war | ? ? | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | org/osgi/service/web/DEPLOYED
TRACE-level log when trying to access localhost : 8181 / portal:
qtp9890336-70 | HttpParser | rg.eclipse.jetty.http.HttpParser 281 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | filled 294/294
336-70 - /portal | Server | org.eclipse.jetty.server.Server 358 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | REQUEST /portal on BlockingHttpConnection@1154edd,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=-5,l=10,c=0},r=1
336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 269 | 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Matching [/portal]...
336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 297 | 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Path [/portal] does not match any context
336-70 - /portal | Server | org.eclipse.jetty.server.Server 360 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | RESPONSE /portal 200 handled=false
What does this entry mean:
14:59:03,315 | DEBUG | -SNAPSHOT/deploy | WarDeployer | eb.deployer.internal.WarDeployer 59 | 90 - org.ops4j.pax.web.pax-web-deployer - 1.1.7 | This artifact has OSGi Manifest Header skipping: myportal-1.9.0.war
Why is it "skipping" the war?
Can you see anything there that could explain why my WAR-servlet is not being accessible on localhost : 8181 / portal ?
- Petri
From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026845&i=1>]
Sent: 21. marraskuuta 2012 12:54
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
The messages you get are OK,
the first one does tell you the Web-Application context, which is portal.
the Second does help you to declare where the War-Extender is supposed to look at inside the War for WebContent and at this point it tells you it looks at the usual place.
This feature was added a long time ago for certain cases where the "root" folder for your web-content isn't set to the root folder inside the war but somewhere else (I think eclipse-rap does something the likes)
regards, Achim
2012/11/21 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026842&i=0>>
Hi,
I tested this with the latest snapshot (apache-karaf-2.3.1-20121121.004041-63) and again I have the same issue as I originally reported: The WAR seems to be deployed just fine (judging from log and from webconsole (so webconsole works now on localhost : 8181 / system / console) events; no errors) and it is installed into context /portal (according to web:list) but I still can’t see the app from localhost : 8181 / portal
So IMO it looks like the earlier mentioned doesn’t seem to fix the issue in my case.
The pax-web-extender 1.1.7 says on the log:
… Using [portal] as web application context name …
and
… Using [] as web application root path ..
Hmm…. Is there any way to see what contexts are actually running in a given Jetty instance?
- Petri
[1] - http://team.ops4j.org/browse/PAXWEB-426
From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026842&i=1>]
Sent: 7. marraskuuta 2012 15:20
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
Hi Petri,
thanks for the update, I'm not able to reproduce that on my machine. I
try with another SNAPSHOT.
Regards
JB
On 11/07/2012 02:16 PM, PJR69 wrote:
> This is what I get an then it just hangs…
>
> karaf@root> features:install -v webconsole
> Installing feature webconsole 2.3.1-SNAPSHOT
> Installing feature webconsole-base 2.3.1-SNAPSHOT
> Installing feature http 2.3.1-SNAPSHOT
> Installing feature jetty 7.6.7.v20120910
> Installing bundle mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/2.2-SNAPSHOT
> Installing bundle mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2
> Installing bundle mvn:javax.mail/mail/1.4.5
> Installing bundle mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
> Installing bundle mvn:org.eclipse.jetty/jetty-util/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-io/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-http/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-client/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-continuation/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-jmx/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-server/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-security/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-servlet/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-servlets/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-xml/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-webapp/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-jndi/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-plus/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-websocket/7.6.7.v20120910
> Checking configuration file mvn:org.apache.karaf/apache-karaf/2.3.1-SNAPSHOT/xml/jettyconfig
> Installing bundle mvn:org.ops4j.pax.web/pax-web-api/1.1.5
> Installing bundle mvn:org.ops4j.pax.web/pax-web-spi/1.1.5
> Installing bundle mvn:org.ops4j.pax.web/pax-web-runtime/1.1.5
> Installing bundle mvn:org.ops4j.pax.web/pax-web-jetty/1.1.5
> Installing bundle mvn:org.apache.felix/org.apache.felix.metatype/1.0.4
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.branding/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.console/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.admin/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.features/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.gogo/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.felix/org.apache.felix.webconsole.plugins.event/1.0.2
>
> (waited about 2 minutes and no progression)
>
>
> - Petri
>
> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026711&i=0>]
> Sent: 7. marraskuuta 2012 11:53
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
>
> Could you try:
>
> features:install -v webconsole
>
> to see which bundle resolution takes time.
>
> Thanks,
> Regards
> JB
>
> On 11/07/2012 10:45 AM, PJR69 wrote:
>
>> That doesn’t seem to be working all all…. I used the Nov 06 snapshot, unzipped the staff and started karaf.bat. Then I just typed features:install webconsole and nyt it’s just running there for 5 minutes and nothing happens…
>>
>> IIRC, installing JUST the webconsole directly seems to be a bit iffy; I usually install at least jetty and war support before webconsole and after those the webconsole installed ok and took only few seconds.
>>
>>
>> - Petri
>>
>> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026709&i=0>]
>> Sent: 7. marraskuuta 2012 11:36
>> To: Riipinen Petri
>> Subject: Re: How to debug non-working war-deployment?
>>
>> I guess that you try:
>> features:install war
>> features:install webconsole
>>
>> Could you try to install directly the webconsole (without previous http
>> or war features installed):
>>
>> features:install webconsole
>>
>> I suspect an issue that I saw before.
>>
>> Regards
>> JB
>>
>> On 11/07/2012 08:01 AM, PJR69 wrote:
>>
>>> Hi,
>>>
>>> Heh… ;) Ok, I feel a bit embarrassed now.. ;)
>>>
>>> Which snapshot would you recommend? I tried the two latest ones (Nov 06 and Nov 07) and the 07 one doesn’t seem to even start and the 06 has some issues with deploying the war, i.e. it won’t trigger Pax Web at all (there is no Web-State for my war and nothing gets dumped into the log even with DEBUG level set) and the Web Console doesn’t work at all. Not really keen on trying out every one of them… ;)
>>>
>>>
>>> - Petri
>>>
>>> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=0>]
>>> Sent: 7. marraskuuta 2012 8:07
>>> To: Riipinen Petri
>>> Subject: Re: How to debug non-working war-deployment?
>>>
>>> Hi,
>>>
>>> Achim talked about Karaf 2.3.1-SNAPSHOT (which use Pax Web 1.1.5 (1.1.6
>>> soon, I'm updating ;))).
>>>
>>> You can find Karaf 2.3.1-SNAPSHOT here:
>>>
>>> https://repository.apache.org/content/groups/snapshots/org/apache/karaf/apache-karaf/2.3.1-SNAPSHOT/
>>>
>>> Regards
>>> JB
>>>
>>> On 11/07/2012 06:27 AM, PJR69 wrote:
>>>
>>>> Hi again,
>>>>
>>>> Ok, I’m prolly being a bit slow here but I’m trying to find 2.3.1-SNAPSHOT here: https://oss.sonatype.org/content/repositories/ops4j-snapshots/org/ops4j/pax/web/ and can’t see it… Where do I find it?
>>>>
>>>>
>>>> - Petri
>>>>
>>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=0>]
>>>> Sent: 6. marraskuuta 2012 21:31
>>>> To: Riipinen Petri
>>>> Subject: Re: How to debug non-working war-deployment?
>>>>
>>>> Hi,
>>>>
>>>> do you mind to test with the latest 2.3.1-SNAPSHOT, cause there had been an issue with Pax-Web [1]
>>>> which should be fixed by now.
>>>>
>>>> regards, Achim
>>>>
>>>> [1] - http://team.ops4j.org/browse/PAXWEB-426
>>>>
>>>> 2012/11/6 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=0>>
>>>> Hi,
>>>>
>>>> Thanks for the advice, that helped me to progress a lot. Now it seems that my servlet looks to be deployed ok, but the context-mapping isn’t working for some reason or other.
>>>>
>>>> web:list shows one entry:
>>>> State = Active
>>>> Web-State = Deployed
>>>> Web-ContextPath = /portal
>>>>
>>>> But when I try to browse http://localhost:8181/portal I get HTTP error 404, not found.
>>>>
>>>> When I look at the log, I always get these kinds of entries:
>>>> Path [/portal] does not match any context.
>>>>
>>>> I’ve tried numerous different URL combinations there (like /portal/portal and /portal1/portal as portal1 is the name of the Karaf instance where the war is deployed) but nothing seems to work.
>>>>
>>>> In the manifest I have Web-ContextPath: portal so AFAIU, the application should be on the above URL.
>>>>
>>>> I’m trying to follow the infor here http://leshazlewood.com/2010/09/08/osgi-maven-pax-and-web-applications/ as much as possible, but I don’t have any jsp-pages there. The main servlet is mapped just on /
>>>>
>>>> So, AFAIU, Karaf + Pax seem to deploy my OSGIfied WAR-bundle ok, no errors on log at least, but for some reason the main servlet inside the war just can’t be reached via the URL that I’d assume it should be.
>>>>
>>>> Any ideas how to proceed would be greatly appreciated…
>>>>
>>>>
>>>> - Petri
>>>>
>>>>
>>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=1>]
>>>> Sent: 5. marraskuuta 2012 15:50
>>>> To: Riipinen Petri
>>>> Subject: Re: How to debug non-working war-deployment?
>>>> Hi,
>>>>
>>>> which version of Karaf do you use?
>>>> Second, what does the karaf.log say?
>>>>
>>>> How does your war look like, did you add the required OSGi-Manifest entries to it?
>>>> if not, you need to install it with
>>>> install -s webbundle:mvn:url
>>>>
>>>> What does the web:list command list when used?
>>>>
>>>> Besides that if you want to debug, you should start Karaf in debug mode by using
>>>> "karaf.sh debug" (or "karaf.bat debug" on windows) on comandline.
>>>>
>>>> The sources for the web-extender can be found at OPS4j Pax-Web, see [1] to [3]
>>>>
>>>> regards, Achim
>>>>
>>>> [1] - http://team.ops4j.org/wiki/display/ops4j/Open+Participation+Software+for+Java
>>>> [2] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
>>>> [3] - https://github.com/ops4j/org.ops4j.pax.web
>>>> 2012/11/5 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026686&i=0>>
>>>> I have a WAR-packaged application that runs fine on Tomcat.
>>>>
>>>> Now I'm trying to get it to run on Karaf with jetty. I've installed jetty +
>>>> war features and I see jetty running on 8181 and get the page not found
>>>> error when browsing the root.
>>>>
>>>> I've osgified my manifest as instructed here:
>>>> http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me it
>>>> looks ok.
>>>>
>>>> But when I drop the WAR into the deploy-folder, nothing much really happens.
>>>> I do see the installer writing "installed... .war" -text and list shows that
>>>> the application is there in Installed-state. But nothing else happens.
>>>>
>>>> The application should be bound to /portal-endpoint but navigating there
>>>> with a browser just gives the same page not found error and nothing gets
>>>> output on the log.
>>>>
>>>> Any ideas how to proceed with debugging the problem?
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
>>>> Sent from the Karaf - User mailing list archive at Nabble.com.
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026711.html
To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026842&i=2><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026842&i=3<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026842&i=3<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026842&i=3%3cmailto:%5bhidden%20email%5d%3c/user/SendEmail.jtp?type=node&node=4026842&i=3>>>>
To unsubscribe from Karaf - User, click here< NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026841.html
Sent from the Karaf - User 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/>
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026842.html
To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026845&i=2>
To unsubscribe from Karaf - User, click here< NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026843.html
Sent from the Karaf - User 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/>
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026845.html
To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026855&i=2><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026855&i=3>>
To unsubscribe from Karaf - User, click here< NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026853.html
Sent from the Karaf - User 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/>
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026855.html
To start a new topic under Karaf - User, email ml-node+s922171n930749h57@n3.nabble.com<ma...@n3.nabble.com>
To unsubscribe from Karaf - User, click here<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8OTMwNzQ5fDU5NTY5OTMzOA==>.
NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026856.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: How to debug non-working war-deployment?
Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,
for the embedded jars, you need to make sure all those dependencies are
configured correctly in the Bundle-Classpath section. This means you need
to list all of the jars that are needed.
Oh and by the way a servlet.jar that might have slipped in there will screw
everything :)
regards, Achim
2012/11/22 PJR69 <pe...@insta.fi>
> Hi again,
>
> Ok, I think that the problem is actually a dependency issue. But I can’t
> figure out what is the reason for this. I have lots of 3rd party jars that
> my servlet uses. All these jars have been embedded into the war inside the
> WEB-INF/lib-folder.
>
> For example, in my WEB-INF/lib there is joda-time-2.0.jar which is a
> proper OSGi-bundle. In the manifest of my WAR-bundle I have the following
> entries (not complete, left out other libs):
> Bundle-ClassPath: WEB-INF/classes;.;WEB-INF/lib/joda-time-2.0.jar
> Import-Package: org.joda.time (was not here earlier but just added it)
> …
>
> When I now deploy the bundle, org.joda.time is not resolved, filainstall
> complaints about it.
>
> So, I guess the dependency issue is the final problem as this would prolly
> result in invalid servlet-stuff and Jetty being unable to process anything.
> However, I can’t understand why doesn’t the embedded jar become properly
> importable as it is listed on the Bundle-Classpath and the jar is
> definitely embedded…?!? And with joda-time specifically, there shouldn’t be
> any transitive dependencies either, not that it should matter as all maven
> dependencies are included in the WEB-INF/lib-folder.
>
>
> - Petri
>
>
> From: Achim Nierbeck [via Karaf] [mailto:
> ml-node+s922171n4026845h33@n3.nabble.com]
> Sent: 21. marraskuuta 2012 17:12
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
>
> You shouldn't worry about the skipping cause the wardeployer takes care of
> non-osgi wars placed inside the deploy folder. For OSGi ready wars the std.
> FileInstall Deployer is sufficient enough since it does have all needed
> Information inside the Manifest.
>
> I'm more worried about this part:
>
> TRACE-level log when trying to access localhost : 8181 / portal:
> qtp9890336-70 | HttpParser | rg.eclipse.jetty.http.HttpParser 281 |
> 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | filled 294/294
> 336-70 - /portal | Server | org.eclipse.jetty.server.Server 358 |
> 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | REQUEST /portal on
> BlockingHttpConnection@1154edd
> ,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=-5,l=10,c=0},r=1
> 336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 269 |
> 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Matching [/portal]...
> 336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 297 |
> 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Path [/portal] does not match
> any context
> 336-70 - /portal | Server | org.eclipse.jetty.server.Server 360 |
> 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | RESPONSE /portal 200
> handled=false
>
> I wonder if your servlet did actually get installed correctly.
>
> You might want to debug into that.
> Right now all my itests at pax-web do work so it's something inside your
> war that makes this special.
>
> regards, Achim
>
> 2012/11/21 PJR69 <[hidden
> email]</user/SendEmail.jtp?type=node&node=4026845&i=0>>
> Hi,
>
> I took some log snippets (sorry about them being a bit hard toi read),
> maybe you can spot some issue on them.
>
> --------------------------------------------------
> First a TRACE-level log on Karaf when deploying:
>
> -SNAPSHOT/deploy | WarDeployer | eb.deployer.internal.WarDeployer
> 59 | 90 - org.ops4j.pax.web.pax-web-deployer - 1.1.7 | This artifact has
> OSGi Manifest Header skipping: myportal-1.9.0.war
> lixDispatchQueue | myportal | ?
> ? | 126 - fi.mycomp.myportal - 1.9.0.SNAPSHOT | BundleEvent INSTALLED -
> fi.mycomp.myportal
> -SNAPSHOT/deploy | fileinstall | ?
> ? | 6 - org.apache.felix.fileinstall - 3.2.6 | Installed
> C:\opt\apache-karaf-2.3.1-SNAPSHOT\deploy\myportal-1.9.0.war
> lixDispatchQueue | framework | ?
> ? | 0 - org.apache.felix.framework - 4.0.3 | FrameworkEvent PACKAGES
> REFRESHED - org.apache.felix.framework
> -SNAPSHOT/deploy | BlueprintExtender | rint.container.BlueprintExtender
> 252 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Scanning bundle
> fi.mycomp.myportal for blueprint application
> lixDispatchQueue | myportal | ?
> ? | 126 - fi.mycomp.myportal - 1.9.0.SNAPSHOT | BundleEvent RESOLVED -
> fi.mycomp.myportal
> -SNAPSHOT/deploy | BlueprintExtender | rint.container.BlueprintExtender
> 325 | 7 - org.apache.aries.blueprint.core - 1.0.1 | No blueprint
> application found in bundle fi.mycomp.myportal
> lixDispatchQueue | myportal | ?
> ? | 126 - fi.mycomp.myportal - 1.9.0.SNAPSHOT | BundleEvent STARTED -
> fi.mycomp.myportal
> Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver
> 120 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Using [portal]
> as web application context name
> -SNAPSHOT/deploy | fileinstall | ?
> ? | 6 - org.apache.felix.fileinstall - 3.2.6 | Started bundle:
> file:/C:/opt/apache-karaf-2.3.1-SNAPSHOT/deploy/myportal-1.9.0.war
> Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver
> 138 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Parsing a web
> application from [bundle://126.0:0/WEB-INF/web.xml]
> Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver
> 316 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | No
> 'Webapp-Root' manifest attribute specified
> Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver
> 141 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Using [] as
> web application root path
> Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver
> 150 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Parsed web app
> [WebApp{displayName=null,contextName=null}]
> Executor: 1 | WebEventDispatcher | .war.internal.WebEventDispatcher
> 130 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Sending web
> event WebEvent [replay=false, type=1, bundle=fi.mycomp.myportal [126],
> extenderBundle=org.ops4j.pax.web.pax-web-extender-war [89], cause=null,
> timestamp=1353502744594, contextPath=/portal, collisionIds=null] for bundle
> fi.mycomp.myportal
> Executor: 1 | WebAppPublisher | der.war.internal.WebAppPublisher
> 72 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Publishing web
> application [WebApp{displayName=null,contextName=portal}]
> tenerExecutor: 2 | pax-web-extender-war | ?
> ? | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 |
> org/osgi/service/web/DEPLOYING
> Executor: 1 | WebEventDispatcher | .war.internal.WebEventDispatcher
> 130 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Sending web
> event WebEvent [replay=false, type=2, bundle=fi.mycomp.myportal [126],
> extenderBundle=org.ops4j.pax.web.pax-web-extender-war [89], cause=null,
> timestamp=1353502744594, contextPath=/portal, collisionIds=null] for bundle
> fi.mycomp.myportal
> tenerExecutor: 2 | pax-web-extender-war | ?
> ? | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 |
> org/osgi/service/web/DEPLOYED
>
> TRACE-level log when trying to access localhost : 8181 / portal:
> qtp9890336-70 | HttpParser | rg.eclipse.jetty.http.HttpParser 281 |
> 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | filled 294/294
> 336-70 - /portal | Server | org.eclipse.jetty.server.Server 358 |
> 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | REQUEST /portal on
> BlockingHttpConnection@1154edd
> ,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=-5,l=10,c=0},r=1
> 336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 269 |
> 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Matching [/portal]...
> 336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 297 |
> 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Path [/portal] does not match
> any context
> 336-70 - /portal | Server | org.eclipse.jetty.server.Server 360 |
> 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | RESPONSE /portal 200
> handled=false
>
> What does this entry mean:
> 14:59:03,315 | DEBUG | -SNAPSHOT/deploy | WarDeployer |
> eb.deployer.internal.WarDeployer 59 | 90 -
> org.ops4j.pax.web.pax-web-deployer - 1.1.7 | This artifact has OSGi
> Manifest Header skipping: myportal-1.9.0.war
>
> Why is it "skipping" the war?
>
> Can you see anything there that could explain why my WAR-servlet is not
> being accessible on localhost : 8181 / portal ?
>
>
> - Petri
>
>
> From: Achim Nierbeck [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026845&i=1>]
> Sent: 21. marraskuuta 2012 12:54
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
> The messages you get are OK,
> the first one does tell you the Web-Application context, which is portal.
> the Second does help you to declare where the War-Extender is supposed to
> look at inside the War for WebContent and at this point it tells you it
> looks at the usual place.
> This feature was added a long time ago for certain cases where the "root"
> folder for your web-content isn't set to the root folder inside the war but
> somewhere else (I think eclipse-rap does something the likes)
>
> regards, Achim
> 2012/11/21 PJR69 <[hidden
> email]</user/SendEmail.jtp?type=node&node=4026842&i=0>>
> Hi,
>
> I tested this with the latest snapshot
> (apache-karaf-2.3.1-20121121.004041-63) and again I have the same issue as
> I originally reported: The WAR seems to be deployed just fine (judging from
> log and from webconsole (so webconsole works now on localhost : 8181 /
> system / console) events; no errors) and it is installed into context
> /portal (according to web:list) but I still can’t see the app from
> localhost : 8181 / portal
>
> So IMO it looks like the earlier mentioned doesn’t seem to fix the issue
> in my case.
>
> The pax-web-extender 1.1.7 says on the log:
> … Using [portal] as web application context name …
> and
> … Using [] as web application root path ..
>
> Hmm…. Is there any way to see what contexts are actually running in a
> given Jetty instance?
>
>
> - Petri
>
> [1] - http://team.ops4j.org/browse/PAXWEB-426
> From: jbonofre [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026842&i=1>]
> Sent: 7. marraskuuta 2012 15:20
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
> Hi Petri,
>
> thanks for the update, I'm not able to reproduce that on my machine. I
> try with another SNAPSHOT.
>
> Regards
> JB
>
> On 11/07/2012 02:16 PM, PJR69 wrote:
>
> > This is what I get an then it just hangs…
> >
> > karaf@root> features:install -v webconsole
> > Installing feature webconsole 2.3.1-SNAPSHOT
> > Installing feature webconsole-base 2.3.1-SNAPSHOT
> > Installing feature http 2.3.1-SNAPSHOT
> > Installing feature jetty 7.6.7.v20120910
> > Installing bundle
> mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/2.2-SNAPSHOT
> > Installing bundle
> mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2
> > Installing bundle mvn:javax.mail/mail/1.4.5
> > Installing bundle
> mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
> > Installing bundle mvn:org.eclipse.jetty/jetty-util/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-io/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-http/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-client/7.6.7.v20120910
> > Installing bundle
> mvn:org.eclipse.jetty/jetty-continuation/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-jmx/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-server/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-security/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-servlet/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-servlets/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-xml/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-webapp/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-jndi/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-plus/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-websocket/7.6.7.v20120910
> > Checking configuration file
> mvn:org.apache.karaf/apache-karaf/2.3.1-SNAPSHOT/xml/jettyconfig
> > Installing bundle mvn:org.ops4j.pax.web/pax-web-api/1.1.5
> > Installing bundle mvn:org.ops4j.pax.web/pax-web-spi/1.1.5
> > Installing bundle mvn:org.ops4j.pax.web/pax-web-runtime/1.1.5
> > Installing bundle mvn:org.ops4j.pax.web/pax-web-jetty/1.1.5
> > Installing bundle mvn:org.apache.felix/org.apache.felix.metatype/1.0.4
> > Installing bundle
> mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.branding/2.3.1-SNAPSHOT
> > Installing bundle
> mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.console/2.3.1-SNAPSHOT
> > Installing bundle
> mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.admin/2.3.1-SNAPSHOT
> > Installing bundle
> mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.features/2.3.1-SNAPSHOT
> > Installing bundle
> mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.gogo/2.3.1-SNAPSHOT
> > Installing bundle
> mvn:org.apache.felix/org.apache.felix.webconsole.plugins.event/1.0.2
> >
> > (waited about 2 minutes and no progression)
> >
> >
> > - Petri
> >
> > From: jbonofre [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026711&i=0>]
> > Sent: 7. marraskuuta 2012 11:53
> > To: Riipinen Petri
> > Subject: Re: How to debug non-working war-deployment?
> >
> > Could you try:
> >
> > features:install -v webconsole
> >
> > to see which bundle resolution takes time.
> >
> > Thanks,
> > Regards
> > JB
> >
> > On 11/07/2012 10:45 AM, PJR69 wrote:
> >
> >> That doesn’t seem to be working all all…. I used the Nov 06 snapshot,
> unzipped the staff and started karaf.bat. Then I just typed
> features:install webconsole and nyt it’s just running there for 5 minutes
> and nothing happens…
> >>
> >> IIRC, installing JUST the webconsole directly seems to be a bit iffy; I
> usually install at least jetty and war support before webconsole and after
> those the webconsole installed ok and took only few seconds.
> >>
> >>
> >> - Petri
> >>
> >> From: jbonofre [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026709&i=0>]
> >> Sent: 7. marraskuuta 2012 11:36
> >> To: Riipinen Petri
> >> Subject: Re: How to debug non-working war-deployment?
> >>
> >> I guess that you try:
> >> features:install war
> >> features:install webconsole
> >>
> >> Could you try to install directly the webconsole (without previous http
> >> or war features installed):
> >>
> >> features:install webconsole
> >>
> >> I suspect an issue that I saw before.
> >>
> >> Regards
> >> JB
> >>
> >> On 11/07/2012 08:01 AM, PJR69 wrote:
> >>
> >>> Hi,
> >>>
> >>> Heh… ;) Ok, I feel a bit embarrassed now.. ;)
> >>>
> >>> Which snapshot would you recommend? I tried the two latest ones (Nov
> 06 and Nov 07) and the 07 one doesn’t seem to even start and the 06 has
> some issues with deploying the war, i.e. it won’t trigger Pax Web at all
> (there is no Web-State for my war and nothing gets dumped into the log even
> with DEBUG level set) and the Web Console doesn’t work at all. Not really
> keen on trying out every one of them… ;)
> >>>
> >>>
> >>> - Petri
> >>>
> >>> From: jbonofre [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026707&i=0>]
> >>> Sent: 7. marraskuuta 2012 8:07
> >>> To: Riipinen Petri
> >>> Subject: Re: How to debug non-working war-deployment?
> >>>
> >>> Hi,
> >>>
> >>> Achim talked about Karaf 2.3.1-SNAPSHOT (which use Pax Web 1.1.5 (1.1.6
> >>> soon, I'm updating ;))).
> >>>
> >>> You can find Karaf 2.3.1-SNAPSHOT here:
> >>>
> >>>
> https://repository.apache.org/content/groups/snapshots/org/apache/karaf/apache-karaf/2.3.1-SNAPSHOT/
> >>>
> >>> Regards
> >>> JB
> >>>
> >>> On 11/07/2012 06:27 AM, PJR69 wrote:
> >>>
> >>>> Hi again,
> >>>>
> >>>> Ok, I’m prolly being a bit slow here but I’m trying to find
> 2.3.1-SNAPSHOT here:
> https://oss.sonatype.org/content/repositories/ops4j-snapshots/org/ops4j/pax/web/and can’t see it… Where do I find it?
> >>>>
> >>>>
> >>>> - Petri
> >>>>
> >>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026704&i=0>]
> >>>> Sent: 6. marraskuuta 2012 21:31
> >>>> To: Riipinen Petri
> >>>> Subject: Re: How to debug non-working war-deployment?
> >>>>
> >>>> Hi,
> >>>>
> >>>> do you mind to test with the latest 2.3.1-SNAPSHOT, cause there had
> been an issue with Pax-Web [1]
> >>>> which should be fixed by now.
> >>>>
> >>>> regards, Achim
> >>>>
> >>>> [1] - http://team.ops4j.org/browse/PAXWEB-426
> >>>>
> >>>> 2012/11/6 PJR69 <[hidden
> email]</user/SendEmail.jtp?type=node&node=4026701&i=0>>
> >>>> Hi,
> >>>>
> >>>> Thanks for the advice, that helped me to progress a lot. Now it seems
> that my servlet looks to be deployed ok, but the context-mapping isn’t
> working for some reason or other.
> >>>>
> >>>> web:list shows one entry:
> >>>> State = Active
> >>>> Web-State = Deployed
> >>>> Web-ContextPath = /portal
> >>>>
> >>>> But when I try to browse http://localhost:8181/portal I get HTTP
> error 404, not found.
> >>>>
> >>>> When I look at the log, I always get these kinds of entries:
> >>>> Path [/portal] does not match any context.
> >>>>
> >>>> I’ve tried numerous different URL combinations there (like
> /portal/portal and /portal1/portal as portal1 is the name of the Karaf
> instance where the war is deployed) but nothing seems to work.
> >>>>
> >>>> In the manifest I have Web-ContextPath: portal so AFAIU, the
> application should be on the above URL.
> >>>>
> >>>> I’m trying to follow the infor here
> http://leshazlewood.com/2010/09/08/osgi-maven-pax-and-web-applications/as much as possible, but I don’t have any jsp-pages there. The main servlet
> is mapped just on /
> >>>>
> >>>> So, AFAIU, Karaf + Pax seem to deploy my OSGIfied WAR-bundle ok, no
> errors on log at least, but for some reason the main servlet inside the war
> just can’t be reached via the URL that I’d assume it should be.
> >>>>
> >>>> Any ideas how to proceed would be greatly appreciated…
> >>>>
> >>>>
> >>>> - Petri
> >>>>
> >>>>
> >>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026701&i=1>]
> >>>> Sent: 5. marraskuuta 2012 15:50
> >>>> To: Riipinen Petri
> >>>> Subject: Re: How to debug non-working war-deployment?
> >>>> Hi,
> >>>>
> >>>> which version of Karaf do you use?
> >>>> Second, what does the karaf.log say?
> >>>>
> >>>> How does your war look like, did you add the required OSGi-Manifest
> entries to it?
> >>>> if not, you need to install it with
> >>>> install -s webbundle:mvn:url
> >>>>
> >>>> What does the web:list command list when used?
> >>>>
> >>>> Besides that if you want to debug, you should start Karaf in debug
> mode by using
> >>>> "karaf.sh debug" (or "karaf.bat debug" on windows) on comandline.
> >>>>
> >>>> The sources for the web-extender can be found at OPS4j Pax-Web, see
> [1] to [3]
> >>>>
> >>>> regards, Achim
> >>>>
> >>>> [1] -
> http://team.ops4j.org/wiki/display/ops4j/Open+Participation+Software+for+Java
> >>>> [2] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
> >>>> [3] - https://github.com/ops4j/org.ops4j.pax.web
> >>>> 2012/11/5 PJR69 <[hidden
> email]</user/SendEmail.jtp?type=node&node=4026686&i=0>>
> >>>> I have a WAR-packaged application that runs fine on Tomcat.
> >>>>
> >>>> Now I'm trying to get it to run on Karaf with jetty. I've installed
> jetty +
> >>>> war features and I see jetty running on 8181 and get the page not
> found
> >>>> error when browsing the root.
> >>>>
> >>>> I've osgified my manifest as instructed here:
> >>>> http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me
> it
> >>>> looks ok.
> >>>>
> >>>> But when I drop the WAR into the deploy-folder, nothing much really
> happens.
> >>>> I do see the installer writing "installed... .war" -text and list
> shows that
> >>>> the application is there in Installed-state. But nothing else happens.
> >>>>
> >>>> The application should be bound to /portal-endpoint but navigating
> there
> >>>> with a browser just gives the same page not found error and nothing
> gets
> >>>> output on the log.
> >>>>
> >>>> Any ideas how to proceed with debugging the problem?
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> View this message in context:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
> >>>> Sent from the Karaf - User mailing list archive at Nabble.com.
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026711.html
> To start a new topic under Karaf - User, email [hidden
> email]</user/SendEmail.jtp?type=node&node=4026842&i=2><mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026842&i=3<mailto:
> [hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026842&i=3>>>
> To unsubscribe from Karaf - User, click here< NAML<
> http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026841.html
> Sent from the Karaf - User 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/>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026842.html
> To start a new topic under Karaf - User, email [hidden
> email]</user/SendEmail.jtp?type=node&node=4026845&i=2>
> To unsubscribe from Karaf - User, click here< NAML<
> http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026843.html
> Sent from the Karaf - User 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/>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026845.html
> To start a new topic under Karaf - User, email
> ml-node+s922171n930749h57@n3.nabble.com<mailto:
> ml-node+s922171n930749h57@n3.nabble.com>
> To unsubscribe from Karaf - User, click here<
> http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8OTMwNzQ5fDU5NTY5OTMzOA==
> >.
> NAML<
> http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026853.html
> Sent from the Karaf - User 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: How to debug non-working war-deployment?
Posted by PJR69 <pe...@insta.fi>.
Hi again,
Ok, I think that the problem is actually a dependency issue. But I can’t figure out what is the reason for this. I have lots of 3rd party jars that my servlet uses. All these jars have been embedded into the war inside the WEB-INF/lib-folder.
For example, in my WEB-INF/lib there is joda-time-2.0.jar which is a proper OSGi-bundle. In the manifest of my WAR-bundle I have the following entries (not complete, left out other libs):
Bundle-ClassPath: WEB-INF/classes;.;WEB-INF/lib/joda-time-2.0.jar
Import-Package: org.joda.time (was not here earlier but just added it)
…
When I now deploy the bundle, org.joda.time is not resolved, filainstall complaints about it.
So, I guess the dependency issue is the final problem as this would prolly result in invalid servlet-stuff and Jetty being unable to process anything. However, I can’t understand why doesn’t the embedded jar become properly importable as it is listed on the Bundle-Classpath and the jar is definitely embedded…?!? And with joda-time specifically, there shouldn’t be any transitive dependencies either, not that it should matter as all maven dependencies are included in the WEB-INF/lib-folder.
- Petri
From: Achim Nierbeck [via Karaf] [mailto:ml-node+s922171n4026845h33@n3.nabble.com]
Sent: 21. marraskuuta 2012 17:12
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
You shouldn't worry about the skipping cause the wardeployer takes care of non-osgi wars placed inside the deploy folder. For OSGi ready wars the std. FileInstall Deployer is sufficient enough since it does have all needed Information inside the Manifest.
I'm more worried about this part:
TRACE-level log when trying to access localhost : 8181 / portal:
qtp9890336-70 | HttpParser | rg.eclipse.jetty.http.HttpParser 281 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | filled 294/294
336-70 - /portal | Server | org.eclipse.jetty.server.Server 358 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | REQUEST /portal on BlockingHttpConnection@1154edd,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=-5,l=10,c=0},r=1
336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 269 | 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Matching [/portal]...
336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 297 | 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Path [/portal] does not match any context
336-70 - /portal | Server | org.eclipse.jetty.server.Server 360 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | RESPONSE /portal 200 handled=false
I wonder if your servlet did actually get installed correctly.
You might want to debug into that.
Right now all my itests at pax-web do work so it's something inside your war that makes this special.
regards, Achim
2012/11/21 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026845&i=0>>
Hi,
I took some log snippets (sorry about them being a bit hard toi read), maybe you can spot some issue on them.
--------------------------------------------------
First a TRACE-level log on Karaf when deploying:
-SNAPSHOT/deploy | WarDeployer | eb.deployer.internal.WarDeployer 59 | 90 - org.ops4j.pax.web.pax-web-deployer - 1.1.7 | This artifact has OSGi Manifest Header skipping: myportal-1.9.0.war
lixDispatchQueue | myportal | ? ? | 126 - fi.mycomp.myportal - 1.9.0.SNAPSHOT | BundleEvent INSTALLED - fi.mycomp.myportal
-SNAPSHOT/deploy | fileinstall | ? ? | 6 - org.apache.felix.fileinstall - 3.2.6 | Installed C:\opt\apache-karaf-2.3.1-SNAPSHOT\deploy\myportal-1.9.0.war
lixDispatchQueue | framework | ? ? | 0 - org.apache.felix.framework - 4.0.3 | FrameworkEvent PACKAGES REFRESHED - org.apache.felix.framework
-SNAPSHOT/deploy | BlueprintExtender | rint.container.BlueprintExtender 252 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Scanning bundle fi.mycomp.myportal for blueprint application
lixDispatchQueue | myportal | ? ? | 126 - fi.mycomp.myportal - 1.9.0.SNAPSHOT | BundleEvent RESOLVED - fi.mycomp.myportal
-SNAPSHOT/deploy | BlueprintExtender | rint.container.BlueprintExtender 325 | 7 - org.apache.aries.blueprint.core - 1.0.1 | No blueprint application found in bundle fi.mycomp.myportal
lixDispatchQueue | myportal | ? ? | 126 - fi.mycomp.myportal - 1.9.0.SNAPSHOT | BundleEvent STARTED - fi.mycomp.myportal
Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver 120 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Using [portal] as web application context name
-SNAPSHOT/deploy | fileinstall | ? ? | 6 - org.apache.felix.fileinstall - 3.2.6 | Started bundle: file:/C:/opt/apache-karaf-2.3.1-SNAPSHOT/deploy/myportal-1.9.0.war
Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver 138 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Parsing a web application from [bundle://126.0:0/WEB-INF/web.xml]
Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver 316 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | No 'Webapp-Root' manifest attribute specified
Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver 141 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Using [] as web application root path
Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver 150 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Parsed web app [WebApp{displayName=null,contextName=null}]
Executor: 1 | WebEventDispatcher | .war.internal.WebEventDispatcher 130 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Sending web event WebEvent [replay=false, type=1, bundle=fi.mycomp.myportal [126], extenderBundle=org.ops4j.pax.web.pax-web-extender-war [89], cause=null, timestamp=1353502744594, contextPath=/portal, collisionIds=null] for bundle fi.mycomp.myportal
Executor: 1 | WebAppPublisher | der.war.internal.WebAppPublisher 72 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Publishing web application [WebApp{displayName=null,contextName=portal}]
tenerExecutor: 2 | pax-web-extender-war | ? ? | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | org/osgi/service/web/DEPLOYING
Executor: 1 | WebEventDispatcher | .war.internal.WebEventDispatcher 130 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Sending web event WebEvent [replay=false, type=2, bundle=fi.mycomp.myportal [126], extenderBundle=org.ops4j.pax.web.pax-web-extender-war [89], cause=null, timestamp=1353502744594, contextPath=/portal, collisionIds=null] for bundle fi.mycomp.myportal
tenerExecutor: 2 | pax-web-extender-war | ? ? | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | org/osgi/service/web/DEPLOYED
TRACE-level log when trying to access localhost : 8181 / portal:
qtp9890336-70 | HttpParser | rg.eclipse.jetty.http.HttpParser 281 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | filled 294/294
336-70 - /portal | Server | org.eclipse.jetty.server.Server 358 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | REQUEST /portal on BlockingHttpConnection@1154edd,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=-5,l=10,c=0},r=1
336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 269 | 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Matching [/portal]...
336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 297 | 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Path [/portal] does not match any context
336-70 - /portal | Server | org.eclipse.jetty.server.Server 360 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | RESPONSE /portal 200 handled=false
What does this entry mean:
14:59:03,315 | DEBUG | -SNAPSHOT/deploy | WarDeployer | eb.deployer.internal.WarDeployer 59 | 90 - org.ops4j.pax.web.pax-web-deployer - 1.1.7 | This artifact has OSGi Manifest Header skipping: myportal-1.9.0.war
Why is it "skipping" the war?
Can you see anything there that could explain why my WAR-servlet is not being accessible on localhost : 8181 / portal ?
- Petri
From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026845&i=1>]
Sent: 21. marraskuuta 2012 12:54
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
The messages you get are OK,
the first one does tell you the Web-Application context, which is portal.
the Second does help you to declare where the War-Extender is supposed to look at inside the War for WebContent and at this point it tells you it looks at the usual place.
This feature was added a long time ago for certain cases where the "root" folder for your web-content isn't set to the root folder inside the war but somewhere else (I think eclipse-rap does something the likes)
regards, Achim
2012/11/21 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026842&i=0>>
Hi,
I tested this with the latest snapshot (apache-karaf-2.3.1-20121121.004041-63) and again I have the same issue as I originally reported: The WAR seems to be deployed just fine (judging from log and from webconsole (so webconsole works now on localhost : 8181 / system / console) events; no errors) and it is installed into context /portal (according to web:list) but I still can’t see the app from localhost : 8181 / portal
So IMO it looks like the earlier mentioned doesn’t seem to fix the issue in my case.
The pax-web-extender 1.1.7 says on the log:
… Using [portal] as web application context name …
and
… Using [] as web application root path ..
Hmm…. Is there any way to see what contexts are actually running in a given Jetty instance?
- Petri
[1] - http://team.ops4j.org/browse/PAXWEB-426
From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026842&i=1>]
Sent: 7. marraskuuta 2012 15:20
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
Hi Petri,
thanks for the update, I'm not able to reproduce that on my machine. I
try with another SNAPSHOT.
Regards
JB
On 11/07/2012 02:16 PM, PJR69 wrote:
> This is what I get an then it just hangs…
>
> karaf@root> features:install -v webconsole
> Installing feature webconsole 2.3.1-SNAPSHOT
> Installing feature webconsole-base 2.3.1-SNAPSHOT
> Installing feature http 2.3.1-SNAPSHOT
> Installing feature jetty 7.6.7.v20120910
> Installing bundle mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/2.2-SNAPSHOT
> Installing bundle mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2
> Installing bundle mvn:javax.mail/mail/1.4.5
> Installing bundle mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
> Installing bundle mvn:org.eclipse.jetty/jetty-util/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-io/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-http/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-client/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-continuation/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-jmx/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-server/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-security/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-servlet/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-servlets/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-xml/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-webapp/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-jndi/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-plus/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-websocket/7.6.7.v20120910
> Checking configuration file mvn:org.apache.karaf/apache-karaf/2.3.1-SNAPSHOT/xml/jettyconfig
> Installing bundle mvn:org.ops4j.pax.web/pax-web-api/1.1.5
> Installing bundle mvn:org.ops4j.pax.web/pax-web-spi/1.1.5
> Installing bundle mvn:org.ops4j.pax.web/pax-web-runtime/1.1.5
> Installing bundle mvn:org.ops4j.pax.web/pax-web-jetty/1.1.5
> Installing bundle mvn:org.apache.felix/org.apache.felix.metatype/1.0.4
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.branding/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.console/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.admin/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.features/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.gogo/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.felix/org.apache.felix.webconsole.plugins.event/1.0.2
>
> (waited about 2 minutes and no progression)
>
>
> - Petri
>
> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026711&i=0>]
> Sent: 7. marraskuuta 2012 11:53
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
>
> Could you try:
>
> features:install -v webconsole
>
> to see which bundle resolution takes time.
>
> Thanks,
> Regards
> JB
>
> On 11/07/2012 10:45 AM, PJR69 wrote:
>
>> That doesn’t seem to be working all all…. I used the Nov 06 snapshot, unzipped the staff and started karaf.bat. Then I just typed features:install webconsole and nyt it’s just running there for 5 minutes and nothing happens…
>>
>> IIRC, installing JUST the webconsole directly seems to be a bit iffy; I usually install at least jetty and war support before webconsole and after those the webconsole installed ok and took only few seconds.
>>
>>
>> - Petri
>>
>> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026709&i=0>]
>> Sent: 7. marraskuuta 2012 11:36
>> To: Riipinen Petri
>> Subject: Re: How to debug non-working war-deployment?
>>
>> I guess that you try:
>> features:install war
>> features:install webconsole
>>
>> Could you try to install directly the webconsole (without previous http
>> or war features installed):
>>
>> features:install webconsole
>>
>> I suspect an issue that I saw before.
>>
>> Regards
>> JB
>>
>> On 11/07/2012 08:01 AM, PJR69 wrote:
>>
>>> Hi,
>>>
>>> Heh… ;) Ok, I feel a bit embarrassed now.. ;)
>>>
>>> Which snapshot would you recommend? I tried the two latest ones (Nov 06 and Nov 07) and the 07 one doesn’t seem to even start and the 06 has some issues with deploying the war, i.e. it won’t trigger Pax Web at all (there is no Web-State for my war and nothing gets dumped into the log even with DEBUG level set) and the Web Console doesn’t work at all. Not really keen on trying out every one of them… ;)
>>>
>>>
>>> - Petri
>>>
>>> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=0>]
>>> Sent: 7. marraskuuta 2012 8:07
>>> To: Riipinen Petri
>>> Subject: Re: How to debug non-working war-deployment?
>>>
>>> Hi,
>>>
>>> Achim talked about Karaf 2.3.1-SNAPSHOT (which use Pax Web 1.1.5 (1.1.6
>>> soon, I'm updating ;))).
>>>
>>> You can find Karaf 2.3.1-SNAPSHOT here:
>>>
>>> https://repository.apache.org/content/groups/snapshots/org/apache/karaf/apache-karaf/2.3.1-SNAPSHOT/
>>>
>>> Regards
>>> JB
>>>
>>> On 11/07/2012 06:27 AM, PJR69 wrote:
>>>
>>>> Hi again,
>>>>
>>>> Ok, I’m prolly being a bit slow here but I’m trying to find 2.3.1-SNAPSHOT here: https://oss.sonatype.org/content/repositories/ops4j-snapshots/org/ops4j/pax/web/ and can’t see it… Where do I find it?
>>>>
>>>>
>>>> - Petri
>>>>
>>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=0>]
>>>> Sent: 6. marraskuuta 2012 21:31
>>>> To: Riipinen Petri
>>>> Subject: Re: How to debug non-working war-deployment?
>>>>
>>>> Hi,
>>>>
>>>> do you mind to test with the latest 2.3.1-SNAPSHOT, cause there had been an issue with Pax-Web [1]
>>>> which should be fixed by now.
>>>>
>>>> regards, Achim
>>>>
>>>> [1] - http://team.ops4j.org/browse/PAXWEB-426
>>>>
>>>> 2012/11/6 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=0>>
>>>> Hi,
>>>>
>>>> Thanks for the advice, that helped me to progress a lot. Now it seems that my servlet looks to be deployed ok, but the context-mapping isn’t working for some reason or other.
>>>>
>>>> web:list shows one entry:
>>>> State = Active
>>>> Web-State = Deployed
>>>> Web-ContextPath = /portal
>>>>
>>>> But when I try to browse http://localhost:8181/portal I get HTTP error 404, not found.
>>>>
>>>> When I look at the log, I always get these kinds of entries:
>>>> Path [/portal] does not match any context.
>>>>
>>>> I’ve tried numerous different URL combinations there (like /portal/portal and /portal1/portal as portal1 is the name of the Karaf instance where the war is deployed) but nothing seems to work.
>>>>
>>>> In the manifest I have Web-ContextPath: portal so AFAIU, the application should be on the above URL.
>>>>
>>>> I’m trying to follow the infor here http://leshazlewood.com/2010/09/08/osgi-maven-pax-and-web-applications/ as much as possible, but I don’t have any jsp-pages there. The main servlet is mapped just on /
>>>>
>>>> So, AFAIU, Karaf + Pax seem to deploy my OSGIfied WAR-bundle ok, no errors on log at least, but for some reason the main servlet inside the war just can’t be reached via the URL that I’d assume it should be.
>>>>
>>>> Any ideas how to proceed would be greatly appreciated…
>>>>
>>>>
>>>> - Petri
>>>>
>>>>
>>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=1>]
>>>> Sent: 5. marraskuuta 2012 15:50
>>>> To: Riipinen Petri
>>>> Subject: Re: How to debug non-working war-deployment?
>>>> Hi,
>>>>
>>>> which version of Karaf do you use?
>>>> Second, what does the karaf.log say?
>>>>
>>>> How does your war look like, did you add the required OSGi-Manifest entries to it?
>>>> if not, you need to install it with
>>>> install -s webbundle:mvn:url
>>>>
>>>> What does the web:list command list when used?
>>>>
>>>> Besides that if you want to debug, you should start Karaf in debug mode by using
>>>> "karaf.sh debug" (or "karaf.bat debug" on windows) on comandline.
>>>>
>>>> The sources for the web-extender can be found at OPS4j Pax-Web, see [1] to [3]
>>>>
>>>> regards, Achim
>>>>
>>>> [1] - http://team.ops4j.org/wiki/display/ops4j/Open+Participation+Software+for+Java
>>>> [2] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
>>>> [3] - https://github.com/ops4j/org.ops4j.pax.web
>>>> 2012/11/5 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026686&i=0>>
>>>> I have a WAR-packaged application that runs fine on Tomcat.
>>>>
>>>> Now I'm trying to get it to run on Karaf with jetty. I've installed jetty +
>>>> war features and I see jetty running on 8181 and get the page not found
>>>> error when browsing the root.
>>>>
>>>> I've osgified my manifest as instructed here:
>>>> http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me it
>>>> looks ok.
>>>>
>>>> But when I drop the WAR into the deploy-folder, nothing much really happens.
>>>> I do see the installer writing "installed... .war" -text and list shows that
>>>> the application is there in Installed-state. But nothing else happens.
>>>>
>>>> The application should be bound to /portal-endpoint but navigating there
>>>> with a browser just gives the same page not found error and nothing gets
>>>> output on the log.
>>>>
>>>> Any ideas how to proceed with debugging the problem?
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
>>>> Sent from the Karaf - User mailing list archive at Nabble.com.
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026711.html
To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026842&i=2><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026842&i=3<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026842&i=3>>>
To unsubscribe from Karaf - User, click here< NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026841.html
Sent from the Karaf - User 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/>
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026842.html
To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026845&i=2>
To unsubscribe from Karaf - User, click here< NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026843.html
Sent from the Karaf - User 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/>
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026845.html
To start a new topic under Karaf - User, email ml-node+s922171n930749h57@n3.nabble.com<ma...@n3.nabble.com>
To unsubscribe from Karaf - User, click here<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8OTMwNzQ5fDU5NTY5OTMzOA==>.
NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026853.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: How to debug non-working war-deployment?
Posted by Achim Nierbeck <bc...@googlemail.com>.
You shouldn't worry about the skipping cause the wardeployer takes care of
non-osgi wars placed inside the deploy folder. For OSGi ready wars the std.
FileInstall Deployer is sufficient enough since it does have all needed
Information inside the Manifest.
I'm more worried about this part:
TRACE-level log when trying to access localhost : 8181 / portal:
qtp9890336-70 | HttpParser | rg.eclipse.jetty.http.HttpParser 281 |
59 - org.eclipse.jetty.util - 7.6.7.v20120910 | filled 294/294
336-70 - /portal | Server | org.eclipse.jetty.server.Server 358 |
59 - org.eclipse.jetty.util - 7.6.7.v20120910 | REQUEST /portal on
BlockingHttpConnection@1154edd,g=HttpGenerator{s=0,h=-1,b=-
1,c=-1},p=HttpParser{s=-5,l=10,c=0},r=1
336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 269 |
75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Matching [/portal]...
336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 297 |
75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Path [/portal] does not match
any context
336-70 - /portal | Server | org.eclipse.jetty.server.Server 360 |
59 - org.eclipse.jetty.util - 7.6.7.v20120910 | RESPONSE /portal 200
handled=false
I wonder if your servlet did actually get installed correctly.
You might want to debug into that.
Right now all my itests at pax-web do work so it's something inside your
war that makes this special.
regards, Achim
2012/11/21 PJR69 <pe...@insta.fi>
> Hi,
>
> I took some log snippets (sorry about them being a bit hard toi read),
> maybe you can spot some issue on them.
>
> --------------------------------------------------
> First a TRACE-level log on Karaf when deploying:
>
> -SNAPSHOT/deploy | WarDeployer | eb.deployer.internal.WarDeployer
> 59 | 90 - org.ops4j.pax.web.pax-web-deployer - 1.1.7 | This artifact has
> OSGi Manifest Header skipping: myportal-1.9.0.war
> lixDispatchQueue | myportal | ?
> ? | 126 - fi.mycomp.myportal - 1.9.0.SNAPSHOT | BundleEvent INSTALLED -
> fi.mycomp.myportal
> -SNAPSHOT/deploy | fileinstall | ?
> ? | 6 - org.apache.felix.fileinstall - 3.2.6 | Installed
> C:\opt\apache-karaf-2.3.1-SNAPSHOT\deploy\myportal-1.9.0.war
> lixDispatchQueue | framework | ?
> ? | 0 - org.apache.felix.framework - 4.0.3 | FrameworkEvent PACKAGES
> REFRESHED - org.apache.felix.framework
> -SNAPSHOT/deploy | BlueprintExtender | rint.container.BlueprintExtender
> 252 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Scanning bundle
> fi.mycomp.myportal for blueprint application
> lixDispatchQueue | myportal | ?
> ? | 126 - fi.mycomp.myportal - 1.9.0.SNAPSHOT | BundleEvent RESOLVED -
> fi.mycomp.myportal
> -SNAPSHOT/deploy | BlueprintExtender | rint.container.BlueprintExtender
> 325 | 7 - org.apache.aries.blueprint.core - 1.0.1 | No blueprint
> application found in bundle fi.mycomp.myportal
> lixDispatchQueue | myportal | ?
> ? | 126 - fi.mycomp.myportal - 1.9.0.SNAPSHOT | BundleEvent STARTED -
> fi.mycomp.myportal
> Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver
> 120 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Using [portal]
> as web application context name
> -SNAPSHOT/deploy | fileinstall | ?
> ? | 6 - org.apache.felix.fileinstall - 3.2.6 | Started bundle:
> file:/C:/opt/apache-karaf-2.3.1-SNAPSHOT/deploy/myportal-1.9.0.war
> Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver
> 138 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Parsing a web
> application from [bundle://126.0:0/WEB-INF/web.xml]
> Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver
> 316 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | No
> 'Webapp-Root' manifest attribute specified
> Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver
> 141 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Using [] as
> web application root path
> Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver
> 150 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Parsed web app
> [WebApp{displayName=null,contextName=null}]
> Executor: 1 | WebEventDispatcher | .war.internal.WebEventDispatcher
> 130 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Sending web
> event WebEvent [replay=false, type=1, bundle=fi.mycomp.myportal [126],
> extenderBundle=org.ops4j.pax.web.pax-web-extender-war [89], cause=null,
> timestamp=1353502744594, contextPath=/portal, collisionIds=null] for bundle
> fi.mycomp.myportal
> Executor: 1 | WebAppPublisher | der.war.internal.WebAppPublisher
> 72 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Publishing web
> application [WebApp{displayName=null,contextName=portal}]
> tenerExecutor: 2 | pax-web-extender-war | ?
> ? | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 |
> org/osgi/service/web/DEPLOYING
> Executor: 1 | WebEventDispatcher | .war.internal.WebEventDispatcher
> 130 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Sending web
> event WebEvent [replay=false, type=2, bundle=fi.mycomp.myportal [126],
> extenderBundle=org.ops4j.pax.web.pax-web-extender-war [89], cause=null,
> timestamp=1353502744594, contextPath=/portal, collisionIds=null] for bundle
> fi.mycomp.myportal
> tenerExecutor: 2 | pax-web-extender-war | ?
> ? | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 |
> org/osgi/service/web/DEPLOYED
>
> TRACE-level log when trying to access localhost : 8181 / portal:
> qtp9890336-70 | HttpParser | rg.eclipse.jetty.http.HttpParser 281 |
> 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | filled 294/294
> 336-70 - /portal | Server | org.eclipse.jetty.server.Server 358 |
> 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | REQUEST /portal on
> BlockingHttpConnection@1154edd
> ,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=-5,l=10,c=0},r=1
> 336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 269 |
> 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Matching [/portal]...
> 336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 297 |
> 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Path [/portal] does not match
> any context
> 336-70 - /portal | Server | org.eclipse.jetty.server.Server 360 |
> 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | RESPONSE /portal 200
> handled=false
>
> What does this entry mean:
> 14:59:03,315 | DEBUG | -SNAPSHOT/deploy | WarDeployer |
> eb.deployer.internal.WarDeployer 59 | 90 -
> org.ops4j.pax.web.pax-web-deployer - 1.1.7 | This artifact has OSGi
> Manifest Header skipping: myportal-1.9.0.war
>
> Why is it "skipping" the war?
>
> Can you see anything there that could explain why my WAR-servlet is not
> being accessible on localhost : 8181 / portal ?
>
>
> - Petri
>
>
> From: Achim Nierbeck [via Karaf] [mailto:
> ml-node+s922171n4026842h40@n3.nabble.com]
> Sent: 21. marraskuuta 2012 12:54
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
>
> The messages you get are OK,
> the first one does tell you the Web-Application context, which is portal.
> the Second does help you to declare where the War-Extender is supposed to
> look at inside the War for WebContent and at this point it tells you it
> looks at the usual place.
> This feature was added a long time ago for certain cases where the "root"
> folder for your web-content isn't set to the root folder inside the war but
> somewhere else (I think eclipse-rap does something the likes)
>
> regards, Achim
>
> 2012/11/21 PJR69 <[hidden
> email]</user/SendEmail.jtp?type=node&node=4026842&i=0>>
> Hi,
>
> I tested this with the latest snapshot
> (apache-karaf-2.3.1-20121121.004041-63) and again I have the same issue as
> I originally reported: The WAR seems to be deployed just fine (judging from
> log and from webconsole (so webconsole works now on localhost : 8181 /
> system / console) events; no errors) and it is installed into context
> /portal (according to web:list) but I still can’t see the app from
> localhost : 8181 / portal
>
> So IMO it looks like the earlier mentioned doesn’t seem to fix the issue
> in my case.
>
> The pax-web-extender 1.1.7 says on the log:
> … Using [portal] as web application context name …
> and
> … Using [] as web application root path ..
>
> Hmm…. Is there any way to see what contexts are actually running in a
> given Jetty instance?
>
>
> - Petri
>
> [1] - http://team.ops4j.org/browse/PAXWEB-426
>
> From: jbonofre [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026842&i=1>]
> Sent: 7. marraskuuta 2012 15:20
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
> Hi Petri,
>
> thanks for the update, I'm not able to reproduce that on my machine. I
> try with another SNAPSHOT.
>
> Regards
> JB
>
> On 11/07/2012 02:16 PM, PJR69 wrote:
>
> > This is what I get an then it just hangs…
> >
> > karaf@root> features:install -v webconsole
> > Installing feature webconsole 2.3.1-SNAPSHOT
> > Installing feature webconsole-base 2.3.1-SNAPSHOT
> > Installing feature http 2.3.1-SNAPSHOT
> > Installing feature jetty 7.6.7.v20120910
> > Installing bundle
> mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/2.2-SNAPSHOT
> > Installing bundle
> mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2
> > Installing bundle mvn:javax.mail/mail/1.4.5
> > Installing bundle
> mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
> > Installing bundle mvn:org.eclipse.jetty/jetty-util/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-io/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-http/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-client/7.6.7.v20120910
> > Installing bundle
> mvn:org.eclipse.jetty/jetty-continuation/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-jmx/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-server/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-security/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-servlet/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-servlets/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-xml/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-webapp/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-jndi/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-plus/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-websocket/7.6.7.v20120910
> > Checking configuration file
> mvn:org.apache.karaf/apache-karaf/2.3.1-SNAPSHOT/xml/jettyconfig
> > Installing bundle mvn:org.ops4j.pax.web/pax-web-api/1.1.5
> > Installing bundle mvn:org.ops4j.pax.web/pax-web-spi/1.1.5
> > Installing bundle mvn:org.ops4j.pax.web/pax-web-runtime/1.1.5
> > Installing bundle mvn:org.ops4j.pax.web/pax-web-jetty/1.1.5
> > Installing bundle mvn:org.apache.felix/org.apache.felix.metatype/1.0.4
> > Installing bundle
> mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.branding/2.3.1-SNAPSHOT
> > Installing bundle
> mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.console/2.3.1-SNAPSHOT
> > Installing bundle
> mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.admin/2.3.1-SNAPSHOT
> > Installing bundle
> mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.features/2.3.1-SNAPSHOT
> > Installing bundle
> mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.gogo/2.3.1-SNAPSHOT
> > Installing bundle
> mvn:org.apache.felix/org.apache.felix.webconsole.plugins.event/1.0.2
> >
> > (waited about 2 minutes and no progression)
> >
> >
> > - Petri
> >
> > From: jbonofre [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026711&i=0>]
> > Sent: 7. marraskuuta 2012 11:53
> > To: Riipinen Petri
> > Subject: Re: How to debug non-working war-deployment?
> >
> > Could you try:
> >
> > features:install -v webconsole
> >
> > to see which bundle resolution takes time.
> >
> > Thanks,
> > Regards
> > JB
> >
> > On 11/07/2012 10:45 AM, PJR69 wrote:
> >
> >> That doesn’t seem to be working all all…. I used the Nov 06 snapshot,
> unzipped the staff and started karaf.bat. Then I just typed
> features:install webconsole and nyt it’s just running there for 5 minutes
> and nothing happens…
> >>
> >> IIRC, installing JUST the webconsole directly seems to be a bit iffy; I
> usually install at least jetty and war support before webconsole and after
> those the webconsole installed ok and took only few seconds.
> >>
> >>
> >> - Petri
> >>
> >> From: jbonofre [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026709&i=0>]
> >> Sent: 7. marraskuuta 2012 11:36
> >> To: Riipinen Petri
> >> Subject: Re: How to debug non-working war-deployment?
> >>
> >> I guess that you try:
> >> features:install war
> >> features:install webconsole
> >>
> >> Could you try to install directly the webconsole (without previous http
> >> or war features installed):
> >>
> >> features:install webconsole
> >>
> >> I suspect an issue that I saw before.
> >>
> >> Regards
> >> JB
> >>
> >> On 11/07/2012 08:01 AM, PJR69 wrote:
> >>
> >>> Hi,
> >>>
> >>> Heh… ;) Ok, I feel a bit embarrassed now.. ;)
> >>>
> >>> Which snapshot would you recommend? I tried the two latest ones (Nov
> 06 and Nov 07) and the 07 one doesn’t seem to even start and the 06 has
> some issues with deploying the war, i.e. it won’t trigger Pax Web at all
> (there is no Web-State for my war and nothing gets dumped into the log even
> with DEBUG level set) and the Web Console doesn’t work at all. Not really
> keen on trying out every one of them… ;)
> >>>
> >>>
> >>> - Petri
> >>>
> >>> From: jbonofre [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026707&i=0>]
> >>> Sent: 7. marraskuuta 2012 8:07
> >>> To: Riipinen Petri
> >>> Subject: Re: How to debug non-working war-deployment?
> >>>
> >>> Hi,
> >>>
> >>> Achim talked about Karaf 2.3.1-SNAPSHOT (which use Pax Web 1.1.5 (1.1.6
> >>> soon, I'm updating ;))).
> >>>
> >>> You can find Karaf 2.3.1-SNAPSHOT here:
> >>>
> >>>
> https://repository.apache.org/content/groups/snapshots/org/apache/karaf/apache-karaf/2.3.1-SNAPSHOT/
> >>>
> >>> Regards
> >>> JB
> >>>
> >>> On 11/07/2012 06:27 AM, PJR69 wrote:
> >>>
> >>>> Hi again,
> >>>>
> >>>> Ok, I’m prolly being a bit slow here but I’m trying to find
> 2.3.1-SNAPSHOT here:
> https://oss.sonatype.org/content/repositories/ops4j-snapshots/org/ops4j/pax/web/and can’t see it… Where do I find it?
> >>>>
> >>>>
> >>>> - Petri
> >>>>
> >>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026704&i=0>]
> >>>> Sent: 6. marraskuuta 2012 21:31
> >>>> To: Riipinen Petri
> >>>> Subject: Re: How to debug non-working war-deployment?
> >>>>
> >>>> Hi,
> >>>>
> >>>> do you mind to test with the latest 2.3.1-SNAPSHOT, cause there had
> been an issue with Pax-Web [1]
> >>>> which should be fixed by now.
> >>>>
> >>>> regards, Achim
> >>>>
> >>>> [1] - http://team.ops4j.org/browse/PAXWEB-426
> >>>>
> >>>> 2012/11/6 PJR69 <[hidden
> email]</user/SendEmail.jtp?type=node&node=4026701&i=0>>
> >>>> Hi,
> >>>>
> >>>> Thanks for the advice, that helped me to progress a lot. Now it seems
> that my servlet looks to be deployed ok, but the context-mapping isn’t
> working for some reason or other.
> >>>>
> >>>> web:list shows one entry:
> >>>> State = Active
> >>>> Web-State = Deployed
> >>>> Web-ContextPath = /portal
> >>>>
> >>>> But when I try to browse http://localhost:8181/portal I get HTTP
> error 404, not found.
> >>>>
> >>>> When I look at the log, I always get these kinds of entries:
> >>>> Path [/portal] does not match any context.
> >>>>
> >>>> I’ve tried numerous different URL combinations there (like
> /portal/portal and /portal1/portal as portal1 is the name of the Karaf
> instance where the war is deployed) but nothing seems to work.
> >>>>
> >>>> In the manifest I have Web-ContextPath: portal so AFAIU, the
> application should be on the above URL.
> >>>>
> >>>> I’m trying to follow the infor here
> http://leshazlewood.com/2010/09/08/osgi-maven-pax-and-web-applications/as much as possible, but I don’t have any jsp-pages there. The main servlet
> is mapped just on /
> >>>>
> >>>> So, AFAIU, Karaf + Pax seem to deploy my OSGIfied WAR-bundle ok, no
> errors on log at least, but for some reason the main servlet inside the war
> just can’t be reached via the URL that I’d assume it should be.
> >>>>
> >>>> Any ideas how to proceed would be greatly appreciated…
> >>>>
> >>>>
> >>>> - Petri
> >>>>
> >>>>
> >>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026701&i=1>]
> >>>> Sent: 5. marraskuuta 2012 15:50
> >>>> To: Riipinen Petri
> >>>> Subject: Re: How to debug non-working war-deployment?
> >>>> Hi,
> >>>>
> >>>> which version of Karaf do you use?
> >>>> Second, what does the karaf.log say?
> >>>>
> >>>> How does your war look like, did you add the required OSGi-Manifest
> entries to it?
> >>>> if not, you need to install it with
> >>>> install -s webbundle:mvn:url
> >>>>
> >>>> What does the web:list command list when used?
> >>>>
> >>>> Besides that if you want to debug, you should start Karaf in debug
> mode by using
> >>>> "karaf.sh debug" (or "karaf.bat debug" on windows) on comandline.
> >>>>
> >>>> The sources for the web-extender can be found at OPS4j Pax-Web, see
> [1] to [3]
> >>>>
> >>>> regards, Achim
> >>>>
> >>>> [1] -
> http://team.ops4j.org/wiki/display/ops4j/Open+Participation+Software+for+Java
> >>>> [2] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
> >>>> [3] - https://github.com/ops4j/org.ops4j.pax.web
> >>>> 2012/11/5 PJR69 <[hidden
> email]</user/SendEmail.jtp?type=node&node=4026686&i=0>>
> >>>> I have a WAR-packaged application that runs fine on Tomcat.
> >>>>
> >>>> Now I'm trying to get it to run on Karaf with jetty. I've installed
> jetty +
> >>>> war features and I see jetty running on 8181 and get the page not
> found
> >>>> error when browsing the root.
> >>>>
> >>>> I've osgified my manifest as instructed here:
> >>>> http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me
> it
> >>>> looks ok.
> >>>>
> >>>> But when I drop the WAR into the deploy-folder, nothing much really
> happens.
> >>>> I do see the installer writing "installed... .war" -text and list
> shows that
> >>>> the application is there in Installed-state. But nothing else happens.
> >>>>
> >>>> The application should be bound to /portal-endpoint but navigating
> there
> >>>> with a browser just gives the same page not found error and nothing
> gets
> >>>> output on the log.
> >>>>
> >>>> Any ideas how to proceed with debugging the problem?
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> View this message in context:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
> >>>> Sent from the Karaf - User mailing list archive at Nabble.com.
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026711.html
> To start a new topic under Karaf - User, email [hidden
> email]</user/SendEmail.jtp?type=node&node=4026842&i=2><mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026842&i=3>>
> To unsubscribe from Karaf - User, click here< NAML<
> http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026841.html
> Sent from the Karaf - User 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/>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026842.html
> To start a new topic under Karaf - User, email
> ml-node+s922171n930749h57@n3.nabble.com
> To unsubscribe from Karaf - User, click here<
> http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8OTMwNzQ5fDU5NTY5OTMzOA==
> >.
> NAML<
> http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026843.html
> Sent from the Karaf - User 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: How to debug non-working war-deployment?
Posted by PJR69 <pe...@insta.fi>.
Hi,
I took some log snippets (sorry about them being a bit hard toi read), maybe you can spot some issue on them.
--------------------------------------------------
First a TRACE-level log on Karaf when deploying:
-SNAPSHOT/deploy | WarDeployer | eb.deployer.internal.WarDeployer 59 | 90 - org.ops4j.pax.web.pax-web-deployer - 1.1.7 | This artifact has OSGi Manifest Header skipping: myportal-1.9.0.war
lixDispatchQueue | myportal | ? ? | 126 - fi.mycomp.myportal - 1.9.0.SNAPSHOT | BundleEvent INSTALLED - fi.mycomp.myportal
-SNAPSHOT/deploy | fileinstall | ? ? | 6 - org.apache.felix.fileinstall - 3.2.6 | Installed C:\opt\apache-karaf-2.3.1-SNAPSHOT\deploy\myportal-1.9.0.war
lixDispatchQueue | framework | ? ? | 0 - org.apache.felix.framework - 4.0.3 | FrameworkEvent PACKAGES REFRESHED - org.apache.felix.framework
-SNAPSHOT/deploy | BlueprintExtender | rint.container.BlueprintExtender 252 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Scanning bundle fi.mycomp.myportal for blueprint application
lixDispatchQueue | myportal | ? ? | 126 - fi.mycomp.myportal - 1.9.0.SNAPSHOT | BundleEvent RESOLVED - fi.mycomp.myportal
-SNAPSHOT/deploy | BlueprintExtender | rint.container.BlueprintExtender 325 | 7 - org.apache.aries.blueprint.core - 1.0.1 | No blueprint application found in bundle fi.mycomp.myportal
lixDispatchQueue | myportal | ? ? | 126 - fi.mycomp.myportal - 1.9.0.SNAPSHOT | BundleEvent STARTED - fi.mycomp.myportal
Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver 120 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Using [portal] as web application context name
-SNAPSHOT/deploy | fileinstall | ? ? | 6 - org.apache.felix.fileinstall - 3.2.6 | Started bundle: file:/C:/opt/apache-karaf-2.3.1-SNAPSHOT/deploy/myportal-1.9.0.war
Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver 138 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Parsing a web application from [bundle://126.0:0/WEB-INF/web.xml]
Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver 316 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | No 'Webapp-Root' manifest attribute specified
Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver 141 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Using [] as web application root path
Executor: 1 | WebXmlObserver | nder.war.internal.WebXmlObserver 150 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Parsed web app [WebApp{displayName=null,contextName=null}]
Executor: 1 | WebEventDispatcher | .war.internal.WebEventDispatcher 130 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Sending web event WebEvent [replay=false, type=1, bundle=fi.mycomp.myportal [126], extenderBundle=org.ops4j.pax.web.pax-web-extender-war [89], cause=null, timestamp=1353502744594, contextPath=/portal, collisionIds=null] for bundle fi.mycomp.myportal
Executor: 1 | WebAppPublisher | der.war.internal.WebAppPublisher 72 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Publishing web application [WebApp{displayName=null,contextName=portal}]
tenerExecutor: 2 | pax-web-extender-war | ? ? | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | org/osgi/service/web/DEPLOYING
Executor: 1 | WebEventDispatcher | .war.internal.WebEventDispatcher 130 | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | Sending web event WebEvent [replay=false, type=2, bundle=fi.mycomp.myportal [126], extenderBundle=org.ops4j.pax.web.pax-web-extender-war [89], cause=null, timestamp=1353502744594, contextPath=/portal, collisionIds=null] for bundle fi.mycomp.myportal
tenerExecutor: 2 | pax-web-extender-war | ? ? | 89 - org.ops4j.pax.web.pax-web-extender-war - 1.1.7 | org/osgi/service/web/DEPLOYED
TRACE-level log when trying to access localhost : 8181 / portal:
qtp9890336-70 | HttpParser | rg.eclipse.jetty.http.HttpParser 281 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | filled 294/294
336-70 - /portal | Server | org.eclipse.jetty.server.Server 358 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | REQUEST /portal on BlockingHttpConnection@1154edd,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=-5,l=10,c=0},r=1
336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 269 | 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Matching [/portal]...
336-70 - /portal | ServerModel | eb.service.spi.model.ServerModel 297 | 75 - org.ops4j.pax.web.pax-web-spi - 1.1.7 | Path [/portal] does not match any context
336-70 - /portal | Server | org.eclipse.jetty.server.Server 360 | 59 - org.eclipse.jetty.util - 7.6.7.v20120910 | RESPONSE /portal 200 handled=false
What does this entry mean:
14:59:03,315 | DEBUG | -SNAPSHOT/deploy | WarDeployer | eb.deployer.internal.WarDeployer 59 | 90 - org.ops4j.pax.web.pax-web-deployer - 1.1.7 | This artifact has OSGi Manifest Header skipping: myportal-1.9.0.war
Why is it "skipping" the war?
Can you see anything there that could explain why my WAR-servlet is not being accessible on localhost : 8181 / portal ?
- Petri
From: Achim Nierbeck [via Karaf] [mailto:ml-node+s922171n4026842h40@n3.nabble.com]
Sent: 21. marraskuuta 2012 12:54
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
The messages you get are OK,
the first one does tell you the Web-Application context, which is portal.
the Second does help you to declare where the War-Extender is supposed to look at inside the War for WebContent and at this point it tells you it looks at the usual place.
This feature was added a long time ago for certain cases where the "root" folder for your web-content isn't set to the root folder inside the war but somewhere else (I think eclipse-rap does something the likes)
regards, Achim
2012/11/21 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026842&i=0>>
Hi,
I tested this with the latest snapshot (apache-karaf-2.3.1-20121121.004041-63) and again I have the same issue as I originally reported: The WAR seems to be deployed just fine (judging from log and from webconsole (so webconsole works now on localhost : 8181 / system / console) events; no errors) and it is installed into context /portal (according to web:list) but I still can’t see the app from localhost : 8181 / portal
So IMO it looks like the earlier mentioned doesn’t seem to fix the issue in my case.
The pax-web-extender 1.1.7 says on the log:
… Using [portal] as web application context name …
and
… Using [] as web application root path ..
Hmm…. Is there any way to see what contexts are actually running in a given Jetty instance?
- Petri
[1] - http://team.ops4j.org/browse/PAXWEB-426
From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026842&i=1>]
Sent: 7. marraskuuta 2012 15:20
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
Hi Petri,
thanks for the update, I'm not able to reproduce that on my machine. I
try with another SNAPSHOT.
Regards
JB
On 11/07/2012 02:16 PM, PJR69 wrote:
> This is what I get an then it just hangs…
>
> karaf@root> features:install -v webconsole
> Installing feature webconsole 2.3.1-SNAPSHOT
> Installing feature webconsole-base 2.3.1-SNAPSHOT
> Installing feature http 2.3.1-SNAPSHOT
> Installing feature jetty 7.6.7.v20120910
> Installing bundle mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/2.2-SNAPSHOT
> Installing bundle mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2
> Installing bundle mvn:javax.mail/mail/1.4.5
> Installing bundle mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
> Installing bundle mvn:org.eclipse.jetty/jetty-util/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-io/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-http/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-client/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-continuation/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-jmx/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-server/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-security/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-servlet/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-servlets/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-xml/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-webapp/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-jndi/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-plus/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-websocket/7.6.7.v20120910
> Checking configuration file mvn:org.apache.karaf/apache-karaf/2.3.1-SNAPSHOT/xml/jettyconfig
> Installing bundle mvn:org.ops4j.pax.web/pax-web-api/1.1.5
> Installing bundle mvn:org.ops4j.pax.web/pax-web-spi/1.1.5
> Installing bundle mvn:org.ops4j.pax.web/pax-web-runtime/1.1.5
> Installing bundle mvn:org.ops4j.pax.web/pax-web-jetty/1.1.5
> Installing bundle mvn:org.apache.felix/org.apache.felix.metatype/1.0.4
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.branding/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.console/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.admin/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.features/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.gogo/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.felix/org.apache.felix.webconsole.plugins.event/1.0.2
>
> (waited about 2 minutes and no progression)
>
>
> - Petri
>
> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026711&i=0>]
> Sent: 7. marraskuuta 2012 11:53
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
>
> Could you try:
>
> features:install -v webconsole
>
> to see which bundle resolution takes time.
>
> Thanks,
> Regards
> JB
>
> On 11/07/2012 10:45 AM, PJR69 wrote:
>
>> That doesn’t seem to be working all all…. I used the Nov 06 snapshot, unzipped the staff and started karaf.bat. Then I just typed features:install webconsole and nyt it’s just running there for 5 minutes and nothing happens…
>>
>> IIRC, installing JUST the webconsole directly seems to be a bit iffy; I usually install at least jetty and war support before webconsole and after those the webconsole installed ok and took only few seconds.
>>
>>
>> - Petri
>>
>> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026709&i=0>]
>> Sent: 7. marraskuuta 2012 11:36
>> To: Riipinen Petri
>> Subject: Re: How to debug non-working war-deployment?
>>
>> I guess that you try:
>> features:install war
>> features:install webconsole
>>
>> Could you try to install directly the webconsole (without previous http
>> or war features installed):
>>
>> features:install webconsole
>>
>> I suspect an issue that I saw before.
>>
>> Regards
>> JB
>>
>> On 11/07/2012 08:01 AM, PJR69 wrote:
>>
>>> Hi,
>>>
>>> Heh… ;) Ok, I feel a bit embarrassed now.. ;)
>>>
>>> Which snapshot would you recommend? I tried the two latest ones (Nov 06 and Nov 07) and the 07 one doesn’t seem to even start and the 06 has some issues with deploying the war, i.e. it won’t trigger Pax Web at all (there is no Web-State for my war and nothing gets dumped into the log even with DEBUG level set) and the Web Console doesn’t work at all. Not really keen on trying out every one of them… ;)
>>>
>>>
>>> - Petri
>>>
>>> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=0>]
>>> Sent: 7. marraskuuta 2012 8:07
>>> To: Riipinen Petri
>>> Subject: Re: How to debug non-working war-deployment?
>>>
>>> Hi,
>>>
>>> Achim talked about Karaf 2.3.1-SNAPSHOT (which use Pax Web 1.1.5 (1.1.6
>>> soon, I'm updating ;))).
>>>
>>> You can find Karaf 2.3.1-SNAPSHOT here:
>>>
>>> https://repository.apache.org/content/groups/snapshots/org/apache/karaf/apache-karaf/2.3.1-SNAPSHOT/
>>>
>>> Regards
>>> JB
>>>
>>> On 11/07/2012 06:27 AM, PJR69 wrote:
>>>
>>>> Hi again,
>>>>
>>>> Ok, I’m prolly being a bit slow here but I’m trying to find 2.3.1-SNAPSHOT here: https://oss.sonatype.org/content/repositories/ops4j-snapshots/org/ops4j/pax/web/ and can’t see it… Where do I find it?
>>>>
>>>>
>>>> - Petri
>>>>
>>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=0>]
>>>> Sent: 6. marraskuuta 2012 21:31
>>>> To: Riipinen Petri
>>>> Subject: Re: How to debug non-working war-deployment?
>>>>
>>>> Hi,
>>>>
>>>> do you mind to test with the latest 2.3.1-SNAPSHOT, cause there had been an issue with Pax-Web [1]
>>>> which should be fixed by now.
>>>>
>>>> regards, Achim
>>>>
>>>> [1] - http://team.ops4j.org/browse/PAXWEB-426
>>>>
>>>> 2012/11/6 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=0>>
>>>> Hi,
>>>>
>>>> Thanks for the advice, that helped me to progress a lot. Now it seems that my servlet looks to be deployed ok, but the context-mapping isn’t working for some reason or other.
>>>>
>>>> web:list shows one entry:
>>>> State = Active
>>>> Web-State = Deployed
>>>> Web-ContextPath = /portal
>>>>
>>>> But when I try to browse http://localhost:8181/portal I get HTTP error 404, not found.
>>>>
>>>> When I look at the log, I always get these kinds of entries:
>>>> Path [/portal] does not match any context.
>>>>
>>>> I’ve tried numerous different URL combinations there (like /portal/portal and /portal1/portal as portal1 is the name of the Karaf instance where the war is deployed) but nothing seems to work.
>>>>
>>>> In the manifest I have Web-ContextPath: portal so AFAIU, the application should be on the above URL.
>>>>
>>>> I’m trying to follow the infor here http://leshazlewood.com/2010/09/08/osgi-maven-pax-and-web-applications/ as much as possible, but I don’t have any jsp-pages there. The main servlet is mapped just on /
>>>>
>>>> So, AFAIU, Karaf + Pax seem to deploy my OSGIfied WAR-bundle ok, no errors on log at least, but for some reason the main servlet inside the war just can’t be reached via the URL that I’d assume it should be.
>>>>
>>>> Any ideas how to proceed would be greatly appreciated…
>>>>
>>>>
>>>> - Petri
>>>>
>>>>
>>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=1>]
>>>> Sent: 5. marraskuuta 2012 15:50
>>>> To: Riipinen Petri
>>>> Subject: Re: How to debug non-working war-deployment?
>>>> Hi,
>>>>
>>>> which version of Karaf do you use?
>>>> Second, what does the karaf.log say?
>>>>
>>>> How does your war look like, did you add the required OSGi-Manifest entries to it?
>>>> if not, you need to install it with
>>>> install -s webbundle:mvn:url
>>>>
>>>> What does the web:list command list when used?
>>>>
>>>> Besides that if you want to debug, you should start Karaf in debug mode by using
>>>> "karaf.sh debug" (or "karaf.bat debug" on windows) on comandline.
>>>>
>>>> The sources for the web-extender can be found at OPS4j Pax-Web, see [1] to [3]
>>>>
>>>> regards, Achim
>>>>
>>>> [1] - http://team.ops4j.org/wiki/display/ops4j/Open+Participation+Software+for+Java
>>>> [2] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
>>>> [3] - https://github.com/ops4j/org.ops4j.pax.web
>>>> 2012/11/5 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026686&i=0>>
>>>> I have a WAR-packaged application that runs fine on Tomcat.
>>>>
>>>> Now I'm trying to get it to run on Karaf with jetty. I've installed jetty +
>>>> war features and I see jetty running on 8181 and get the page not found
>>>> error when browsing the root.
>>>>
>>>> I've osgified my manifest as instructed here:
>>>> http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me it
>>>> looks ok.
>>>>
>>>> But when I drop the WAR into the deploy-folder, nothing much really happens.
>>>> I do see the installer writing "installed... .war" -text and list shows that
>>>> the application is there in Installed-state. But nothing else happens.
>>>>
>>>> The application should be bound to /portal-endpoint but navigating there
>>>> with a browser just gives the same page not found error and nothing gets
>>>> output on the log.
>>>>
>>>> Any ideas how to proceed with debugging the problem?
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
>>>> Sent from the Karaf - User mailing list archive at Nabble.com.
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026711.html
To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026842&i=2><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026842&i=3>>
To unsubscribe from Karaf - User, click here< NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026841.html
Sent from the Karaf - User 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/>
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026842.html
To start a new topic under Karaf - User, email ml-node+s922171n930749h57@n3.nabble.com
To unsubscribe from Karaf - User, click here<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8OTMwNzQ5fDU5NTY5OTMzOA==>.
NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026843.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: How to debug non-working war-deployment?
Posted by Achim Nierbeck <bc...@googlemail.com>.
The messages you get are OK,
the first one does tell you the Web-Application context, which is portal.
the Second does help you to declare where the War-Extender is supposed to
look at inside the War for WebContent and at this point it tells you it
looks at the usual place.
This feature was added a long time ago for certain cases where the "root"
folder for your web-content isn't set to the root folder inside the war but
somewhere else (I think eclipse-rap does something the likes)
regards, Achim
2012/11/21 PJR69 <pe...@insta.fi>
> Hi,
>
> I tested this with the latest snapshot
> (apache-karaf-2.3.1-20121121.004041-63) and again I have the same issue as
> I originally reported: The WAR seems to be deployed just fine (judging from
> log and from webconsole (so webconsole works now on localhost : 8181 /
> system / console) events; no errors) and it is installed into context
> /portal (according to web:list) but I still can’t see the app from
> localhost : 8181 / portal
>
> So IMO it looks like the earlier mentioned doesn’t seem to fix the issue
> in my case.
>
> The pax-web-extender 1.1.7 says on the log:
> … Using [portal] as web application context name …
> and
> … Using [] as web application root path ..
>
> Hmm…. Is there any way to see what contexts are actually running in a
> given Jetty instance?
>
>
> - Petri
>
> [1] - http://team.ops4j.org/browse/PAXWEB-426
>
> From: jbonofre [via Karaf] [mailto:
> ml-node+s922171n4026711h79@n3.nabble.com]
> Sent: 7. marraskuuta 2012 15:20
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
>
> Hi Petri,
>
> thanks for the update, I'm not able to reproduce that on my machine. I
> try with another SNAPSHOT.
>
> Regards
> JB
>
> On 11/07/2012 02:16 PM, PJR69 wrote:
>
> > This is what I get an then it just hangs…
> >
> > karaf@root> features:install -v webconsole
> > Installing feature webconsole 2.3.1-SNAPSHOT
> > Installing feature webconsole-base 2.3.1-SNAPSHOT
> > Installing feature http 2.3.1-SNAPSHOT
> > Installing feature jetty 7.6.7.v20120910
> > Installing bundle
> mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/2.2-SNAPSHOT
> > Installing bundle
> mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2
> > Installing bundle mvn:javax.mail/mail/1.4.5
> > Installing bundle
> mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
> > Installing bundle mvn:org.eclipse.jetty/jetty-util/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-io/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-http/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-client/7.6.7.v20120910
> > Installing bundle
> mvn:org.eclipse.jetty/jetty-continuation/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-jmx/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-server/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-security/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-servlet/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-servlets/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-xml/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-webapp/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-jndi/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-plus/7.6.7.v20120910
> > Installing bundle mvn:org.eclipse.jetty/jetty-websocket/7.6.7.v20120910
> > Checking configuration file
> mvn:org.apache.karaf/apache-karaf/2.3.1-SNAPSHOT/xml/jettyconfig
> > Installing bundle mvn:org.ops4j.pax.web/pax-web-api/1.1.5
> > Installing bundle mvn:org.ops4j.pax.web/pax-web-spi/1.1.5
> > Installing bundle mvn:org.ops4j.pax.web/pax-web-runtime/1.1.5
> > Installing bundle mvn:org.ops4j.pax.web/pax-web-jetty/1.1.5
> > Installing bundle mvn:org.apache.felix/org.apache.felix.metatype/1.0.4
> > Installing bundle
> mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.branding/2.3.1-SNAPSHOT
> > Installing bundle
> mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.console/2.3.1-SNAPSHOT
> > Installing bundle
> mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.admin/2.3.1-SNAPSHOT
> > Installing bundle
> mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.features/2.3.1-SNAPSHOT
> > Installing bundle
> mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.gogo/2.3.1-SNAPSHOT
> > Installing bundle
> mvn:org.apache.felix/org.apache.felix.webconsole.plugins.event/1.0.2
> >
> > (waited about 2 minutes and no progression)
> >
> >
> > - Petri
> >
> > From: jbonofre [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026711&i=0>]
> > Sent: 7. marraskuuta 2012 11:53
> > To: Riipinen Petri
> > Subject: Re: How to debug non-working war-deployment?
> >
> > Could you try:
> >
> > features:install -v webconsole
> >
> > to see which bundle resolution takes time.
> >
> > Thanks,
> > Regards
> > JB
> >
> > On 11/07/2012 10:45 AM, PJR69 wrote:
> >
> >> That doesn’t seem to be working all all…. I used the Nov 06 snapshot,
> unzipped the staff and started karaf.bat. Then I just typed
> features:install webconsole and nyt it’s just running there for 5 minutes
> and nothing happens…
> >>
> >> IIRC, installing JUST the webconsole directly seems to be a bit iffy; I
> usually install at least jetty and war support before webconsole and after
> those the webconsole installed ok and took only few seconds.
> >>
> >>
> >> - Petri
> >>
> >> From: jbonofre [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026709&i=0>]
> >> Sent: 7. marraskuuta 2012 11:36
> >> To: Riipinen Petri
> >> Subject: Re: How to debug non-working war-deployment?
> >>
> >> I guess that you try:
> >> features:install war
> >> features:install webconsole
> >>
> >> Could you try to install directly the webconsole (without previous http
> >> or war features installed):
> >>
> >> features:install webconsole
> >>
> >> I suspect an issue that I saw before.
> >>
> >> Regards
> >> JB
> >>
> >> On 11/07/2012 08:01 AM, PJR69 wrote:
> >>
> >>> Hi,
> >>>
> >>> Heh… ;) Ok, I feel a bit embarrassed now.. ;)
> >>>
> >>> Which snapshot would you recommend? I tried the two latest ones (Nov
> 06 and Nov 07) and the 07 one doesn’t seem to even start and the 06 has
> some issues with deploying the war, i.e. it won’t trigger Pax Web at all
> (there is no Web-State for my war and nothing gets dumped into the log even
> with DEBUG level set) and the Web Console doesn’t work at all. Not really
> keen on trying out every one of them… ;)
> >>>
> >>>
> >>> - Petri
> >>>
> >>> From: jbonofre [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026707&i=0>]
> >>> Sent: 7. marraskuuta 2012 8:07
> >>> To: Riipinen Petri
> >>> Subject: Re: How to debug non-working war-deployment?
> >>>
> >>> Hi,
> >>>
> >>> Achim talked about Karaf 2.3.1-SNAPSHOT (which use Pax Web 1.1.5 (1.1.6
> >>> soon, I'm updating ;))).
> >>>
> >>> You can find Karaf 2.3.1-SNAPSHOT here:
> >>>
> >>>
> https://repository.apache.org/content/groups/snapshots/org/apache/karaf/apache-karaf/2.3.1-SNAPSHOT/
> >>>
> >>> Regards
> >>> JB
> >>>
> >>> On 11/07/2012 06:27 AM, PJR69 wrote:
> >>>
> >>>> Hi again,
> >>>>
> >>>> Ok, I’m prolly being a bit slow here but I’m trying to find
> 2.3.1-SNAPSHOT here:
> https://oss.sonatype.org/content/repositories/ops4j-snapshots/org/ops4j/pax/web/and can’t see it… Where do I find it?
> >>>>
> >>>>
> >>>> - Petri
> >>>>
> >>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026704&i=0>]
> >>>> Sent: 6. marraskuuta 2012 21:31
> >>>> To: Riipinen Petri
> >>>> Subject: Re: How to debug non-working war-deployment?
> >>>>
> >>>> Hi,
> >>>>
> >>>> do you mind to test with the latest 2.3.1-SNAPSHOT, cause there had
> been an issue with Pax-Web [1]
> >>>> which should be fixed by now.
> >>>>
> >>>> regards, Achim
> >>>>
> >>>> [1] - http://team.ops4j.org/browse/PAXWEB-426
> >>>>
> >>>> 2012/11/6 PJR69 <[hidden
> email]</user/SendEmail.jtp?type=node&node=4026701&i=0>>
> >>>> Hi,
> >>>>
> >>>> Thanks for the advice, that helped me to progress a lot. Now it seems
> that my servlet looks to be deployed ok, but the context-mapping isn’t
> working for some reason or other.
> >>>>
> >>>> web:list shows one entry:
> >>>> State = Active
> >>>> Web-State = Deployed
> >>>> Web-ContextPath = /portal
> >>>>
> >>>> But when I try to browse http://localhost:8181/portal I get HTTP
> error 404, not found.
> >>>>
> >>>> When I look at the log, I always get these kinds of entries:
> >>>> Path [/portal] does not match any context.
> >>>>
> >>>> I’ve tried numerous different URL combinations there (like
> /portal/portal and /portal1/portal as portal1 is the name of the Karaf
> instance where the war is deployed) but nothing seems to work.
> >>>>
> >>>> In the manifest I have Web-ContextPath: portal so AFAIU, the
> application should be on the above URL.
> >>>>
> >>>> I’m trying to follow the infor here
> http://leshazlewood.com/2010/09/08/osgi-maven-pax-and-web-applications/as much as possible, but I don’t have any jsp-pages there. The main servlet
> is mapped just on /
> >>>>
> >>>> So, AFAIU, Karaf + Pax seem to deploy my OSGIfied WAR-bundle ok, no
> errors on log at least, but for some reason the main servlet inside the war
> just can’t be reached via the URL that I’d assume it should be.
> >>>>
> >>>> Any ideas how to proceed would be greatly appreciated…
> >>>>
> >>>>
> >>>> - Petri
> >>>>
> >>>>
> >>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden
> email]</user/SendEmail.jtp?type=node&node=4026701&i=1>]
> >>>> Sent: 5. marraskuuta 2012 15:50
> >>>> To: Riipinen Petri
> >>>> Subject: Re: How to debug non-working war-deployment?
> >>>> Hi,
> >>>>
> >>>> which version of Karaf do you use?
> >>>> Second, what does the karaf.log say?
> >>>>
> >>>> How does your war look like, did you add the required OSGi-Manifest
> entries to it?
> >>>> if not, you need to install it with
> >>>> install -s webbundle:mvn:url
> >>>>
> >>>> What does the web:list command list when used?
> >>>>
> >>>> Besides that if you want to debug, you should start Karaf in debug
> mode by using
> >>>> "karaf.sh debug" (or "karaf.bat debug" on windows) on comandline.
> >>>>
> >>>> The sources for the web-extender can be found at OPS4j Pax-Web, see
> [1] to [3]
> >>>>
> >>>> regards, Achim
> >>>>
> >>>> [1] -
> http://team.ops4j.org/wiki/display/ops4j/Open+Participation+Software+for+Java
> >>>> [2] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
> >>>> [3] - https://github.com/ops4j/org.ops4j.pax.web
> >>>> 2012/11/5 PJR69 <[hidden
> email]</user/SendEmail.jtp?type=node&node=4026686&i=0>>
> >>>> I have a WAR-packaged application that runs fine on Tomcat.
> >>>>
> >>>> Now I'm trying to get it to run on Karaf with jetty. I've installed
> jetty +
> >>>> war features and I see jetty running on 8181 and get the page not
> found
> >>>> error when browsing the root.
> >>>>
> >>>> I've osgified my manifest as instructed here:
> >>>> http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me
> it
> >>>> looks ok.
> >>>>
> >>>> But when I drop the WAR into the deploy-folder, nothing much really
> happens.
> >>>> I do see the installer writing "installed... .war" -text and list
> shows that
> >>>> the application is there in Installed-state. But nothing else happens.
> >>>>
> >>>> The application should be bound to /portal-endpoint but navigating
> there
> >>>> with a browser just gives the same page not found error and nothing
> gets
> >>>> output on the log.
> >>>>
> >>>> Any ideas how to proceed with debugging the problem?
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> View this message in context:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
> >>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026711.html
> To start a new topic under Karaf - User, email
> ml-node+s922171n930749h57@n3.nabble.com<mailto:
> ml-node+s922171n930749h57@n3.nabble.com>
> To unsubscribe from Karaf - User, click here<
> http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8OTMwNzQ5fDU5NTY5OTMzOA==
> >.
> NAML<
> http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026841.html
> Sent from the Karaf - User 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: How to debug non-working war-deployment?
Posted by PJR69 <pe...@insta.fi>.
Hi,
I tested this with the latest snapshot (apache-karaf-2.3.1-20121121.004041-63) and again I have the same issue as I originally reported: The WAR seems to be deployed just fine (judging from log and from webconsole (so webconsole works now on localhost : 8181 / system / console) events; no errors) and it is installed into context /portal (according to web:list) but I still can’t see the app from localhost : 8181 / portal
So IMO it looks like the earlier mentioned doesn’t seem to fix the issue in my case.
The pax-web-extender 1.1.7 says on the log:
… Using [portal] as web application context name …
and
… Using [] as web application root path ..
Hmm…. Is there any way to see what contexts are actually running in a given Jetty instance?
- Petri
[1] - http://team.ops4j.org/browse/PAXWEB-426
From: jbonofre [via Karaf] [mailto:ml-node+s922171n4026711h79@n3.nabble.com]
Sent: 7. marraskuuta 2012 15:20
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
Hi Petri,
thanks for the update, I'm not able to reproduce that on my machine. I
try with another SNAPSHOT.
Regards
JB
On 11/07/2012 02:16 PM, PJR69 wrote:
> This is what I get an then it just hangs…
>
> karaf@root> features:install -v webconsole
> Installing feature webconsole 2.3.1-SNAPSHOT
> Installing feature webconsole-base 2.3.1-SNAPSHOT
> Installing feature http 2.3.1-SNAPSHOT
> Installing feature jetty 7.6.7.v20120910
> Installing bundle mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/2.2-SNAPSHOT
> Installing bundle mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2
> Installing bundle mvn:javax.mail/mail/1.4.5
> Installing bundle mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
> Installing bundle mvn:org.eclipse.jetty/jetty-util/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-io/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-http/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-client/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-continuation/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-jmx/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-server/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-security/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-servlet/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-servlets/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-xml/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-webapp/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-jndi/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-plus/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-websocket/7.6.7.v20120910
> Checking configuration file mvn:org.apache.karaf/apache-karaf/2.3.1-SNAPSHOT/xml/jettyconfig
> Installing bundle mvn:org.ops4j.pax.web/pax-web-api/1.1.5
> Installing bundle mvn:org.ops4j.pax.web/pax-web-spi/1.1.5
> Installing bundle mvn:org.ops4j.pax.web/pax-web-runtime/1.1.5
> Installing bundle mvn:org.ops4j.pax.web/pax-web-jetty/1.1.5
> Installing bundle mvn:org.apache.felix/org.apache.felix.metatype/1.0.4
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.branding/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.console/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.admin/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.features/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.gogo/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.felix/org.apache.felix.webconsole.plugins.event/1.0.2
>
> (waited about 2 minutes and no progression)
>
>
> - Petri
>
> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026711&i=0>]
> Sent: 7. marraskuuta 2012 11:53
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
>
> Could you try:
>
> features:install -v webconsole
>
> to see which bundle resolution takes time.
>
> Thanks,
> Regards
> JB
>
> On 11/07/2012 10:45 AM, PJR69 wrote:
>
>> That doesn’t seem to be working all all…. I used the Nov 06 snapshot, unzipped the staff and started karaf.bat. Then I just typed features:install webconsole and nyt it’s just running there for 5 minutes and nothing happens…
>>
>> IIRC, installing JUST the webconsole directly seems to be a bit iffy; I usually install at least jetty and war support before webconsole and after those the webconsole installed ok and took only few seconds.
>>
>>
>> - Petri
>>
>> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026709&i=0>]
>> Sent: 7. marraskuuta 2012 11:36
>> To: Riipinen Petri
>> Subject: Re: How to debug non-working war-deployment?
>>
>> I guess that you try:
>> features:install war
>> features:install webconsole
>>
>> Could you try to install directly the webconsole (without previous http
>> or war features installed):
>>
>> features:install webconsole
>>
>> I suspect an issue that I saw before.
>>
>> Regards
>> JB
>>
>> On 11/07/2012 08:01 AM, PJR69 wrote:
>>
>>> Hi,
>>>
>>> Heh… ;) Ok, I feel a bit embarrassed now.. ;)
>>>
>>> Which snapshot would you recommend? I tried the two latest ones (Nov 06 and Nov 07) and the 07 one doesn’t seem to even start and the 06 has some issues with deploying the war, i.e. it won’t trigger Pax Web at all (there is no Web-State for my war and nothing gets dumped into the log even with DEBUG level set) and the Web Console doesn’t work at all. Not really keen on trying out every one of them… ;)
>>>
>>>
>>> - Petri
>>>
>>> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=0>]
>>> Sent: 7. marraskuuta 2012 8:07
>>> To: Riipinen Petri
>>> Subject: Re: How to debug non-working war-deployment?
>>>
>>> Hi,
>>>
>>> Achim talked about Karaf 2.3.1-SNAPSHOT (which use Pax Web 1.1.5 (1.1.6
>>> soon, I'm updating ;))).
>>>
>>> You can find Karaf 2.3.1-SNAPSHOT here:
>>>
>>> https://repository.apache.org/content/groups/snapshots/org/apache/karaf/apache-karaf/2.3.1-SNAPSHOT/
>>>
>>> Regards
>>> JB
>>>
>>> On 11/07/2012 06:27 AM, PJR69 wrote:
>>>
>>>> Hi again,
>>>>
>>>> Ok, I’m prolly being a bit slow here but I’m trying to find 2.3.1-SNAPSHOT here: https://oss.sonatype.org/content/repositories/ops4j-snapshots/org/ops4j/pax/web/ and can’t see it… Where do I find it?
>>>>
>>>>
>>>> - Petri
>>>>
>>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=0>]
>>>> Sent: 6. marraskuuta 2012 21:31
>>>> To: Riipinen Petri
>>>> Subject: Re: How to debug non-working war-deployment?
>>>>
>>>> Hi,
>>>>
>>>> do you mind to test with the latest 2.3.1-SNAPSHOT, cause there had been an issue with Pax-Web [1]
>>>> which should be fixed by now.
>>>>
>>>> regards, Achim
>>>>
>>>> [1] - http://team.ops4j.org/browse/PAXWEB-426
>>>>
>>>> 2012/11/6 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=0>>
>>>> Hi,
>>>>
>>>> Thanks for the advice, that helped me to progress a lot. Now it seems that my servlet looks to be deployed ok, but the context-mapping isn’t working for some reason or other.
>>>>
>>>> web:list shows one entry:
>>>> State = Active
>>>> Web-State = Deployed
>>>> Web-ContextPath = /portal
>>>>
>>>> But when I try to browse http://localhost:8181/portal I get HTTP error 404, not found.
>>>>
>>>> When I look at the log, I always get these kinds of entries:
>>>> Path [/portal] does not match any context.
>>>>
>>>> I’ve tried numerous different URL combinations there (like /portal/portal and /portal1/portal as portal1 is the name of the Karaf instance where the war is deployed) but nothing seems to work.
>>>>
>>>> In the manifest I have Web-ContextPath: portal so AFAIU, the application should be on the above URL.
>>>>
>>>> I’m trying to follow the infor here http://leshazlewood.com/2010/09/08/osgi-maven-pax-and-web-applications/ as much as possible, but I don’t have any jsp-pages there. The main servlet is mapped just on /
>>>>
>>>> So, AFAIU, Karaf + Pax seem to deploy my OSGIfied WAR-bundle ok, no errors on log at least, but for some reason the main servlet inside the war just can’t be reached via the URL that I’d assume it should be.
>>>>
>>>> Any ideas how to proceed would be greatly appreciated…
>>>>
>>>>
>>>> - Petri
>>>>
>>>>
>>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=1>]
>>>> Sent: 5. marraskuuta 2012 15:50
>>>> To: Riipinen Petri
>>>> Subject: Re: How to debug non-working war-deployment?
>>>> Hi,
>>>>
>>>> which version of Karaf do you use?
>>>> Second, what does the karaf.log say?
>>>>
>>>> How does your war look like, did you add the required OSGi-Manifest entries to it?
>>>> if not, you need to install it with
>>>> install -s webbundle:mvn:url
>>>>
>>>> What does the web:list command list when used?
>>>>
>>>> Besides that if you want to debug, you should start Karaf in debug mode by using
>>>> "karaf.sh debug" (or "karaf.bat debug" on windows) on comandline.
>>>>
>>>> The sources for the web-extender can be found at OPS4j Pax-Web, see [1] to [3]
>>>>
>>>> regards, Achim
>>>>
>>>> [1] - http://team.ops4j.org/wiki/display/ops4j/Open+Participation+Software+for+Java
>>>> [2] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
>>>> [3] - https://github.com/ops4j/org.ops4j.pax.web
>>>> 2012/11/5 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026686&i=0>>
>>>> I have a WAR-packaged application that runs fine on Tomcat.
>>>>
>>>> Now I'm trying to get it to run on Karaf with jetty. I've installed jetty +
>>>> war features and I see jetty running on 8181 and get the page not found
>>>> error when browsing the root.
>>>>
>>>> I've osgified my manifest as instructed here:
>>>> http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me it
>>>> looks ok.
>>>>
>>>> But when I drop the WAR into the deploy-folder, nothing much really happens.
>>>> I do see the installer writing "installed... .war" -text and list shows that
>>>> the application is there in Installed-state. But nothing else happens.
>>>>
>>>> The application should be bound to /portal-endpoint but navigating there
>>>> with a browser just gives the same page not found error and nothing gets
>>>> output on the log.
>>>>
>>>> Any ideas how to proceed with debugging the problem?
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
>>>> Sent from the Karaf - User mailing list archive at Nabble.com.
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026711.html
To start a new topic under Karaf - User, email ml-node+s922171n930749h57@n3.nabble.com<ma...@n3.nabble.com>
To unsubscribe from Karaf - User, click here<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8OTMwNzQ5fDU5NTY5OTMzOA==>.
NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026841.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: How to debug non-working war-deployment?
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,
Sorry I was very busy with travels the last two weeks.
I try to take a look later today.
Regards
JB
On 11/20/2012 11:44 AM, PJR69 wrote:
> Hi JB,
>
> What’s the status of the snapshot / next release schedule? I still haven’t managed to get my war exported to jetty contextpath so I’m hoping to get a more stable snapshot / release to test the war deployment.
>
>
> - Petri
>
> From: jbonofre [via Karaf] [mailto:ml-node+s922171n4026711h79@n3.nabble.com]
> Sent: 7. marraskuuta 2012 15:20
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
>
> Hi Petri,
>
> thanks for the update, I'm not able to reproduce that on my machine. I
> try with another SNAPSHOT.
>
> Regards
> JB
>
> On 11/07/2012 02:16 PM, PJR69 wrote:
>
>> This is what I get an then it just hangs…
>>
>> karaf@root> features:install -v webconsole
>> Installing feature webconsole 2.3.1-SNAPSHOT
>> Installing feature webconsole-base 2.3.1-SNAPSHOT
>> Installing feature http 2.3.1-SNAPSHOT
>> Installing feature jetty 7.6.7.v20120910
>> Installing bundle mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/2.2-SNAPSHOT
>> Installing bundle mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2
>> Installing bundle mvn:javax.mail/mail/1.4.5
>> Installing bundle mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
>> Installing bundle mvn:org.eclipse.jetty/jetty-util/7.6.7.v20120910
>> Installing bundle mvn:org.eclipse.jetty/jetty-io/7.6.7.v20120910
>> Installing bundle mvn:org.eclipse.jetty/jetty-http/7.6.7.v20120910
>> Installing bundle mvn:org.eclipse.jetty/jetty-client/7.6.7.v20120910
>> Installing bundle mvn:org.eclipse.jetty/jetty-continuation/7.6.7.v20120910
>> Installing bundle mvn:org.eclipse.jetty/jetty-jmx/7.6.7.v20120910
>> Installing bundle mvn:org.eclipse.jetty/jetty-server/7.6.7.v20120910
>> Installing bundle mvn:org.eclipse.jetty/jetty-security/7.6.7.v20120910
>> Installing bundle mvn:org.eclipse.jetty/jetty-servlet/7.6.7.v20120910
>> Installing bundle mvn:org.eclipse.jetty/jetty-servlets/7.6.7.v20120910
>> Installing bundle mvn:org.eclipse.jetty/jetty-xml/7.6.7.v20120910
>> Installing bundle mvn:org.eclipse.jetty/jetty-webapp/7.6.7.v20120910
>> Installing bundle mvn:org.eclipse.jetty/jetty-jndi/7.6.7.v20120910
>> Installing bundle mvn:org.eclipse.jetty/jetty-plus/7.6.7.v20120910
>> Installing bundle mvn:org.eclipse.jetty/jetty-websocket/7.6.7.v20120910
>> Checking configuration file mvn:org.apache.karaf/apache-karaf/2.3.1-SNAPSHOT/xml/jettyconfig
>> Installing bundle mvn:org.ops4j.pax.web/pax-web-api/1.1.5
>> Installing bundle mvn:org.ops4j.pax.web/pax-web-spi/1.1.5
>> Installing bundle mvn:org.ops4j.pax.web/pax-web-runtime/1.1.5
>> Installing bundle mvn:org.ops4j.pax.web/pax-web-jetty/1.1.5
>> Installing bundle mvn:org.apache.felix/org.apache.felix.metatype/1.0.4
>> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.branding/2.3.1-SNAPSHOT
>> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.console/2.3.1-SNAPSHOT
>> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.admin/2.3.1-SNAPSHOT
>> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.features/2.3.1-SNAPSHOT
>> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.gogo/2.3.1-SNAPSHOT
>> Installing bundle mvn:org.apache.felix/org.apache.felix.webconsole.plugins.event/1.0.2
>>
>> (waited about 2 minutes and no progression)
>>
>>
>> - Petri
>>
>> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026711&i=0>]
>> Sent: 7. marraskuuta 2012 11:53
>> To: Riipinen Petri
>> Subject: Re: How to debug non-working war-deployment?
>>
>> Could you try:
>>
>> features:install -v webconsole
>>
>> to see which bundle resolution takes time.
>>
>> Thanks,
>> Regards
>> JB
>>
>> On 11/07/2012 10:45 AM, PJR69 wrote:
>>
>>> That doesn’t seem to be working all all…. I used the Nov 06 snapshot, unzipped the staff and started karaf.bat. Then I just typed features:install webconsole and nyt it’s just running there for 5 minutes and nothing happens…
>>>
>>> IIRC, installing JUST the webconsole directly seems to be a bit iffy; I usually install at least jetty and war support before webconsole and after those the webconsole installed ok and took only few seconds.
>>>
>>>
>>> - Petri
>>>
>>> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026709&i=0>]
>>> Sent: 7. marraskuuta 2012 11:36
>>> To: Riipinen Petri
>>> Subject: Re: How to debug non-working war-deployment?
>>>
>>> I guess that you try:
>>> features:install war
>>> features:install webconsole
>>>
>>> Could you try to install directly the webconsole (without previous http
>>> or war features installed):
>>>
>>> features:install webconsole
>>>
>>> I suspect an issue that I saw before.
>>>
>>> Regards
>>> JB
>>>
>>> On 11/07/2012 08:01 AM, PJR69 wrote:
>>>
>>>> Hi,
>>>>
>>>> Heh… ;) Ok, I feel a bit embarrassed now.. ;)
>>>>
>>>> Which snapshot would you recommend? I tried the two latest ones (Nov 06 and Nov 07) and the 07 one doesn’t seem to even start and the 06 has some issues with deploying the war, i.e. it won’t trigger Pax Web at all (there is no Web-State for my war and nothing gets dumped into the log even with DEBUG level set) and the Web Console doesn’t work at all. Not really keen on trying out every one of them… ;)
>>>>
>>>>
>>>> - Petri
>>>>
>>>> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=0>]
>>>> Sent: 7. marraskuuta 2012 8:07
>>>> To: Riipinen Petri
>>>> Subject: Re: How to debug non-working war-deployment?
>>>>
>>>> Hi,
>>>>
>>>> Achim talked about Karaf 2.3.1-SNAPSHOT (which use Pax Web 1.1.5 (1.1.6
>>>> soon, I'm updating ;))).
>>>>
>>>> You can find Karaf 2.3.1-SNAPSHOT here:
>>>>
>>>> https://repository.apache.org/content/groups/snapshots/org/apache/karaf/apache-karaf/2.3.1-SNAPSHOT/
>>>>
>>>> Regards
>>>> JB
>>>>
>>>> On 11/07/2012 06:27 AM, PJR69 wrote:
>>>>
>>>>> Hi again,
>>>>>
>>>>> Ok, I’m prolly being a bit slow here but I’m trying to find 2.3.1-SNAPSHOT here: https://oss.sonatype.org/content/repositories/ops4j-snapshots/org/ops4j/pax/web/ and can’t see it… Where do I find it?
>>>>>
>>>>>
>>>>> - Petri
>>>>>
>>>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=0>]
>>>>> Sent: 6. marraskuuta 2012 21:31
>>>>> To: Riipinen Petri
>>>>> Subject: Re: How to debug non-working war-deployment?
>>>>>
>>>>> Hi,
>>>>>
>>>>> do you mind to test with the latest 2.3.1-SNAPSHOT, cause there had been an issue with Pax-Web [1]
>>>>> which should be fixed by now.
>>>>>
>>>>> regards, Achim
>>>>>
>>>>> [1] - http://team.ops4j.org/browse/PAXWEB-426
>>>>>
>>>>> 2012/11/6 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=0>>
>>>>> Hi,
>>>>>
>>>>> Thanks for the advice, that helped me to progress a lot. Now it seems that my servlet looks to be deployed ok, but the context-mapping isn’t working for some reason or other.
>>>>>
>>>>> web:list shows one entry:
>>>>> State = Active
>>>>> Web-State = Deployed
>>>>> Web-ContextPath = /portal
>>>>>
>>>>> But when I try to browse http://localhost:8181/portal I get HTTP error 404, not found.
>>>>>
>>>>> When I look at the log, I always get these kinds of entries:
>>>>> Path [/portal] does not match any context.
>>>>>
>>>>> I’ve tried numerous different URL combinations there (like /portal/portal and /portal1/portal as portal1 is the name of the Karaf instance where the war is deployed) but nothing seems to work.
>>>>>
>>>>> In the manifest I have Web-ContextPath: portal so AFAIU, the application should be on the above URL.
>>>>>
>>>>> I’m trying to follow the infor here http://leshazlewood.com/2010/09/08/osgi-maven-pax-and-web-applications/ as much as possible, but I don’t have any jsp-pages there. The main servlet is mapped just on /
>>>>>
>>>>> So, AFAIU, Karaf + Pax seem to deploy my OSGIfied WAR-bundle ok, no errors on log at least, but for some reason the main servlet inside the war just can’t be reached via the URL that I’d assume it should be.
>>>>>
>>>>> Any ideas how to proceed would be greatly appreciated…
>>>>>
>>>>>
>>>>> - Petri
>>>>>
>>>>>
>>>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=1>]
>>>>> Sent: 5. marraskuuta 2012 15:50
>>>>> To: Riipinen Petri
>>>>> Subject: Re: How to debug non-working war-deployment?
>>>>> Hi,
>>>>>
>>>>> which version of Karaf do you use?
>>>>> Second, what does the karaf.log say?
>>>>>
>>>>> How does your war look like, did you add the required OSGi-Manifest entries to it?
>>>>> if not, you need to install it with
>>>>> install -s webbundle:mvn:url
>>>>>
>>>>> What does the web:list command list when used?
>>>>>
>>>>> Besides that if you want to debug, you should start Karaf in debug mode by using
>>>>> "karaf.sh debug" (or "karaf.bat debug" on windows) on comandline.
>>>>>
>>>>> The sources for the web-extender can be found at OPS4j Pax-Web, see [1] to [3]
>>>>>
>>>>> regards, Achim
>>>>>
>>>>> [1] - http://team.ops4j.org/wiki/display/ops4j/Open+Participation+Software+for+Java
>>>>> [2] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
>>>>> [3] - https://github.com/ops4j/org.ops4j.pax.web
>>>>> 2012/11/5 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026686&i=0>>
>>>>> I have a WAR-packaged application that runs fine on Tomcat.
>>>>>
>>>>> Now I'm trying to get it to run on Karaf with jetty. I've installed jetty +
>>>>> war features and I see jetty running on 8181 and get the page not found
>>>>> error when browsing the root.
>>>>>
>>>>> I've osgified my manifest as instructed here:
>>>>> http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me it
>>>>> looks ok.
>>>>>
>>>>> But when I drop the WAR into the deploy-folder, nothing much really happens.
>>>>> I do see the installer writing "installed... .war" -text and list shows that
>>>>> the application is there in Installed-state. But nothing else happens.
>>>>>
>>>>> The application should be bound to /portal-endpoint but navigating there
>>>>> with a browser just gives the same page not found error and nothing gets
>>>>> output on the log.
>>>>>
>>>>> Any ideas how to proceed with debugging the problem?
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
>>>>> Sent from the Karaf - User 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/>
>>>>> ________________________________
>>>>> If you reply to this email, your message will be added to the discussion below:
>>>>> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026686.html
>>>>> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=2><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=3<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026701&i=3<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026701&i=3%3cmailto:%5bhidden%20email%5d%3c/user/SendEmail.jtp?type=node&node=4026701&i=3<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026701&i=3%3cmailto:%5bhidden%20email%5d%3c/user/SendEmail.jtp?type=node&node=4026701&i=3%3cmailto:%5bhidden%20email%5d%3c/user/SendEmail.jtp?type=node&node=4026701&i=3%3cmailto:%5bhidden%20email%5d%3c/user/SendEmail.jtp?type=node&node=4026701&i=3>>>>>
>>>>> To unsubscribe from Karaf - User, click here< NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026700.html
>>>>> Sent from the Karaf - User 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/>
>>>>>
>>>>> ________________________________
>>>>> If you reply to this email, your message will be added to the discussion below:
>>>>> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026701.html
>>>>> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=1><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=2<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026704&i=2<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026704&i=2%3cmailto:%5bhidden%20email%5d%3c/user/SendEmail.jtp?type=node&node=4026704&i=2>>>>
>>>>> To unsubscribe from Karaf - User, click here<
>>>>> NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026703.html
>>>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>>>
>>>>
>>>> --
>>>> Jean-Baptiste Onofré
>>>> [hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=3>
>>>> http://blog.nanthrax.net
>>>> Talend - http://www.talend.com
>>>>
>>>> ________________________________
>>>> If you reply to this email, your message will be added to the discussion below:
>>>> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026704.html
>>>> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=1><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=2<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026707&i=2>>>
>>>> To unsubscribe from Karaf - User, click here<
>>>> NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026705.html
>>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>>
>>>
>>> --
>>> Jean-Baptiste Onofré
>>> [hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=3>
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>> ________________________________
>>> If you reply to this email, your message will be added to the discussion below:
>>> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026707.html
>>> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026709&i=1><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026709&i=2<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026709&i=2>>>
>>> To unsubscribe from Karaf - User, click here<
>>> NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026708.html
>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> [hidden email]</user/SendEmail.jtp?type=node&node=4026709&i=3>
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>> ________________________________
>> If you reply to this email, your message will be added to the discussion below:
>> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026709.html
>> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026711&i=1>
>> To unsubscribe from Karaf - User, click here<
>> NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>>
>>
>>
>> --
>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026710.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>
> --
> Jean-Baptiste Onofré
> [hidden email]</user/SendEmail.jtp?type=node&node=4026711&i=2>
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026711.html
> To start a new topic under Karaf - User, email ml-node+s922171n930749h57@n3.nabble.com<ma...@n3.nabble.com>
> To unsubscribe from Karaf - User, click here<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8OTMwNzQ5fDU5NTY5OTMzOA==>.
> NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026830.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
RE: How to debug non-working war-deployment?
Posted by PJR69 <pe...@insta.fi>.
Hi JB,
What’s the status of the snapshot / next release schedule? I still haven’t managed to get my war exported to jetty contextpath so I’m hoping to get a more stable snapshot / release to test the war deployment.
- Petri
From: jbonofre [via Karaf] [mailto:ml-node+s922171n4026711h79@n3.nabble.com]
Sent: 7. marraskuuta 2012 15:20
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
Hi Petri,
thanks for the update, I'm not able to reproduce that on my machine. I
try with another SNAPSHOT.
Regards
JB
On 11/07/2012 02:16 PM, PJR69 wrote:
> This is what I get an then it just hangs…
>
> karaf@root> features:install -v webconsole
> Installing feature webconsole 2.3.1-SNAPSHOT
> Installing feature webconsole-base 2.3.1-SNAPSHOT
> Installing feature http 2.3.1-SNAPSHOT
> Installing feature jetty 7.6.7.v20120910
> Installing bundle mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/2.2-SNAPSHOT
> Installing bundle mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2
> Installing bundle mvn:javax.mail/mail/1.4.5
> Installing bundle mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
> Installing bundle mvn:org.eclipse.jetty/jetty-util/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-io/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-http/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-client/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-continuation/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-jmx/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-server/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-security/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-servlet/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-servlets/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-xml/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-webapp/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-jndi/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-plus/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-websocket/7.6.7.v20120910
> Checking configuration file mvn:org.apache.karaf/apache-karaf/2.3.1-SNAPSHOT/xml/jettyconfig
> Installing bundle mvn:org.ops4j.pax.web/pax-web-api/1.1.5
> Installing bundle mvn:org.ops4j.pax.web/pax-web-spi/1.1.5
> Installing bundle mvn:org.ops4j.pax.web/pax-web-runtime/1.1.5
> Installing bundle mvn:org.ops4j.pax.web/pax-web-jetty/1.1.5
> Installing bundle mvn:org.apache.felix/org.apache.felix.metatype/1.0.4
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.branding/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.console/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.admin/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.features/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.gogo/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.felix/org.apache.felix.webconsole.plugins.event/1.0.2
>
> (waited about 2 minutes and no progression)
>
>
> - Petri
>
> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026711&i=0>]
> Sent: 7. marraskuuta 2012 11:53
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
>
> Could you try:
>
> features:install -v webconsole
>
> to see which bundle resolution takes time.
>
> Thanks,
> Regards
> JB
>
> On 11/07/2012 10:45 AM, PJR69 wrote:
>
>> That doesn’t seem to be working all all…. I used the Nov 06 snapshot, unzipped the staff and started karaf.bat. Then I just typed features:install webconsole and nyt it’s just running there for 5 minutes and nothing happens…
>>
>> IIRC, installing JUST the webconsole directly seems to be a bit iffy; I usually install at least jetty and war support before webconsole and after those the webconsole installed ok and took only few seconds.
>>
>>
>> - Petri
>>
>> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026709&i=0>]
>> Sent: 7. marraskuuta 2012 11:36
>> To: Riipinen Petri
>> Subject: Re: How to debug non-working war-deployment?
>>
>> I guess that you try:
>> features:install war
>> features:install webconsole
>>
>> Could you try to install directly the webconsole (without previous http
>> or war features installed):
>>
>> features:install webconsole
>>
>> I suspect an issue that I saw before.
>>
>> Regards
>> JB
>>
>> On 11/07/2012 08:01 AM, PJR69 wrote:
>>
>>> Hi,
>>>
>>> Heh… ;) Ok, I feel a bit embarrassed now.. ;)
>>>
>>> Which snapshot would you recommend? I tried the two latest ones (Nov 06 and Nov 07) and the 07 one doesn’t seem to even start and the 06 has some issues with deploying the war, i.e. it won’t trigger Pax Web at all (there is no Web-State for my war and nothing gets dumped into the log even with DEBUG level set) and the Web Console doesn’t work at all. Not really keen on trying out every one of them… ;)
>>>
>>>
>>> - Petri
>>>
>>> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=0>]
>>> Sent: 7. marraskuuta 2012 8:07
>>> To: Riipinen Petri
>>> Subject: Re: How to debug non-working war-deployment?
>>>
>>> Hi,
>>>
>>> Achim talked about Karaf 2.3.1-SNAPSHOT (which use Pax Web 1.1.5 (1.1.6
>>> soon, I'm updating ;))).
>>>
>>> You can find Karaf 2.3.1-SNAPSHOT here:
>>>
>>> https://repository.apache.org/content/groups/snapshots/org/apache/karaf/apache-karaf/2.3.1-SNAPSHOT/
>>>
>>> Regards
>>> JB
>>>
>>> On 11/07/2012 06:27 AM, PJR69 wrote:
>>>
>>>> Hi again,
>>>>
>>>> Ok, I’m prolly being a bit slow here but I’m trying to find 2.3.1-SNAPSHOT here: https://oss.sonatype.org/content/repositories/ops4j-snapshots/org/ops4j/pax/web/ and can’t see it… Where do I find it?
>>>>
>>>>
>>>> - Petri
>>>>
>>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=0>]
>>>> Sent: 6. marraskuuta 2012 21:31
>>>> To: Riipinen Petri
>>>> Subject: Re: How to debug non-working war-deployment?
>>>>
>>>> Hi,
>>>>
>>>> do you mind to test with the latest 2.3.1-SNAPSHOT, cause there had been an issue with Pax-Web [1]
>>>> which should be fixed by now.
>>>>
>>>> regards, Achim
>>>>
>>>> [1] - http://team.ops4j.org/browse/PAXWEB-426
>>>>
>>>> 2012/11/6 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=0>>
>>>> Hi,
>>>>
>>>> Thanks for the advice, that helped me to progress a lot. Now it seems that my servlet looks to be deployed ok, but the context-mapping isn’t working for some reason or other.
>>>>
>>>> web:list shows one entry:
>>>> State = Active
>>>> Web-State = Deployed
>>>> Web-ContextPath = /portal
>>>>
>>>> But when I try to browse http://localhost:8181/portal I get HTTP error 404, not found.
>>>>
>>>> When I look at the log, I always get these kinds of entries:
>>>> Path [/portal] does not match any context.
>>>>
>>>> I’ve tried numerous different URL combinations there (like /portal/portal and /portal1/portal as portal1 is the name of the Karaf instance where the war is deployed) but nothing seems to work.
>>>>
>>>> In the manifest I have Web-ContextPath: portal so AFAIU, the application should be on the above URL.
>>>>
>>>> I’m trying to follow the infor here http://leshazlewood.com/2010/09/08/osgi-maven-pax-and-web-applications/ as much as possible, but I don’t have any jsp-pages there. The main servlet is mapped just on /
>>>>
>>>> So, AFAIU, Karaf + Pax seem to deploy my OSGIfied WAR-bundle ok, no errors on log at least, but for some reason the main servlet inside the war just can’t be reached via the URL that I’d assume it should be.
>>>>
>>>> Any ideas how to proceed would be greatly appreciated…
>>>>
>>>>
>>>> - Petri
>>>>
>>>>
>>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=1>]
>>>> Sent: 5. marraskuuta 2012 15:50
>>>> To: Riipinen Petri
>>>> Subject: Re: How to debug non-working war-deployment?
>>>> Hi,
>>>>
>>>> which version of Karaf do you use?
>>>> Second, what does the karaf.log say?
>>>>
>>>> How does your war look like, did you add the required OSGi-Manifest entries to it?
>>>> if not, you need to install it with
>>>> install -s webbundle:mvn:url
>>>>
>>>> What does the web:list command list when used?
>>>>
>>>> Besides that if you want to debug, you should start Karaf in debug mode by using
>>>> "karaf.sh debug" (or "karaf.bat debug" on windows) on comandline.
>>>>
>>>> The sources for the web-extender can be found at OPS4j Pax-Web, see [1] to [3]
>>>>
>>>> regards, Achim
>>>>
>>>> [1] - http://team.ops4j.org/wiki/display/ops4j/Open+Participation+Software+for+Java
>>>> [2] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
>>>> [3] - https://github.com/ops4j/org.ops4j.pax.web
>>>> 2012/11/5 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026686&i=0>>
>>>> I have a WAR-packaged application that runs fine on Tomcat.
>>>>
>>>> Now I'm trying to get it to run on Karaf with jetty. I've installed jetty +
>>>> war features and I see jetty running on 8181 and get the page not found
>>>> error when browsing the root.
>>>>
>>>> I've osgified my manifest as instructed here:
>>>> http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me it
>>>> looks ok.
>>>>
>>>> But when I drop the WAR into the deploy-folder, nothing much really happens.
>>>> I do see the installer writing "installed... .war" -text and list shows that
>>>> the application is there in Installed-state. But nothing else happens.
>>>>
>>>> The application should be bound to /portal-endpoint but navigating there
>>>> with a browser just gives the same page not found error and nothing gets
>>>> output on the log.
>>>>
>>>> Any ideas how to proceed with debugging the problem?
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
>>>> Sent from the Karaf - User 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/>
>>>> ________________________________
>>>> If you reply to this email, your message will be added to the discussion below:
>>>> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026686.html
>>>> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=2><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=3<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026701&i=3<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026701&i=3%3cmailto:%5bhidden%20email%5d%3c/user/SendEmail.jtp?type=node&node=4026701&i=3<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026701&i=3%3cmailto:%5bhidden%20email%5d%3c/user/SendEmail.jtp?type=node&node=4026701&i=3%3cmailto:%5bhidden%20email%5d%3c/user/SendEmail.jtp?type=node&node=4026701&i=3%3cmailto:%5bhidden%20email%5d%3c/user/SendEmail.jtp?type=node&node=4026701&i=3>>>>>
>>>> To unsubscribe from Karaf - User, click here< NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026700.html
>>>> Sent from the Karaf - User 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/>
>>>>
>>>> ________________________________
>>>> If you reply to this email, your message will be added to the discussion below:
>>>> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026701.html
>>>> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=1><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=2<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026704&i=2<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026704&i=2%3cmailto:%5bhidden%20email%5d%3c/user/SendEmail.jtp?type=node&node=4026704&i=2>>>>
>>>> To unsubscribe from Karaf - User, click here<
>>>> NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026703.html
>>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>>
>>>
>>> --
>>> Jean-Baptiste Onofré
>>> [hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=3>
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>> ________________________________
>>> If you reply to this email, your message will be added to the discussion below:
>>> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026704.html
>>> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=1><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=2<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026707&i=2>>>
>>> To unsubscribe from Karaf - User, click here<
>>> NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026705.html
>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> [hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=3>
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>> ________________________________
>> If you reply to this email, your message will be added to the discussion below:
>> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026707.html
>> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026709&i=1><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026709&i=2<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026709&i=2>>>
>> To unsubscribe from Karaf - User, click here<
>> NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>>
>>
>>
>> --
>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026708.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>
> --
> Jean-Baptiste Onofré
> [hidden email]</user/SendEmail.jtp?type=node&node=4026709&i=3>
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026709.html
> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026711&i=1>
> To unsubscribe from Karaf - User, click here<
> NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026710.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
Jean-Baptiste Onofré
[hidden email]</user/SendEmail.jtp?type=node&node=4026711&i=2>
http://blog.nanthrax.net
Talend - http://www.talend.com
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026711.html
To start a new topic under Karaf - User, email ml-node+s922171n930749h57@n3.nabble.com<ma...@n3.nabble.com>
To unsubscribe from Karaf - User, click here<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8OTMwNzQ5fDU5NTY5OTMzOA==>.
NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026830.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: How to debug non-working war-deployment?
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Petri,
thanks for the update, I'm not able to reproduce that on my machine. I
try with another SNAPSHOT.
Regards
JB
On 11/07/2012 02:16 PM, PJR69 wrote:
> This is what I get an then it just hangs…
>
> karaf@root> features:install -v webconsole
> Installing feature webconsole 2.3.1-SNAPSHOT
> Installing feature webconsole-base 2.3.1-SNAPSHOT
> Installing feature http 2.3.1-SNAPSHOT
> Installing feature jetty 7.6.7.v20120910
> Installing bundle mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/2.2-SNAPSHOT
> Installing bundle mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2
> Installing bundle mvn:javax.mail/mail/1.4.5
> Installing bundle mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
> Installing bundle mvn:org.eclipse.jetty/jetty-util/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-io/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-http/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-client/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-continuation/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-jmx/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-server/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-security/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-servlet/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-servlets/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-xml/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-webapp/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-jndi/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-plus/7.6.7.v20120910
> Installing bundle mvn:org.eclipse.jetty/jetty-websocket/7.6.7.v20120910
> Checking configuration file mvn:org.apache.karaf/apache-karaf/2.3.1-SNAPSHOT/xml/jettyconfig
> Installing bundle mvn:org.ops4j.pax.web/pax-web-api/1.1.5
> Installing bundle mvn:org.ops4j.pax.web/pax-web-spi/1.1.5
> Installing bundle mvn:org.ops4j.pax.web/pax-web-runtime/1.1.5
> Installing bundle mvn:org.ops4j.pax.web/pax-web-jetty/1.1.5
> Installing bundle mvn:org.apache.felix/org.apache.felix.metatype/1.0.4
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.branding/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.console/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.admin/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.features/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.gogo/2.3.1-SNAPSHOT
> Installing bundle mvn:org.apache.felix/org.apache.felix.webconsole.plugins.event/1.0.2
>
> (waited about 2 minutes and no progression)
>
>
> - Petri
>
> From: jbonofre [via Karaf] [mailto:ml-node+s922171n4026709h17@n3.nabble.com]
> Sent: 7. marraskuuta 2012 11:53
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
>
> Could you try:
>
> features:install -v webconsole
>
> to see which bundle resolution takes time.
>
> Thanks,
> Regards
> JB
>
> On 11/07/2012 10:45 AM, PJR69 wrote:
>
>> That doesn’t seem to be working all all…. I used the Nov 06 snapshot, unzipped the staff and started karaf.bat. Then I just typed features:install webconsole and nyt it’s just running there for 5 minutes and nothing happens…
>>
>> IIRC, installing JUST the webconsole directly seems to be a bit iffy; I usually install at least jetty and war support before webconsole and after those the webconsole installed ok and took only few seconds.
>>
>>
>> - Petri
>>
>> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026709&i=0>]
>> Sent: 7. marraskuuta 2012 11:36
>> To: Riipinen Petri
>> Subject: Re: How to debug non-working war-deployment?
>>
>> I guess that you try:
>> features:install war
>> features:install webconsole
>>
>> Could you try to install directly the webconsole (without previous http
>> or war features installed):
>>
>> features:install webconsole
>>
>> I suspect an issue that I saw before.
>>
>> Regards
>> JB
>>
>> On 11/07/2012 08:01 AM, PJR69 wrote:
>>
>>> Hi,
>>>
>>> Heh… ;) Ok, I feel a bit embarrassed now.. ;)
>>>
>>> Which snapshot would you recommend? I tried the two latest ones (Nov 06 and Nov 07) and the 07 one doesn’t seem to even start and the 06 has some issues with deploying the war, i.e. it won’t trigger Pax Web at all (there is no Web-State for my war and nothing gets dumped into the log even with DEBUG level set) and the Web Console doesn’t work at all. Not really keen on trying out every one of them… ;)
>>>
>>>
>>> - Petri
>>>
>>> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=0>]
>>> Sent: 7. marraskuuta 2012 8:07
>>> To: Riipinen Petri
>>> Subject: Re: How to debug non-working war-deployment?
>>>
>>> Hi,
>>>
>>> Achim talked about Karaf 2.3.1-SNAPSHOT (which use Pax Web 1.1.5 (1.1.6
>>> soon, I'm updating ;))).
>>>
>>> You can find Karaf 2.3.1-SNAPSHOT here:
>>>
>>> https://repository.apache.org/content/groups/snapshots/org/apache/karaf/apache-karaf/2.3.1-SNAPSHOT/
>>>
>>> Regards
>>> JB
>>>
>>> On 11/07/2012 06:27 AM, PJR69 wrote:
>>>
>>>> Hi again,
>>>>
>>>> Ok, I’m prolly being a bit slow here but I’m trying to find 2.3.1-SNAPSHOT here: https://oss.sonatype.org/content/repositories/ops4j-snapshots/org/ops4j/pax/web/ and can’t see it… Where do I find it?
>>>>
>>>>
>>>> - Petri
>>>>
>>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=0>]
>>>> Sent: 6. marraskuuta 2012 21:31
>>>> To: Riipinen Petri
>>>> Subject: Re: How to debug non-working war-deployment?
>>>>
>>>> Hi,
>>>>
>>>> do you mind to test with the latest 2.3.1-SNAPSHOT, cause there had been an issue with Pax-Web [1]
>>>> which should be fixed by now.
>>>>
>>>> regards, Achim
>>>>
>>>> [1] - http://team.ops4j.org/browse/PAXWEB-426
>>>>
>>>> 2012/11/6 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=0>>
>>>> Hi,
>>>>
>>>> Thanks for the advice, that helped me to progress a lot. Now it seems that my servlet looks to be deployed ok, but the context-mapping isn’t working for some reason or other.
>>>>
>>>> web:list shows one entry:
>>>> State = Active
>>>> Web-State = Deployed
>>>> Web-ContextPath = /portal
>>>>
>>>> But when I try to browse http://localhost:8181/portal I get HTTP error 404, not found.
>>>>
>>>> When I look at the log, I always get these kinds of entries:
>>>> Path [/portal] does not match any context.
>>>>
>>>> I’ve tried numerous different URL combinations there (like /portal/portal and /portal1/portal as portal1 is the name of the Karaf instance where the war is deployed) but nothing seems to work.
>>>>
>>>> In the manifest I have Web-ContextPath: portal so AFAIU, the application should be on the above URL.
>>>>
>>>> I’m trying to follow the infor here http://leshazlewood.com/2010/09/08/osgi-maven-pax-and-web-applications/ as much as possible, but I don’t have any jsp-pages there. The main servlet is mapped just on /
>>>>
>>>> So, AFAIU, Karaf + Pax seem to deploy my OSGIfied WAR-bundle ok, no errors on log at least, but for some reason the main servlet inside the war just can’t be reached via the URL that I’d assume it should be.
>>>>
>>>> Any ideas how to proceed would be greatly appreciated…
>>>>
>>>>
>>>> - Petri
>>>>
>>>>
>>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=1>]
>>>> Sent: 5. marraskuuta 2012 15:50
>>>> To: Riipinen Petri
>>>> Subject: Re: How to debug non-working war-deployment?
>>>> Hi,
>>>>
>>>> which version of Karaf do you use?
>>>> Second, what does the karaf.log say?
>>>>
>>>> How does your war look like, did you add the required OSGi-Manifest entries to it?
>>>> if not, you need to install it with
>>>> install -s webbundle:mvn:url
>>>>
>>>> What does the web:list command list when used?
>>>>
>>>> Besides that if you want to debug, you should start Karaf in debug mode by using
>>>> "karaf.sh debug" (or "karaf.bat debug" on windows) on comandline.
>>>>
>>>> The sources for the web-extender can be found at OPS4j Pax-Web, see [1] to [3]
>>>>
>>>> regards, Achim
>>>>
>>>> [1] - http://team.ops4j.org/wiki/display/ops4j/Open+Participation+Software+for+Java
>>>> [2] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
>>>> [3] - https://github.com/ops4j/org.ops4j.pax.web
>>>> 2012/11/5 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026686&i=0>>
>>>> I have a WAR-packaged application that runs fine on Tomcat.
>>>>
>>>> Now I'm trying to get it to run on Karaf with jetty. I've installed jetty +
>>>> war features and I see jetty running on 8181 and get the page not found
>>>> error when browsing the root.
>>>>
>>>> I've osgified my manifest as instructed here:
>>>> http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me it
>>>> looks ok.
>>>>
>>>> But when I drop the WAR into the deploy-folder, nothing much really happens.
>>>> I do see the installer writing "installed... .war" -text and list shows that
>>>> the application is there in Installed-state. But nothing else happens.
>>>>
>>>> The application should be bound to /portal-endpoint but navigating there
>>>> with a browser just gives the same page not found error and nothing gets
>>>> output on the log.
>>>>
>>>> Any ideas how to proceed with debugging the problem?
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
>>>> Sent from the Karaf - User 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/>
>>>> ________________________________
>>>> If you reply to this email, your message will be added to the discussion below:
>>>> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026686.html
>>>> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=2><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=3<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026701&i=3<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026701&i=3%3cmailto:%5bhidden%20email%5d%3c/user/SendEmail.jtp?type=node&node=4026701&i=3>>>>
>>>> To unsubscribe from Karaf - User, click here< NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026700.html
>>>> Sent from the Karaf - User 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/>
>>>>
>>>> ________________________________
>>>> If you reply to this email, your message will be added to the discussion below:
>>>> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026701.html
>>>> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=1><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=2<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026704&i=2>>>
>>>> To unsubscribe from Karaf - User, click here<
>>>> NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026703.html
>>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>>
>>>
>>> --
>>> Jean-Baptiste Onofré
>>> [hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=3>
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>> ________________________________
>>> If you reply to this email, your message will be added to the discussion below:
>>> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026704.html
>>> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=1><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=2>>
>>> To unsubscribe from Karaf - User, click here<
>>> NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026705.html
>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> [hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=3>
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>> ________________________________
>> If you reply to this email, your message will be added to the discussion below:
>> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026707.html
>> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026709&i=1><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026709&i=2>>
>> To unsubscribe from Karaf - User, click here<
>> NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>>
>>
>>
>> --
>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026708.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>
> --
> Jean-Baptiste Onofré
> [hidden email]</user/SendEmail.jtp?type=node&node=4026709&i=3>
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026709.html
> To start a new topic under Karaf - User, email ml-node+s922171n930749h57@n3.nabble.com
> To unsubscribe from Karaf - User, click here<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8OTMwNzQ5fDU5NTY5OTMzOA==>.
> NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026710.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
RE: How to debug non-working war-deployment?
Posted by PJR69 <pe...@insta.fi>.
This is what I get an then it just hangs…
karaf@root> features:install -v webconsole
Installing feature webconsole 2.3.1-SNAPSHOT
Installing feature webconsole-base 2.3.1-SNAPSHOT
Installing feature http 2.3.1-SNAPSHOT
Installing feature jetty 7.6.7.v20120910
Installing bundle mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/2.2-SNAPSHOT
Installing bundle mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2
Installing bundle mvn:javax.mail/mail/1.4.5
Installing bundle mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
Installing bundle mvn:org.eclipse.jetty/jetty-util/7.6.7.v20120910
Installing bundle mvn:org.eclipse.jetty/jetty-io/7.6.7.v20120910
Installing bundle mvn:org.eclipse.jetty/jetty-http/7.6.7.v20120910
Installing bundle mvn:org.eclipse.jetty/jetty-client/7.6.7.v20120910
Installing bundle mvn:org.eclipse.jetty/jetty-continuation/7.6.7.v20120910
Installing bundle mvn:org.eclipse.jetty/jetty-jmx/7.6.7.v20120910
Installing bundle mvn:org.eclipse.jetty/jetty-server/7.6.7.v20120910
Installing bundle mvn:org.eclipse.jetty/jetty-security/7.6.7.v20120910
Installing bundle mvn:org.eclipse.jetty/jetty-servlet/7.6.7.v20120910
Installing bundle mvn:org.eclipse.jetty/jetty-servlets/7.6.7.v20120910
Installing bundle mvn:org.eclipse.jetty/jetty-xml/7.6.7.v20120910
Installing bundle mvn:org.eclipse.jetty/jetty-webapp/7.6.7.v20120910
Installing bundle mvn:org.eclipse.jetty/jetty-jndi/7.6.7.v20120910
Installing bundle mvn:org.eclipse.jetty/jetty-plus/7.6.7.v20120910
Installing bundle mvn:org.eclipse.jetty/jetty-websocket/7.6.7.v20120910
Checking configuration file mvn:org.apache.karaf/apache-karaf/2.3.1-SNAPSHOT/xml/jettyconfig
Installing bundle mvn:org.ops4j.pax.web/pax-web-api/1.1.5
Installing bundle mvn:org.ops4j.pax.web/pax-web-spi/1.1.5
Installing bundle mvn:org.ops4j.pax.web/pax-web-runtime/1.1.5
Installing bundle mvn:org.ops4j.pax.web/pax-web-jetty/1.1.5
Installing bundle mvn:org.apache.felix/org.apache.felix.metatype/1.0.4
Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.branding/2.3.1-SNAPSHOT
Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.console/2.3.1-SNAPSHOT
Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.admin/2.3.1-SNAPSHOT
Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.features/2.3.1-SNAPSHOT
Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.gogo/2.3.1-SNAPSHOT
Installing bundle mvn:org.apache.felix/org.apache.felix.webconsole.plugins.event/1.0.2
(waited about 2 minutes and no progression)
- Petri
From: jbonofre [via Karaf] [mailto:ml-node+s922171n4026709h17@n3.nabble.com]
Sent: 7. marraskuuta 2012 11:53
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
Could you try:
features:install -v webconsole
to see which bundle resolution takes time.
Thanks,
Regards
JB
On 11/07/2012 10:45 AM, PJR69 wrote:
> That doesn’t seem to be working all all…. I used the Nov 06 snapshot, unzipped the staff and started karaf.bat. Then I just typed features:install webconsole and nyt it’s just running there for 5 minutes and nothing happens…
>
> IIRC, installing JUST the webconsole directly seems to be a bit iffy; I usually install at least jetty and war support before webconsole and after those the webconsole installed ok and took only few seconds.
>
>
> - Petri
>
> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026709&i=0>]
> Sent: 7. marraskuuta 2012 11:36
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
>
> I guess that you try:
> features:install war
> features:install webconsole
>
> Could you try to install directly the webconsole (without previous http
> or war features installed):
>
> features:install webconsole
>
> I suspect an issue that I saw before.
>
> Regards
> JB
>
> On 11/07/2012 08:01 AM, PJR69 wrote:
>
>> Hi,
>>
>> Heh… ;) Ok, I feel a bit embarrassed now.. ;)
>>
>> Which snapshot would you recommend? I tried the two latest ones (Nov 06 and Nov 07) and the 07 one doesn’t seem to even start and the 06 has some issues with deploying the war, i.e. it won’t trigger Pax Web at all (there is no Web-State for my war and nothing gets dumped into the log even with DEBUG level set) and the Web Console doesn’t work at all. Not really keen on trying out every one of them… ;)
>>
>>
>> - Petri
>>
>> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=0>]
>> Sent: 7. marraskuuta 2012 8:07
>> To: Riipinen Petri
>> Subject: Re: How to debug non-working war-deployment?
>>
>> Hi,
>>
>> Achim talked about Karaf 2.3.1-SNAPSHOT (which use Pax Web 1.1.5 (1.1.6
>> soon, I'm updating ;))).
>>
>> You can find Karaf 2.3.1-SNAPSHOT here:
>>
>> https://repository.apache.org/content/groups/snapshots/org/apache/karaf/apache-karaf/2.3.1-SNAPSHOT/
>>
>> Regards
>> JB
>>
>> On 11/07/2012 06:27 AM, PJR69 wrote:
>>
>>> Hi again,
>>>
>>> Ok, I’m prolly being a bit slow here but I’m trying to find 2.3.1-SNAPSHOT here: https://oss.sonatype.org/content/repositories/ops4j-snapshots/org/ops4j/pax/web/ and can’t see it… Where do I find it?
>>>
>>>
>>> - Petri
>>>
>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=0>]
>>> Sent: 6. marraskuuta 2012 21:31
>>> To: Riipinen Petri
>>> Subject: Re: How to debug non-working war-deployment?
>>>
>>> Hi,
>>>
>>> do you mind to test with the latest 2.3.1-SNAPSHOT, cause there had been an issue with Pax-Web [1]
>>> which should be fixed by now.
>>>
>>> regards, Achim
>>>
>>> [1] - http://team.ops4j.org/browse/PAXWEB-426
>>>
>>> 2012/11/6 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=0>>
>>> Hi,
>>>
>>> Thanks for the advice, that helped me to progress a lot. Now it seems that my servlet looks to be deployed ok, but the context-mapping isn’t working for some reason or other.
>>>
>>> web:list shows one entry:
>>> State = Active
>>> Web-State = Deployed
>>> Web-ContextPath = /portal
>>>
>>> But when I try to browse http://localhost:8181/portal I get HTTP error 404, not found.
>>>
>>> When I look at the log, I always get these kinds of entries:
>>> Path [/portal] does not match any context.
>>>
>>> I’ve tried numerous different URL combinations there (like /portal/portal and /portal1/portal as portal1 is the name of the Karaf instance where the war is deployed) but nothing seems to work.
>>>
>>> In the manifest I have Web-ContextPath: portal so AFAIU, the application should be on the above URL.
>>>
>>> I’m trying to follow the infor here http://leshazlewood.com/2010/09/08/osgi-maven-pax-and-web-applications/ as much as possible, but I don’t have any jsp-pages there. The main servlet is mapped just on /
>>>
>>> So, AFAIU, Karaf + Pax seem to deploy my OSGIfied WAR-bundle ok, no errors on log at least, but for some reason the main servlet inside the war just can’t be reached via the URL that I’d assume it should be.
>>>
>>> Any ideas how to proceed would be greatly appreciated…
>>>
>>>
>>> - Petri
>>>
>>>
>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=1>]
>>> Sent: 5. marraskuuta 2012 15:50
>>> To: Riipinen Petri
>>> Subject: Re: How to debug non-working war-deployment?
>>> Hi,
>>>
>>> which version of Karaf do you use?
>>> Second, what does the karaf.log say?
>>>
>>> How does your war look like, did you add the required OSGi-Manifest entries to it?
>>> if not, you need to install it with
>>> install -s webbundle:mvn:url
>>>
>>> What does the web:list command list when used?
>>>
>>> Besides that if you want to debug, you should start Karaf in debug mode by using
>>> "karaf.sh debug" (or "karaf.bat debug" on windows) on comandline.
>>>
>>> The sources for the web-extender can be found at OPS4j Pax-Web, see [1] to [3]
>>>
>>> regards, Achim
>>>
>>> [1] - http://team.ops4j.org/wiki/display/ops4j/Open+Participation+Software+for+Java
>>> [2] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
>>> [3] - https://github.com/ops4j/org.ops4j.pax.web
>>> 2012/11/5 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026686&i=0>>
>>> I have a WAR-packaged application that runs fine on Tomcat.
>>>
>>> Now I'm trying to get it to run on Karaf with jetty. I've installed jetty +
>>> war features and I see jetty running on 8181 and get the page not found
>>> error when browsing the root.
>>>
>>> I've osgified my manifest as instructed here:
>>> http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me it
>>> looks ok.
>>>
>>> But when I drop the WAR into the deploy-folder, nothing much really happens.
>>> I do see the installer writing "installed... .war" -text and list shows that
>>> the application is there in Installed-state. But nothing else happens.
>>>
>>> The application should be bound to /portal-endpoint but navigating there
>>> with a browser just gives the same page not found error and nothing gets
>>> output on the log.
>>>
>>> Any ideas how to proceed with debugging the problem?
>>>
>>>
>>>
>>> --
>>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
>>> Sent from the Karaf - User 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/>
>>> ________________________________
>>> If you reply to this email, your message will be added to the discussion below:
>>> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026686.html
>>> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=2><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=3<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026701&i=3<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026701&i=3%3cmailto:%5bhidden%20email%5d%3c/user/SendEmail.jtp?type=node&node=4026701&i=3>>>>
>>> To unsubscribe from Karaf - User, click here< NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>>
>>>
>>>
>>> --
>>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026700.html
>>> Sent from the Karaf - User 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/>
>>>
>>> ________________________________
>>> If you reply to this email, your message will be added to the discussion below:
>>> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026701.html
>>> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=1><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=2<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026704&i=2>>>
>>> To unsubscribe from Karaf - User, click here<
>>> NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026703.html
>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> [hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=3>
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>> ________________________________
>> If you reply to this email, your message will be added to the discussion below:
>> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026704.html
>> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=1><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=2>>
>> To unsubscribe from Karaf - User, click here<
>> NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>>
>>
>>
>> --
>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026705.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>
> --
> Jean-Baptiste Onofré
> [hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=3>
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026707.html
> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026709&i=1><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026709&i=2>>
> To unsubscribe from Karaf - User, click here<
> NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026708.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
Jean-Baptiste Onofré
[hidden email]</user/SendEmail.jtp?type=node&node=4026709&i=3>
http://blog.nanthrax.net
Talend - http://www.talend.com
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026709.html
To start a new topic under Karaf - User, email ml-node+s922171n930749h57@n3.nabble.com
To unsubscribe from Karaf - User, click here<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8OTMwNzQ5fDU5NTY5OTMzOA==>.
NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026710.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: How to debug non-working war-deployment?
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Could you try:
features:install -v webconsole
to see which bundle resolution takes time.
Thanks,
Regards
JB
On 11/07/2012 10:45 AM, PJR69 wrote:
> That doesn’t seem to be working all all…. I used the Nov 06 snapshot, unzipped the staff and started karaf.bat. Then I just typed features:install webconsole and nyt it’s just running there for 5 minutes and nothing happens…
>
> IIRC, installing JUST the webconsole directly seems to be a bit iffy; I usually install at least jetty and war support before webconsole and after those the webconsole installed ok and took only few seconds.
>
>
> - Petri
>
> From: jbonofre [via Karaf] [mailto:ml-node+s922171n4026707h55@n3.nabble.com]
> Sent: 7. marraskuuta 2012 11:36
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
>
> I guess that you try:
> features:install war
> features:install webconsole
>
> Could you try to install directly the webconsole (without previous http
> or war features installed):
>
> features:install webconsole
>
> I suspect an issue that I saw before.
>
> Regards
> JB
>
> On 11/07/2012 08:01 AM, PJR69 wrote:
>
>> Hi,
>>
>> Heh… ;) Ok, I feel a bit embarrassed now.. ;)
>>
>> Which snapshot would you recommend? I tried the two latest ones (Nov 06 and Nov 07) and the 07 one doesn’t seem to even start and the 06 has some issues with deploying the war, i.e. it won’t trigger Pax Web at all (there is no Web-State for my war and nothing gets dumped into the log even with DEBUG level set) and the Web Console doesn’t work at all. Not really keen on trying out every one of them… ;)
>>
>>
>> - Petri
>>
>> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=0>]
>> Sent: 7. marraskuuta 2012 8:07
>> To: Riipinen Petri
>> Subject: Re: How to debug non-working war-deployment?
>>
>> Hi,
>>
>> Achim talked about Karaf 2.3.1-SNAPSHOT (which use Pax Web 1.1.5 (1.1.6
>> soon, I'm updating ;))).
>>
>> You can find Karaf 2.3.1-SNAPSHOT here:
>>
>> https://repository.apache.org/content/groups/snapshots/org/apache/karaf/apache-karaf/2.3.1-SNAPSHOT/
>>
>> Regards
>> JB
>>
>> On 11/07/2012 06:27 AM, PJR69 wrote:
>>
>>> Hi again,
>>>
>>> Ok, I’m prolly being a bit slow here but I’m trying to find 2.3.1-SNAPSHOT here: https://oss.sonatype.org/content/repositories/ops4j-snapshots/org/ops4j/pax/web/ and can’t see it… Where do I find it?
>>>
>>>
>>> - Petri
>>>
>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=0>]
>>> Sent: 6. marraskuuta 2012 21:31
>>> To: Riipinen Petri
>>> Subject: Re: How to debug non-working war-deployment?
>>>
>>> Hi,
>>>
>>> do you mind to test with the latest 2.3.1-SNAPSHOT, cause there had been an issue with Pax-Web [1]
>>> which should be fixed by now.
>>>
>>> regards, Achim
>>>
>>> [1] - http://team.ops4j.org/browse/PAXWEB-426
>>>
>>> 2012/11/6 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=0>>
>>> Hi,
>>>
>>> Thanks for the advice, that helped me to progress a lot. Now it seems that my servlet looks to be deployed ok, but the context-mapping isn’t working for some reason or other.
>>>
>>> web:list shows one entry:
>>> State = Active
>>> Web-State = Deployed
>>> Web-ContextPath = /portal
>>>
>>> But when I try to browse http://localhost:8181/portal I get HTTP error 404, not found.
>>>
>>> When I look at the log, I always get these kinds of entries:
>>> Path [/portal] does not match any context.
>>>
>>> I’ve tried numerous different URL combinations there (like /portal/portal and /portal1/portal as portal1 is the name of the Karaf instance where the war is deployed) but nothing seems to work.
>>>
>>> In the manifest I have Web-ContextPath: portal so AFAIU, the application should be on the above URL.
>>>
>>> I’m trying to follow the infor here http://leshazlewood.com/2010/09/08/osgi-maven-pax-and-web-applications/ as much as possible, but I don’t have any jsp-pages there. The main servlet is mapped just on /
>>>
>>> So, AFAIU, Karaf + Pax seem to deploy my OSGIfied WAR-bundle ok, no errors on log at least, but for some reason the main servlet inside the war just can’t be reached via the URL that I’d assume it should be.
>>>
>>> Any ideas how to proceed would be greatly appreciated…
>>>
>>>
>>> - Petri
>>>
>>>
>>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=1>]
>>> Sent: 5. marraskuuta 2012 15:50
>>> To: Riipinen Petri
>>> Subject: Re: How to debug non-working war-deployment?
>>> Hi,
>>>
>>> which version of Karaf do you use?
>>> Second, what does the karaf.log say?
>>>
>>> How does your war look like, did you add the required OSGi-Manifest entries to it?
>>> if not, you need to install it with
>>> install -s webbundle:mvn:url
>>>
>>> What does the web:list command list when used?
>>>
>>> Besides that if you want to debug, you should start Karaf in debug mode by using
>>> "karaf.sh debug" (or "karaf.bat debug" on windows) on comandline.
>>>
>>> The sources for the web-extender can be found at OPS4j Pax-Web, see [1] to [3]
>>>
>>> regards, Achim
>>>
>>> [1] - http://team.ops4j.org/wiki/display/ops4j/Open+Participation+Software+for+Java
>>> [2] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
>>> [3] - https://github.com/ops4j/org.ops4j.pax.web
>>> 2012/11/5 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026686&i=0>>
>>> I have a WAR-packaged application that runs fine on Tomcat.
>>>
>>> Now I'm trying to get it to run on Karaf with jetty. I've installed jetty +
>>> war features and I see jetty running on 8181 and get the page not found
>>> error when browsing the root.
>>>
>>> I've osgified my manifest as instructed here:
>>> http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me it
>>> looks ok.
>>>
>>> But when I drop the WAR into the deploy-folder, nothing much really happens.
>>> I do see the installer writing "installed... .war" -text and list shows that
>>> the application is there in Installed-state. But nothing else happens.
>>>
>>> The application should be bound to /portal-endpoint but navigating there
>>> with a browser just gives the same page not found error and nothing gets
>>> output on the log.
>>>
>>> Any ideas how to proceed with debugging the problem?
>>>
>>>
>>>
>>> --
>>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
>>> Sent from the Karaf - User 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/>
>>> ________________________________
>>> If you reply to this email, your message will be added to the discussion below:
>>> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026686.html
>>> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=2><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=3<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026701&i=3<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026701&i=3%3cmailto:%5bhidden%20email%5d%3c/user/SendEmail.jtp?type=node&node=4026701&i=3>>>>
>>> To unsubscribe from Karaf - User, click here< NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>>
>>>
>>>
>>> --
>>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026700.html
>>> Sent from the Karaf - User 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/>
>>>
>>> ________________________________
>>> If you reply to this email, your message will be added to the discussion below:
>>> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026701.html
>>> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=1><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=2<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026704&i=2>>>
>>> To unsubscribe from Karaf - User, click here<
>>> NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026703.html
>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> [hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=3>
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>> ________________________________
>> If you reply to this email, your message will be added to the discussion below:
>> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026704.html
>> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=1><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=2>>
>> To unsubscribe from Karaf - User, click here<
>> NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>>
>>
>>
>> --
>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026705.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>
> --
> Jean-Baptiste Onofré
> [hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=3>
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026707.html
> To start a new topic under Karaf - User, email ml-node+s922171n930749h57@n3.nabble.com<ma...@n3.nabble.com>
> To unsubscribe from Karaf - User, click here<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8OTMwNzQ5fDU5NTY5OTMzOA==>.
> NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026708.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
RE: How to debug non-working war-deployment?
Posted by PJR69 <pe...@insta.fi>.
That doesn’t seem to be working all all…. I used the Nov 06 snapshot, unzipped the staff and started karaf.bat. Then I just typed features:install webconsole and nyt it’s just running there for 5 minutes and nothing happens…
IIRC, installing JUST the webconsole directly seems to be a bit iffy; I usually install at least jetty and war support before webconsole and after those the webconsole installed ok and took only few seconds.
- Petri
From: jbonofre [via Karaf] [mailto:ml-node+s922171n4026707h55@n3.nabble.com]
Sent: 7. marraskuuta 2012 11:36
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
I guess that you try:
features:install war
features:install webconsole
Could you try to install directly the webconsole (without previous http
or war features installed):
features:install webconsole
I suspect an issue that I saw before.
Regards
JB
On 11/07/2012 08:01 AM, PJR69 wrote:
> Hi,
>
> Heh… ;) Ok, I feel a bit embarrassed now.. ;)
>
> Which snapshot would you recommend? I tried the two latest ones (Nov 06 and Nov 07) and the 07 one doesn’t seem to even start and the 06 has some issues with deploying the war, i.e. it won’t trigger Pax Web at all (there is no Web-State for my war and nothing gets dumped into the log even with DEBUG level set) and the Web Console doesn’t work at all. Not really keen on trying out every one of them… ;)
>
>
> - Petri
>
> From: jbonofre [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=0>]
> Sent: 7. marraskuuta 2012 8:07
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
>
> Hi,
>
> Achim talked about Karaf 2.3.1-SNAPSHOT (which use Pax Web 1.1.5 (1.1.6
> soon, I'm updating ;))).
>
> You can find Karaf 2.3.1-SNAPSHOT here:
>
> https://repository.apache.org/content/groups/snapshots/org/apache/karaf/apache-karaf/2.3.1-SNAPSHOT/
>
> Regards
> JB
>
> On 11/07/2012 06:27 AM, PJR69 wrote:
>
>> Hi again,
>>
>> Ok, I’m prolly being a bit slow here but I’m trying to find 2.3.1-SNAPSHOT here: https://oss.sonatype.org/content/repositories/ops4j-snapshots/org/ops4j/pax/web/ and can’t see it… Where do I find it?
>>
>>
>> - Petri
>>
>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=0>]
>> Sent: 6. marraskuuta 2012 21:31
>> To: Riipinen Petri
>> Subject: Re: How to debug non-working war-deployment?
>>
>> Hi,
>>
>> do you mind to test with the latest 2.3.1-SNAPSHOT, cause there had been an issue with Pax-Web [1]
>> which should be fixed by now.
>>
>> regards, Achim
>>
>> [1] - http://team.ops4j.org/browse/PAXWEB-426
>>
>> 2012/11/6 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=0>>
>> Hi,
>>
>> Thanks for the advice, that helped me to progress a lot. Now it seems that my servlet looks to be deployed ok, but the context-mapping isn’t working for some reason or other.
>>
>> web:list shows one entry:
>> State = Active
>> Web-State = Deployed
>> Web-ContextPath = /portal
>>
>> But when I try to browse http://localhost:8181/portal I get HTTP error 404, not found.
>>
>> When I look at the log, I always get these kinds of entries:
>> Path [/portal] does not match any context.
>>
>> I’ve tried numerous different URL combinations there (like /portal/portal and /portal1/portal as portal1 is the name of the Karaf instance where the war is deployed) but nothing seems to work.
>>
>> In the manifest I have Web-ContextPath: portal so AFAIU, the application should be on the above URL.
>>
>> I’m trying to follow the infor here http://leshazlewood.com/2010/09/08/osgi-maven-pax-and-web-applications/ as much as possible, but I don’t have any jsp-pages there. The main servlet is mapped just on /
>>
>> So, AFAIU, Karaf + Pax seem to deploy my OSGIfied WAR-bundle ok, no errors on log at least, but for some reason the main servlet inside the war just can’t be reached via the URL that I’d assume it should be.
>>
>> Any ideas how to proceed would be greatly appreciated…
>>
>>
>> - Petri
>>
>>
>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=1>]
>> Sent: 5. marraskuuta 2012 15:50
>> To: Riipinen Petri
>> Subject: Re: How to debug non-working war-deployment?
>> Hi,
>>
>> which version of Karaf do you use?
>> Second, what does the karaf.log say?
>>
>> How does your war look like, did you add the required OSGi-Manifest entries to it?
>> if not, you need to install it with
>> install -s webbundle:mvn:url
>>
>> What does the web:list command list when used?
>>
>> Besides that if you want to debug, you should start Karaf in debug mode by using
>> "karaf.sh debug" (or "karaf.bat debug" on windows) on comandline.
>>
>> The sources for the web-extender can be found at OPS4j Pax-Web, see [1] to [3]
>>
>> regards, Achim
>>
>> [1] - http://team.ops4j.org/wiki/display/ops4j/Open+Participation+Software+for+Java
>> [2] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
>> [3] - https://github.com/ops4j/org.ops4j.pax.web
>> 2012/11/5 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026686&i=0>>
>> I have a WAR-packaged application that runs fine on Tomcat.
>>
>> Now I'm trying to get it to run on Karaf with jetty. I've installed jetty +
>> war features and I see jetty running on 8181 and get the page not found
>> error when browsing the root.
>>
>> I've osgified my manifest as instructed here:
>> http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me it
>> looks ok.
>>
>> But when I drop the WAR into the deploy-folder, nothing much really happens.
>> I do see the installer writing "installed... .war" -text and list shows that
>> the application is there in Installed-state. But nothing else happens.
>>
>> The application should be bound to /portal-endpoint but navigating there
>> with a browser just gives the same page not found error and nothing gets
>> output on the log.
>>
>> Any ideas how to proceed with debugging the problem?
>>
>>
>>
>> --
>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
>> Sent from the Karaf - User 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/>
>> ________________________________
>> If you reply to this email, your message will be added to the discussion below:
>> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026686.html
>> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=2><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=3<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026701&i=3<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026701&i=3%3cmailto:%5bhidden%20email%5d%3c/user/SendEmail.jtp?type=node&node=4026701&i=3>>>>
>> To unsubscribe from Karaf - User, click here< NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>>
>>
>> --
>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026700.html
>> Sent from the Karaf - User 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/>
>>
>> ________________________________
>> If you reply to this email, your message will be added to the discussion below:
>> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026701.html
>> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=1><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=2<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026704&i=2>>>
>> To unsubscribe from Karaf - User, click here<
>> NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>>
>>
>>
>> --
>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026703.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>
> --
> Jean-Baptiste Onofré
> [hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=3>
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026704.html
> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=1><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=2>>
> To unsubscribe from Karaf - User, click here<
> NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026705.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
Jean-Baptiste Onofré
[hidden email]</user/SendEmail.jtp?type=node&node=4026707&i=3>
http://blog.nanthrax.net
Talend - http://www.talend.com
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026707.html
To start a new topic under Karaf - User, email ml-node+s922171n930749h57@n3.nabble.com<ma...@n3.nabble.com>
To unsubscribe from Karaf - User, click here<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8OTMwNzQ5fDU5NTY5OTMzOA==>.
NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026708.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: How to debug non-working war-deployment?
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
I guess that you try:
features:install war
features:install webconsole
Could you try to install directly the webconsole (without previous http
or war features installed):
features:install webconsole
I suspect an issue that I saw before.
Regards
JB
On 11/07/2012 08:01 AM, PJR69 wrote:
> Hi,
>
> Heh… ;) Ok, I feel a bit embarrassed now.. ;)
>
> Which snapshot would you recommend? I tried the two latest ones (Nov 06 and Nov 07) and the 07 one doesn’t seem to even start and the 06 has some issues with deploying the war, i.e. it won’t trigger Pax Web at all (there is no Web-State for my war and nothing gets dumped into the log even with DEBUG level set) and the Web Console doesn’t work at all. Not really keen on trying out every one of them… ;)
>
>
> - Petri
>
> From: jbonofre [via Karaf] [mailto:ml-node+s922171n4026704h62@n3.nabble.com]
> Sent: 7. marraskuuta 2012 8:07
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
>
> Hi,
>
> Achim talked about Karaf 2.3.1-SNAPSHOT (which use Pax Web 1.1.5 (1.1.6
> soon, I'm updating ;))).
>
> You can find Karaf 2.3.1-SNAPSHOT here:
>
> https://repository.apache.org/content/groups/snapshots/org/apache/karaf/apache-karaf/2.3.1-SNAPSHOT/
>
> Regards
> JB
>
> On 11/07/2012 06:27 AM, PJR69 wrote:
>
>> Hi again,
>>
>> Ok, I’m prolly being a bit slow here but I’m trying to find 2.3.1-SNAPSHOT here: https://oss.sonatype.org/content/repositories/ops4j-snapshots/org/ops4j/pax/web/ and can’t see it… Where do I find it?
>>
>>
>> - Petri
>>
>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=0>]
>> Sent: 6. marraskuuta 2012 21:31
>> To: Riipinen Petri
>> Subject: Re: How to debug non-working war-deployment?
>>
>> Hi,
>>
>> do you mind to test with the latest 2.3.1-SNAPSHOT, cause there had been an issue with Pax-Web [1]
>> which should be fixed by now.
>>
>> regards, Achim
>>
>> [1] - http://team.ops4j.org/browse/PAXWEB-426
>>
>> 2012/11/6 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=0>>
>> Hi,
>>
>> Thanks for the advice, that helped me to progress a lot. Now it seems that my servlet looks to be deployed ok, but the context-mapping isn’t working for some reason or other.
>>
>> web:list shows one entry:
>> State = Active
>> Web-State = Deployed
>> Web-ContextPath = /portal
>>
>> But when I try to browse http://localhost:8181/portal I get HTTP error 404, not found.
>>
>> When I look at the log, I always get these kinds of entries:
>> Path [/portal] does not match any context.
>>
>> I’ve tried numerous different URL combinations there (like /portal/portal and /portal1/portal as portal1 is the name of the Karaf instance where the war is deployed) but nothing seems to work.
>>
>> In the manifest I have Web-ContextPath: portal so AFAIU, the application should be on the above URL.
>>
>> I’m trying to follow the infor here http://leshazlewood.com/2010/09/08/osgi-maven-pax-and-web-applications/ as much as possible, but I don’t have any jsp-pages there. The main servlet is mapped just on /
>>
>> So, AFAIU, Karaf + Pax seem to deploy my OSGIfied WAR-bundle ok, no errors on log at least, but for some reason the main servlet inside the war just can’t be reached via the URL that I’d assume it should be.
>>
>> Any ideas how to proceed would be greatly appreciated…
>>
>>
>> - Petri
>>
>>
>> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=1>]
>> Sent: 5. marraskuuta 2012 15:50
>> To: Riipinen Petri
>> Subject: Re: How to debug non-working war-deployment?
>> Hi,
>>
>> which version of Karaf do you use?
>> Second, what does the karaf.log say?
>>
>> How does your war look like, did you add the required OSGi-Manifest entries to it?
>> if not, you need to install it with
>> install -s webbundle:mvn:url
>>
>> What does the web:list command list when used?
>>
>> Besides that if you want to debug, you should start Karaf in debug mode by using
>> "karaf.sh debug" (or "karaf.bat debug" on windows) on comandline.
>>
>> The sources for the web-extender can be found at OPS4j Pax-Web, see [1] to [3]
>>
>> regards, Achim
>>
>> [1] - http://team.ops4j.org/wiki/display/ops4j/Open+Participation+Software+for+Java
>> [2] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
>> [3] - https://github.com/ops4j/org.ops4j.pax.web
>> 2012/11/5 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026686&i=0>>
>> I have a WAR-packaged application that runs fine on Tomcat.
>>
>> Now I'm trying to get it to run on Karaf with jetty. I've installed jetty +
>> war features and I see jetty running on 8181 and get the page not found
>> error when browsing the root.
>>
>> I've osgified my manifest as instructed here:
>> http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me it
>> looks ok.
>>
>> But when I drop the WAR into the deploy-folder, nothing much really happens.
>> I do see the installer writing "installed... .war" -text and list shows that
>> the application is there in Installed-state. But nothing else happens.
>>
>> The application should be bound to /portal-endpoint but navigating there
>> with a browser just gives the same page not found error and nothing gets
>> output on the log.
>>
>> Any ideas how to proceed with debugging the problem?
>>
>>
>>
>> --
>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
>> Sent from the Karaf - User 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/>
>> ________________________________
>> If you reply to this email, your message will be added to the discussion below:
>> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026686.html
>> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=2><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=3<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026701&i=3>>>
>> To unsubscribe from Karaf - User, click here< NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>>
>>
>> --
>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026700.html
>> Sent from the Karaf - User 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/>
>>
>> ________________________________
>> If you reply to this email, your message will be added to the discussion below:
>> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026701.html
>> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=1><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=2>>
>> To unsubscribe from Karaf - User, click here<
>> NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>>
>>
>>
>> --
>> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026703.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>
> --
> Jean-Baptiste Onofré
> [hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=3>
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026704.html
> To start a new topic under Karaf - User, email ml-node+s922171n930749h57@n3.nabble.com<ma...@n3.nabble.com>
> To unsubscribe from Karaf - User, click here<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8OTMwNzQ5fDU5NTY5OTMzOA==>.
> NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026705.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
RE: How to debug non-working war-deployment?
Posted by PJR69 <pe...@insta.fi>.
Hi,
Heh… ;) Ok, I feel a bit embarrassed now.. ;)
Which snapshot would you recommend? I tried the two latest ones (Nov 06 and Nov 07) and the 07 one doesn’t seem to even start and the 06 has some issues with deploying the war, i.e. it won’t trigger Pax Web at all (there is no Web-State for my war and nothing gets dumped into the log even with DEBUG level set) and the Web Console doesn’t work at all. Not really keen on trying out every one of them… ;)
- Petri
From: jbonofre [via Karaf] [mailto:ml-node+s922171n4026704h62@n3.nabble.com]
Sent: 7. marraskuuta 2012 8:07
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
Hi,
Achim talked about Karaf 2.3.1-SNAPSHOT (which use Pax Web 1.1.5 (1.1.6
soon, I'm updating ;))).
You can find Karaf 2.3.1-SNAPSHOT here:
https://repository.apache.org/content/groups/snapshots/org/apache/karaf/apache-karaf/2.3.1-SNAPSHOT/
Regards
JB
On 11/07/2012 06:27 AM, PJR69 wrote:
> Hi again,
>
> Ok, I’m prolly being a bit slow here but I’m trying to find 2.3.1-SNAPSHOT here: https://oss.sonatype.org/content/repositories/ops4j-snapshots/org/ops4j/pax/web/ and can’t see it… Where do I find it?
>
>
> - Petri
>
> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=0>]
> Sent: 6. marraskuuta 2012 21:31
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
>
> Hi,
>
> do you mind to test with the latest 2.3.1-SNAPSHOT, cause there had been an issue with Pax-Web [1]
> which should be fixed by now.
>
> regards, Achim
>
> [1] - http://team.ops4j.org/browse/PAXWEB-426
>
> 2012/11/6 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=0>>
> Hi,
>
> Thanks for the advice, that helped me to progress a lot. Now it seems that my servlet looks to be deployed ok, but the context-mapping isn’t working for some reason or other.
>
> web:list shows one entry:
> State = Active
> Web-State = Deployed
> Web-ContextPath = /portal
>
> But when I try to browse http://localhost:8181/portal I get HTTP error 404, not found.
>
> When I look at the log, I always get these kinds of entries:
> Path [/portal] does not match any context.
>
> I’ve tried numerous different URL combinations there (like /portal/portal and /portal1/portal as portal1 is the name of the Karaf instance where the war is deployed) but nothing seems to work.
>
> In the manifest I have Web-ContextPath: portal so AFAIU, the application should be on the above URL.
>
> I’m trying to follow the infor here http://leshazlewood.com/2010/09/08/osgi-maven-pax-and-web-applications/ as much as possible, but I don’t have any jsp-pages there. The main servlet is mapped just on /
>
> So, AFAIU, Karaf + Pax seem to deploy my OSGIfied WAR-bundle ok, no errors on log at least, but for some reason the main servlet inside the war just can’t be reached via the URL that I’d assume it should be.
>
> Any ideas how to proceed would be greatly appreciated…
>
>
> - Petri
>
>
> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=1>]
> Sent: 5. marraskuuta 2012 15:50
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
> Hi,
>
> which version of Karaf do you use?
> Second, what does the karaf.log say?
>
> How does your war look like, did you add the required OSGi-Manifest entries to it?
> if not, you need to install it with
> install -s webbundle:mvn:url
>
> What does the web:list command list when used?
>
> Besides that if you want to debug, you should start Karaf in debug mode by using
> "karaf.sh debug" (or "karaf.bat debug" on windows) on comandline.
>
> The sources for the web-extender can be found at OPS4j Pax-Web, see [1] to [3]
>
> regards, Achim
>
> [1] - http://team.ops4j.org/wiki/display/ops4j/Open+Participation+Software+for+Java
> [2] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
> [3] - https://github.com/ops4j/org.ops4j.pax.web
> 2012/11/5 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026686&i=0>>
> I have a WAR-packaged application that runs fine on Tomcat.
>
> Now I'm trying to get it to run on Karaf with jetty. I've installed jetty +
> war features and I see jetty running on 8181 and get the page not found
> error when browsing the root.
>
> I've osgified my manifest as instructed here:
> http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me it
> looks ok.
>
> But when I drop the WAR into the deploy-folder, nothing much really happens.
> I do see the installer writing "installed... .war" -text and list shows that
> the application is there in Installed-state. But nothing else happens.
>
> The application should be bound to /portal-endpoint but navigating there
> with a browser just gives the same page not found error and nothing gets
> output on the log.
>
> Any ideas how to proceed with debugging the problem?
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
> Sent from the Karaf - User 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/>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026686.html
> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=2><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=3<mailto:[hidden%20email]%3c/user/SendEmail.jtp?type=node&node=4026701&i=3>>>
> To unsubscribe from Karaf - User, click here< NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026700.html
> Sent from the Karaf - User 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/>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026701.html
> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=1><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=2>>
> To unsubscribe from Karaf - User, click here<
> NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026703.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
Jean-Baptiste Onofré
[hidden email]</user/SendEmail.jtp?type=node&node=4026704&i=3>
http://blog.nanthrax.net
Talend - http://www.talend.com
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026704.html
To start a new topic under Karaf - User, email ml-node+s922171n930749h57@n3.nabble.com<ma...@n3.nabble.com>
To unsubscribe from Karaf - User, click here<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8OTMwNzQ5fDU5NTY5OTMzOA==>.
NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026705.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: How to debug non-working war-deployment?
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,
Achim talked about Karaf 2.3.1-SNAPSHOT (which use Pax Web 1.1.5 (1.1.6
soon, I'm updating ;))).
You can find Karaf 2.3.1-SNAPSHOT here:
https://repository.apache.org/content/groups/snapshots/org/apache/karaf/apache-karaf/2.3.1-SNAPSHOT/
Regards
JB
On 11/07/2012 06:27 AM, PJR69 wrote:
> Hi again,
>
> Ok, I’m prolly being a bit slow here but I’m trying to find 2.3.1-SNAPSHOT here: https://oss.sonatype.org/content/repositories/ops4j-snapshots/org/ops4j/pax/web/ and can’t see it… Where do I find it?
>
>
> - Petri
>
> From: Achim Nierbeck [via Karaf] [mailto:ml-node+s922171n4026701h69@n3.nabble.com]
> Sent: 6. marraskuuta 2012 21:31
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
>
> Hi,
>
> do you mind to test with the latest 2.3.1-SNAPSHOT, cause there had been an issue with Pax-Web [1]
> which should be fixed by now.
>
> regards, Achim
>
> [1] - http://team.ops4j.org/browse/PAXWEB-426
>
> 2012/11/6 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=0>>
> Hi,
>
> Thanks for the advice, that helped me to progress a lot. Now it seems that my servlet looks to be deployed ok, but the context-mapping isn’t working for some reason or other.
>
> web:list shows one entry:
> State = Active
> Web-State = Deployed
> Web-ContextPath = /portal
>
> But when I try to browse http://localhost:8181/portal I get HTTP error 404, not found.
>
> When I look at the log, I always get these kinds of entries:
> Path [/portal] does not match any context.
>
> I’ve tried numerous different URL combinations there (like /portal/portal and /portal1/portal as portal1 is the name of the Karaf instance where the war is deployed) but nothing seems to work.
>
> In the manifest I have Web-ContextPath: portal so AFAIU, the application should be on the above URL.
>
> I’m trying to follow the infor here http://leshazlewood.com/2010/09/08/osgi-maven-pax-and-web-applications/ as much as possible, but I don’t have any jsp-pages there. The main servlet is mapped just on /
>
> So, AFAIU, Karaf + Pax seem to deploy my OSGIfied WAR-bundle ok, no errors on log at least, but for some reason the main servlet inside the war just can’t be reached via the URL that I’d assume it should be.
>
> Any ideas how to proceed would be greatly appreciated…
>
>
> - Petri
>
>
> From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=1>]
> Sent: 5. marraskuuta 2012 15:50
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
> Hi,
>
> which version of Karaf do you use?
> Second, what does the karaf.log say?
>
> How does your war look like, did you add the required OSGi-Manifest entries to it?
> if not, you need to install it with
> install -s webbundle:mvn:url
>
> What does the web:list command list when used?
>
> Besides that if you want to debug, you should start Karaf in debug mode by using
> "karaf.sh debug" (or "karaf.bat debug" on windows) on comandline.
>
> The sources for the web-extender can be found at OPS4j Pax-Web, see [1] to [3]
>
> regards, Achim
>
> [1] - http://team.ops4j.org/wiki/display/ops4j/Open+Participation+Software+for+Java
> [2] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
> [3] - https://github.com/ops4j/org.ops4j.pax.web
> 2012/11/5 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026686&i=0>>
> I have a WAR-packaged application that runs fine on Tomcat.
>
> Now I'm trying to get it to run on Karaf with jetty. I've installed jetty +
> war features and I see jetty running on 8181 and get the page not found
> error when browsing the root.
>
> I've osgified my manifest as instructed here:
> http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me it
> looks ok.
>
> But when I drop the WAR into the deploy-folder, nothing much really happens.
> I do see the installer writing "installed... .war" -text and list shows that
> the application is there in Installed-state. But nothing else happens.
>
> The application should be bound to /portal-endpoint but navigating there
> with a browser just gives the same page not found error and nothing gets
> output on the log.
>
> Any ideas how to proceed with debugging the problem?
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
> Sent from the Karaf - User 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/>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026686.html
> To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=2><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=3>>
> To unsubscribe from Karaf - User, click here< NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026700.html
> Sent from the Karaf - User 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/>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026701.html
> To start a new topic under Karaf - User, email ml-node+s922171n930749h57@n3.nabble.com<ma...@n3.nabble.com>
> To unsubscribe from Karaf - User, click here<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8OTMwNzQ5fDU5NTY5OTMzOA==>.
> NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026703.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
RE: How to debug non-working war-deployment?
Posted by PJR69 <pe...@insta.fi>.
Hi again,
Ok, I’m prolly being a bit slow here but I’m trying to find 2.3.1-SNAPSHOT here: https://oss.sonatype.org/content/repositories/ops4j-snapshots/org/ops4j/pax/web/ and can’t see it… Where do I find it?
- Petri
From: Achim Nierbeck [via Karaf] [mailto:ml-node+s922171n4026701h69@n3.nabble.com]
Sent: 6. marraskuuta 2012 21:31
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
Hi,
do you mind to test with the latest 2.3.1-SNAPSHOT, cause there had been an issue with Pax-Web [1]
which should be fixed by now.
regards, Achim
[1] - http://team.ops4j.org/browse/PAXWEB-426
2012/11/6 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=0>>
Hi,
Thanks for the advice, that helped me to progress a lot. Now it seems that my servlet looks to be deployed ok, but the context-mapping isn’t working for some reason or other.
web:list shows one entry:
State = Active
Web-State = Deployed
Web-ContextPath = /portal
But when I try to browse http://localhost:8181/portal I get HTTP error 404, not found.
When I look at the log, I always get these kinds of entries:
Path [/portal] does not match any context.
I’ve tried numerous different URL combinations there (like /portal/portal and /portal1/portal as portal1 is the name of the Karaf instance where the war is deployed) but nothing seems to work.
In the manifest I have Web-ContextPath: portal so AFAIU, the application should be on the above URL.
I’m trying to follow the infor here http://leshazlewood.com/2010/09/08/osgi-maven-pax-and-web-applications/ as much as possible, but I don’t have any jsp-pages there. The main servlet is mapped just on /
So, AFAIU, Karaf + Pax seem to deploy my OSGIfied WAR-bundle ok, no errors on log at least, but for some reason the main servlet inside the war just can’t be reached via the URL that I’d assume it should be.
Any ideas how to proceed would be greatly appreciated…
- Petri
From: Achim Nierbeck [via Karaf] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=1>]
Sent: 5. marraskuuta 2012 15:50
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
Hi,
which version of Karaf do you use?
Second, what does the karaf.log say?
How does your war look like, did you add the required OSGi-Manifest entries to it?
if not, you need to install it with
install -s webbundle:mvn:url
What does the web:list command list when used?
Besides that if you want to debug, you should start Karaf in debug mode by using
"karaf.sh debug" (or "karaf.bat debug" on windows) on comandline.
The sources for the web-extender can be found at OPS4j Pax-Web, see [1] to [3]
regards, Achim
[1] - http://team.ops4j.org/wiki/display/ops4j/Open+Participation+Software+for+Java
[2] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
[3] - https://github.com/ops4j/org.ops4j.pax.web
2012/11/5 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026686&i=0>>
I have a WAR-packaged application that runs fine on Tomcat.
Now I'm trying to get it to run on Karaf with jetty. I've installed jetty +
war features and I see jetty running on 8181 and get the page not found
error when browsing the root.
I've osgified my manifest as instructed here:
http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me it
looks ok.
But when I drop the WAR into the deploy-folder, nothing much really happens.
I do see the installer writing "installed... .war" -text and list shows that
the application is there in Installed-state. But nothing else happens.
The application should be bound to /portal-endpoint but navigating there
with a browser just gives the same page not found error and nothing gets
output on the log.
Any ideas how to proceed with debugging the problem?
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
Sent from the Karaf - User 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/>
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026686.html
To start a new topic under Karaf - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=2><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4026701&i=3>>
To unsubscribe from Karaf - User, click here< NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026700.html
Sent from the Karaf - User 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/>
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026701.html
To start a new topic under Karaf - User, email ml-node+s922171n930749h57@n3.nabble.com<ma...@n3.nabble.com>
To unsubscribe from Karaf - User, click here<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8OTMwNzQ5fDU5NTY5OTMzOA==>.
NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026703.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: How to debug non-working war-deployment?
Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,
do you mind to test with the latest 2.3.1-SNAPSHOT, cause there had been an
issue with Pax-Web [1]
which should be fixed by now.
regards, Achim
[1] - http://team.ops4j.org/browse/PAXWEB-426
2012/11/6 PJR69 <pe...@insta.fi>
> Hi,
>
> Thanks for the advice, that helped me to progress a lot. Now it seems that
> my servlet looks to be deployed ok, but the context-mapping isn’t working
> for some reason or other.
>
> web:list shows one entry:
> State = Active
> Web-State = Deployed
> Web-ContextPath = /portal
>
> But when I try to browse http://localhost:8181/portal I get HTTP error
> 404, not found.
>
> When I look at the log, I always get these kinds of entries:
> Path [/portal] does not match any context.
>
> I’ve tried numerous different URL combinations there (like /portal/portal
> and /portal1/portal as portal1 is the name of the Karaf instance where the
> war is deployed) but nothing seems to work.
>
> In the manifest I have Web-ContextPath: portal so AFAIU, the application
> should be on the above URL.
>
> I’m trying to follow the infor here
> http://leshazlewood.com/2010/09/08/osgi-maven-pax-and-web-applications/as much as possible, but I don’t have any jsp-pages there. The main servlet
> is mapped just on /
>
> So, AFAIU, Karaf + Pax seem to deploy my OSGIfied WAR-bundle ok, no errors
> on log at least, but for some reason the main servlet inside the war just
> can’t be reached via the URL that I’d assume it should be.
>
> Any ideas how to proceed would be greatly appreciated…
>
>
> - Petri
>
>
> From: Achim Nierbeck [via Karaf] [mailto:
> ml-node+s922171n4026686h4@n3.nabble.com]
> Sent: 5. marraskuuta 2012 15:50
> To: Riipinen Petri
> Subject: Re: How to debug non-working war-deployment?
>
> Hi,
>
> which version of Karaf do you use?
> Second, what does the karaf.log say?
>
> How does your war look like, did you add the required OSGi-Manifest
> entries to it?
> if not, you need to install it with
> install -s webbundle:mvn:url
>
> What does the web:list command list when used?
>
> Besides that if you want to debug, you should start Karaf in debug mode by
> using
> "karaf.sh debug" (or "karaf.bat debug" on windows) on comandline.
>
> The sources for the web-extender can be found at OPS4j Pax-Web, see [1] to
> [3]
>
> regards, Achim
>
> [1] -
> http://team.ops4j.org/wiki/display/ops4j/Open+Participation+Software+for+Java
> [2] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
> [3] - https://github.com/ops4j/org.ops4j.pax.web
>
> 2012/11/5 PJR69 <[hidden
> email]</user/SendEmail.jtp?type=node&node=4026686&i=0>>
> I have a WAR-packaged application that runs fine on Tomcat.
>
> Now I'm trying to get it to run on Karaf with jetty. I've installed jetty +
> war features and I see jetty running on 8181 and get the page not found
> error when browsing the root.
>
> I've osgified my manifest as instructed here:
> http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me it
> looks ok.
>
> But when I drop the WAR into the deploy-folder, nothing much really
> happens.
> I do see the installer writing "installed... .war" -text and list shows
> that
> the application is there in Installed-state. But nothing else happens.
>
> The application should be bound to /portal-endpoint but navigating there
> with a browser just gives the same page not found error and nothing gets
> output on the log.
>
> Any ideas how to proceed with debugging the problem?
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
> Sent from the Karaf - User 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/>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026686.html
> To start a new topic under Karaf - User, email
> ml-node+s922171n930749h57@n3.nabble.com<mailto:
> ml-node+s922171n930749h57@n3.nabble.com>
> To unsubscribe from Karaf - User, click here<
> http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8OTMwNzQ5fDU5NTY5OTMzOA==
> >.
> NAML<
> http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026700.html
> Sent from the Karaf - User 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: How to debug non-working war-deployment?
Posted by PJR69 <pe...@insta.fi>.
Hi,
Thanks for the advice, that helped me to progress a lot. Now it seems that my servlet looks to be deployed ok, but the context-mapping isn’t working for some reason or other.
web:list shows one entry:
State = Active
Web-State = Deployed
Web-ContextPath = /portal
But when I try to browse http://localhost:8181/portal I get HTTP error 404, not found.
When I look at the log, I always get these kinds of entries:
Path [/portal] does not match any context.
I’ve tried numerous different URL combinations there (like /portal/portal and /portal1/portal as portal1 is the name of the Karaf instance where the war is deployed) but nothing seems to work.
In the manifest I have Web-ContextPath: portal so AFAIU, the application should be on the above URL.
I’m trying to follow the infor here http://leshazlewood.com/2010/09/08/osgi-maven-pax-and-web-applications/ as much as possible, but I don’t have any jsp-pages there. The main servlet is mapped just on /
So, AFAIU, Karaf + Pax seem to deploy my OSGIfied WAR-bundle ok, no errors on log at least, but for some reason the main servlet inside the war just can’t be reached via the URL that I’d assume it should be.
Any ideas how to proceed would be greatly appreciated…
- Petri
From: Achim Nierbeck [via Karaf] [mailto:ml-node+s922171n4026686h4@n3.nabble.com]
Sent: 5. marraskuuta 2012 15:50
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
Hi,
which version of Karaf do you use?
Second, what does the karaf.log say?
How does your war look like, did you add the required OSGi-Manifest entries to it?
if not, you need to install it with
install -s webbundle:mvn:url
What does the web:list command list when used?
Besides that if you want to debug, you should start Karaf in debug mode by using
"karaf.sh debug" (or "karaf.bat debug" on windows) on comandline.
The sources for the web-extender can be found at OPS4j Pax-Web, see [1] to [3]
regards, Achim
[1] - http://team.ops4j.org/wiki/display/ops4j/Open+Participation+Software+for+Java
[2] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
[3] - https://github.com/ops4j/org.ops4j.pax.web
2012/11/5 PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026686&i=0>>
I have a WAR-packaged application that runs fine on Tomcat.
Now I'm trying to get it to run on Karaf with jetty. I've installed jetty +
war features and I see jetty running on 8181 and get the page not found
error when browsing the root.
I've osgified my manifest as instructed here:
http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me it
looks ok.
But when I drop the WAR into the deploy-folder, nothing much really happens.
I do see the installer writing "installed... .war" -text and list shows that
the application is there in Installed-state. But nothing else happens.
The application should be bound to /portal-endpoint but navigating there
with a browser just gives the same page not found error and nothing gets
output on the log.
Any ideas how to proceed with debugging the problem?
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
Sent from the Karaf - User 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/>
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026686.html
To start a new topic under Karaf - User, email ml-node+s922171n930749h57@n3.nabble.com<ma...@n3.nabble.com>
To unsubscribe from Karaf - User, click here<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8OTMwNzQ5fDU5NTY5OTMzOA==>.
NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026700.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: How to debug non-working war-deployment?
Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,
which version of Karaf do you use?
Second, what does the karaf.log say?
How does your war look like, did you add the required OSGi-Manifest entries
to it?
if not, you need to install it with
install -s webbundle:mvn:url
What does the web:list command list when used?
Besides that if you want to debug, you should start Karaf in debug mode by
using
"karaf.sh debug" (or "karaf.bat debug" on windows) on comandline.
The sources for the web-extender can be found at OPS4j Pax-Web, see [1] to
[3]
regards, Achim
[1] -
http://team.ops4j.org/wiki/display/ops4j/Open+Participation+Software+for+Java
[2] - http://team.ops4j.org/wiki/display/paxweb/Pax+Web
[3] - https://github.com/ops4j/org.ops4j.pax.web
2012/11/5 PJR69 <pe...@insta.fi>
> I have a WAR-packaged application that runs fine on Tomcat.
>
> Now I'm trying to get it to run on Karaf with jetty. I've installed jetty +
> war features and I see jetty running on 8181 and get the page not found
> error when browsing the root.
>
> I've osgified my manifest as instructed here:
> http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me it
> looks ok.
>
> But when I drop the WAR into the deploy-folder, nothing much really
> happens.
> I do see the installer writing "installed... .war" -text and list shows
> that
> the application is there in Installed-state. But nothing else happens.
>
> The application should be bound to /portal-endpoint but navigating there
> with a browser just gives the same page not found error and nothing gets
> output on the log.
>
> Any ideas how to proceed with debugging the problem?
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
> Sent from the Karaf - User 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: How to debug non-working war-deployment?
Posted by PJR69 <pe...@insta.fi>.
Hi,
Ok, I did as you suggest, but exactly the same thing happened… ☹ No errors printed anywhere and the file just appears on the osgi:list in Installed-state.
- Petri
From: Charles Moulliard-2 [via Karaf] [mailto:ml-node+s922171n4026683h11@n3.nabble.com]
Sent: 5. marraskuuta 2012 15:19
To: Riipinen Petri
Subject: Re: How to debug non-working war-deployment?
Hi,
Instead of dropping your osgified war in deploy directory, can you deploy it using "install -s file://location<file:///\\location>" to see the error generated by Karaf.
Regards,
On Mon, Nov 5, 2012 at 2:12 PM, PJR69 <[hidden email]</user/SendEmail.jtp?type=node&node=4026683&i=0>> wrote:
I have a WAR-packaged application that runs fine on Tomcat.
Now I'm trying to get it to run on Karaf with jetty. I've installed jetty +
war features and I see jetty running on 8181 and get the page not found
error when browsing the root.
I've osgified my manifest as instructed here:
http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me it
looks ok.
But when I drop the WAR into the deploy-folder, nothing much really happens.
I do see the installer writing "installed... .war" -text and list shows that
the application is there in Installed-state. But nothing else happens.
The application should be bound to /portal-endpoint but navigating there
with a browser just gives the same page not found error and nothing gets
output on the log.
Any ideas how to proceed with debugging the problem?
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
Sent from the Karaf - User mailing list archive at Nabble.com.
--
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
________________________________
If you reply to this email, your message will be added to the discussion below:
http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026683.html
To start a new topic under Karaf - User, email ml-node+s922171n930749h57@n3.nabble.com<ma...@n3.nabble.com>
To unsubscribe from Karaf - User, click here<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8OTMwNzQ5fDU5NTY5OTMzOA==>.
NAML<http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682p4026684.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: How to debug non-working war-deployment?
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
I won't change.
My suggestion is to set the log level to debug to see what's happen exactly:
log:set DEBUG
Regards
JB
On 11/05/2012 02:17 PM, Charles Moulliard wrote:
> Hi,
>
> Instead of dropping your osgified war in deploy directory, can you
> deploy it using "install -s file://location" to see the error generated
> by Karaf.
>
> Regards,
>
>
>
>
> On Mon, Nov 5, 2012 at 2:12 PM, PJR69 <petri.riipinen@insta.fi
> <ma...@insta.fi>> wrote:
>
> I have a WAR-packaged application that runs fine on Tomcat.
>
> Now I'm trying to get it to run on Karaf with jetty. I've installed
> jetty +
> war features and I see jetty running on 8181 and get the page not found
> error when browsing the root.
>
> I've osgified my manifest as instructed here:
> http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me it
> looks ok.
>
> But when I drop the WAR into the deploy-folder, nothing much really
> happens.
> I do see the installer writing "installed... .war" -text and list
> shows that
> the application is there in Installed-state. But nothing else happens.
>
> The application should be bound to /portal-endpoint but navigating there
> with a browser just gives the same page not found error and nothing gets
> output on the log.
>
> Any ideas how to proceed with debugging the problem?
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
>
>
>
> --
> Charles Moulliard
> Apache Committer / Sr. Enterprise Architect (RedHat)
> Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
>
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: How to debug non-working war-deployment?
Posted by Charles Moulliard <ch...@gmail.com>.
Hi,
Instead of dropping your osgified war in deploy directory, can you deploy
it using "install -s file://location" to see the error generated by Karaf.
Regards,
On Mon, Nov 5, 2012 at 2:12 PM, PJR69 <pe...@insta.fi> wrote:
> I have a WAR-packaged application that runs fine on Tomcat.
>
> Now I'm trying to get it to run on Karaf with jetty. I've installed jetty +
> war features and I see jetty running on 8181 and get the page not found
> error when browsing the root.
>
> I've osgified my manifest as instructed here:
> http://team.ops4j.org/wiki/display/paxweb/OSGi-fy+your+WAR and to me it
> looks ok.
>
> But when I drop the WAR into the deploy-folder, nothing much really
> happens.
> I do see the installer writing "installed... .war" -text and list shows
> that
> the application is there in Installed-state. But nothing else happens.
>
> The application should be bound to /portal-endpoint but navigating there
> with a browser just gives the same page not found error and nothing gets
> output on the log.
>
> Any ideas how to proceed with debugging the problem?
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/How-to-debug-non-working-war-deployment-tp4026682.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com