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
D:\usr\alintest>pax-run mvn:org.ops4j.pax.web-extender/pax-web-ex-war
    ______  ________  __  __
   / __  / /  __   / / / / /
  /  ___/ /  __   / _\ \ _/
 /  /    /  / /  / / _\ \
/__/    /__/ /__/ /_/ /_/

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 [mvn:org.ops4j.pax.web-extender/pax-web-ex-war]
 -> Provision from [scan-bundle:mvn:org.ops4j.pax.web-extender/pax-web-ex-war]
 -> Installing bundle [{location=mvn:org.ops4j.pax.web-extender/pax-web-ex-war,s
tartlevel=null,shouldStart=true,shouldUpdate=false}]
 -> Downloading bundles...
 -> Execution environment [J2SE-1.6]
 -> Starting platform [Felix 1.0.3]. Runner has succesfully finished his job!

Welcome to Felix.
=================

-> ERROR: Error starting file:/D:/usr/alintest/runner/bundles/101630960.jar (org
.osgi.framework.BundleException: Unresolved package in bundle 1: package; (&(pac
kage=javax.servlet)(version>=2.1.0)))
org.osgi.framework.BundleException: Unresolved package in bundle 1: package; (&(
package=javax.servlet)(version>=2.1.0))
        at org.apache.felix.framework.Felix._resolveBundle(Felix.java:1699)
        at org.apache.felix.framework.Felix._startBundle(Felix.java:1566)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1519)
        at org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:11
04)
        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:258
)
        at java.lang.Thread.run(Thread.java:619)

->
->
->
->
-> ps
START LEVEL 6
   ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (1.0.3)
[   1] [Installed  ] [    5] OPS4J Pax Web Extender - WAR (0.3.0)
[   2] [Active     ] [    1] osgi.compendium (4.0.1)
[   3] [Active     ] [    1] Apache Felix Shell Service (1.0.0)
[   4] [Active     ] [    1] Apache Felix Shell TUI (1.0.0)
->
->
-> cd file:/D:/usr/alintest/runner/bundles/
-> ps
START LEVEL 6
   ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (1.0.3)
[   1] [Installed  ] [    5] OPS4J Pax Web Extender - WAR (0.3.0)
[   2] [Active     ] [    1] osgi.compendium (4.0.1)
[   3] [Active     ] [    1] Apache Felix Shell Service (1.0.0)
[   4] [Active     ] [    1] Apache Felix Shell TUI (1.0.0)
-> install pax-logging-api-1.0.0.jar
Bundle ID: 5
-> install pax-logging-service-1.0.0.jar
Bundle ID: 6
-> install pax-web-jsp-0.3.1.jar
Bundle ID: 7
-> install pax-web-service-0.3.1.jar
Bundle ID: 8
-> ps
START LEVEL 6
   ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (1.0.3)
[   1] [Installed  ] [    5] OPS4J Pax Web Extender - WAR (0.3.0)
[   2] [Active     ] [    1] osgi.compendium (4.0.1)
[   3] [Active     ] [    1] Apache Felix Shell Service (1.0.0)
[   4] [Active     ] [    1] Apache Felix Shell TUI (1.0.0)
[   5] [Installed  ] [    5] OPS4J - Pax Logging API (1.0.0)
[   6] [Installed  ] [    5] OPS4J - Pax Logging Service (1.0.0)
[   7] [Installed  ] [    5] OPS4J Pax Web - Jsp Support (0.3.1)
[   8] [Installed  ] [    5] OPS4J Pax Web - Service (0.3.1)
-> start 5
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.
-> start 6
-> [FelixDispatchQueue] INFO org.ops4j.pax.logging.pax-logging-service - BundleE
vent STARTED

-> start 7
-> [FelixDispatchQueue] INFO org.ops4j.pax.web.service - BundleEvent RESOLVED
[FelixDispatchQueue] INFO org.ops4j.pax.web.jsp - BundleEvent RESOLVED
[FelixDispatchQueue] INFO org.ops4j.pax.web.jsp - BundleEvent STARTED

-> start 8
2008-02-22 20:48:27.258::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
[Felix Shell TUI] INFO org.ops4j.pax.web.service.internal.Activator - Starting p
ax http service
[Felix Shell TUI] INFO org.ops4j.pax.web.service - ServiceEvent REGISTERED
[Felix Shell TUI] WARN org.ops4j.pax.web.service.internal.ConfigurationImpl - Re
ading configuration property org.ops4j.pax.web.session.timeout has failed
[Felix Shell TUI] INFO org.ops4j.pax.web.service.internal.ServerControllerImpl -
 configuring server: ServerControllerImpl{state=UNCONFIGURED} -> ConfigurationIm
pl{http enabled=true,http port=8080,http secure enabled=false,http secure port=8
443,ssl keystore=C:\Documents and Settings\ivy2961\.keystore,session timeout=nul
l}
[Felix Shell TUI] INFO org.ops4j.pax.web.service.internal.ServerControllerImpl -
 starting server: ServerControllerImpl{state=STOPPED}
[Felix Shell TUI] INFO org.ops4j.pax.web.service.internal.JettyServerImpl - addi
ng [EMAIL PROTECTED]:8080
[Felix Shell TUI] WARN org.ops4j.pax.web.service.internal.ConfigurationImpl - Re
ading configuration property org.ops4j.pax.web.session.timeout has failed
2008-02-22 20:48:27.336::INFO:  jetty-6.1.x[Felix Shell TUI] INFO org.ops4j.pax.
web.service.internal.JettyServerImpl - starting JettyServerImpl{}

2008-02-22 20:48:27.398::INFO:  Started [EMAIL PROTECTED]:8080
[Felix Shell TUI] INFO org.ops4j.pax.web.service - ServiceEvent REGISTERED
[Felix Shell TUI] INFO org.ops4j.pax.web.service.internal.Activator - Started pa
x http service
-> [FelixDispatchQueue] INFO org.ops4j.pax.web.service - BundleEvent STARTED


->
-> install petclinic.war
Bundle ID: 10
-> [FelixDispatchQueue] INFO spring.petclinic - BundleEvent INSTALLED

->
-> start 10
[FelixDispatchQueue] INFO spring.petclinic - BundleEvent RESOLVED
[FelixDispatchQueue] INFO spring.petclinic - BundleEvent STARTED
->
->
->
->
-> ps
START LEVEL 6
   ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (1.0.3)
[   1] [Installed  ] [    5] OPS4J Pax Web Extender - WAR (0.3.0)
[   2] [Active     ] [    1] osgi.compendium (4.0.1)
[   3] [Active     ] [    1] Apache Felix Shell Service (1.0.0)
[   4] [Active     ] [    1] Apache Felix Shell TUI (1.0.0)
[   5] [Active     ] [    5] OPS4J - Pax Logging API (1.0.0)
[   6] [Active     ] [    5] OPS4J - Pax Logging Service (1.0.0)
[   7] [Active     ] [    5] OPS4J Pax Web - Jsp Support (0.3.1)
[   8] [Active     ] [    5] OPS4J Pax Web - Service (0.3.1)
[  10] [Active     ] [    5] spring.petclinic (2.5)
->
->
->
-> start 1
[FelixDispatchQueue] INFO org.ops4j.pax.web.extender.war - BundleEvent RESOLVED
[Felix Shell TUI] DEBUG org.ops4j.pax.web.extender.war.internal.Activator - Pax
Web WAR Extender - Starting
[Felix Shell TUI] INFO org.ops4j.pax.swissbox.extender.BundleWatcher - Creating
bundle watcher with scanner [BundleURLScanner{path=WEB-INF/,filePattern=web.xml,
recurse=false}]...
[Felix Shell TUI] DEBUG org.ops4j.pax.swissbox.extender.BundleWatcher - Scanning
 bundle [System Bundle]
[Felix Shell TUI] DEBUG org.ops4j.pax.swissbox.extender.BundleWatcher - Scanning
 bundle [osgi.compendium]
[Felix Shell TUI] DEBUG org.ops4j.pax.swissbox.extender.BundleWatcher - Scanning
 bundle [org.apache.felix.shell]
[Felix Shell TUI] DEBUG org.ops4j.pax.swissbox.extender.BundleWatcher - Scanning
 bundle [org.apache.felix.shell.tui]
[Felix Shell TUI] DEBUG org.ops4j.pax.swissbox.extender.BundleWatcher - Scanning
 bundle [org.ops4j.pax.logging.pax-logging-api]
[Felix Shell TUI] DEBUG org.ops4j.pax.swissbox.extender.BundleWatcher - Scanning
 bundle [org.ops4j.pax.logging.pax-logging-service]
[Felix Shell TUI] DEBUG org.ops4j.pax.swissbox.extender.BundleWatcher - Scanning
 bundle [org.ops4j.pax.web.jsp]
[Felix Shell TUI] DEBUG org.ops4j.pax.swissbox.extender.BundleWatcher - Scanning
 bundle [org.ops4j.pax.web.service]
[Felix Shell TUI] DEBUG org.ops4j.pax.swissbox.extender.BundleWatcher - Scanning
 bundle [spring.petclinic]
[Felix Shell TUI] DEBUG org.ops4j.pax.swissbox.extender.BundleWatcher - Found re
sources [bundle://10.0:0/WEB-INF/web.xml]
[Felix Shell TUI] DEBUG org.ops4j.pax.web.extender.war.internal.WebXmlObserver -
 Parsing a web application from [bundle://10.0:0/WEB-INF/web.xml]
[Felix Shell TUI] DEBUG org.ops4j.pax.web.extender.war.internal.WebXmlObserver -
 Parsed web app [WebApp{displayName=Spring PetClinic,contextName=null}]
[Felix Shell TUI] DEBUG org.ops4j.pax.web.extender.war.internal.WebAppPublisher
- Publishing web application [WebApp{displayName=Spring PetClinic,contextName=sp
ring.petclinic}]
[Felix Shell TUI] INFO org.ops4j.pax.swissbox.tracker.ReplaceableService - Creat
ing replaceable service for [interface org.osgi.service.http.HttpService]
[Felix Shell TUI] INFO org.ops4j.pax.swissbox.tracker.ServiceCollection - Creati
ng service collection for [interface org.osgi.service.http.HttpService]
[Felix Shell TUI] INFO org.ops4j.pax.swissbox.tracker.ServiceCollection - Added
service with reference [[org.osgi.service.http.HttpService, org.ops4j.pax.web.se
rvice.WebContainer]]
[Felix Shell TUI] INFO org.ops4j.pax.web.service.internal.HttpServiceFactoryImpl
 - binding bundle: [spring.petclinic [10]] to http service
[Felix Shell TUI] INFO org.ops4j.pax.web.service.internal.HttpServiceStarted - C
reating http service for: spring.petclinic [10]
[Felix Shell TUI] DEBUG org.ops4j.pax.swissbox.tracker.ServiceCollection - Relat
ed service [EMAIL PROTECTED]
[Felix Shell TUI] INFO org.ops4j.pax.swissbox.tracker.ReplaceableService - Servi
ce changed [null]  -> [EMAIL PROTECTED]
]
[Felix Shell TUI] DEBUG org.ops4j.pax.web.extender.war.internal.WebAppPublisher
- Registering web application [WebApp{displayName=Spring PetClinic,contextName=s
pring.petclinic}] from http service [org.ops4j.pax.web.service.internal.HttpServ
[EMAIL PROTECTED]
[Felix Shell TUI] INFO org.ops4j.pax.web.service.internal.HttpServiceProxy - Cre
ating adefault context
[Felix Shell TUI] INFO org.ops4j.pax.web.service.internal.HttpServiceProxy - Set
ting context paramters [{webAppRootKey=petclinic.root, log4jConfigLocation=/WEB-
INF/log4j.properties, contextConfigLocation=/WEB-INF/applicationContext-jdbc.xml
, webapp.context=spring.petclinic}]
[Felix Shell TUI] INFO org.ops4j.pax.web.service.internal.HttpServiceProxy - Reg
istering resource: [/] ->
[Felix Shell TUI] DEBUG org.ops4j.pax.web.service.internal.HttpServiceStarted -
Using context [ContextModel{,id=org.ops4j.pax.web.service.internal.model.Context
Model-1,name=spring.petclinic,httpContext=org.ops4j.pax.web.extender.war.interna
[EMAIL PROTECTED],contextParams={contextConfigLocation=/WEB-INF/applica
tionContext-jdbc.xml, webapp.context=spring.petclinic, log4jConfigLocation=/WEB-
INF/log4j.properties, webAppRootKey=petclinic.root}}]
[Felix Shell TUI] DEBUG org.ops4j.pax.web.service.internal.JettyServerImpl - Add
ing servlet [ResourceModel{id=org.ops4j.pax.web.service.internal.model.ResourceM
odel-2,urlPatterns=[/],alias=/,servlet=org.ops4j.pax.web.service.internal.Resour
[EMAIL 
PROTECTED],initParams={},context=ContextModel{,id=org.ops4j.pax.web.servic
e.internal.model.ContextModel-1,name=spring.petclinic,httpContext=org.ops4j.pax.
[EMAIL PROTECTED],contextParams={contextConfigL
ocation=/WEB-INF/applicationContext-jdbc.xml, webapp.context=spring.petclinic, l
og4jConfigLocation=/WEB-INF/log4j.properties, webAppRootKey=petclinic.root}}}]
[Felix Shell TUI] INFO org.ops4j.pax.web.service.internal.JettyServerWrapper - a
dded servlet context: HttpServiceContext{httpContext=org.ops4j.pax.web.extender.
[EMAIL PROTECTED]
[Felix Shell TUI] DEBUG org.ops4j.pax.web.service.internal.JettyServerWrapper -
(Re)starting servlet contexts...
[Felix Shell TUI] DEBUG org.ops4j.pax.web.service.internal.HttpServiceContext -
Started servlet context for http context [org.ops4j.pax.web.extender.war.interna
[EMAIL PROTECTED]
[Felix Shell TUI] INFO org.ops4j.pax.web.service.internal.HttpServiceProxy - Reg
istering welcome files [[index.jsp]]
[Felix Shell TUI] DEBUG org.ops4j.pax.web.service.internal.HttpServiceStarted -
Using context [ContextModel{,id=org.ops4j.pax.web.service.internal.model.Context
Model-1,name=spring.petclinic,httpContext=org.ops4j.pax.web.extender.war.interna
[EMAIL PROTECTED],contextParams={contextConfigLocation=/WEB-INF/applica
tionContext-jdbc.xml, webapp.context=spring.petclinic, log4jConfigLocation=/WEB-
INF/log4j.properties, webAppRootKey=petclinic.root}}]
[Felix Shell TUI] DEBUG org.ops4j.pax.web.service.internal.JettyServerImpl - Add
ing filter model [FilterModel{id=org.ops4j.pax.web.service.internal.model.Filter
Model-3,urlPatterns=[/*],servletNames=null,filter=org.ops4j.pax.web.service.inte
[EMAIL PROTECTED],context=ContextModel{,id=org.ops4j.pax.web.servic
e.internal.model.ContextModel-1,name=spring.petclinic,httpContext=org.ops4j.pax.
[EMAIL PROTECTED],contextParams={contextConfigL
ocation=/WEB-INF/applicationContext-jdbc.xml, webapp.context=spring.petclinic, l
og4jConfigLocation=/WEB-INF/log4j.properties, webAppRootKey=petclinic.root}}}]
[Felix Shell TUI] INFO org.ops4j.pax.web.service.internal.HttpServiceProxy - Reg
istering jsps
[Felix Shell TUI] DEBUG org.ops4j.pax.web.jsp.internal.JasperClassLoader - Bundl
e-ClassPath URLs: []
[Felix Shell TUI] DEBUG org.ops4j.pax.web.service.internal.HttpServiceStarted -
Using context [ContextModel{,id=org.ops4j.pax.web.service.internal.model.Context
Model-1,name=spring.petclinic,httpContext=org.ops4j.pax.web.extender.war.interna
[EMAIL PROTECTED],contextParams={contextConfigLocation=/WEB-INF/applica
tionContext-jdbc.xml, webapp.context=spring.petclinic, log4jConfigLocation=/WEB-
INF/log4j.properties, webAppRootKey=petclinic.root}}]
[Felix Shell TUI] DEBUG org.ops4j.pax.web.service.internal.JettyServerImpl - Add
ing servlet [ServletModel{id=org.ops4j.pax.web.service.internal.model.ServletMod
el-4,urlPatterns=[*.jsp],alias=null,servlet=org.ops4j.pax.web.jsp.JspServletWrap
[EMAIL 
PROTECTED],initParams={},context=ContextModel{,id=org.ops4j.pax.web.service.int
ernal.model.ContextModel-1,name=spring.petclinic,httpContext=org.ops4j.pax.web.e
[EMAIL PROTECTED],contextParams={contextConfigLocati
on=/WEB-INF/applicationContext-jdbc.xml, webapp.context=spring.petclinic, log4jC
onfigLocation=/WEB-INF/log4j.properties, webAppRootKey=petclinic.root}}}]
[Felix Shell TUI] DEBUG org.apache.jasper.compiler.JspRuntimeContext - Parent cl
ass loader is: JasperClassLoader{bundleClassLoader=BundleClassLoader{bundle=spri
ng.petclinic [10],parent=7.0}}
[Felix Shell TUI] DEBUG org.apache.jasper.compiler.JspRuntimeContext - Compilati
on classpath initialized: C:\Documents and Settings\ivy2961\Local Settings\Temp\
.paxweb34466;null
[Felix Shell TUI] DEBUG org.apache.jasper.servlet.JspServlet - Scratch dir for t
he JSP engine is: C:\Documents and Settings\ivy2961\Local Settings\Temp\.paxweb3
4466
JarContent: java.io.FileNotFoundException: D:\usr\alintest\runner\felix\cache\ru
nner\bundle10\version0.0\embedded\. (Access is denied)
[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.ContextLoaderL
istener
        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
pPublisher.java:81)
        at org.ops4j.pax.web.extender.war.internal.WebXmlObserver.addingEntries(
WebXmlObserver.java:112)
        at org.ops4j.pax.swissbox.extender.BundleWatcher.register(BundleWatcher.
java:186)
        at org.ops4j.pax.swissbox.extender.BundleWatcher.onStart(BundleWatcher.j
ava:145)
        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.Activator.start(Activator.jav
a:75)
        at org.apache.felix.framework.util.SecureAction.startActivator(SecureAct
ion.java:589)
        at org.apache.felix.framework.Felix._startBundle(Felix.java:1585)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1519)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:354)
        at org.apache.felix.shell.impl.StartCommandImpl.execute(StartCommandImpl
.java:82)
        at org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand
(Activator.java:265)
        at org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Activator.j
ava:167)
        at java.lang.Thread.run(Thread.java:619)
JarContent: java.io.FileNotFoundException: D:\usr\alintest\runner\felix\cache\ru
nner\bundle10\version0.0\embedded\. (Access is denied)
[Felix Shell TUI] ERROR org.ops4j.pax.web.extender.war.internal.RegisterWebAppVi
sitorWC - Registration exception. Skipping.
java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServ
let
        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:171)
        at org.ops4j.pax.web.extender.war.internal.model.WebApp.accept(WebApp.ja
va:492)
        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
pPublisher.java:81)
        at org.ops4j.pax.web.extender.war.internal.WebXmlObserver.addingEntries(
WebXmlObserver.java:112)
        at org.ops4j.pax.swissbox.extender.BundleWatcher.register(BundleWatcher.
java:186)
        at org.ops4j.pax.swissbox.extender.BundleWatcher.onStart(BundleWatcher.j
ava:145)
        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.Activator.start(Activator.jav
a:75)
        at org.apache.felix.framework.util.SecureAction.startActivator(SecureAct
ion.java:589)
        at org.apache.felix.framework.Felix._startBundle(Felix.java:1585)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1519)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:354)
        at org.apache.felix.shell.impl.StartCommandImpl.execute(StartCommandImpl
.java:82)
        at org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand
(Activator.java:265)
        at org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Activator.j
ava:167)
        at java.lang.Thread.run(Thread.java:619)
[Felix Shell TUI] INFO org.ops4j.pax.web.service.internal.HttpServiceProxy - Reg
istering error page [java.lang.Exception]
[Felix Shell TUI] DEBUG org.ops4j.pax.web.service.internal.HttpServiceStarted -
Using context [ContextModel{,id=org.ops4j.pax.web.service.internal.model.Context
Model-1,name=spring.petclinic,httpContext=org.ops4j.pax.web.extender.war.interna
[EMAIL PROTECTED],contextParams={contextConfigLocation=/WEB-INF/applica
tionContext-jdbc.xml, webapp.context=spring.petclinic, log4jConfigLocation=/WEB-
INF/log4j.properties, webAppRootKey=petclinic.root}}]
[Felix Shell TUI] DEBUG org.ops4j.pax.web.extender.war.internal.Activator - Pax
Web WAR Extender - Started
[Felix Shell TUI] DEBUG org.ops4j.pax.swissbox.extender.BundleWatcher - Scanning
 bundle [org.ops4j.pax.web.extender.war]
-> [FelixDispatchQueue] INFO org.ops4j.pax.web.extender.war - BundleEvent STARTE
D

*****************************************   BUILDING OSGIFIED Spring Petclinic


Step 1:
Building Spring Petclinic through the Spring Framework
http://www.springframework.org/docs/petclinic.html

Followed instruction on  
http://wiki.ops4j.org/confluence/display/ops4j/Pax+Web+Extender+-+War+-+Examples
  
before building



Step 2:
pax-run 
scan-file:jar:mvn:org.ops4j.pax.web-extender.samples/provision!/spring-petclinic-2.5-wrap.
bundles

This did not work because of this error

 -> Downloading bundles...
 -> wrap:file:petclinic.war,jar:mvn:org.ops4j.pax.web-extender.samples/provision
         ___clinic-2.5.bnd : connecting...
        /  /
       /  / Ops, there has been a problem!
      /  /
     /__/
    ___
   /__/

 -> java.lang.StackOverflowError
java.lang.StackOverflowError
        at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
        at java.io.FilterInputStream.read(FilterInputStream.java:116)
        at java.io.PushbackInputStream.read(PushbackInputStream.java:169)
        at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:221)


Step 3:
Then I manually tried to OSGI'fy the spring petclinic WAR
http://wiki.ops4j.org/confluence/display/ops4j/Pax+Web+Extender+-+War+-+OSGi-fy

Changed META-INF/MANIFEST.MF inside the WAR to 

Bundle-ManifestVersion: 2
Bundle-SymbolicName: spring.petclinic
Bundle-Version: 2.5
Webapp-Context: spring.petclinic
Bundle-ClassPath: WEB-INF/classes,\
 .,\
 WEB-INF/lib/antlr-2.7.6.jar,\
 WEB-INF/lib/aspectjrt.jar,\
 WEB-INF/lib/aspectjweaver.jar,\
 WEB-INF/lib/cglib-nodep-2.1_3.jar,\
 WEB-INF/lib/commons-collections.jar,\
 WEB-INF/lib/commons-dbcp.jar,\
 WEB-INF/lib/commons-lang.jar,\
 WEB-INF/lib/commons-logging.jar,\
 WEB-INF/lib/commons-pool.jar,\
 WEB-INF/lib/connector.jar,\
 WEB-INF/lib/dom4j-1.6.1.jar,\
 WEB-INF/lib/ehcache-1.3.0.jar,\
 WEB-INF/lib/hibernate-annotations.jar,\
 WEB-INF/lib/hibernate-commons-annotations.jar,\
 WEB-INF/lib/hibernate-entitymanager.jar,\
 WEB-INF/lib/hibernate3.jar,\
 WEB-INF/lib/hsqldb.jar,\
 WEB-INF/lib/jboss-archive-browsing.jar,\
 WEB-INF/lib/jstl.jar,\
 WEB-INF/lib/jta.jar,\
 WEB-INF/lib/log4j-1.2.14.jar,\
 WEB-INF/lib/openjpa-1.0.1.jar,\
 WEB-INF/lib/persistence.jar,\
 WEB-INF/lib/petclinic-domain.jar,\
 WEB-INF/lib/petclinic.jar,\
 WEB-INF/lib/serp-1.13.1.jar,\
 WEB-INF/lib/spring-aspects.jar,\
 WEB-INF/lib/spring-webmvc.jar,\
 WEB-INF/lib/spring.jar,\
 WEB-INF/lib/standard.jar,\
 WEB-INF/lib/toplink-essentials.jar
Import-Package: javax.servlet,javax.servlet.http,javax.*; resolution:=optional,\
 org.xml.*; resolution:=optional,\
 org.w3c.*; resolution:=optional
****************************************************
_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to