[jboss-jira] [JBoss JIRA] Commented: (JBAS-4052) NPE in RepositoryClassLoader when loading BouncyCastle

Torsten Krah (JIRA) jira-events at lists.jboss.org
Mon Dec 8 07:55:38 EST 2008


    [ https://jira.jboss.org/jira/browse/JBAS-4052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12441584#action_12441584 ] 

Torsten Krah commented on JBAS-4052:
------------------------------------

It does not seem to me like a hot deploy issue.
I am getting a few of this NPEs per minute running quartz jobs (JBoss 4.2):

Caused by: java.lang.NullPointerException
	at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:630)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
	at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:474)
	at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
	at org.slf4j.impl.Log4jLoggerAdapter.log(Log4jLoggerAdapter.java:577)
	at org.apache.commons.logging.impl.SLF4JLocationAwareLog.trace(SLF4JLocationAwareLog.java:99)
	at org.hibernate.jdbc.JDBCContext.registerSynchronizationIfPossible(JDBCContext.java:160)
	... 28 more


I do not redeploy anything, i only have to do a "tail -f ..." watching those NPEs running through the screen, causing my jobs to fail many times (Hibernate, JTA Transactions).
Any workaround there?


> NPE in RepositoryClassLoader when loading BouncyCastle
> ------------------------------------------------------
>
>                 Key: JBAS-4052
>                 URL: https://jira.jboss.org/jira/browse/JBAS-4052
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: ClassLoading
>    Affects Versions: JBossAS-4.0.5.GA
>            Reporter: Jon Stevens
>            Assignee: Scott M Stark
>
> Occasionally, I will get the exception below when trying to load the bouncy castle library. One would think it is a problem in BC, except for the fact that the NPE is clearly coming from JBoss's RepositoryClassLoader.
> The hard part about this bug is that it happens some of the time and not other times. It's been impossible to reliably reproduce. Restarting the appserver/jvm causes the problem to go away and everything works just fine, but eventually it will happen again. 
> BC is being started in a @Service Bean. The start() method looks like this:
> 	public void start() throws Exception
> 	{
> 		Security.addProvider(new BouncyCastleProvider());
> 	}
> Has anyone else seen this problem?
> Caused by: java.security.NoSuchAlgorithmException: No such algorithm: AES/CBC/PKCS5Padding
>         at javax.crypto.Cipher.getInstance(DashoA13*..)
>         at javax.crypto.Cipher.getInstance(DashoA13*..)
>         at com.kink.heart.biz.system.EncryptorBean.encrypt(EncryptorBean.java:349)
>         ... 73 more
> Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: AES, provider: BC, class: org.bouncycastle.jce.provider.JCEBlockCipher$AES)
>         at java.security.Provider$Service.newInstance(Provider.java:1201)
>         ... 76 more
> Caused by: java.lang.NullPointerException
>         at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:620)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
>         at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:464)
>         at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.security.Provider$Service.getImplClass(Provider.java:1218)
>         at java.security.Provider$Service.newInstance(Provider.java:1176)
>         ... 76 more

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list