ops4j / org.ops4j.pax.runner

Multi Framework OSGi Runner
http://team.ops4j.org/wiki/display/paxrunner/
47 stars 39 forks source link

Can't run PAX-RUNNER with a bundle defined with extension /war & --log=debug does not work [PAXRUNNER-295] #316

Closed ops4j-issues closed 15 years ago

ops4j-issues commented 15 years ago

Charles Moulliard created PAXRUNNER-295

Hi,

I try to run PAX-runner with the following bundle list but I receive an error :

mvn:org.ops4j.pax.logging/pax-logging-api
mvn:org.ops4j.pax.logging/pax-logging-service
mvn:org.ops4j.pax.web/pax-web-bundle
mvn:org.apache.wicket/wicket/1.4.1
mvn:org.apache.wicket/wicket-ioc/1.4.1
mvn:org.apache.wicket/wicket-spring/1.4.1
mvn:org.apache.wicket/wicket-extensions/1.4.1
mvn:com.xpectis.x3s/helloworld/1.0-SNAPSHOT/war

-> Downloading bundles...
-> mvn:com.xpectis.x3s/helloworld/1.0-SNAPSHOT/war : connecting...
_
/ /
/ / Oops, there has been a problem!
/ /
/_/ URL mvn:com.xpectis.x3s/helloworld/1.0-SNAPSHOT/war could not be resolved.

/__/ Use --log=debug to see details.

REMARK : OPTION --log=debug is not accepted

pax-run --lr "C:/.m2/repository" --log=debug helloworld.bundles

org.ops4j.pax.runner.provision.MalformedSpecificationException: Specification debug could not be used


Fixed in: (none) Votes: 0, Watches: 1

ops4j-issues commented 15 years ago

Alin Dreghiciu commented

About --log=debug option: On windows you have to quote it as windows will remove teh = sign.
So use "--log=debug".

ops4j-issues commented 15 years ago

Charles Moulliard commented

In debug mode, here is the exception reported :

-> Exception catched during execution:
java.lang.RuntimeException: org.ops4j.pax.runner.platform.PlatformException: mvn:com.xpectis.x3s/helloworld/1.0-SNAPSHOT/war is not a valid bundle
at org.ops4j.pax.runner.Run.startPlatform(Run.java:665)
at org.ops4j.pax.runner.Run.start(Run.java:220)
at org.ops4j.pax.runner.Run.main(Run.java:147)
at org.ops4j.pax.runner.Run.main(Run.java:120)
Caused by: org.ops4j.pax.runner.platform.PlatformException: mvn:com.xpectis.x3s/helloworld/1.0-SNAPSHOT/war is not a valid bundle
at org.ops4j.pax.runner.platform.internal.PlatformImpl.validateBundleAndGetFilename(PlatformImpl.java:736)
at org.ops4j.pax.runner.platform.internal.PlatformImpl.download(PlatformImpl.java:617)
at org.ops4j.pax.runner.platform.internal.PlatformImpl.downloadBundles(PlatformImpl.java:390)
at org.ops4j.pax.runner.platform.internal.PlatformImpl.start(PlatformImpl.java:181)
at org.ops4j.pax.runner.Run.startPlatform(Run.java:661)
... 3 more

If have put the war used as example (and generated from apache wicket web site) in attachment of the ticket : PAXWEB-163

ops4j-issues commented 15 years ago

Alin Dreghiciu commented

Pax Runner is right :wink: Your war is not an osgi bundle so it cannot be deployed into an OSGi framework as is.
That is why we have the war: protocol handler. So, add war: in front of your war url as in:

war:mvn:com.xpectis.x3s/helloworld/1.0-SNAPSHOT/war

Simple? :wink:

ops4j-issues commented 15 years ago

Charles Moulliard commented

Thx.

I have modified the bundles file as you propose and add the line "--log=debug" between double quotes. Felix is started but the jetty web server does not answer on the port 8080

here is the bundles list loaded :

mvn:org.ops4j.pax.logging/pax-logging-api
mvn:org.ops4j.pax.logging/pax-logging-service
mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jetty-bundle/6.1.14_1
mvn:org.ops4j.pax.web/pax-web-bundle
mvn:org.apache.wicket/wicket/1.4.1
mvn:org.apache.wicket/wicket-ioc/1.4.1
mvn:org.apache.wicket/wicket-spring/1.4.1
mvn:org.apache.wicket/wicket-extensions/1.4.1
war:mvn:com.xpectis.x3s/helloworld/1.0-SNAPSHOT/war?Webapp-Context=helloworld
ops4j-issues commented 15 years ago

Alin Dreghiciu commented

  1. When framework is started, are all your bundles started?
    2. Do you see pax web related logging?
ops4j-issues commented 15 years ago

Charles Moulliard commented

All the bundles are started :

-> ps
START LEVEL 6
   ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (1.8.1)
[   1] [Active     ] [    5] OPS4J Pax Logging - API (1.4)
[   2] [Active     ] [    5] OPS4J Pax Logging - Service (1.4)
[   3] [Active     ] [    5] geronimo-servlet_2.5_spec (1.1.2)
[   4] [Active     ] [    5] Apache ServiceMix Bundles: jetty-6.1.14 (6.1.14.1)
[   5] [Active     ] [    5] OPS4J Pax Web - Web Container (0.6.0)
[   6] [Active     ] [    5] Wicket (1.4.1)
[   7] [Active     ] [    5] Wicket IoC common code (1.4.1)
[   8] [Active     ] [    5] Wicket Spring Integration (1.4.1)
[   9] [Active     ] [    5] Wicket Extensions (1.4.1)
[  10] [Active     ] [    5] mvn_com.xpectis.x3s_helloworld_1.0-SNAPSHOT_war (0)
[  11] [Active     ] [    1] osgi.compendium (4.1.0.build-200702212030)
[  12] [Active     ] [    1] Apache Felix Shell Service (1.2.0)
[  13] [Active     ] [    1] Apache Felix Shell TUI (1.2.0)

but I don't see any trace in the console log. Here is what I see if I stop/start jetty (bundle 4)

-> stop 4
-> [FelixDispatchQueue] DEBUG org.apache.servicemix.bundles.jetty-bundle - BundleEvent STOPPED

-> start 4
-> [FelixDispatchQueue] DEBUG org.apache.servicemix.bundles.jetty-bundle - BundleEvent STARTED

-> ps
ops4j-issues commented 15 years ago

Charles Moulliard commented

Jetty works. I have stopped and restarted Felix. Nevertheless, the Wicket application does not work (same problem as also oberser on Apache Karaf using Wicket 1.4 and Pax Web 0.6.0)

-> org.ops4j.pax.logging.pax-logging-api[org.ops4j.pax.logging.internal.Activator] : Enabling SLF4J API support.
org.ops4j.pax.logging.pax-logging-api[org.ops4j.pax.logging.internal.Activator] : Enabling Jakarta Commons Logging API support.
org.ops4j.pax.logging.pax-logging-api[org.ops4j.pax.logging.internal.Activator] : Enabling Log4J API support.
org.ops4j.pax.logging.pax-logging-api[org.ops4j.pax.logging.internal.Activator] : Enabling Avalon Logger API support.
org.ops4j.pax.logging.pax-logging-api[org.ops4j.pax.logging.internal.Activator] : Enabling JULI Logger API support.
[FelixDispatchQueue] DEBUG org.ops4j.pax.logging.pax-logging-service - BundleEvent STARTED
[FelixDispatchQueue] DEBUG org.apache.geronimo.specs.geronimo-servlet_2.5_spec - BundleEvent STARTED
[FelixDispatchQueue] DEBUG org.apache.servicemix.bundles.jetty-bundle - BundleEvent STARTED
[FelixStartLevel] INFO org.mortbay.jetty - Logging to org.ops4j.pax.web.service.internal.util.JCLLogger@d0a5d9 via org.ops4j.pax.web.service.internal.
util.JCLLogger
[FelixStartLevel] INFO org.ops4j.pax.web.service.internal.Activator - Starting pax http service
[FelixStartLevel] DEBUG org.ops4j.pax.web.pax-web-bundle - ServiceEvent REGISTERED

-> [FelixStartLevel] WARN org.ops4j.pax.web.service.internal.ConfigurationImpl - Reading configuration property org.ops4j.pax.web.session.timeout has
failed
[FelixStartLevel] INFO org.ops4j.pax.web.service.internal.ServerControllerImpl - configuring server: ServerControllerImpl{state=UNCONFIGURED} -> Confi
gurationImpl{http enabled=true,http port=8080,http secure enabled=false,http secure port=8443,ssl keystore=C:\Documents and Settings\Charlesm.STREAMLI
NED\.keystore,ssl keystoreType=null,session timeout=null,listening addresses=[Ljava.lang.String;@121f1d}
[FelixStartLevel] INFO org.ops4j.pax.web.service.internal.ServerControllerImpl - starting server: ServerControllerImpl{state=STOPPED}
[FelixStartLevel] INFO org.ops4j.pax.web.service.internal.JettyServerImpl - adding connectorNIOSocketConnectorWrapper@0.0.0.0:8080
[FelixStartLevel] DEBUG org.mortbay.jetty - Container JettyServerWrapper@1630ab9 + NIOSocketConnectorWrapper@0.0.0.0:8080 as connector
[FelixStartLevel] WARN org.ops4j.pax.web.service.internal.ConfigurationImpl - Reading configuration property org.ops4j.pax.web.session.timeout has fai
led
[FelixStartLevel] INFO org.ops4j.pax.web.service.internal.JettyServerImpl - starting JettyServerImpl{}
[FelixStartLevel] INFO org.mortbay.jetty - jetty-6.1.x
[FelixStartLevel] DEBUG org.mortbay.jetty - Container JettyServerWrapper@1630ab9 + org.mortbay.thread.QueuedThreadPool@1e8a1f6 as threadpool
[FelixStartLevel] DEBUG org.mortbay.jetty - started org.mortbay.thread.QueuedThreadPool@1e8a1f6
[FelixStartLevel] DEBUG org.mortbay.jetty - starting JettyServerWrapper@1630ab9
[FelixStartLevel] DEBUG org.mortbay.jetty - started org.mortbay.jetty.nio.SelectChannelConnector$1@10f11b8
[FelixStartLevel] INFO org.mortbay.jetty - Started NIOSocketConnectorWrapper@0.0.0.0:8080
[FelixStartLevel] DEBUG org.mortbay.jetty - started NIOSocketConnectorWrapper@0.0.0.0:8080
[FelixStartLevel] DEBUG org.mortbay.jetty - started JettyServerWrapper@1630ab9
[FelixStartLevel] WARN org.ops4j.pax.web.service.internal.ConfigurationImpl - Reading configuration property org.ops4j.pax.web.session.timeout has fai
led
[FelixStartLevel] DEBUG org.ops4j.pax.web.pax-web-bundle - ServiceEvent REGISTERED
[FelixStartLevel] INFO org.ops4j.pax.web.service.internal.Activator - Started pax http service
[FelixDispatchQueue] DEBUG org.ops4j.pax.web.pax-web-bundle - BundleEvent STARTED
[FelixDispatchQueue] DEBUG org.apache.wicket.wicket - BundleEvent RESOLVED
[FelixDispatchQueue] DEBUG org.apache.wicket.wicket - BundleEvent STARTED
[FelixDispatchQueue] DEBUG org.apache.wicket.wicket-ioc - BundleEvent RESOLVED
[FelixDispatchQueue] DEBUG org.apache.wicket.wicket-ioc - BundleEvent STARTED
[FelixDispatchQueue] DEBUG org.apache.wicket.wicket-spring - BundleEvent RESOLVED
[FelixDispatchQueue] DEBUG org.apache.wicket.wicket-spring - BundleEvent STARTED
[FelixDispatchQueue] DEBUG org.apache.wicket.wicket-extensions - BundleEvent RESOLVED
[FelixDispatchQueue] DEBUG org.apache.wicket.wicket-extensions - BundleEvent STARTED
[FelixDispatchQueue] DEBUG mvn_com.xpectis.x3s_helloworld_1.0-SNAPSHOT_war - BundleEvent RESOLVED
[FelixDispatchQueue] DEBUG mvn_com.xpectis.x3s_helloworld_1.0-SNAPSHOT_war - BundleEvent STARTED
[FelixDispatchQueue] DEBUG org.apache.felix.framework - BundleEvent STARTED
[FelixDispatchQueue] DEBUG org.apache.felix.framework - FrameworkEvent STARTED
[22743805@qtp0-1 - /] DEBUG org.mortbay.jetty - REQUEST / on org.mortbay.jetty.HttpConnection@18b3364
[22743805@qtp0-1 - /] DEBUG org.mortbay.jetty - RESPONSE /  200
[22743805@qtp0-1 - /favicon.ico] DEBUG org.mortbay.jetty - REQUEST /favicon.ico on org.mortbay.jetty.HttpConnection@18b3364
[22743805@qtp0-1 - /favicon.ico] DEBUG org.mortbay.jetty - RESPONSE /favicon.ico  200
[22743805@qtp0-1 - /favicon.ico] DEBUG org.mortbay.jetty - REQUEST /favicon.ico on org.mortbay.jetty.HttpConnection@18b3364
[22743805@qtp0-1 - /favicon.ico] DEBUG org.mortbay.jetty - RESPONSE /favicon.ico  200
[22743805@qtp0-1 - /helloworld] DEBUG org.mortbay.jetty - REQUEST /helloworld on org.mortbay.jetty.HttpConnection@18b3364
[22743805@qtp0-1 - /helloworld] DEBUG org.mortbay.jetty - RESPONSE /helloworld  200
[22743805@qtp0-1 - /helloworld/] DEBUG org.mortbay.jetty - REQUEST /helloworld/ on org.mortbay.jetty.HttpConnection@18b3364
[22743805@qtp0-1 - /helloworld/] DEBUG org.mortbay.jetty - RESPONSE /helloworld/  200

The bundle is deployed like this : war:mvn:com.xpectis.x3s/helloworld/1.0-SNAPSHOT/war?Webapp-Context=helloworld

but the following url does not work : http://127.0.0.1:8080/helloworld/

and no Wicket DEVELOPMENT message is displayed in the console

ops4j-issues commented 15 years ago

Alin Dreghiciu commented

I close this issue as at it looks like tehre is not problem with Pax Runner. The fact that Pax Web may not work is tracked in another issue.