Bug 1037485 - switchyard-core - failing unit test(s)
Summary: switchyard-core - failing unit test(s)
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: SwitchYard
Version: 6.0.0
Hardware: Unspecified
OS: Windows
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: tcunning
QA Contact: Jiri Sedlacek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-03 09:31 UTC by Martin Basovník
Modified: 2016-12-01 00:55 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Some problems have been found on an IBM JVM (both 1.6 and 1.7) when parsing XML files. XML files should have values on one line if possible. Unit tests have been performed where one XML file is used with the binary security token spread across several lines. Only the first line is being read; therefore, these tests fail.
Clone Of:
Environment:
Last Closed: 2014-10-16 13:59:37 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1069593 0 unspecified CLOSED XML document limitations for IBM jdk 1.6, 1.7 2021-02-22 00:41:40 UTC

Internal Links: 1069593

Description Martin Basovník 2013-12-03 09:31:04 UTC
Description of problem:
Unit test on switchyard-core is failing (OS Win2k8 + JDK ibm7)
org.switchyard.security.credential.extractor.SOAPMessageCredentialExtractorTests#testBinarySecurityToken


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:

1. Environment: W2k8-x86_64, JDK ibm7 (opt\windows\amd64\ibm-java-70)
2. Clone switchyard-core from http://dev138.mw.lab.eng.bos.redhat.com/candidate/soa-6.0.0-ER6/builder.cfg with patches OR download it from here https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/SOA/view/SOA6/job/soa-6.0/lastSuccessfulBuild/artifact/resources-switchyardcore.zip (Check the parametr 'build.config' at soa-6.0. There has to be URL defined above!!)
3. Execute unit test: org.switchyard.security.credential.extractor.SOAPMessageCredentialExtractorTests#testBinarySecurityToken
 

Actual results:
Error Message

SWITCHYARD014407: Could not create certificate(s): Unable to initialize, java.io.EOFException: Detect premature EOF

Stacktrace

java.lang.RuntimeException: SWITCHYARD014407: Could not create certificate(s): Unable to initialize, java.io.EOFException: Detect premature EOF
	at org.switchyard.security.credential.extractor.SOAPMessageCredentialExtractor.extract(SOAPMessageCredentialExtractor.java:132)
	at org.switchyard.security.credential.extractor.SOAPMessageCredentialExtractorTests.testBinarySecurityToken(SOAPMessageCredentialExtractorTests.java:92)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:607)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
	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:76)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:607)
	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: java.security.cert.CertificateException: Unable to initialize, java.io.EOFException: Detect premature EOF
	at com.ibm.security.x509.X509CertImpl.<init>(X509CertImpl.java:276)
	at com.ibm.crypto.provider.X509Factory.engineGenerateCertificate(Unknown Source)
	at java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.java:407)
	at org.switchyard.security.credential.extractor.SOAPMessageCredentialExtractor.extract(SOAPMessageCredentialExtractor.java:124)
	... 30 more


Expected results:
Tests is successful.

Additional info:
https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/SOA/view/SOA6/job/soa-6-switchyard-unit-matrix/jdk=ibm17,label_exp=w2k8%26%26x86_64,project_name=switchyardcore/lastCompletedBuild/testReport/org.switchyard.security.credential.extractor/SOAPMessageCredentialExtractorTests/testBinarySecurityToken/

Comment 1 belong 2014-02-27 00:06:10 UTC
Anne-Louise,

Does this bug have to be marked as Private? It would be convenient if it wasn't so it can be picked up in Release Notes.

Ben

Comment 2 belong 2014-02-28 01:36:30 UTC
Len confirmed this bug can be publicly viewable.

Comment 3 tcunning 2014-10-16 13:59:37 UTC
I tested this on F20 / IBM JDK 1.7 and Martin re-tested it on Windows / IBM JDK 1.7.    Neither of us could reproduce this.    It is possible that something changed in the IBM JDK since this bug was reported.


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