On 06/03/2008, Sriram Muthuswamy Chittathoor <[EMAIL PROTECTED]>
wrote:
>
> Okay I built the Spring Petclinic from scratch and then from their dist
> directory  I did what u mentioned (it has petclinic.war)
>
> "pax-run wrap:file:petclinic.war --profiles=war
> mvn:org.ops4j.pax.web/pax-web-jsp"
>
>
>
> This is what I get (So what did I do wrong).


on Windows you need quotes around the --profiles=war option, for example:

  pax-run wrap:file:petclinic.war "--profiles=war" mvn:org.ops4j.pax.web
/pax-web-jsp

because otherwise the Windows cmd shell will strip the equals (=) and treat
the --profiles and war string as separate options - this is a known
bug/feature
with the Windows shell :(

( see http://alias-i.com/lingpipe/web/demo-cmd.html and
  http://www.openlaszlo.org/jira/browse/lpp-4142 for other
  places which mention this quirk when using cmd.exe )

HTH

D:\usr\projects\spring-framework-2.5.1\samples\petclinic\dist>pax-run
>
> wrap:file:
> petclinic.war --profiles=war mvn:org.ops4j.pax.web/pax-web-jsp
>
>     ______  ________  __  __
>    / __  / /  __   / / / / /
>   /  ___/ /  __   / _\ \ _/
>   /  /    /  / /  / / _\ \
> /__/    /__/ /__/ /_/ /_/
>
> Pax Runner from OPS4J - http://www.ops4j.org
> --------------------------------------------
>
>   -> Using config [classpath:META-INF/runner.properties]
>   -> Creating replaceable service for [interface
> org.osgi.service.obr.RepositoryA
> dmin]
>   -> Creating service collection for [interface
> org.osgi.service.obr.RepositoryAd
> min]
>   -> Added service with reference
> [[org.osgi.service.obr.RepositoryAdmin]]
>   -> Service changed [null]  ->
> [org.apache.felix.bundlerepository.RepositoryAdmi
> [EMAIL PROTECTED]
>   -> Provision from [wrap:file:petclinic.war]
>   -> Provision from [scan-bundle:wrap:file:petclinic.war]
>   -> Installing bundle
> [{location=wrap:file:petclinic.war,startlevel=null,shouldS
> tart=true,shouldUpdate=false}]
>   -> Provision from [war]
>   -> Provision from [scan-bundle:war]
>   -> Installing bundle
> [{location=war,startlevel=null,shouldStart=true,shouldUpda
> te=false}]
>          ___
>         /  /
>        /  / Ops, there has been a problem!
>       /  /
>      /__/
>     ___
>    /__/
>
>   -> java.lang.RuntimeException: org.osgi.framework.BundleException:
> Invalid loca
> tion [war]
> java.lang.RuntimeException: org.osgi.framework.BundleException: Invalid
> location
>   [war]
>         at org.ops4j.pax.runner.Run.installBundles(Run.java:313)
>         at org.ops4j.pax.runner.Run.start(Run.java:138)
>
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Alin Dreghiciu
>
> Sent: Saturday, February 23, 2008 8:40 AM
> To: General OPS4J
> Subject: Re: Error while running Spring Petclinic in PAX Web WAR
> Extender
>
> At a first glance I would say that your problem is the spring jar. If
> you used a normal zip tool (other then java jar tool) to change things
> inside the jar as for example the manifest file you may end up with an
> invalid jar file. Jars manifest are expected by java to be in a
> special place in the jar. But I'm not too much on an expert in this
> mater. I can only say to yo hat I encounter strange errors when I
> tried to change manifest file by another tool then java jar.
>
> Back tour problem, either the manifest file is not find at all, either
> the Bundle-ClassPath header is not found as the following log message
> says. This is from the jsp extender and the log message is showing the
> results of looking for Bundle-ClassPath manifest entry in the jar and
> selecting the entries that ends with .jar:
> [Felix Shell TUI] DEBUG
> org.ops4j.pax.web.jsp.internal.JasperClassLoader - Bundle-ClassPath
> URLs: []
>
> To verify that you have a valid jar, do this:
> provision only the spring-petclinic jar into Felix using pax runner
> and do headers <id of spring-petclinic jar bundle>
> as this should display all headers from your manifest. If there are
> headers displayed it means that your jar may be packaged okay.If
> Bundle-ClassPath does not show up verify that the maniest does not
> contain empty lines, as the spec says that main manifest headers are
> those till the first empty line.
>
> You may also try this:
> Build spring petclinic as explained by spring and do not change the
> jar, then provision spring petclinic jar using:
> pax-run wrap:file:petclinic.war --profiles=war
> mvn:org.ops4j.pax.web/pax-web-jsp
> and see if it works.
>
> Alin
>
> On Fri, Feb 22, 2008 at 11:37 PM, Sriram Muthuswamy Chittathoor
> <[EMAIL PROTECTED]> wrote:
> > Hi:
> >
> >  Thanks for the reply.  Please check the attachment for the steps from
> >  the beginning
> >
> >
> >  Please check the section at the end of the file which says "BUILDING
> >  OSGIFIED Spring Petclinic" for what I had to do to OSGIFY Spring
> >  petclinic.
> >  I am suspecting this is where the error is.
> >
> >  Thx
> >
> >  Sriram C
> >
> >
> >
> >  -----Original Message-----
> >  From: [EMAIL PROTECTED]
> >  [mailto:[EMAIL PROTECTED] On Behalf Of Alin Dreghiciu
> >  Sent: Friday, February 22, 2008 1:32 PM
> >  To: General OPS4J
> >  Subject: Re: Error while running Spring Petclinic in PAX Web WAR
> >  Extender
> >
> >  Hi,
> >
> >  I just test it again and it works fine in my case. Can you provide
> >  more info? How do you provision? Using Pax Runner? If yes,can you
> send
> >  me the command you are using and the log output (put it in an
> >  attachment).
> >
> >  Alin
> >
> >  On Thu, Feb 21, 2008 at 11:30 PM, Sriram Muthuswamy Chittathoor
> >  <[EMAIL PROTECTED]> wrote:
> >  > Hi:
> >  >
> >  >  Why am I getting this error while running  Spring-Petclinic
> example
> >  >  within the PAX web extender WAR. The pax web extender seems to be
> >  >  depending on a spring.jar (which has the
> >  >  org.springframework.web.context.ContextLoaderListener class).
> This
> >  jar
> >  >  is embedded with the spring petclinic WAR's WEB-INF/lib directory
> >  >
> >  >  Any help is appeciated
> >  >
> >  >  Thx
> >  >
> >  >  Sriram C
> >  >
> >  >
> >  >  *******************  ERROR
> ******************************************
> >  >  [Felix Shell TUI] DEBUG org.apache.jasper.servlet.JspServlet -
> >  >  IMPORTANT: Do not
> >  >   modify the generated servlets
> >  >  [Felix Shell TUI] ERROR
> >  >  org.ops4j.pax.web.extender.war.internal.RegisterWebAppVi
> >  >  sitorWC - Registration exception. Skipping.
> >  >  java.lang.ClassNotFoundException:
> >  >  org.springframework.web.context.ContextLoaderListener
> >  >         at
> >  >  org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1479)
> >  >         at
> >  >
> org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:341)
> >  >         at
> >  >
> org.ops4j.pax.swissbox.core.BundleClassLoader.findClass(BundleClassLo
> >  >  ader.java:158)
> >  >         at
> >  >
> org.ops4j.pax.swissbox.core.BundleClassLoader.loadClass(BundleClassLo
> >  >  ader.java:176)
> >  >         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> >  >         at
> >  >
> org.ops4j.pax.web.extender.war.internal.RegisterWebAppVisitorHS.newIn
> >  >  stance(RegisterWebAppVisitorHS.java:202)
> >  >         at
> >  >
> org.ops4j.pax.web.extender.war.internal.RegisterWebAppVisitorWC.visit
> >  >  (RegisterWebAppVisitorWC.java:242)
> >  >         at
> >  >
> org.ops4j.pax.web.extender.war.internal.model.WebApp.accept(WebApp.ja
> >  >  va:488)
> >  >         at
> >  >
> org.ops4j.pax.web.extender.war.internal.WebAppPublisher$HttpServiceLi
> >  >  stener.register(WebAppPublisher.java:170)
> >  >         at
> >  >
> org.ops4j.pax.web.extender.war.internal.WebAppPublisher$HttpServiceLi
> >  >  stener.serviceChanged(WebAppPublisher.java:155)
> >  >         at
> >  >
> org.ops4j.pax.web.extender.war.internal.WebAppPublisher$HttpServiceLi
> >  >  stener.serviceChanged(WebAppPublisher.java:119)
> >  >         at
> >  >
> org.ops4j.pax.swissbox.tracker.ReplaceableService.setService(Replacea
> >  >  bleService.java:114)
> >  >         at
> >  >
> org.ops4j.pax.swissbox.tracker.ReplaceableService.access$100(Replacea
> >  >  bleService.java:28)
> >  >         at
> >  >
> org.ops4j.pax.swissbox.tracker.ReplaceableService$CollectionListener.
> >  >  serviceAdded(ReplaceableService.java:183)
> >  >         at
> >  >
> org.ops4j.pax.swissbox.tracker.ServiceCollection$Tracker.addingServic
> >  >  e(ServiceCollection.java:181)
> >  >         at
> >  >
> org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTrack
> >  >  er.java:1021)
> >  >         at
> >  >
> org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialServices(Ser
> >  >  viceTracker.java:882)
> >  >         at
> >  >  org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:289)
> >  >         at
> >  >  org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:228)
> >  >         at
> >  >
> org.ops4j.pax.swissbox.tracker.ServiceCollection.onStart(ServiceColle
> >  >  ction.java:139)
> >  >         at
> >  >
> org.ops4j.pax.swissbox.lifecycle.AbstractLifecycle$Stopped.start(Abst
> >  >  ractLifecycle.java:121)
> >  >         at
> >  >
> org.ops4j.pax.swissbox.lifecycle.AbstractLifecycle.start(AbstractLife
> >  >  cycle.java:49)
> >  >         at
> >  >
> org.ops4j.pax.swissbox.tracker.ReplaceableService.onStart(Replaceable
> >  >  Service.java:146)
> >  >         at
> >  >
> org.ops4j.pax.swissbox.lifecycle.AbstractLifecycle$Stopped.start(Abst
> >  >  ractLifecycle.java:121)
> >  >         at
> >  >
> org.ops4j.pax.swissbox.lifecycle.AbstractLifecycle.start(AbstractLife
> >  >  cycle.java:49)
> >  >         at
> >  >
> org.ops4j.pax.web.extender.war.internal.WebAppPublisher.publish(WebAp
> >  >
> >  >  _______________________________________________
> >  >  general mailing list
> >  >  general@lists.ops4j.org
> >  >  http://lists.ops4j.org/mailman/listinfo/general
> >  >
> >
> >  _______________________________________________
> >  general mailing list
> >  general@lists.ops4j.org
> >  http://lists.ops4j.org/mailman/listinfo/general
> >
> > _______________________________________________
> >  general mailing list
> >  general@lists.ops4j.org
> >  http://lists.ops4j.org/mailman/listinfo/general
> >
> >
>
> _______________________________________________
> general mailing list
> general@lists.ops4j.org
> http://lists.ops4j.org/mailman/listinfo/general
>
> _______________________________________________
> general mailing list
> general@lists.ops4j.org
> http://lists.ops4j.org/mailman/listinfo/general
>



-- 
Cheers, Stuart
_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to