5 Replies Latest reply on Nov 22, 2012 5:45 AM by milind_cm

    jboss-as-7.1.1 deploy error

    milind_cm

      I am trying to deploy an application which was working in JBoss 4.2 into Jboss 7.1.1. Managed to get around few initial problems but stuck at the following problem. Any clues/ideas will be very helpful..Thanks in advance.

       

      Caused by: java.lang.NoClassDefFoundError: Could not initialize class java.nio.file.TempFileHelper
              at java.nio.file.TempFileHelper.create(TempFileHelper.java:92) [rt.jar:1.7.0]
              at java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:161) [rt.jar:1.7.0]
              at java.nio.file.Files.createTempFile(Files.java:842) [rt.jar:1.7.0]
              at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:218) [rt.jar:1.7.0]
              at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:216) [rt.jar:1.7.0]
              at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0]
              at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:215) [rt.jar:1.7.0]
              at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:71) [rt.jar:1.7.0]
              at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:98) [rt.jar:1.7.0]
              at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122) [rt.jar:1.7.0]
              at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:89) [rt.jar:1.7.0]
              at javax.crypto.JarVerifier$2.run(JarVerifier.java:399) [jce.jar:1.7.0-ea]
              at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0]
              at javax.crypto.JarVerifier.verifySingleJar(JarVerifier.java:384) [jce.jar:1.7.0-ea]
              at javax.crypto.JarVerifier.verifyJars(JarVerifier.java:322) [jce.jar:1.7.0-ea]
              at javax.crypto.JarVerifier.verify(JarVerifier.java:250) [jce.jar:1.7.0-ea]
              at javax.crypto.JceSecurity.verifyProviderJar(JceSecurity.java:161) [jce.jar:1.7.0-ea]
              at javax.crypto.JceSecurity.getVerificationResult(JceSecurity.java:187) [jce.jar:1.7.0-ea]
              at javax.crypto.JceSecurity.canUseProvider(JceSecurity.java:201) [jce.jar:1.7.0-ea]
              at javax.crypto.Cipher.getInstance(Cipher.java:498) [jce.jar:1.7.0-ea]
              at oracle.security.o5logon.O5LoginClientHelper.decryptAES(Unknown Source)
              at oracle.security.o5logon.O5LoginClientHelper.generateOAuthResponse(Unknown Source)
              at oracle.jdbc.driver.T4CTTIoauthenticate.marshalOauth(T4CTTIoauthenticate.java:457)
              at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:367)
              at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:508)
              at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:203)
              at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)
              at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:510)
              at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:249)
              ... 25 more

       

      This happens while code tries to get connection from the datasource which is configured correctly and tested. Using jdk1.7.

        • 1. Re: jboss-as-7.1.1 deploy error
          wdfink

          How do you connect the database? If this is in your code you might need to add a dependency to the java.nio module.

          But the recommended way is to use a datasource and the connection pool.

          • 2. Re: jboss-as-7.1.1 deploy error
            milind_cm

            Thanks a lot for the response.

             

            I am indeed using the datasource and getConnection() method on it. Similar to the following:

             

            DataSource ds = (DataSource) ctx.lookup("java:/dname");
            Connection con = ds.getConnection();

             

            The datasource is configured correctly and I get the following log at the startup.

             

            Datasource is org.jboss.jca.adapters.jdbc.WrapperDataSource@16ca8de

             

            I think it is a basic stuff and probably may not need any additional dependancies...But not sure why java.nio is coming to into picture in the first place....

            • 3. Re: jboss-as-7.1.1 deploy error
              wdfink

              Ok,

              that is very basic and should work without having a dependency to your app.

               

              Do you follow the DS wiki? How do you install the Oracle driver, as module or deployed?

              Do you use 'jboss/datasource/MyDS' as the dname or something different?

              I never saw such problem.

              • 4. Re: jboss-as-7.1.1 deploy error
                nickarls

                There is some cipher references in the stacktrace. Are you using a signed driver jar?

                • 5. Re: jboss-as-7.1.1 deploy error
                  milind_cm

                  Thanks again to both of you for responding.

                   

                  Just thought of posting what I found - may be it's useful to somebody else...

                   

                  I got around this error by simply removing a jar file from my web application's library (I started thinking in this direction after Nicklas's post above). The jar file I removed as "jsafejce.jar". I feel that for some reason, Oracle driver (yes, I am using the module configuration etc as required for Jboss 7) is trying to use encryption if this jar exists in application's classpath..When I remove this, the application was able to get the database connection and got the data from the database...

                   

                  Thanks again,

                   

                  Regards,

                  -Milind