Uploaded image for project: 'MINA'
  1. MINA
  2. DIRMINA-1016

Regression with 2.0.9: Missing javax.net.ssl import in manifest

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.9
    • Fix Version/s: 2.0.10
    • Component/s: Core
    • Environment:
      Karaf 3.0.3, Camel 2.15.2, Java 1.8.0_45
    • Flags:
      Important

      Description

      see http://camel.465427.n5.nabble.com/MINA-TLS-Silent-Error-when-trying-to-load-a-MINA-route-with-TLS-td5769456.html

      in mina-core 2.0.7, it imports javax.net.ssl:
      Import-Package: javax.crypto,javax.crypto.spec,javax.net.ssl,javax.secur
      ity.sasl,org.ietf.jgss,org.slf4j;version="[1.6,2)"

      in mina-core 2.09, it only imports:
      Import-Package: org.slf4j;version="1.7.7"

      Is no one else having this problem?

      Exception:
      org.osgi.framework.BundleException: Activator start error in bundle com.nextgate.ms.components.adapters.ngms-listener-hl7v2-mllp [348].
      at org.apache.felix.framework.Felix.activateBundle(Felix.java:2196)[org.apache.felix.framework-4.2.1.jar:]
      at org.apache.felix.framework.Felix.startBundle(Felix.java:2064)[org.apache.felix.framework-4.2.1.jar:]
      at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291)[org.apache.felix.framework-4.2.1.jar:]
      at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)[org.apache.felix.framework-4.2.1.jar:]
      at java.lang.Thread.run(Unknown Source)[:1.8.0_45]
      Caused by: java.lang.NoClassDefFoundError: javax/net/ssl/SSLException
      at org.apache.camel.component.mina2.Mina2Consumer.setupSocketProtocol(Mina2Consumer.java:194)
      at org.apache.camel.component.mina2.Mina2Consumer.<init>(Mina2Consumer.java:87)
      at org.apache.camel.component.mina2.Mina2Endpoint.createConsumer(Mina2Endpoint.java:59)
      at org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:65)
      at org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:85)
      at org.apache.camel.impl.RouteService.warmUp(RouteService.java:158)
      at org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:3090)
      at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3020)
      at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:2797)
      at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:2653)
      at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:167)
      at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2467)
      at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2463)
      at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2486)
      at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2463)
      at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
      at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2432)
      at com.nextgate.ms.bundlelib.interfaces.NGMSBundleActivator.startup(NGMSBundleActivator.java:81)
      at com.nextgate.ms.component.adapter.listener.hl7mllp.routes.Activator.start(Activator.java:58)
      at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:645)
      at org.apache.felix.framework.Felix.activateBundle(Felix.java:2146)
      ... 4 more
      Caused by: java.lang.ClassNotFoundException: javax.net.ssl.SSLException not found by org.apache.mina.core [75]
      at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)[org.apache.felix.framework-4.2.1.jar:]
      at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)[org.apache.felix.framework-4.2.1.jar:]
      at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)[org.apache.felix.framework-4.2.1.jar:]
      at java.lang.ClassLoader.loadClass(Unknown Source)[:1.8.0_45]
      ... 25 more

        Issue Links

          Activity

          Hide
          mondain Paul Gregoire added a comment -

          We are possibly having an issue with SSL/TLS in Mina with Red5, but it's proving to be very difficult to pinpoint.

          Show
          mondain Paul Gregoire added a comment - We are possibly having an issue with SSL/TLS in Mina with Red5, but it's proving to be very difficult to pinpoint.
          Hide
          pberkman Peter Berkman added a comment -

          we got around this by manually "hacking" the META-INF/MANIFEST.MF inside the mina-core-2.0.9.jar. Replace the existing "Import-Package" with this:

          Import-Package: javax.crypto,javax.crypto.spec,javax.net.ssl,javax.secur
          ity.sasl,org.slf4j;version="1.7.7"

          Not really an acceptable "permanent" workaround, but proves the need to create the jar differently.

          Show
          pberkman Peter Berkman added a comment - we got around this by manually "hacking" the META-INF/MANIFEST.MF inside the mina-core-2.0.9.jar. Replace the existing "Import-Package" with this: Import-Package: javax.crypto,javax.crypto.spec,javax.net.ssl,javax.secur ity.sasl,org.slf4j;version="1.7.7" Not really an acceptable "permanent" workaround, but proves the need to create the jar differently.
          Hide
          jeffmaury Jeff MAURY added a comment -

          Will submit a path but have you problems only with core

          Show
          jeffmaury Jeff MAURY added a comment - Will submit a path but have you problems only with core
          Hide
          pberkman Peter Berkman added a comment -

          Jeff, assuming "path" = "patch" ... So far, yes, only with core. But, I would fix others too if they have the same issue – any artifact that uses/references the javax.net.ssl package MUST include it as an "Import-Package" to be able to run within OSGi.

          Show
          pberkman Peter Berkman added a comment - Jeff, assuming "path" = "patch" ... So far, yes, only with core. But, I would fix others too if they have the same issue – any artifact that uses/references the javax.net.ssl package MUST include it as an "Import-Package" to be able to run within OSGi.
          Hide
          jeffmaury Jeff MAURY added a comment -

          Peter,

          patch has been committed, you can find the latest build JAR at https://repository.apache.org/content/repositories/snapshots/org/apache/mina/mina-core/2.0.10-SNAPSHOT/mina-core-2.0.10-20150726.091142-1.jar
          Please let us know if this fix the problem.

          Show
          jeffmaury Jeff MAURY added a comment - Peter, patch has been committed, you can find the latest build JAR at https://repository.apache.org/content/repositories/snapshots/org/apache/mina/mina-core/2.0.10-SNAPSHOT/mina-core-2.0.10-20150726.091142-1.jar Please let us know if this fix the problem.
          Hide
          pberkman Peter Berkman added a comment -

          Jeff,
          manifest looks good. I'll try and validate in Karaf this week.

          Show
          pberkman Peter Berkman added a comment - Jeff, manifest looks good. I'll try and validate in Karaf this week.
          Hide
          elecharny Emmanuel Lecharny added a comment -

          Fixed.

          Show
          elecharny Emmanuel Lecharny added a comment - Fixed.

            People

            • Assignee:
              Unassigned
              Reporter:
              pberkman Peter Berkman
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development