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/servicemix/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

Reply via email to