Thanks, Freeman. Here is the output: karaf@root> headers 245
Apache ServiceMix :: Bundles :: fop (245) ----------------------------------------- Manifest-Version = 1.0 Bnd-LastModified = 1306830819732 Tool = Bnd-0.0.357 Built-By = hudson Build-Jdk = 1.6.0_20 Created-By = Apache Maven Bundle Plugin Bundle-Vendor = The Apache Software Foundation Bundle-Name = Apache ServiceMix :: Bundles :: fop Bundle-DocURL = http://www.apache.org/ Bundle-Description = This OSGi bundle wraps fop 1.0 jar file. Bundle-SymbolicName = org.apache.servicemix.bundles.fop Bundle-Version = 1.0.0.1-SNAPSHOT Bundle-License = http://www.apache.org/licenses/LICENSE-2.0.txt Bundle-ManifestVersion = 2 Import-Package = javax.crypto, javax.crypto.spec, javax.media.jai;resolution:=optional, << RED javax.servlet;resolution:=optional, javax.servlet.http;resolution:=optional, javax.swing;resolution:=optional, javax.swing.border;resolution:=optional, javax.swing.event;resolution:=optional, javax.xml.parsers, javax.xml.transform, javax.xml.transform.dom, javax.xml.transform.sax, javax.xml.transform.stream, org.apache.avalon.framework;resolution:=optional, << RED org.apache.avalon.framework.configuration;resolution:=optional, << RED org.apache.batik.bridge, org.apache.batik.bridge.svg12, org.apache.batik.dom, org.apache.batik.dom.svg, org.apache.batik.dom.util, org.apache.batik.ext.awt, org.apache.batik.extension.svg, org.apache.batik.gvt, org.apache.batik.gvt.flow, org.apache.batik.gvt.font, org.apache.batik.gvt.renderer, org.apache.batik.gvt.text, org.apache.batik.parser, org.apache.batik.svggen, org.apache.batik.transcoder, org.apache.batik.transcoder.image, org.apache.batik.transcoder.keys, org.apache.batik.transcoder.wmf.tosvg, org.apache.batik.util, org.apache.commons.io, org.apache.commons.io.filefilter, org.apache.commons.io.output, org.apache.commons.logging;resolution:=optional, org.apache.commons.logging.impl;resolution:=optional, org.apache.tools.ant;resolution:=optional, org.apache.tools.ant.types;resolution:=optional, org.apache.tools.ant.util;resolution:=optional, org.apache.xmlgraphics.fonts, org.apache.xmlgraphics.image, org.apache.xmlgraphics.image.codec.png, org.apache.xmlgraphics.image.loader, org.apache.xmlgraphics.image.loader.impl, org.apache.xmlgraphics.image.loader.pipeline, org.apache.xmlgraphics.image.loader.spi, org.apache.xmlgraphics.image.loader.util, org.apache.xmlgraphics.image.rendered, org.apache.xmlgraphics.image.writer, org.apache.xmlgraphics.java2d, org.apache.xmlgraphics.java2d.color, org.apache.xmlgraphics.java2d.ps, org.apache.xmlgraphics.ps, org.apache.xmlgraphics.ps.dsc, org.apache.xmlgraphics.ps.dsc.events, org.apache.xmlgraphics.ps.dsc.tools, org.apache.xmlgraphics.util, org.apache.xmlgraphics.util.io, org.apache.xmlgraphics.util.uri, org.apache.xmlgraphics.xmp, org.apache.xmlgraphics.xmp.schemas, org.apache.xmlgraphics.xmp.schemas.pdf, org.w3c.dom;resolution:=optional, org.w3c.dom.svg;resolution:=optional, << RED org.xml.sax, org.xml.sax.ext, org.xml.sax.helpers Any assistance you can provide in getting these resolved would be much appreciated. For convenience, here again is the snippet of osgi:list for these bundles. I wonder if the Avalon ones are not OSGi bundles (the way the description shows up indicates that perhaps they are not). [ 236] [Active ] [ ] [ ] [ 60] Apache ServiceMix :: Bundles :: xmlgraphics-commons (1.4.0.1-SNAPSHOT) [ 237] [Active ] [ ] [ ] [ 60] Apache ServiceMix :: Bundles :: batik (1.7.0.1-SNAPSHOT) [ 241] [Active ] [ ] [ ] [ 60] mvn:org.apache.avalon.framework/avalon-framework-api/4.3.1 [ 242] [Active ] [ ] [ ] [ 60] mvn:org.apache.avalon.framework/avalon-framework-impl/4.3.1 [ 245] [Active ] [ ] [ ] [ 60] Apache ServiceMix :: Bundles :: fop (1.0.0.1-SNAPSHOT) Here is some additional info that may help: karaf@root> headers 241 Bundle 241 ---------- Manifest-Version = 1.0 Archiver-Version = Plexus Archiver Built-By = jheymans Build-Jdk = 1.4.2_09 Created-By = Apache Maven Do I need to install the Avalon bundles from somewhere else? Thanks. --Scott -----Original Message----- From: Freeman Fang [mailto:[email protected]] Sent: Thursday, June 02, 2011 2:24 AM To: [email protected] Subject: Re: Install snapshot bundles Hi, Could you use osgi:headers fon_bundle_id and tell if the optional import package "rg.apache.avalon.framework.configuration" is already get resolved? The red color means doesn't get resolved. Freeman On 2011-6-2, at 下午1:59, Scott Came wrote: > Thanks, Freeman, but that didn't help. > > I restarted servicemix, did "refresh [fop bundle id]", then tried to > start my bundle that instantiates FopFactory. I still get the > NoClassDefFoundError. > > I also uninstalled the Fop bundle, then reinstalled it, to be sure > Avalon was there prior to Fop. > > Still when I start my bundle that instantiates FopFactory, I get the > NCDFE. > > Anything else I could try? > > -----Original Message----- > From: Freeman Fang [mailto:[email protected]] > Sent: Wednesday, June 01, 2011 5:31 PM > To: [email protected] > Subject: Re: Install snapshot bundles > > Hi, > > That's because Fon bundle optionally import > org.apache.avalon.framework.configuration package, so even this > package isn't available, it won't affect the fon start correctly. > After you manually install avalon bundle, you also need refresh Fon > bundle to pick up this optional import. Or you can put Fon and avalon > into a feature, then install this feature can get all available > optional package installed out of box. > > Freeman > On 2011-6-2, at 上午4:26, Scott Came wrote: > >> OK, I figured this out...but there seems to be a problem with the Fop >> bundle. >> >> Since the apache snapshots repository is included in the list that >> the mvn installer searches, it worked to install the fop bundle and >> its two dependencies (xmlgraphics-commons and batik). All three >> install and start just fine. >> >> However, when I attempt to instantiate org.apache.fop.apps.FopFactory >> I get this exception (embedded in a chained stack trace)... >> >> Caused by: java.lang.NoClassDefFoundError: org/apache/avalon/ >> framework/configuration/ConfigurationException >> at org.apache.fop.apps.FopFactory.<init>(FopFactory.java:153) >> at org.apache.fop.apps.FopFactory.newInstance(FopFactory.java: >> 177) >> at >> gov >> .ojp >> .it.ws.remote.PdfExportProcessor.<clinit>(PdfExportProcessor.java:26) >> at >> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) >> at >> sun >> .reflect >> .NativeConstructorAccessorImpl >> .newInstance(NativeConstructorAccessorImpl.java:39) >> at >> sun >> .reflect >> .DelegatingConstructorAccessorImpl >> .newInstance(DelegatingConstructorAccessorImpl.java:27) >> at java.lang.reflect.Constructor.newInstance(Constructor.java: >> 513) >> at >> org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java: >> 126) >> at >> org >> .springframework >> .beans >> .factory >> .support >> .SimpleInstantiationStrategy >> .instantiate(SimpleInstantiationStrategy.java:74) >> at >> org >> .springframework >> .beans >> .factory >> .support >> .AbstractAutowireCapableBeanFactory >> .instantiateBean(AbstractAutowireCapableBeanFactory.java:958) >> ... 15 more >> >> Clearly there is a dependency on Avalon here...so I looked in the fop >> bundle pom, and installed org.apache.avalon.framework/avalon- >> framework-api and -impl bundles. They both installed and started >> fine. But still when I install and start my bundle that instantiates >> org.apache.fop.apps.FopFactory, I still get the same stack trace as >> above. >> >> If it helps diagnose, here is a snippet from osgi:list: >> >> [ 234] [Active ] [ ] [ ] [ 60] Apache >> ServiceMix :: Bundles :: fop (1.0.0.1-SNAPSHOT) >> [ 236] [Active ] [ ] [ ] [ 60] Apache >> ServiceMix :: Bundles :: xmlgraphics-commons (1.4.0.1-SNAPSHOT) >> [ 237] [Active ] [ ] [ ] [ 60] Apache >> ServiceMix :: Bundles :: batik (1.7.0.1-SNAPSHOT) >> [ 241] [Active ] [ ] [ ] [ 60] >> mvn:org.apache.avalon.framework/avalon-framework-api/4.3.1 >> [ 242] [Active ] [ ] [ ] [ 60] >> mvn:org.apache.avalon.framework/avalon-framework-impl/4.3.1 >> >> Could it be that these Avalon bundles are not "osgi-ready"? (I did >> not see smx bundles for them...) >> >> Thanks. >> --Scott >> >> -----Original Message----- >> From: Scott Came [mailto:[email protected]] >> Sent: Wednesday, June 01, 2011 11:57 AM >> To: [email protected] >> Subject: Install snapshot bundles >> >> I would like to install the new FOP bundle (snapshot) into my running >> instance of smx 4.3.0. >> >> I see it has been deployed to the snapshot repository: >> >> https://repository.apache.org/content/groups/snapshots/org/apache/ser >> vicemix/bundles/org.apache.servicemix.bundles.fop/ >> >> I also note that it has a number of dependencies. >> >> What is the easiest way to install the bundle, and its dependencies? >> I'd rather avoid manually downloading the graph of dependencies and >> placing all the jars in the smx deploy directory...is there an easier >> way? >> >> Thanks. >> --Scott > > --------------------------------------------- > Freeman Fang > > FuseSource > Email:[email protected] > Web: fusesource.com > Twitter: freemanfang > Blog: http://freemanfang.blogspot.com > Connect at CamelOne May 24-26 > The Open Source Integration Conference > > > > > > > > --------------------------------------------- Freeman Fang FuseSource Email:[email protected] Web: fusesource.com Twitter: freemanfang Blog: http://freemanfang.blogspot.com Connect at CamelOne May 24-26 The Open Source Integration Conference
