[jboss-jira] [JBoss JIRA] (WFLY-10060) wsconsume script is not working on JDK9+
David Lloyd (JIRA)
issues at jboss.org
Thu Mar 22 07:46:03 EDT 2018
[ https://issues.jboss.org/browse/WFLY-10060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13549691#comment-13549691 ]
David Lloyd commented on WFLY-10060:
------------------------------------
We definitely don't want to do that.
I think the easiest workaround - ugly as it is - would be to add our javax.ws.* JARs to the class path manually by setting the {{java.class.path}} system property to the set of JARs that we want to include from the module repository. Since the versions of the JARs may change, we need to use some wrapper startup class which uses JBoss Modules to find the module dependencies we want, load their modules, and find their locations on the filesystem.
Alternatively we could enhance, wrap, or replace {{org.apache.cxf.common.util.Compiler}} with a smarter version that always uses {{javax.tools.JavaCompiler}} with our own custom {{javax.tools.JavaFileManager}} which loads class files directly from JBoss Modules. This is more elegant but may require more coding effort.
> wsconsume script is not working on JDK9+
> ----------------------------------------
>
> Key: WFLY-10060
> URL: https://issues.jboss.org/browse/WFLY-10060
> Project: WildFly
> Issue Type: Bug
> Components: Scripts, Web Services
> Affects Versions: 12.0.0.Final
> Reporter: Jan Blizňák
> Assignee: R Searls
> Attachments: mywsdl2java
>
>
> wsconsume script is not working on JDK9/10/11
> {code:java}
> [jbliznak at rh wildfly-13.0.0.Alpha1-SNAPSHOT]$ java -version
> java version "9.0.4"
> Java(TM) SE Runtime Environment (build 9.0.4+11)
> Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)
> [jbliznak at rh wildfly-13.0.0.Alpha1-SNAPSHOT]$ bin/wsconsume.sh https://raw.githubusercontent.com/jbossws/jbossws-cxf/master/modules/testsuite/shared-tests/src/test/resources/jaxws/smoke/tools/wsdl/TestServiceSoap12.wsdl
> Could not find log4j.properties or log4j.xml configuration, logging to console.
> WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access by com.sun.xml.bind.v2.runtime.reflect.opt.Injector (jar:file:/tmp/wildfly/dist/target/wildfly-13.0.0.Alpha1-SNAPSHOT/modules/system/layers/base/com/sun/xml/bind/main/jaxb-runtime-2.3.0.jar!/) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int)
> WARNING: Please consider reporting this to the maintainers of com.sun.xml.bind.v2.runtime.reflect.opt.Injector
> WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
> WARNING: All illegal access operations will be denied in a future release
> Loading FrontEnd jaxws ...
> Loading DataBinding jaxb ...
> wsdl2java -compile -exsh false -d /tmp/wildfly/dist/target/wildfly-13.0.0.Alpha1-SNAPSHOT/output/tmp854430 -verbose -classdir /tmp/wildfly/dist/target/wildfly-13.0.0.Alpha1-SNAPSHOT/output -allowElementReferences https://raw.githubusercontent.com/jbossws/jbossws-cxf/master/modules/testsuite/shared-tests/src/test/resources/jaxws/smoke/tools/wsdl/TestServiceSoap12.wsdl
> wsdl2java - Apache CXF 3.2.2
> /tmp/wildfly/dist/target/wildfly-13.0.0.Alpha1-SNAPSHOT/output/tmp854430/org/openuri/_2004/_04/helloworld/TestService.java:6: error: package javax.xml.ws is not visible
> import javax.xml.ws.WebEndpoint;
> ^
> (package javax.xml.ws is declared in module java.xml.ws, which is not in the module graph)
> /tmp/wildfly/dist/target/wildfly-13.0.0.Alpha1-SNAPSHOT/output/tmp854430/org/openuri/_2004/_04/helloworld/TestService.java:7: error: package javax.xml.ws is not visible
> import javax.xml.ws.WebServiceClient;
> ^
> (package javax.xml.ws is declared in module java.xml.ws, which is not in the module graph)
> /tmp/wildfly/dist/target/wildfly-13.0.0.Alpha1-SNAPSHOT/output/tmp854430/org/openuri/_2004/_04/helloworld/TestService.java:8: error: package javax.xml.ws is not visible
> import javax.xml.ws.WebServiceFeature;
> ^
> (package javax.xml.ws is declared in module java.xml.ws, which is not in the module graph)
> /tmp/wildfly/dist/target/wildfly-13.0.0.Alpha1-SNAPSHOT/output/tmp854430/org/openuri/_2004/_04/helloworld/TestService.java:9: error: package javax.xml.ws is not visible
> import javax.xml.ws.Service;
> ^
> (package javax.xml.ws is declared in module java.xml.ws, which is not in the module graph)
> /tmp/wildfly/dist/target/wildfly-13.0.0.Alpha1-SNAPSHOT/output/tmp854430/org/openuri/_2004/_04/helloworld/EndpointInterface.java:3: error: package javax.jws is not visible
> import javax.jws.WebMethod;
> ^
> (package javax.jws is declared in module java.xml.ws, which is not in the module graph)
> /tmp/wildfly/dist/target/wildfly-13.0.0.Alpha1-SNAPSHOT/output/tmp854430/org/openuri/_2004/_04/helloworld/EndpointInterface.java:4: error: package javax.jws is not visible
> import javax.jws.WebParam;
> ^
> (package javax.jws is declared in module java.xml.ws, which is not in the module graph)
> /tmp/wildfly/dist/target/wildfly-13.0.0.Alpha1-SNAPSHOT/output/tmp854430/org/openuri/_2004/_04/helloworld/EndpointInterface.java:5: error: package javax.jws is not visible
> import javax.jws.WebResult;
> ^
> (package javax.jws is declared in module java.xml.ws, which is not in the module graph)
> /tmp/wildfly/dist/target/wildfly-13.0.0.Alpha1-SNAPSHOT/output/tmp854430/org/openuri/_2004/_04/helloworld/EndpointInterface.java:6: error: package javax.jws is not visible
> import javax.jws.WebService;
> ^
> (package javax.jws is declared in module java.xml.ws, which is not in the module graph)
> /tmp/wildfly/dist/target/wildfly-13.0.0.Alpha1-SNAPSHOT/output/tmp854430/org/openuri/_2004/_04/helloworld/EndpointInterface.java:7: error: package javax.jws.soap is not visible
> import javax.jws.soap.SOAPBinding;
> ^
> (package javax.jws.soap is declared in module java.xml.ws, which is not in the module graph)
> /tmp/wildfly/dist/target/wildfly-13.0.0.Alpha1-SNAPSHOT/output/tmp854430/org/openuri/_2004/_04/helloworld/TestService.java:72: error: cannot find symbol
> return super.getPort(EndpointInterfacePort, EndpointInterface.class);
> ^
> symbol: variable super
> location: class org.openuri._2004._04.helloworld.TestService
> /tmp/wildfly/dist/target/wildfly-13.0.0.Alpha1-SNAPSHOT/output/tmp854430/org/openuri/_2004/_04/helloworld/TestService.java:84: error: cannot find symbol
> return super.getPort(EndpointInterfacePort, EndpointInterface.class, features);
> ^
> symbol: variable super
> location: class org.openuri._2004._04.helloworld.TestService
> JBWS024002: Failed to invoke org.apache.cxf.tools.wsdlto.WSDLToJava
> org.apache.cxf.tools.common.ToolException: Failed to compile generated code
> at org.apache.cxf.impl//org.apache.cxf.tools.common.ClassUtils.compile(ClassUtils.java:125)
> at org.apache.cxf.impl//org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:303)
> at org.apache.cxf.impl//org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:164)
> at org.apache.cxf.impl//org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:412)
> at org.apache.cxf.impl//org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:105)
> at org.apache.cxf.impl//org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
> at org.jboss.ws.jaxws-client//org.jboss.wsf.stack.cxf.tools.CXFConsumerImpl.consume(CXFConsumerImpl.java:313)
> at org.jboss.ws.tools.common//org.jboss.ws.tools.cmd.WSConsume.importServices(WSConsume.java:298)
> at org.jboss.ws.tools.common//org.jboss.ws.tools.cmd.WSConsume.mainInternal(WSConsume.java:108)
> at org.jboss.ws.tools.common//org.jboss.ws.tools.cmd.WSConsume.main(WSConsume.java:96)
> at org.jboss.modules.Module.runMainMethod(Module.java:348)
> at org.jboss.modules.Module.run(Module.java:328)
> at org.jboss.modules.Main.main(Main.java:557)
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list