0

So, I am working with webservices using SOAP and Maven. This error - I think - is a warning instead because it let me run the application and the service just fine for now. Whenever I call any other package inside this module class it turns red. If I don't add packages the error disappears but I need jasperreports (strange, as the involved package got nothing to do with this)

I've followed this: Module reads package from both Using the solution "implementation and excludes" does nothing. Probably because it is Gradle but I had to try restricting the xml transform using the suggested message.

I also tried Package 'com.example' reads package 'javafx.beans' from both 'javafx.base' and 'javafx.base' this.

I followed this guide as well. https://maven.apache.org/guides/mini/guide-multiple-modules.html

<dependency>
  <groupId>sample.ProjectA</groupId>
  <artifactId>Project-A</artifactId>
  <version>1.0</version>
  <scope>compile</scope>
  <optional>true</optional> <!-- value will be true or false only -->
</dependency>

Making those package use optional does not help either.

Important note, using a different package I want to use the ERROR WILL CHANGE. I removed and added some so you can withness it. Check these:

err err2 err3

Ultra
  • 55
  • 9
  • What is this `webservices-api` module? Is it this one: https://mvnrepository.com/artifact/org.glassfish.metro/webservices-api ? If so, remove it, because it doesn't seem to do anything except bundle some other Jakarta EE packages. – Rob Spoor Oct 10 '22 at 19:18
  • 1
    I've also checked https://mvnrepository.com/artifact/org.glassfish.metro/webservices-extra-xmlsec, and it's just as terrible. It only bundles commons-codec and SLF4J. – Rob Spoor Oct 10 '22 at 19:19
  • Seems like it groupid org.glassfish.metro artifactid webservices-rt version 2.3 – Ultra Oct 10 '22 at 20:57
  • The message is still there. Package reads javax.xml.transform from both java.xml and xml.apis even with the changes. – Ultra Oct 10 '22 at 21:05
  • You'll probably have to repeat this process a few times, removing another dependency (sometimes a transitive dependency...) until you get it right. Sometimes bumping versions may help, but other times you'll just have to do it the hard way... – Rob Spoor Oct 11 '22 at 09:01
  • Yes, definitely going hardcore now one by one hahaha. Thanks for the suggestion. – Ultra Oct 11 '22 at 18:46

1 Answers1

0

In short, a Web Service dependency using some of the declared in the client as well. As mentioned, I went one by one until I found it. Also, updating javax.xml version of the dependency was a necessary step in order to solve the problem.

Ultra
  • 55
  • 9