0 Replies Latest reply on Mar 14, 2005 12:28 PM by keanthian

    Hit Illegal access after redeploy my application.

    keanthian

      hi all,
      I have a web application which allow user to deal with JAVA Keystore. I'm using BouncyCastle library to deal with PKCS#12 keystore. In order for my application to use BC provider, i need to instantiate the provider and add it into my Security Provider as followed :

      // Instantiate the BouncyCastle provider
      Class bcProvClass = Class.forName("org.bouncycastle.jce.provider.BouncyCastleProvider");
      Provider bcProv = (Provider)bcProvClass.newInstance();

      // Add BC as a security provider
      Security.addProvider(bcProv);

      The application works fine when the first time i run it. The problem arises after I redeploy my application (without restart JBoss) and my application trying to get the Keystore instance.
      Code to get Keystore instance :
      keyStore = KeyStore.getInstance(keyStoreType.toString(), "BC");

      The error returned to me is :

      01:17:50,064 INFO [WebappClassLoader] Illegal access: this web application instance has been stopped already (the eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact)
      01:17:50,134 ERROR [Engine] StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
      java.lang.ThreadDeath
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1229)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
      at java.security.Security.doGetImpl(Security.java:1123)
      at java.security.Security.doGetImpl(Security.java:1084)
      at java.security.Security.getImpl(Security.java:1068)
      at java.security.KeyStore.getInstance(KeyStore.java:238)


      any ideas how to overcome this?

      thanks..