4 Replies Latest reply on May 28, 2013 10:04 AM by bes.comcom

    How to load a class from jsse.jar

    bes.comcom Newbie

      I have a case where there doesn't seem to be any modules in eap6 that provide com.sun.net.ssl.internal.ssl.Provider (and its related classes).

      How do I configure the modules in eap6 to provide this class?

      I added it as an export to a few of the modules that are already exporting some com.sun classes from various locations (ie sun.jdk.main), with no effect.

      It makes no sense that this class and some other fairly basic things just aren't loaded by the container.

       

      I read this article on AS7 https://community.jboss.org/thread/169608

      It seems to have no effect because obviously in eap6 there *is* no module named system.  So I just get ModuleNotFoundException: system:main

        • 1. Re: How to load a class from jsse.jar
          jaikiran pai Master

          Those classes are Java vendor specific classes and aren't part of the core Java API. That's the reason why they aren't visible by "default". Some of those have been added to sun.jdk module as and when required. Can you post more details including the exception stacktrace where you are seeing this problem.

          • 2. Re: How to load a class from jsse.jar
            bes.comcom Newbie

            The stack trace isn't going to tell us anything we don't already know.  It tells us that a method in my middleware has a dependancy on the com.sun ssl classes.

             

            Caused by: java.lang.ClassNotFoundException: com.sun.net.ssl.internal.ssl.Provider from [Module "deployment.pz3.ear.pz3Business.ejb3:main" from Service Module Loader]

                    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.2.0.CR1-redhat-1]

                    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.2.0.CR1-redhat-1]

                    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.2.0.CR1-redhat-1]

                    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.2.0.CR1-redhat-1]

                    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.2.0.CR1-redhat-1]

                    ... 105 more

             

             

            More relevant is probably how I'm trying to add this class set to the sun.jdk module  Here's my modification:

            I added

             

            <path name="com/sun/ssl/internal/ssl" />

            to the paths element of the sun.jdk:main module.xml

             

            I also added the sun.jdk module as a dependency in my jboss-deployment-structure.xml for good measure.  none of this has resolved the error.

            • 3. Re: How to load a class from jsse.jar
              Stephen Coy Master

              Show us the whole stacktrace anyway.

               

              Or are referencing the "com.sun.net.ssl.internal.ssl.Provider" class directly?

              • 4. Re: How to load a class from jsse.jar
                bes.comcom Newbie

                Stephen, Yes the Provider class was being referenced directly.  Back when the servlet that was using it was written that was standard practice.  I refactored it to use the security manager so this is no longer an issue.  But the original question remains.  How to import similar classes in the future.