Hello Bertrand,

I narrowed one of my problems down to google guava. I found guava-osgi which 
fixed the logging for the bundle that was including guava.

The other problem is due to activemq. There is an activemq-osgi but it gives an 
dependency error somewhere inside activemq. This is the same dependency problem 
I get with activemq-core which I'd rather use since I only need the client 
classes, not the server/broker classes.

What's the best way of tracking down a fix when you have a dependency problem 
that you don't have control over?
Specifically, when I use activemq-core or activemq-osgi, I get the error:
Caused by: java.lang.ClassNotFoundException: 
javax.management.j2ee.statistics.Stats not found by iarpa-messaging [115]

I don't get this error when I use activemq-all, but activemq-all interferes 
with slf4j so there are no log messages for that bundle.

Here's the artifact:
http://mvnrepository.com/artifact/org.apache.activemq/activemq-osgi/5.8.0

When I look up the missing class I see it's available here:
http://www.jarfinder.com/index.php/java/info/javax.management.j2ee.statistics.Stats

When I compare the jars between the activemq-all and activemq-osgi, I see that 
activemq-osgi is missing:
javax.management.j2ee
javax.management.j2ee.statistics

So, then what? Do I pull out that jar and package it? It seems like this could 
potentially never end.


Rob

On Mar 19, 2013, at 10:10 AM, Bertrand Delacretaz wrote:

> Hi Rob,
> 
> On Tue, Mar 19, 2013 at 9:16 AM, Robert A. Decker <[email protected]> 
> wrote:
>> ...For your question 'Do you embedd activemq in the bundle ?', is there 
>> something else I could do?...
> 
> Importing packages from other bundles can be cleaner than embedding,
> but AFAICS activemq is not delivered as an OSGi bundle by default so
> you would need some tweaking anyway. Maybe look if Karaf or ServiceMix
> have a bundleized version, which they do for many projects.
> 
> If it's only your bundle where logging is disabled, you need to make
> sure there are no extra logging related classes in it - look at the
> generated bundle with unzip -l for example to see what's in it
> exactly, and maybe try filtering that by hand (unpack/repack the jar
> file) to diagnose before tackling the Maven build problem
> 
> If your bundle disables the whole Sling logging, that would indicate
> that your bundle exports too much, including logging classes, which
> would be a problem of the bundle's Export-Package header.
> 
> -Bertrand
> 

Reply via email to