You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Simon Nunn <Si...@issinc.com> on 2008/03/06 18:44:01 UTC

WLS 10 MP1 - Axis 2 1.3 - BouncyCastle problem

 

I am using WLS 10MP1 with Axis 2 v 1.3.  I am running into the same problem
that was described/fixed for http://issues.apache.org/jira/browse/AXIS2-811.
However, this bug was reported against an older version.  Has anyone else
ran into this problem?  I verified that the jar was indeed in the lib
directory, etc.  I had to use the "workaround" of modifying my java.security
file, and adding the bcprov-jdk15-132 .jar to my extensions directory.

 

Has anyone else ran into this and got it to work without modifying the
java.security file and copying the jar?

 

Thanks,

 Simon

 


RE: WLS 10 MP1 - Axis 2 1.3 - BouncyCastle problem

Posted by Simon Nunn <Si...@issinc.com>.
George,

 

 For WLS 10, it seems that BC needs to be in the system classpath.  The
specific error that I get is the same as Axis2-811..here is the exception
under WLS 10.   I removed our specific classes from the stack trace, since
they do nothing with classloaders, etc.  I had to add the bcprov jar to the
extension dir, and then modify the java.security file to contain:
"security.provider.7=org.bouncycastle.jce.provider.BouncyCastleProvider"

 

 

7:00> <Error> <HTTP> <BEA-101216> <Servlet: "GatewayServlet" failed to
preload o
n startup in Web application: "/gateway".
java.lang.ExceptionInInitializerError
        at javax.crypto.SecretKeyFactory.getInstance(DashoA12275)
<SNIP>.<SNIP>

        Truncated. see log file for complete stacktrace
java.lang.SecurityException: Cannot set up certs for trusted CAs
        at javax.crypto.SunJCE_b.<clinit>(DashoA12275)
        at javax.crypto.SecretKeyFactory.getInstance(DashoA12275)
<SNIP>.<SNIP>

        Truncated. see log file for complete stacktrace
java.security.PrivilegedActionException: java.security.InvalidKeyException:
Publ
ic key presented not for certificate signature
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.crypto.SunJCE_b.<clinit>(DashoA12275)
        at javax.crypto.SecretKeyFactory.getInstance(DashoA12275)
<SNIP>.<SNIP>

        Truncated. see log file for complete stacktrace
java.security.InvalidKeyException: Public key presented not for certificate
sign
ature
        at
org.bouncycastle.jce.provider.X509CertificateObject.checkSignature(Un
known Source)
        at
org.bouncycastle.jce.provider.X509CertificateObject.verify(Unknown So
urce)
        at javax.crypto.SunJCE_b.d(DashoA12275)
        at javax.crypto.SunJCE_b.c(DashoA12275)
        at javax.crypto.SunJCE_r.run(DashoA12275)
        Truncated. see log file for complete stacktrace
>
<Feb 26, 2008 9:14:09 AM GMT-07:00> <Error> <Deployer> <BEA-149231> <Unable
to s
et the activation state to true for the application 'appservices'.
weblogic.application.ModuleException: [HTTP:101216]Servlet: "GatewayServlet"
fai
led to preload on startup in Web application: "/gateway".
java.lang.ExceptionInInitializerError
        at javax.crypto.SecretKeyFactory.getInstance(DashoA12275)



<SNIP>..<SNIP>

 

        at javax.servlet.GenericServlet.init(GenericServlet.java:241)
        at
weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(St
ubSecurityHelper.java:282)
        at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(Unknown Source)
        at
weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecuri
tyHelper.java:63)
        at
weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubL
ifecycleHelper.java:58)
        at
weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHel
per.java:48)
        at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
mpl.java:507)
        at
weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppS
ervletContext.java:1853)
        at
weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(
WebAppServletContext.java:1830)
        at
weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAp
pServletContext.java:1750)
        at
weblogic.servlet.internal.WebAppServletContext.start(WebAppServletCon
text.java:2909)
        at
weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.jav
a:973)
        at
weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:361)
        at
weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleSta
teDriver.java:204)
        at
weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
river.java:26)
        at
weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStat
eDriver.java:60)
        at
weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedMod
uleDriver.java:200)
        at
weblogic.application.internal.flow.ModuleListenerInvoker.start(Module
ListenerInvoker.java:117)
        at
weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleSta
teDriver.java:204)
        at
weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
river.java:26)
        at
weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStat
eDriver.java:60)
        at
weblogic.application.internal.flow.StartModulesFlow.activate(StartMod
ulesFlow.java:26)
        at
weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.ja
va:635)
        at
weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
river.java:26)
        at
weblogic.application.internal.BaseDeployment.activate(BaseDeployment.
java:212)
        at
weblogic.application.internal.DeploymentStateChecker.activate(Deploym
entStateChecker.java:154)
        at
weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(Ap
pContainerInvoker.java:80)
        at
weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicD
eployment.java:182)
        at
weblogic.deploy.internal.targetserver.BasicDeployment.activateFromSer
verLifecycle(BasicDeployment.java:359)
        at
weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(De
ploymentAdapter.java:51)
        at
weblogic.management.deploy.internal.DeploymentAdapter.activate(Deploy
mentAdapter.java:196)
        at
weblogic.management.deploy.internal.AppTransition$2.transitionApp(App
Transition.java:30)
        at
weblogic.management.deploy.internal.ConfiguredDeployments.transitionA
pps(ConfiguredDeployments.java:233)
        at
weblogic.management.deploy.internal.ConfiguredDeployments.activate(Co
nfiguredDeployments.java:169)
        at
weblogic.management.deploy.internal.ConfiguredDeployments.deploy(Conf
iguredDeployments.java:123)
        at
weblogic.management.deploy.internal.DeploymentServerService.resume(De
ploymentServerService.java:173)
        at
weblogic.management.deploy.internal.DeploymentServerService.start(Dep
loymentServerService.java:89)
        at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
        at
weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTunin
gWorkManagerImpl.java:464)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
Caused by: java.lang.SecurityException: Cannot set up certs for trusted CAs
        at javax.crypto.SunJCE_b.<clinit>(DashoA12275)
        ... 54 more
Caused by: java.security.PrivilegedActionException:
java.security.InvalidKeyExce
ption: Public key presented not for certificate signature
        at java.security.AccessController.doPrivileged(Native Method)
        ... 55 more
Caused by: java.security.InvalidKeyException: Public key presented not for
certi
ficate signature
        at
org.bouncycastle.jce.provider.X509CertificateObject.checkSignature(Un
known Source)
        at
org.bouncycastle.jce.provider.X509CertificateObject.verify(Unknown So
urce)
        at javax.crypto.SunJCE_b.d(DashoA12275)
        at javax.crypto.SunJCE_b.c(DashoA12275)
        at javax.crypto.SunJCE_r.run(DashoA12275)
        ... 56 more

 

        at
weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.jav
a:975)
        at
weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:361)
        at
weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleSta
teDriver.java:204)
        at
weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
river.java:26)
        at
weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStat
eDriver.java:60)
        Truncated. see log file for complete stacktrace
java.security.InvalidKeyException: Public key presented not for certificate
sign
ature
        at
org.bouncycastle.jce.provider.X509CertificateObject.checkSignature(Un
known Source)
        at
org.bouncycastle.jce.provider.X509CertificateObject.verify(Unknown So
urce)
        at javax.crypto.SunJCE_b.d(DashoA12275)
        at javax.crypto.SunJCE_b.c(DashoA12275)
        at javax.crypto.SunJCE_r.run(DashoA12275)
        Truncated. see log file for complete stacktrace
>
<Feb 26, 2008 9:14:09 AM GMT-07:00> <Notice> <Log Management> <BEA-170027>
<The



 

-Simon

 

From: George Stanchev [mailto:Gstanchev@serena.com] 
Sent: Tuesday, March 11, 2008 12:59 PM
To: axis-dev@ws.apache.org
Subject: RE: WLS 10 MP1 - Axis 2 1.3 - BouncyCastle problem

 

Hi Simon,

 

I saw your two messages on the users list. Can you describe what you are
running into?

BC needs to be in the system classpath?

 

George

 

  _____  

From: Simon Nunn [mailto:Simon.Nunn@issinc.com] 
Sent: Tuesday, March 11, 2008 9:46 AM
To: axis-dev@ws.apache.org
Subject: RE: WLS 10 MP1 - Axis 2 1.3 - BouncyCastle problem

One more try..I tried the Axis2 user list but never got a response.  Should
I reopen the issue below and add comments?

 

-Simon

 

From: Simon Nunn [mailto:Simon.Nunn@issinc.com] 
Sent: Thursday, March 06, 2008 10:44 AM
To: axis-dev@ws.apache.org
Subject: WLS 10 MP1 - Axis 2 1.3 - BouncyCastle problem

 

 

I am using WLS 10MP1 with Axis 2 v 1.3.  I am running into the same problem
that was described/fixed for http://issues.apache.org/jira/browse/AXIS2-811.
However, this bug was reported against an older version.  Has anyone else
ran into this problem?  I verified that the jar was indeed in the lib
directory, etc.  I had to use the "workaround" of modifying my java.security
file, and adding the bcprov-jdk15-132 .jar to my extensions directory.

 

Has anyone else ran into this and got it to work without modifying the
java.security file and copying the jar?

 

Thanks,

 Simon

 

**********************************************************************

This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
Any unauthorized review, use, disclosure or distribution is prohibited. If
you are not the intended recipient, please contact the sender by reply
e-mail and destroy all copies of the original message. 

**********************************************************************

 


RE: WLS 10 MP1 - Axis 2 1.3 - BouncyCastle problem

Posted by George Stanchev <Gs...@serena.com>.
Hi Simon,
 
I saw your two messages on the users list. Can you describe what you are
running into?
BC needs to be in the system classpath?
 
George

________________________________

From: Simon Nunn [mailto:Simon.Nunn@issinc.com] 
Sent: Tuesday, March 11, 2008 9:46 AM
To: axis-dev@ws.apache.org
Subject: RE: WLS 10 MP1 - Axis 2 1.3 - BouncyCastle problem



One more try....I tried the Axis2 user list but never got a response.
Should I reopen the issue below and add comments?

 

-Simon

 

From: Simon Nunn [mailto:Simon.Nunn@issinc.com] 
Sent: Thursday, March 06, 2008 10:44 AM
To: axis-dev@ws.apache.org
Subject: WLS 10 MP1 - Axis 2 1.3 - BouncyCastle problem

 

 

I am using WLS 10MP1 with Axis 2 v 1.3.  I am running into the same
problem that was described/fixed for
http://issues.apache.org/jira/browse/AXIS2-811. However, this bug was
reported against an older version.  Has anyone else ran into this
problem?  I verified that the jar was indeed in the lib directory, etc.
I had to use the "workaround" of modifying my java.security file, and
adding the bcprov-jdk15-132 .jar to my extensions directory.

 

Has anyone else ran into this and got it to work without modifying the
java.security file and copying the jar?

 

Thanks,

 Simon

 


**********************************************************************
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. 
**********************************************************************


RE: WLS 10 MP1 - Axis 2 1.3 - BouncyCastle problem

Posted by Simon Nunn <Si...@issinc.com>.
One more try..I tried the Axis2 user list but never got a response.  Should
I reopen the issue below and add comments?

 

-Simon

 

From: Simon Nunn [mailto:Simon.Nunn@issinc.com] 
Sent: Thursday, March 06, 2008 10:44 AM
To: axis-dev@ws.apache.org
Subject: WLS 10 MP1 - Axis 2 1.3 - BouncyCastle problem

 

 

I am using WLS 10MP1 with Axis 2 v 1.3.  I am running into the same problem
that was described/fixed for http://issues.apache.org/jira/browse/AXIS2-811.
However, this bug was reported against an older version.  Has anyone else
ran into this problem?  I verified that the jar was indeed in the lib
directory, etc.  I had to use the "workaround" of modifying my java.security
file, and adding the bcprov-jdk15-132 .jar to my extensions directory.

 

Has anyone else ran into this and got it to work without modifying the
java.security file and copying the jar?

 

Thanks,

 Simon