Bug 1097211 - JBossWS testsuite failures on Solaris11 and JDK7 with BC and unlimited cryptography
Summary: JBossWS testsuite failures on Solaris11 and JDK7 with BC and unlimited crypto...
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web Services
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: EAP 6.4.0
Assignee: Jim Ma
QA Contact: Jan Blizňák
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-13 11:53 UTC by Jan Blizňák
Modified: 2019-08-19 12:44 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
Cause: ?? Consequence: Workaround (if any): Result:
Clone Of:
Environment:
- Solaris11 x86/x86_64/SPARC64 - Oracle JDK 1.7 with Bouncy Castle JCE Provider and JCE unlimited strength cryptography - EAP 6.3.0.ER3 - JBossWS 4.3.0.Final
Last Closed: 2019-08-19 12:44:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jan Blizňák 2014-05-13 11:53:36 UTC
On Solaris11 x86/x86_64/SPARC64 with Oracle JDK 1.7 with Bouncy Castle JCE Provider and JCE limited strength cryptography
following tests are failing with the same errors with EAP 6.3.0.ER3 (JBossWS 4.3.0.Final):

============================================================================================================
org.jboss.test.ws.jaxws.samples.wsse.policy.basic.AnnotatedSignEncryptTestCase.test
============================================================================================================

Error Message:
The signature or decryption was invalid

Stacktrace:

javax.xml.ws.soap.SOAPFaultException: The signature or decryption was invalid
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:157)
	at com.sun.proxy.$Proxy122.sayHello(Unknown Source)
	at org.jboss.test.ws.jaxws.samples.wsse.policy.basic.AnnotatedSignEncryptTestCase.test(AnnotatedSignEncryptTestCase.java:69)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at junit.framework.TestCase.runTest(TestCase.java:168)
	at junit.framework.TestCase.runBare(TestCase.java:134)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:243)
	at junit.framework.TestSuite.run(TestSuite.java:238)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
	at org.jboss.wsf.test.JBossWSTestSetup$1.protect(JBossWSTestSetup.java:142)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at org.jboss.wsf.test.JBossWSTestSetup.run(JBossWSTestSetup.java:149)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:234)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:133)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:114)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:188)
	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:166)
	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:101)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
Caused by: org.apache.cxf.binding.soap.SoapFault: The signature or decryption was invalid
	at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:84)
	at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:51)
	at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:40)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
	at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:113)
	at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69)
	at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:835)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1614)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1504)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1310)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:628)
	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:565)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:474)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:377)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:330)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
	... 31 more

============================================================================================================
org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptGCMTestCase.testClientSide
============================================================================================================

Error Message:
The signature or decryption was invalid

Stacktrace:

javax.xml.ws.soap.SOAPFaultException: The signature or decryption was invalid
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:157)
	at com.sun.proxy.$Proxy127.sayHello(Unknown Source)
	at org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptHelper.invoke(SignEncryptHelper.java:91)
	at org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptHelper.testSignEncrypt(SignEncryptHelper.java:57)
	at org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptGCMTestCase.testClientSide(SignEncryptGCMTestCase.java:55)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at junit.framework.TestCase.runTest(TestCase.java:168)
	at junit.framework.TestCase.runBare(TestCase.java:134)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:243)
	at junit.framework.TestSuite.run(TestSuite.java:238)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
	at org.jboss.wsf.test.JBossWSTestSetup$1.protect(JBossWSTestSetup.java:142)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at org.jboss.wsf.test.JBossWSTestSetup.run(JBossWSTestSetup.java:149)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:234)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:133)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:114)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:188)
	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:166)
	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:101)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
Caused by: org.apache.cxf.binding.soap.SoapFault: The signature or decryption was invalid
	at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:84)
	at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:51)
	at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:40)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
	at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:113)
	at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69)
	at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:835)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1614)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1504)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1310)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:628)
	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:565)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:474)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:377)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:330)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
	... 33 more


============================================================================================================
org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptGCMTestCase.testClientSideUsingConfigProperties
============================================================================================================

Error Message:
The signature or decryption was invalid

Stacktrace:

javax.xml.ws.soap.SOAPFaultException: The signature or decryption was invalid
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:157)
	at com.sun.proxy.$Proxy127.sayHello(Unknown Source)
	at org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptHelper.invoke(SignEncryptHelper.java:91)
	at org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptHelper.testSignEncryptUsingConfigProperties(SignEncryptHelper.java:73)
	at org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptGCMTestCase.testClientSideUsingConfigProperties(SignEncryptGCMTestCase.java:62)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at junit.framework.TestCase.runTest(TestCase.java:168)
	at junit.framework.TestCase.runBare(TestCase.java:134)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:243)
	at junit.framework.TestSuite.run(TestSuite.java:238)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
	at org.jboss.wsf.test.JBossWSTestSetup$1.protect(JBossWSTestSetup.java:142)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at org.jboss.wsf.test.JBossWSTestSetup.run(JBossWSTestSetup.java:149)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:234)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:133)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:114)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:188)
	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:166)
	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:101)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
Caused by: org.apache.cxf.binding.soap.SoapFault: The signature or decryption was invalid
	at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:84)
	at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:51)
	at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:40)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
	at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:113)
	at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69)
	at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:835)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1614)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1504)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1310)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:628)
	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:565)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:474)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:377)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:330)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
	... 33 more

============================================================================================================
org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptGCMTestCase.testServerSideUsingConfigProperties
============================================================================================================

Error Message:
expected:<[1]> but was:<[# Failed tests:  # Error tests: testSignEncryptUsingConfigProperties: java.lang.NoClassDefFoundError org/apache/cxf/binding/soap/SoapFault]>

Stacktrace:

junit.framework.ComparisonFailure: expected:<[1]> but was:<[# Failed tests:  # Error tests: testSignEncryptUsingConfigProperties: java.lang.NoClassDefFoundError org/apache/cxf/binding/soap/SoapFault]>
	at junit.framework.Assert.assertEquals(Assert.java:85)
	at junit.framework.Assert.assertEquals(Assert.java:91)
	at org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptGCMTestCase.testServerSideUsingConfigProperties(SignEncryptGCMTestCase.java:77)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at junit.framework.TestCase.runTest(TestCase.java:168)
	at junit.framework.TestCase.runBare(TestCase.java:134)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:243)
	at junit.framework.TestSuite.run(TestSuite.java:238)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
	at org.jboss.wsf.test.JBossWSTestSetup$1.protect(JBossWSTestSetup.java:142)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at org.jboss.wsf.test.JBossWSTestSetup.run(JBossWSTestSetup.java:149)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:234)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:133)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:114)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:188)
	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:166)
	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:101)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)

============================================================================================================

How reproducible:
always so far


Additional info:
It might appear sooner but we didn't test previous builds with these JCEs on Solaris. I will try to investigate little bit more on this.

Comment 2 Jim Ma 2014-05-16 12:42:49 UTC
It could be another jdk bug on Solaris. The configured Bouncy Castle JCE Provider does NOT work at all. From the error stacktrace, it still uses the oracle's com.oracle.security.ucrypto.NativeCipher in jdk. It should be BC's
org.bouncycastle.jcajce.provider.symmetric.AES:

org.apache.xml.security.encryption.XMLEncryptionException: GCMParameterSpec required
Original Exception was java.security.InvalidAlgorithmParameterException: GCMParameterSpec required
	at org.apache.xml.security.encryption.XMLCipher.decryptToByteArray(XMLCipher.java:1764)
	at org.apache.xml.security.encryption.XMLCipher.decryptElement(XMLCipher.java:1618)
	at org.apache.xml.security.encryption.XMLCipher.decryptElementContent(XMLCipher.java:1656)
	at org.apache.xml.security.encryption.XMLCipher.doFinal(XMLCipher.java:978)
	at org.apache.ws.security.processor.ReferenceListProcessor.decryptEncryptedData(ReferenceListProcessor.java:337)
	... 33 more
Caused by: java.security.InvalidAlgorithmParameterException: GCMParameterSpec required
	at com.oracle.security.ucrypto.NativeCipher.engineInit(NativeCipher.java:360)
	at javax.crypto.Cipher.init(Cipher.java:1346) [jce.jar:1.7.0_51]
	at javax.crypto.Cipher.init(Cipher.java:1282) [jce.jar:1.7.0_51]
	at org.apache.xml.security.encryption.XMLCipher.decryptToByteArray(XMLCipher.java:1760)

Comment 4 Jim Ma 2014-05-21 09:07:25 UTC
Hi Jan, What's the result if we change the BuncyCastleProvider to be the security. provider.1 ?

Comment 5 Jan Blizňák 2014-05-21 16:55:27 UTC
Tested on Solaris11 32 and 64bit, failing tests only:

used Java with custom java.security file with providers order:

UcryptoProvider; SunPKCS11; ..others..; BouncyCastleProvider; --> FAILED
BouncyCastleProvider; UcryptoProvider; SunPKCS11; ..others..; --> PASSED
..others..; BouncyCastleProvider;                             --> PASSED
BouncyCastleProvider; ..others..;                             --> PASSED

https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/EAP6/view/EAP6-WS/job/eap-6x-jbossws-testsuite-solaris11-JDK7-issues-check/8/

Comment 6 Jim Ma 2014-05-23 00:10:26 UTC
We can document something like this:
To use AES in Galois Counter Mode(AES-GCM) based algorithms for jbossws WS-Security on Solaris with JDK7, the BouncyCastleProvider must be configured as the first security provider in the java.security file in the lib/security directory of the JDK.

Comment 7 Jan Blizňák 2014-08-12 10:31:22 UTC
I found this issue which seems related:
https://issues.apache.org/jira/browse/SANTUARIO-392

Given that, I replace xmlsec with upstream version 1.5.7 for both server and client and executed testsuite with EAP 6.3.0.ER10, JDK 1.7.0_51, java.security:

security.provider.1=com.oracle.security.ucrypto.UcryptoProvider ${java.home}/lib/security/ucrypto-solaris.cfg
security.provider.2=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/sunpkcs11-solaris.cfg
security.provider.3=sun.security.provider.Sun
security.provider.4=sun.security.rsa.SunRsaSign
security.provider.5=sun.security.ec.SunEC
security.provider.6=com.sun.net.ssl.internal.ssl.Provider
security.provider.7=com.sun.crypto.provider.SunJCE
security.provider.8=sun.security.jgss.SunProvider
security.provider.9=com.sun.security.sasl.Provider
security.provider.10=org.jcp.xml.dsig.internal.dom.XMLDSigRI
security.provider.11=sun.security.smartcardio.SunPCSC
security.provider.12=org.bouncycastle.jce.provider.BouncyCastleProvider


============================================================================================================
org.jboss.test.ws.jaxws.samples.wsse.policy.basic.AnnotatedSignEncryptTestCase.test
============================================================================================================

javax.xml.ws.soap.SOAPFaultException: Cannot encrypt data
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:157)
	at com.sun.proxy.$Proxy128.sayHello(Unknown Source)
	at org.jboss.test.ws.jaxws.samples.wsse.policy.basic.AnnotatedSignEncryptTestCase.test(AnnotatedSignEncryptTestCase.java:69)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at junit.framework.TestCase.runTest(TestCase.java:168)
 	at junit.framework.TestCase.runBare(TestCase.java:134)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
 	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
 	at junit.framework.TestSuite.runTest(TestSuite.java:243)
	at junit.framework.TestSuite.run(TestSuite.java:238)
 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
	at org.jboss.wsf.test.JBossWSTestSetup$1.protect(JBossWSTestSetup.java:142)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
 	at org.jboss.wsf.test.JBossWSTestSetup.run(JBossWSTestSetup.java:149)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
 	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:234)
 	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:133)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:114)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:188)
	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:166)
	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86)
 	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:101)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
Caused by: org.apache.cxf.ws.policy.PolicyException: Cannot encrypt data
	at org.apache.cxf.ws.security.wss4j.policyhandlers.AbstractBindingBuilder.policyNotAsserted(AbstractBindingBuilder.java:292)
 	at org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.doEncryption(AsymmetricBindingHandler.java:461)
 	at org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.doSignBeforeEncrypt(AsymmetricBindingHandler.java:190)
 	at org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.handleBinding(AsymmetricBindingHandler.java:98)
 	at org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$PolicyBasedWSS4JOutInterceptorInternal.handleMessage(PolicyBasedWSS4JOutInterceptor.java:176)
	at org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$PolicyBasedWSS4JOutInterceptorInternal.handleMessage(PolicyBasedWSS4JOutInterceptor.java:90)
 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:570)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:479)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:382)
 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:335)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
	... 31 more
Caused by: org.apache.ws.security.WSSecurityException: Cannot encrypt data
	at org.apache.ws.security.message.WSSecEncrypt.encryptElement(WSSecEncrypt.java:493)
	at org.apache.ws.security.message.WSSecEncrypt.doEncryption(WSSecEncrypt.java:406)
 	at org.apache.ws.security.message.WSSecEncrypt.encryptForRef(WSSecEncrypt.java:289)
	at org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.doEncryption(AsymmetricBindingHandler.java:452)
	... 42 more
Caused by: com.oracle.security.ucrypto.UcryptoException: Cannot initialize Cipher
 	at com.oracle.security.ucrypto.NativeCipher.ensureInitialized(NativeCipher.java:590)
 	at com.oracle.security.ucrypto.NativeCipher.update(NativeCipher.java:621)
 	at com.oracle.security.ucrypto.NativeCipher.engineDoFinal(NativeCipher.java:482)
 	at com.oracle.security.ucrypto.NativeCipher.engineDoFinal(NativeCipher.java:464)
 	at javax.crypto.Cipher.doFinal(Cipher.java:2087)
 	at org.apache.xml.security.encryption.XMLCipher.encryptData(XMLCipher.java:1173)
 	at org.apache.xml.security.encryption.XMLCipher.encryptData(XMLCipher.java:1093)
	at org.apache.xml.security.encryption.XMLCipher.encryptElementContent(XMLCipher.java:867)
	at org.apache.xml.security.encryption.XMLCipher.doFinal(XMLCipher.java:997)
	at org.apache.ws.security.message.WSSecEncrypt.encryptElement(WSSecEncrypt.java:490)
 	... 45 more

============================================================================================================
org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptGCMTestCase.testClientSide
============================================================================================================

javax.xml.ws.soap.SOAPFaultException: Cannot encrypt data
 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:157)
 	at com.sun.proxy.$Proxy133.sayHello(Unknown Source)
 	at org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptHelper.invoke(SignEncryptHelper.java:91)
	at org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptHelper.testSignEncrypt(SignEncryptHelper.java:57)
 	at org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptGCMTestCase.testClientSide(SignEncryptGCMTestCase.java:55)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
 	at junit.framework.TestCase.runTest(TestCase.java:168)
	at junit.framework.TestCase.runBare(TestCase.java:134)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
 	at junit.framework.TestResult.runProtected(TestResult.java:128)
 	at junit.framework.TestResult.run(TestResult.java:113)
 	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:243)
	at junit.framework.TestSuite.run(TestSuite.java:238)
 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
 	at org.jboss.wsf.test.JBossWSTestSetup$1.protect(JBossWSTestSetup.java:142)
 	at junit.framework.TestResult.runProtected(TestResult.java:128)
 	at org.jboss.wsf.test.JBossWSTestSetup.run(JBossWSTestSetup.java:149)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
 	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:234)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:133)
 	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:114)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:188)
 	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:166)
	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:101)
 	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
Caused by: org.apache.cxf.ws.policy.PolicyException: Cannot encrypt data
 	at org.apache.cxf.ws.security.wss4j.policyhandlers.AbstractBindingBuilder.policyNotAsserted(AbstractBindingBuilder.java:292)
	at org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.doEncryption(AsymmetricBindingHandler.java:461)
	at org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.doSignBeforeEncrypt(AsymmetricBindingHandler.java:190)
 	at org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.handleBinding(AsymmetricBindingHandler.java:98)
	at org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$PolicyBasedWSS4JOutInterceptorInternal.handleMessage(PolicyBasedWSS4JOutInterceptor.java:176)
	at org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$PolicyBasedWSS4JOutInterceptorInternal.handleMessage(PolicyBasedWSS4JOutInterceptor.java:90)
 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:570)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:479)
 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:382)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:335)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
	... 33 more
Caused by: org.apache.ws.security.WSSecurityException: Cannot encrypt data
 	at org.apache.ws.security.message.WSSecEncrypt.encryptElement(WSSecEncrypt.java:493)
 	at org.apache.ws.security.message.WSSecEncrypt.doEncryption(WSSecEncrypt.java:406)
 	at org.apache.ws.security.message.WSSecEncrypt.encryptForRef(WSSecEncrypt.java:289)
	at org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.doEncryption(AsymmetricBindingHandler.java:452)
 	... 44 more
Caused by: com.oracle.security.ucrypto.UcryptoException: Cannot initialize Cipher
	at com.oracle.security.ucrypto.NativeCipher.ensureInitialized(NativeCipher.java:590)
 	at com.oracle.security.ucrypto.NativeCipher.update(NativeCipher.java:621)
	at com.oracle.security.ucrypto.NativeCipher.engineDoFinal(NativeCipher.java:482)
 	at com.oracle.security.ucrypto.NativeCipher.engineDoFinal(NativeCipher.java:464)
	at javax.crypto.Cipher.doFinal(Cipher.java:2087)
 	at org.apache.xml.security.encryption.XMLCipher.encryptData(XMLCipher.java:1173)
	at org.apache.xml.security.encryption.XMLCipher.encryptData(XMLCipher.java:1093)
 	at org.apache.xml.security.encryption.XMLCipher.encryptElementContent(XMLCipher.java:867)
	at org.apache.xml.security.encryption.XMLCipher.doFinal(XMLCipher.java:997)
	at org.apache.ws.security.message.WSSecEncrypt.encryptElement(WSSecEncrypt.java:490)
	... 47 more


============================================================================================================
org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptGCMTestCase.testClientSideUsingConfigProperties
============================================================================================================

javax.xml.ws.soap.SOAPFaultException: Cannot encrypt data
 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:157)
	at com.sun.proxy.$Proxy133.sayHello(Unknown Source)
	at org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptHelper.invoke(SignEncryptHelper.java:91)
	at org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptHelper.testSignEncryptUsingConfigProperties(SignEncryptHelper.java:73)
	at org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptGCMTestCase.testClientSideUsingConfigProperties(SignEncryptGCMTestCase.java:62)
 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at junit.framework.TestCase.runTest(TestCase.java:168)
 	at junit.framework.TestCase.runBare(TestCase.java:134)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
 	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
 	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:243)
	at junit.framework.TestSuite.run(TestSuite.java:238)
 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
	at org.jboss.wsf.test.JBossWSTestSetup$1.protect(JBossWSTestSetup.java:142)
 	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at org.jboss.wsf.test.JBossWSTestSetup.run(JBossWSTestSetup.java:149)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
 	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:234)
 	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:133)
 	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:114)
 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 	at java.lang.reflect.Method.invoke(Method.java:606)
 	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:188)
 	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:166)
 	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86)
 	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:101)
 	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
Caused by: org.apache.cxf.ws.policy.PolicyException: Cannot encrypt data
 	at org.apache.cxf.ws.security.wss4j.policyhandlers.AbstractBindingBuilder.policyNotAsserted(AbstractBindingBuilder.java:292)
 	at org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.doEncryption(AsymmetricBindingHandler.java:461)
 	at org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.doSignBeforeEncrypt(AsymmetricBindingHandler.java:190)
 	at org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.handleBinding(AsymmetricBindingHandler.java:98)
 	at org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$PolicyBasedWSS4JOutInterceptorInternal.handleMessage(PolicyBasedWSS4JOutInterceptor.java:176)
 	at org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$PolicyBasedWSS4JOutInterceptorInternal.handleMessage(PolicyBasedWSS4JOutInterceptor.java:90)
 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
 	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:570)
 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:479)
 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:382)
 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:335)
 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
 	... 33 more
Caused by: org.apache.ws.security.WSSecurityException: Cannot encrypt data
        at org.apache.ws.security.message.WSSecEncrypt.encryptElement(WSSecEncrypt.java:493)
 	at org.apache.ws.security.message.WSSecEncrypt.doEncryption(WSSecEncrypt.java:406)
 	at org.apache.ws.security.message.WSSecEncrypt.encryptForRef(WSSecEncrypt.java:289)
 	at org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.doEncryption(AsymmetricBindingHandler.java:452)
 	... 44 more
Caused by: com.oracle.security.ucrypto.UcryptoException: Cannot initialize Cipher
	at com.oracle.security.ucrypto.NativeCipher.ensureInitialized(NativeCipher.java:590)
 	at com.oracle.security.ucrypto.NativeCipher.update(NativeCipher.java:621)
 	at com.oracle.security.ucrypto.NativeCipher.engineDoFinal(NativeCipher.java:482)
 	at com.oracle.security.ucrypto.NativeCipher.engineDoFinal(NativeCipher.java:464)
 	at javax.crypto.Cipher.doFinal(Cipher.java:2087)
	at org.apache.xml.security.encryption.XMLCipher.encryptData(XMLCipher.java:1173)
	at org.apache.xml.security.encryption.XMLCipher.encryptData(XMLCipher.java:1093)
 	at org.apache.xml.security.encryption.XMLCipher.encryptElementContent(XMLCipher.java:867)
	at org.apache.xml.security.encryption.XMLCipher.doFinal(XMLCipher.java:997)
 	at org.apache.ws.security.message.WSSecEncrypt.encryptElement(WSSecEncrypt.java:490)
	... 47 more

============================================================================================================
org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptGCMTestCase.testServerSideUsingConfigProperties
============================================================================================================

junit.framework.ComparisonFailure: expected:<[1]> but was:<[# Failed tests:  # Error tests: testSignEncryptUsingConfigProperties: java.lang.NoClassDefFoundError org/apache/cxf/binding/soap/SoapFault]>
	at junit.framework.Assert.assertEquals(Assert.java:85)
	at junit.framework.Assert.assertEquals(Assert.java:91)
	at org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptGCMTestCase.testServerSideUsingConfigProperties(SignEncryptGCMTestCase.java:77)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at junit.framework.TestCase.runTest(TestCase.java:168)
	at junit.framework.TestCase.runBare(TestCase.java:134)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:243)
	at junit.framework.TestSuite.run(TestSuite.java:238)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
	at org.jboss.wsf.test.JBossWSTestSetup$1.protect(JBossWSTestSetup.java:142)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at org.jboss.wsf.test.JBossWSTestSetup.run(JBossWSTestSetup.java:149)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:234)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:133)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:114)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:188)
	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:166)
	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:101)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)

============================================================================================================


So the issue in xmlsec hid another issue which might be configuration issue of Solaris machine since it can't load Cipher in native method.
But the high level issue persists - it does not work when UCryptoProvider is defined in java.security before BC provider.
And it does work when BC provider is before UCryptoProvider.

Comment 8 Jim Ma 2014-10-30 10:09:28 UTC
Both Apache CXF and  uses the BC provider to run all security tests.

Comment 9 Jim Ma 2014-10-30 10:16:12 UTC
(In reply to Jim Ma from comment #8)
Wrongly click the save changes button , more thing to add ...
Both Apache CXF and JBoss-CXF uses the BC provider to run all security tests. It is possible there is something wrong in oracle's UCryptoProvider, or jbossws-cxf doesn't support the mix configuration of BC provider and UCryptoProvider. Given we have already figured out BC provider can work, we can document this and let customer know how to configure on Solaris.


Note You need to log in before you can comment on or make changes to this bug.