3 Replies Latest reply on Oct 17, 2012 12:31 PM by Jeff Powell

    ExceptionInInitializerError in JBoss 7.0.2

    Satish Gavali Newbie

      Recently, we migrated from BO XI 3.1 to BO 4.0 and JBoss 7.0.2 app server. I am currently getting following exception:

       

       

      14:53:44,256 ERROR [stderr] (Thread-25) Exception in thread "Thread-25" java.lang.ExceptionInInitializerError 14:53:44,256 ERROR [stderr] (Thread-25)         at com.businessobjects.bcm.BCM.(BCM.java:1144) 14:53:44,271 ERROR [stderr] (Thread-25)         at com.crystaldecisions.enterprise.ocaframework.BCMInitializer.run(BCMInitializer.java:29) 14:53:44,271 ERROR [stderr] (Thread-25)         at java.lang.Thread.run(Thread.java:619) 14:53:44,271 ERROR [stderr] (Thread-25) Caused by: java.lang.SecurityException: Toolkit not encapsulated by a jar. 14:53:44,271 ERROR [stderr] (Thread-25)         at com.rsa.cryptoj.f.ug.d(Unknown Source) 14:53:44,271 ERROR [stderr] (Thread-25)         at com.rsa.cryptoj.f.ug.b(Unknown Source) 14:53:44,271 ERROR [stderr] (Thread-25)         at com.rsa.cryptoj.f.nd.b(Unknown Source) 14:53:44,271 ERROR [stderr] (Thread-25)         at com.rsa.cryptoj.f.nd.c(Unknown Source) 14:53:44,271 INFO  [stdout] (http--0.0.0.0-7005-1) 25 Jul 2012 14:53:44,271 TANL ERROR [http--0.0.0.0-7005-1] meta.AnalyticsMetaDataServiceImpl: Failed to connect to provider server: Could not initialize class com.businessobjects.bcm.BCM 14:53:44,271 ERROR [stderr] (Thread-25)         at com.rsa.jsafe.CryptoJ.isFIPS140Compliant(Unknown Source) 14:53:44,271 INFO  [stdout] (http--0.0.0.0-7005-1) java.lang.NoClassDefFoundError: Could not initialize class com.businessobjects.bcm.BCM 14:53:44,271 ERROR [stderr] (Thread-25)         at com.businessobjects.bcm.internal.BcmRsaLib.initialize(BcmRsaLib.java:214) 14:53:44,271 INFO  [stdout] (http--0.0.0.0-7005-1)      at com.crystaldecisions.sdk.framework.internal.TrustedPrincipal.getRandomString(TrustedPrincipal.java:253) 14:53:44,271 ERROR [stderr] (Thread-25)         at com.businessobjects.bcm.internal.BcmRsaLib.(BcmRsaLib.java:289) 14:53:44,271 INFO  [stdout] (http--0.0.0.0-7005-1)      at com.crystaldecisions.sdk.framework.internal.TrustedPrincipal.getPassword(TrustedPrincipal.java:196) 14:53:44,271 ERROR [stderr] (Thread-25)         ... 3 more 14:53:44,271 INFO  [stdout] (http--0.0.0.0-7005-1)      at com.crystaldecisions.sdk.framework.internal.SessionMgr.logon_aroundBody22(SessionMgr.java:853) 14:53:44,271 INFO  [stdout] (http--0.0.0.0-7005-1)      at com.crystaldecisions.sdk.framework.internal.SessionMgr.logon(SessionMgr.java:1) 14:53:44,271 INFO  [stdout] (http--0.0.0.0-7005-1)      at com.crystaldecisions.sdk.framework.internal.SessionMgr.logon_aroundBody20(SessionMgr.java:821) 14:53:44,271 INFO  [stdout] (http--0.0.0.0-7005-1)      at com.crystaldecisions.sdk.framework.internal.SessionMgr.logon_aroundBody21$advice(SessionMgr.java:512) 14:53:44,271 INFO  [stdout] (http--0.0.0.0-7005-1)      at com.crystaldecisions.sdk.framework.internal.SessionMgr.logon(SessionMgr.java:1)

       

       

      Class overloading architecture in JBoss 7.0.2 has been changed from 5.x versions. Can anyone please provide how we can achieve the class overloading precedence in JBoss 7.0.2? Or did anyone face similar issue?

        • 1. Re: ExceptionInInitializerError in JBoss 7.0.2
          Jeff Powell Newbie

          I've ran into this problem recently too.  However, I am running JBoss 7.1.1.

           

          I found some information which suggested moving SAP's Crystal businessobjects' rsa dependencies from the App.ear/App.war/META-INF/lib directory and place them in [jboss-home]\modules\com\rsa\main, (also adding the indices, module.xml, etc).  After that, you would have to adding or creating a com.rsa dependency entry within App.ear/META-INF/jboss-deployment-structure.xml.

           

          Unfortunately; that is not working either.  No sure if I have an incorrect jboss-deployment-structure or if something else is the root of the problem.

           

          <?xml version="1.0" encoding="UTF-8"?>

          <jboss-deployment-structure>

            <deployment>

              <dependencies>

                <module name="com.rsa" />

              </dependencies>

            </deployment>

          </jboss-deployment-structure>

          • 2. Re: ExceptionInInitializerError in JBoss 7.0.2
            Tomaz Cerar Master

            Hi,

             

            you can find documentation on new classloading here https://docs.jboss.org/author/display/AS71/Class+Loading+in+AS7

             

            In any case i would recommend you to upgrade to 7.1.1 as 7.0.x has many known issues.

             

             

            --

            tomaz

            • 3. Re: ExceptionInInitializerError in JBoss 7.0.2
              Jeff Powell Newbie

              That fixed it for me; JBoss 7.1.1 + AS71 class loading documentation.

               

              The AS71 class loading doc had the answers I needed.  So either the AS70 doc had invalid or missing information or, (being new to JBoss,) I just needed to work through the problem for a while and read documentation repeatadly before it all started making sense.

               

              In the end, I moved the jboss-deployment-structure.xml to the App.war/WEB-INF/ directory and adding a manifest entry for com.rsa to the top level App.ear/META_INF/ dir.  Here's my deployment structure now.

               

              app.ear

                |

                | --- ejb.jar

                | --- META-INF

                       |

                       | --- MANIFEST.MF  (Dependencies: com.rsa export)

                | --- web.war

                       | --- WEB-INF

                               |

                               | --- jboss-deployment-structure.xml

               

               

              Again, this is the error I was getting; (below line taken from Satish's stack trace above), which was being thrown by SAP's Crystal businessobjects within my web.war deployment.

                   Caused by: java.lang.SecurityException: Toolkit not encapsulated by a jar.


              I resolved it by removing certjFIPS.jar, cryptojFIPS.jar, and ssljFIPS.jar from web.war/WEB-INF/lib/ directory and placed them within a module (named com.rsa) at [jboss.home]/modules/com/rsa/main/ directory. Then finished by working though the class loading as described by the page Tomaz provided.

               

              Thanks.