[
https://issues.apache.org/jira/browse/AMQ-4850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13837469#comment-13837469
]
Amichai Rothman commented on AMQ-4850:
--------------------------------------
The imports/exports are below. Nothing imports or uses javax.net.ssl directly
(the string "javax.net" doesn't appear anywhere in the project, actually),
that's only in the ActiveMQ bundle.
The url is "failover://(tcp://localhost:61616)?startupMaxReconnectAttempts=10",
though iirc it's the same error with only "tcp://localhost:61616" (in 5.8.0 the
exception was masked when using failover url and could only be seen with a
debug breakpoint in the ActiveMQ code, and only when using the tcp url directly
was this exception printed to the logs. In 5.9.0 it is no longer being
swallowed so the full exception is logged with either url).
I don't know about that pax url bug - I just install the feature and it works.
Maybe, as the related bug (KARAF-2536) suggests, I already had the library in
the local maven repo, or maybe it's because I'm creating an offline custom
karaf distribution and the maven plugin manages to get the problematic library
at build time and it would only fail if karaf tried fetching it at runtime.
The imports/exports (copied form manifests and manually edited to be more
readable here):
common bundle:
{quote}
Import-Package:
javax.xml.bind.annotation,org.osgi.framework;version="[1.6,2)",
org.osgi.service.blueprint.container;version="[1.0,2)",
org.slf4j;version="[1.7,2)"
Export-Package:
com.myproject.common.core;version="0.1.0.SNAPSHOT";uses:="javax.xml.bind.annotation",
com.myproject.common.framework;version="0.1.0.SNAPSHOT";uses:="com.myproject.common.util,org.osgi.framework",
com.myproject.common.util;version="0.1.0.SNAPSHOT"
{quote}
bus bundle:
{quote}
Import-Package:
com.myproject.bus.api;version="[0.1,1)",
com.myproject.common.core;version="[0.1,1)",
com.myproject.common.framework;version="[0.1,1)",
com.myproject.common.util;version="[0.1,1)",
com.myproject.messaging.api;version="[0.1,1)",
com.myproject.messaging.jms;version="[0.1,1)",
javax.jms;version="[1.1,2)",
org.apache.activemq,org.osgi.service.blueprint;version="[1.0.0,2.0.0)",
org.slf4j;version="[1.7,2)"
Export-Package:
com.myproject.bus.api;version="0.1.0.SNAPSHOT";uses:="com.myproject.common.core"
{quote}
messaging bundle:
{quote}
Import-Package:
com.myproject.common.core;version="[0.1,1)",
com.myproject.common.util;version="[0.1,1)",
javax.jms;version="[1.1,2)",
org.slf4j;version="[1.7,2)"
Export-Package:
com.myproject.messaging.api;version="0.1.0.SNAPSHOT";uses:="com.myproject.common.core",
com.myproject.messaging.jms;version="0.1.0.SNAPSHOT";uses:="com.myproject.common.core,javax.jms"
{quote}
> NoClassDefFoundError: javax/net/ssl/SSLServerSocket (in Karaf)
> --------------------------------------------------------------
>
> Key: AMQ-4850
> URL: https://issues.apache.org/jira/browse/AMQ-4850
> 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(IntrospectionSupport.java:163)
> at
> org.apache.activemq.util.IntrospectionSupport.setProperties(IntrospectionSupport.java:151)
> at
> org.apache.activemq.transport.failover.FailoverTransportFactory.createTransport(FailoverTransportFactory.java:74)
> at
> org.apache.activemq.transport.failover.FailoverTransportFactory.createTransport(FailoverTransportFactory.java:63)
> at
> org.apache.activemq.transport.failover.FailoverTransportFactory.doConnect(FailoverTransportFactory.java:38)
> at
> org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:64)
> at
> org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:258)
> at
> org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:273)
> at
> org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:246)
> at
> org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:186)
> ...
--
This message was sent by Atlassian JIRA
(v6.1#6144)