[
https://issues.apache.org/jira/browse/AMQ-4850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13843197#comment-13843197
]
Amichai Rothman commented on AMQ-4850:
--------------------------------------
I tried it out - stopping and updating the web console bundle does fix the
issue (until the next app bundle deploy, that is), but only after a Karaf
restart. It seems that during runtime the existing wirings remain intact even
when the bundle is in Installed state. To see this, I used the dev:show-tree
command (on my bus bundle) before stopping the web console bundle:
{quote}
{noformat}
+- org.apache.activemq.activemq-web-console [223]
| +- org.apache.geronimo.specs.geronimo-servlet_2.5_spec [78]
| +- org.ops4j.pax.logging.pax-logging-api [4]
| +- org.ops4j.pax.web.pax-web-jsp [219]
| | +- org.ops4j.pax.logging.pax-logging-api [4]
| | +- org.apache.geronimo.specs.geronimo-servlet_2.5_spec [78]
| +- org.apache.felix.configadmin [5]
| +- org.eclipse.jetty.continuation [85]
| +- org.apache.geronimo.specs.geronimo-servlet_2.5_spec [78]
| +- org.mortbay.jetty.util [157]
| +- org.ops4j.pax.logging.pax-logging-api [4]
| +- org.apache.geronimo.specs.geronimo-servlet_2.5_spec [78]
...
{noformat}
{quote}
and after osgi:stop and osgi:update (in Intalled state):
{quote}
{noformat}
+- org.apache.activemq.activemq-web-console [223]
...
{noformat}
{quote}
i.e. the bundle itself is still there, even though the entire subtree under it
is gone (I don't know what that means).
Just for completeness, after the Karaf restart (the web console bundle now
shows up back as Resolved) it is indeed wired properly to the activemq-osgi
bundle instead:
{quote}
{noformat}
+- org.apache.activemq.activemq-osgi [200]
...
{noformat}
{quote}
So now there are a few open questions:
- Is this the correct behavior when stopping a bundle, or a bug in
Equinox/Karaf? (I was expecting the console bundle to no longer be used, and a
new wiring to activemq-osgi to happen at runtime when the console bundle was
stopped without requiring a restart, but my assumption may be wrong.)
- Why was it wiring to the web console bundle (223) rather than activemq-osgi
(200) in the first place? Is this just a race condition during startup? Do the
bundle ids have anything to do with it?
- I too think the original problem is with the web console bundle export
configuration. It should probably only be exporting the packages under
org.apache.activemq.web*, if at all. Btw the org.apache.activemq.web.config
package seems to be split between this bundle and one of the embedded jars in
WEB-INF/lib, which is probably not so good for osgi either. Can a developer
familiar with the activemq-web-console bundle confirm which exports are really
needed there?
> 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.4#6159)