]
David Lloyd commented on WFLY-10060:
------------------------------------
The compiler itself (javac) cannot make use of module names. Really all it wants from us
is something that returns the .class files when it asks for them. Therefore we need a way
to know which module to search for which .class files; the simplest way to do that is to
aggregate the set of modules into one (or use an existing aggregated module), and use that
module's class loader to load the .class files as resources by name, because modules
already index by package name.
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@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@rh wildfly-13.0.0.Alpha1-SNAPSHOT]$ bin/wsconsume.sh
https://raw.githubusercontent.com/jbossws/jbossws-cxf/master/modules/test...
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/test...
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}