Open dzonekl opened 5 months ago
Searching for parts of the error message, shows that it originates from here:
https://github.com/eclipse-ee4j/metro-jax-ws/blob/e72999c71eef4d6bf828c67a7d7a402e371c4c8e/jaxws-ri/extras/jaxws-maven-plugin/src/main/java/org/jvnet/jax_ws_commons/jaxws/WsImportMojo.java#L521-L541
There are two possibilities for toAdd
to get a value assigned, either via resource-loading or by converting the file-object to an url. The error message states, that the final result of toAdd
is null
and a quick look at toURI()
and toURL
shows null
being an unlikely result of these method-calls. Therefore, assuming the "files-does-not-exist"-check (!wsdl.exists()
) succeeds, leading to an resource-loading attempt with an URLClassloader, that scans your dependencies for the wsdl-file (which most likely won't find anything resulting in a result of null
).
Was able to reconstruct the error-message locally by referencing a wsdl-directory, which does not exist at all (e.g. typo in the path - which isn't the case here, but might help narrowing it down).
A wild guess in the blue: are the file-permissions set in a way that the maven process is allowed to access the wsdl-file?
Assuming that the ls
-command is executed by a different process.
I managed to fix the issue by specifying the file explictly, and also have the correct case for the filename, as it was case sensitive. It did work on Mac (local) but not on Linux (gitlab runner image) with incorrect file case: Nlets.wsdl
vs NLets.wsdl
('L' being capital and hard to spot difference).
It feels like a bug as, it did work on one env and not on the other, but we know JVM File API is OS dependent so, with Mvn build on this, not sure this can be tackled by a plugin.
Hi,
I have a project which uses wsimport using the maven plugin [1] When running locally with maven 3.8.5, the wsimport goal succeeds (java17-oracle), when running in gitlab it fails. Gitlab runs with java17-jdk docker base image.
The error [2] in gitlab shows : `The wsdl File is 'Nlets.wsdl' from 'null' while the .wsdl file property is set
Prior to running the
mvn clean verify
I dump the content of the directory, showing the file is present.$ ls src/main/resources application-dev.yml application.yml CreateDatabase.sql NLetsRequest.xml NLets.wsdl
In which case would the error `The wsdl File is ... from null" be issued ? Is there a way to further troubleshoot this issue ? Are there known issues with specific Java 17 JDK's ?
TIA Christophe
[1]
jaxws.version=4.0.2
[2]