Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JAXWS TCK failures with GF 6.1 and JDK 11 #649

Closed
gurunrao opened this issue Mar 11, 2021 · 18 comments
Closed

JAXWS TCK failures with GF 6.1 and JDK 11 #649

gurunrao opened this issue Mar 11, 2021 · 18 comments
Assignees
Labels
9.1 9.1 release

Comments

@gurunrao
Copy link
Contributor

gurunrao commented Mar 11, 2021

JAXWS TCK Test run logs and details of failures can be seen here - xml-ws-tck-junit-report.txt
Failure count can be found at wiki - https://github.com/eclipse-ee4j/jakartaee-tck/wiki/Jakarta-EE-9.1-TCK-results
Steps for reproducing issue by running JAXWS TCK, can be found with wiki - https://github.com/eclipse-ee4j/jakartaee-tck/wiki/Instructions-for-Building-&-Running-Jakarta-EE-Standalone-TCKs

JAXWS TCK bundle can be downloaded from https://download.eclipse.org/ee4j/jakartaee-tck/jakartaee9-eftl/staged-910/jakarta-xml-ws-tck-3.0.0.zip
Archive with logs and results can be found at https://ci.eclipse.org/jakartaee-tck/job/9.1/job/eftl-standalonetck-build-run-910/28/artifact/xml-ws-tck-results.tar.gz

@gurunrao gurunrao added the 9.1 9.1 release label Mar 11, 2021
@gurunrao gurunrao self-assigned this Mar 11, 2021
@gurunrao
Copy link
Contributor Author

gurunrao commented Mar 11, 2021

WIP PR - #662

@scottmarlow
Copy link
Contributor

@gurunrao
Copy link
Contributor Author

JAXWS tests passes with GF build #117, we are seeing failures with latest GF build.
JAXWS Tests with GF build #117 - https://ci.eclipse.org/jakartaee-tck/job/guru/job/jakartaee-tck-guru/job/master/11
JAXWS Tests with latest GF build - https://ci.eclipse.org/jakartaee-tck/job/guru/job/jakartaee-tck-guru/job/master/12/
Unfortunately GF build #117 is archived.
Looks like metro was upgraded in build 118 - https://ci.eclipse.org/jakartaee-tck/job/build-glassfish/118/
cc @scottmarlow

@gurunrao
Copy link
Contributor Author

gurunrao commented Mar 21, 2021

We are seeing " [wsgen] Caused by: java.lang.ClassNotFoundException: com.sun.tools.ws.WsGen" even though webservices-osgi.jar is in classpath.

complete stack-trace is as follows:

[wsgen] JAX-WS RI ${project.version} [wsgen] command line: wsgen-d /home/jenkins/agent/workspace/guru_jakartaee-tck-guru_master/xml-ws-tck/classes_vi_built/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/generated_classes -keep -s /home/jenkins/agent/workspace/guru_jakartaee-tck-guru_master/xml-ws-tck/classes_vi_built/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/generated_sources -verbose -classpath /home/jenkins/agent/workspace/guru_jakartaee-tck-guru_master/glassfish6/glassfish/lib/resolver.jar:/home/jenkins/agent/workspace/guru_jakartaee-tck-guru_master/glassfish6/glassfish/modules/webservices-api-osgi.jar:/home/jenkins/agent/workspace/guru_jakartaee-tck-guru_master/glassfish6/glassfish/modules/jaxb-api-osgi.jar:/home/jenkins/agent/workspace/guru_jakartaee-tck-guru_master/glassfish6/glassfish/modules/webservices-osgi.jar:/home/jenkins/agent/workspace/guru_jakartaee-tck-guru_master/glassfish6/glassfish/modules/jaxb-osgi.jar:/home/jenkins/agent/workspace/guru_jakartaee-tck-guru_master/glassfish6/glassfish/modules/gmbal.jar:/home/jenkins/agent/workspace/guru_jakartaee-tck-guru_master/glassfish6/glassfish/modules/management-api.jar:/home/jenkins/agent/workspace/guru_jakartaee-tck-guru_master/glassfish6/glassfish/modules/mimepull.jar:/home/jenkins/agent/workspace/guru_jakartaee-tck-guru_master/glassfish6/glassfish/modules/ha-api.jar:/home/jenkins/agent/workspace/guru_jakartaee-tck-guru_master/glassfish6/glassfish/modules/webservices-api.jar:/home/jenkins/agent/workspace/guru_jakartaee-tck-guru_master/glassfish6/glassfish/modules/jakarta.xml.bind-api.jar:/home/jenkins/agent/workspace/guru_jakartaee-tck-guru_master/glassfish6/glassfish/modules/jakarta.activation.jar:/opt/lib/tools.jar:/home/jenkins/agent/workspace/guru_jakartaee-tck-guru_master/xml-ws-tck/classes_vi_built:/home/jenkins/agent/workspace/guru_jakartaee-tck-guru_master/xml-ws-tck/src/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server -wsdl:soap1.1 -r /home/jenkins/agent/workspace/guru_jakartaee-tck-guru_master/xml-ws-tck/src/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server com.sun.ts.tests.jaxws.ee.j2w.document.literal.marshalltest.server.MarshallTestImpl [wsgen] Picked up JAVA_TOOL_OPTIONS: -Xmx6G [wsgen] Error: Could not find or load main class com.sun.tools.ws.WsGen [wsgen] Caused by: java.lang.ClassNotFoundException: com.sun.tools.ws.WsGen [dosubdirs] The following error occurred while executing this line: [dosubdirs] /home/jenkins/agent/workspace/guru_jakartaee-tck-guru_master/xml-ws-tck/src/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/client/build.xml:37: The following error occurred while executing this line: [dosubdirs] /home/jenkins/agent/workspace/guru_jakartaee-tck-guru_master/xml-ws-tck/src/com/sun/ts/tests/jaxws/ee/j2w/document/literal/marshalltest/server/build.xml:43: The following error occurred while executing this line: [dosubdirs] /home/jenkins/agent/workspace/guru_jakartaee-tck-guru_master/xml-ws-tck/src/com/sun/ts/tests/jaxws/common/xml/common.xml:1146: The following error occurred while executing this line: [dosubdirs] /home/jenkins/agent/workspace/guru_jakartaee-tck-guru_master/xml-ws-tck/src/com/sun/ts/tests/jaxws/common/xml/common.xml:940: wsgen failed [dosubdirs] at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:571) [dosubdirs] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:440) [dosubdirs] at com.sun.ant.taskdefs.common.DoSubdirs.execute(DoSubdirs.java:123) [dosubdirs] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) [dosubdirs] at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) [dosubdirs] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [dosubdirs] at java.base/java.lang.reflect.Method.invoke(Method.java:566) [dosubdirs] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99) [dosubdirs] at org.apache.tools.ant.Task.perform(Task.java:350) [dosubdirs] at org.apache.tools.ant.Target.execute(Target.java:449) [dosubdirs] at org.apache.tools.ant.Target.performTasks(Target.java:470) [dosubdirs] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1391) [dosubdirs] at org.apache.tools.ant.Project.executeTarget(Project.java:1364) [dosubdirs] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) [dosubdirs] at org.apache.tools.ant.Project.executeTargets(Project.java:1254) [dosubdirs] at org.apache.tools.ant.Main.runBuild(Main.java:830) [dosubdirs] at org.apache.tools.ant.Main.startAnt(Main.java:223) [dosubdirs] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284) [dosubdirs] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)

@scottmarlow
Copy link
Contributor

Wsgen failure also mentioned on #668 (comment)

@hussainnm
Copy link
Contributor

@gurunrao Setting fork="false" in the wsgen task works.

https://github.com/eclipse-ee4j/jakartaee-tck/blob/5d6811de89da2e23086c6e766585118b7b4d16f6/src/com/sun/ts/tests/jaxws/common/xml/common.xml#L957-L963

@gurunrao
Copy link
Contributor Author

gurunrao commented Mar 21, 2021

Post making fork=false, wsgen CNFE are gone and failures have reduced.
We have around 31 failures with:

IOException thrown when processing "http://www.w3.org/2006/03/addressing/ws-addr.xsd". Exception: java.io.FileNotFoundException: /home/jenkins/agent/workspace/guru_jakartaee-tck-guru_jaxws-cp/xml-ws-tck/lib/schemas/ws-addr.xsd (No such file or directory).

More details can be found with logs here - https://ci.eclipse.org/jakartaee-tck/job/guru/job/jakartaee-tck-guru/job/jaxws-cp/5/artifact/jaxwstck.log

@hussainnm
Copy link
Contributor

Adding ws-addr.xsd to lib/schema resolves the FileNotFoundException.

http://www.w3.org/2002/ws/addr/ns/ws-addr

@gurunrao
Copy link
Contributor Author

Adding ws-addr.xsd to lib/schema resolves the FileNotFoundException.

http://www.w3.org/2002/ws/addr/ns/ws-addr

not sure if FileNotFoundException is an issue with new metro release, since previously our test used to pass without ws-addr.xsd in lib/schema.

@hussainnm
Copy link
Contributor

It is defined in jax-ws-catalog.xml to be served by lib/schemas. In the below stack trace, it fails to resolve EndpointReferenceType which is defined in ws-addr.

 [wsimport] parsing WSDL...
 [wsimport] 
 [wsimport] 
 [wsimport] [ERROR] IOException thrown when processing "http://www.w3.org/2006/03/addressing/ws-addr.xsd". Exception: java.io.FileNotFoundException: /home/jenkins/agent/workspace/guru_jakartaee-tck-guru_jaxws-cp/xml-ws-tck/lib/schemas/ws-addr.xsd (No such file or directory).
 [wsimport] 
 [wsimport] 
 [wsimport] [ERROR] IOException thrown when processing "http://www.w3.org/2006/03/addressing/ws-addr.xsd". Exception: java.io.FileNotFoundException: /home/jenkins/agent/workspace/guru_jakartaee-tck-guru_jaxws-cp/xml-ws-tck/lib/schemas/ws-addr.xsd (No such file or directory).
 [wsimport] 
 [wsimport] 
 [wsimport] [WARNING] schema_reference.4: Failed to read schema document 'file:/home/jenkins/agent/workspace/guru_jakartaee-tck-guru_jaxws-cp/xml-ws-tck/lib/schemas/ws-addr.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
 [wsimport]   line 36 of file:/home/jenkins/agent/workspace/guru_jakartaee-tck-guru_jaxws-cp/xml-ws-tck/src/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/eprsubtypes/W2JDLEPRSubTypes.wsdl#types?schema1
 [wsimport] 
 [wsimport] [WARNING] schema_reference.4: Failed to read schema document 'file:/home/jenkins/agent/workspace/guru_jakartaee-tck-guru_jaxws-cp/xml-ws-tck/lib/schemas/ws-addr.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
 [wsimport]   line 25 of file:/home/jenkins/agent/workspace/guru_jakartaee-tck-guru_jaxws-cp/xml-ws-tck/src/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/eprsubtypes/W2JDLEPRSubTypes.xsd
 [wsimport] 
 [wsimport] [WARNING] src-resolve: Cannot resolve the name 'ws:EndpointReferenceType' to a(n) 'type definition' component.
 [wsimport]   line 58 of file:/home/jenkins/agent/workspace/guru_jakartaee-tck-guru_jaxws-cp/xml-ws-tck/src/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/eprsubtypes/W2JDLEPRSubTypes.wsdl#types?schema1
 [wsimport] 
 [wsimport] Exception in thread "main" com.sun.tools.ws.wscompile.AbortException
 [wsimport] 	at com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:114)
 [wsimport] 	at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2268)
 [wsimport] 	at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:168)
 [wsimport] 	at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:111)
 [wsimport] 	at com.sun.tools.ws.wscompile.WsimportTool.buildWsdlModel(WsimportTool.java:414)
 [wsimport] 	at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:175)
 [wsimport] 	at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:153)
 [wsimport] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 [wsimport] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 [wsimport] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 [wsimport] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
 [wsimport] 	at com.sun.tools.ws.Invoker.invoke(Invoker.java:124)
 [wsimport] 	at com.sun.tools.ws.WsImport.main(WsImport.java:26)

@gurunrao
Copy link
Contributor Author

gurunrao commented Mar 21, 2021

PR with fixes - #676 will not be required as metro team will fix issue with wsgen and resolution of ws-addr.xsd

@gurunrao
Copy link
Contributor Author

jaxws standalone tck passing here - https://ci.eclipse.org/jakartaee-tck/blue/organizations/jenkins/jakartaee-tck/detail/master/1347/tests

https://ci.eclipse.org/jakartaee-tck/blue/rest/organizations/jenkins/pipelines/jakar[…]tck/branches/master/runs/1347/nodes/70/steps/270/log/?start=0

[javatest.batch] ********************************************************************************
[javatest.batch] Number of tests completed: 1703 (1703 passed, 0 failed, 0 with errors)
[javatest.batch] Number of tests remaining: 0
[javatest.batch] ********************************************************************************
[javatest.batch] Completed running 1703 tests.
[javatest.batch] Number of Tests Passed = 1703
[javatest.batch] Number of Tests Failed = 0
[javatest.batch] Number of Tests with Errors = 0
[javatest.batch] ********************************************************************************

@scottmarlow
Copy link
Contributor

#676 (comment) calls out that we need to add schemas for swaref + ws-addr which isn't yet resolved. We have pending CQs that will help us but do not yet have a tracking issue.

Does anyone think that we do not need to add schemas for swaref + ws-addr? I'm asking so we can understand if a new tracking issue should be created for doing that for Jakarta EE 9.1.

@lukasj
Copy link
Contributor

lukasj commented Mar 24, 2021

@scottmarlow

if you're fine with following warning during the build:

...
 [wsimport] JAX-WS RI 3.0.1-b02
 [wsimport] command line: wsimport-d /home/jenkins/agent/workspace/TCK_jakarta_9_JAXWS/xml-ws-tck/classes_vi_built/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/eprsubtypes/generated_classes -keep -s /home/jenkins/agent/workspace/TCK_jakarta_9_JAXWS/xml-ws-tck/classes_vi_built/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/eprsubtypes/generated_sources -verbose -catalog /home/jenkins/agent/workspace/TCK_jakarta_9_JAXWS/xml-ws-tck/src/com/sun/ts/tests/jaxws/common/xml/catalog/META-INF/jax-ws-catalog.xml /home/jenkins/agent/workspace/TCK_jakarta_9_JAXWS/xml-ws-tck/bin/xml/../../src/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/eprsubtypes/W2JDLEPRSubTypes.wsdl -b /home/jenkins/agent/workspace/TCK_jakarta_9_JAXWS/xml-ws-tck/src/com/sun/ts/tests/jaxws/mapping/w2jmapping/document/literal/eprsubtypes/customfile.xml -wsdllocation WEB-INF/wsdl/${the.wsdl.filename}
 [wsimport] parsing WSDL...
 [wsimport] 
 [wsimport] 
 [wsimport] [WARNING] Catalog points to non-existent resource: "file:/home/jenkins/agent/workspace/TCK_jakarta_9_JAXWS/xml-ws-tck/lib/schemas/ws-addr.xsd". Trying to reach "http://www.w3.org/2006/03/addressing/ws-addr.xsd" directly.
 [wsimport] 
 [wsimport] 
 [wsimport] 
 [wsimport] Generating code...
 [wsimport] 
 [wsimport] test/importedtypes/ImportedResType.java
 [wsimport] test/importedtypes/ObjectFactory.java
...

those schemas don't have to be added. I believe what is going on is self explanatory :-)

@scottmarlow
Copy link
Contributor

@lukasj If an implementation fails due to the missing schemas and such implementation creates a TCK challenge, would we exclude the tests that depend on those missing schemas. If yes, I would like to add the schemas.

FYI, the current TCK process https://jakarta.ee/committees/specification/tckprocess explains valid challenges:

Valid Challenges

Any test case (e.g., test class, @Test method), test case configuration (e.g., deployment descriptor), test beans, annotations, and other resources considered part of the TCK may be challenged.

The following scenarios are considered in scope for test challenges:
- Claims that a test assertion conflicts with the specification.
- Claims that a test asserts requirements over and above that of the specification.
- Claims that an assertion of the specification is not sufficiently implementable.
- Claims that a test is not portable or depends on a particular implementation.

@lukasj
Copy link
Contributor

lukasj commented Mar 24, 2021

@scottmarlow the case here is the case where "catalog contains an URI pointing to non-existing resource".

From the XML WS perspective - catalogs are defined in section 4.4, important part is:

[..] a Jakarta XML Web Services implementation MUST perform a URI resolution for it, as prescribed by the XML Catalogs 1.1 specification [..]

From the catalog perspective (OASIS XML Catalogs 1.1 specification) - the behaviour is, IMHO, correct - catalog returns a pointer to uri matched by provided systemId (7.1.2, step 2)

Possible failures are defined in section 8 which says (among others):

If the processor attempts to load a resource and fails (because the resource does not exist or is not reachable, for example), it must recover by ignoring the catalog entry file that failed and proceeding.

therefore I think that current behaviour is correct and the test itself does not need to change

Makes sense?

@scottmarlow
Copy link
Contributor

@lukasj I agree that the current Jakarta EE 8/9 test is covering what happens in the missing schema case (thanks to your explanation and linked material).

Thank you!

I will cancel the CQs

@lukasj
Copy link
Contributor

lukasj commented Mar 26, 2021

@scottmarlow happy to help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
9.1 9.1 release
Projects
None yet
Development

No branches or pull requests

4 participants