activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grzegorz Grzybek (JIRA)" <>
Subject [jira] [Commented] (AMQ-4850) NoClassDefFoundError: javax/net/ssl/SSLServerSocket (in Karaf)
Date Mon, 09 Dec 2013 07:26:07 GMT


Grzegorz Grzybek commented on AMQ-4850:

I'd have hard work trying to mimic your configuration - your bundle 223 seem to be my bundle
120 which is the bundle with symbolic name {{org.apache.activemq.activemq-web-console}}.

>From the latest debug you've send I can see what I've confirmed with simple test - I've
uninstalled bundle {{activemq-osgi}} so all imports from my app's bundles to activemq were
resolved against imports from {{org.apache.activemq.activemq-web-console}}. This bundle have
nested dependencies which are exported to the system.

And after restart, I got nice and beautiful:
Exception in thread "Thread-38" java.lang.NoClassDefFoundError: javax/net/ssl/SSLServerSocket
        at org.apache.activemq.util.IntrospectionSupport.setProperty(
        at org.apache.activemq.util.IntrospectionSupport.setProperties(


I don't know why you're bundle seem to be resolved against web console bundle instead of proper
activemq bundle. The web console's {{WEB-INF/lib}} dependencies are *not* OSGi bundles! So
even if web console exports these dependencies' packages, the web console's bundle does "not"
import {{}} (only {{}}) - and it's hardcoded in

Check your bundles (use e.g., {{packages:exports}} gogo command). You can also add this code
before connecting to ActiveMQ:
List<BundleWire> list = FrameworkUtil.getBundle(this.getClass()).adapt(BundleWiring.class).getRequiredWires(null);
for (BundleWire bw: list) {
   System.out.println(bw.getRequirement() + " -> " + bw.getProvider());

I got (after uninstalling {{activemq-osgi}}):
osgi.wiring.package; resolution:="mandatory"; filter:="(&(osgi.wiring.package=org.apache.activemq))"
-> org.apache.activemq.activemq-web-console_5.9.0
and this wiring leads straight to NCDFE (because web console doesn't import {{}}

So your problem seem to be related with single thing - your bundle has been wired to {{org.apache.activemq.activemq-web-console_5.9.0}}
instead of {{activemq-osgi}}...

Grzegorz Grzybek

> NoClassDefFoundError: javax/net/ssl/SSLServerSocket (in Karaf)
> --------------------------------------------------------------
>                 Key: AMQ-4850
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: OSGi/Karaf
>    Affects Versions: 5.9.0
>         Environment: Oracle JDK 7u45, Karaf 2.3.3 with activemq-broker installed from
5.9.0 feature
>            Reporter: Amichai Rothman
>            Assignee: Jean-Baptiste Onofré
> I couldn't find a way to recreate this consistently, but after repeating several times
the following steps reproduce it:
> 1. Install custom Karaf 2.3.3 from scratch. Customizations include installing the activemq-broker
feature using the featuresBoot configuration (along with a couple other unrelated features),
and a dozen or so of my application's bundles in the deploy folder.
> 2. Start Karaf - everything works fine.
> 3. Shut down Karaf.
> 4. Touch my application's 'common' bundle (in deploy folder). The other application bundles
depend on this one. This is *not* the bundle that uses ActiveMQ.
> 5. Start Karaf - it first starts all the app bundles (the old version I think), then
it picks up the modified bundle timestamp and restarts the app bundles in what appears to
be arbitrary order. This usually works, but once in a while the app's 'bus' bundle (which
connects to ActiveMQ) fails to start with this exception showing up in the logs.
> 6. Interestingly, restarting the app or activemq bundles, or even restarting Karaf itself,
doesn't fix things - once it enters this invalid state, it seems to stay stuck in it and continues
with the same exception and with the app unable to connect to ActiveMQ. However, if I shut
down Karaf and once again touch my app's 'common' bundle in the deploy folder and then start
up Karaf again, it restarts the app bundles and this time everything goes back to normal,
with a successful connection to ActiveMQ. So it looks like while the first occurrence is not
recreated consistently, this state is not just a runtime thing but remains persisted somehow
for as long as the app bundle files aren't modified.
> Here is the stack trace:
> java.lang.NoClassDefFoundError: javax/net/ssl/SSLServerSocket
>         at org.apache.activemq.util.IntrospectionSupport.setProperty(
>         at org.apache.activemq.util.IntrospectionSupport.setProperties(
>         at org.apache.activemq.transport.failover.FailoverTransportFactory.createTransport(
>         at org.apache.activemq.transport.failover.FailoverTransportFactory.createTransport(
>         at org.apache.activemq.transport.failover.FailoverTransportFactory.doConnect(
>         at org.apache.activemq.transport.TransportFactory.connect(
>         at org.apache.activemq.ActiveMQConnectionFactory.createTransport(
>         at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(
>         at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(
>         at org.apache.activemq.ActiveMQConnectionFactory.createConnection(
> ...

This message was sent by Atlassian JIRA

View raw message