5 Replies Latest reply on Mar 12, 2012 4:04 PM by pstackle

    JBoss 7.1 Beta1 no longer has the system module

    pstackle

      When running on JBoss 7.1 Beta1, I receive a ClassNotFoundException for sun.security.x509.X509CertImpl. In JBoss 7.0.2, I was able to fix this issue by adding the following XML snippet to my jboss-deployment-structure.xml file for my EAR:

       

      <module name="system">
        <imports>
          <include-set>
            <path name="sun/security/x509" />
          </include-set>
        </imports>
      </module>
      

       

      In JBoss 7.1 Beta1, it appears that the system module has been removed and has been "somewhat" replaced by the sun.jdk module. Unfortunately, I can no longer successfully deploy and use the sun.security.x509.X509CertImpl class. I have tried depending on the following XML module snippets in my jboss-deployment-structure.xml file with no success:

       

      The first two resulted in no errors logged, but I still get the ClassNotFoundException.

       

      <module name="deployment.sun.jdk">
        <dependencies>
          <module name="sun.jdk">
            <imports>
              <include-set>
                <path name="sun/security/x509"/>
              </include-set>
            </imports>
          </module>
        </dependencies>
      </module>
      

       

      <module name="deployment.sun.jdk">
        <dependencies>
          <module name="sun.jdk">
            <imports>
              <include path="sun/security/x509"/>
            </imports>
          </module>
        </dependencies>
      </module>
      

       

      This one resulted in a parse error because it doesn't like the <system> tag.

      <module name="deployment.sun.jdk">
        <dependencies>
          <system export="true">
            <paths>
              <path name="sun/security/x509"/>
            </paths>
          </system>
        </dependencies>
      </module>
      

       

       

      I've tried looking through the JBoss Modules documentation for how to add dependencies to the system module, but all I found were the following two pages that are blank:

       

      https://docs.jboss.org/author/display/MODULES/The+system+module

      https://docs.jboss.org/author/display/MODULES/Handling+the+system+module

       

      Does anyone have any suggestions for what else I could try or that can point out what I'm doing wrong?

      Thank you.

       

      Message was edited - added wiki formatting blocks

       

      Message was edited - Try 2 with formatting

       

      Message was edited - third times a charm

        • 1. Re: JBoss 7.1 Beta1 no longer has the system module
          gonne

          Please have a look at http://community.jboss.org/message/638330#638330

           

          Kind regards,

          Gonne

          1 of 1 people found this helpful
          • 2. Re: JBoss 7.1 Beta1 no longer has the system module
            pstackle

            Is there a way to define the dependency without modifying the container's sun.jdk module?

            • 3. Re: JBoss 7.1 Beta1 no longer has the system module
              gonne

              Yes, the you find the solution in https://community.jboss.org/message/717927#717927

               

              Regards,

              Gonne

              • 4. Re: JBoss 7.1 Beta1 no longer has the system module
                yashendrac

                Hi Gonne,

                 

                I have been getting this error

                 

                Caused by: java.lang.ClassNotFoundException: sun.security.x509.X509CertImpl

                 

                As suggested I added jboss-deployment-structure.xml in my ear/META-INF/

                Following is content of my jboss-deployment-structure.xml

                 

                <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">

                    <deployment>

                        <dependencies>

                            <system>

                                <paths>

                                    <path name="sun/security/x509"/>

                                </paths>

                            </system>

                        </dependencies>

                    </deployment>

                </jboss-deployment-structure>

                 

                 

                But that didnt resolve the problem, though adding following line in existing sun\jdk module.xml worked

                 

                <path name="sun/security/x509"/>

                • 5. Re: JBoss 7.1 Beta1 no longer has the system module
                  pstackle

                  I had to do something like the following to get it to work for me with an EAR that contains a application.war and a application.jar.

                   

                   

                  {code:xml}

                  <jboss-deployment-structure>

                    <deployment>

                      <dependencies>

                        <system>

                          <paths>

                            <path name="sun/security/x509"/>

                          </paths>

                        </system>

                      </dependencies>

                    </deployment>

                   

                    <sub-deployment name="application.war">

                      <dependencies>

                        <system>

                          <paths>

                            <path name="sun/security/x509"/>

                          </paths>

                        </system>

                      </dependencies>

                    </sub-deployment>

                   

                    <sub-deployment name="application.jar">

                      <dependencies>

                        <system>

                          <paths>

                            <path name="sun/security/x509"/>

                          </paths>

                        </system>

                      </dependencies>

                    </sub-deployment>

                  </jboss-deployment-structure>

                  {code}