M
M
MaxLich2019-04-20 10:10:57
Java
MaxLich, 2019-04-20 10:10:57

How to deploy a java 11 web service on Tomcat 9 using soap without pain and suffering?

Hello. Wrote a service - a web client that works on soap, wrote it on the 11th Java. At first, I could not find the right library for soap and web services. In the end, I settled on these:

<dependency>
                    <groupId>com.sun.xml.ws</groupId>
                    <artifactId>rt</artifactId>
                    <version>2.3.1</version>
                </dependency>
                <dependency>
                    <groupId>com.sun.xml.ws</groupId>
                    <artifactId>jaxws-rt</artifactId>
                    <version>2.3.1</version>
                    <type>pom</type>
                </dependency>

I throw out almost all libraries (except internal ones) from the service. I throw all the libraries in the form of jars into the lib directory of the Tomcat. And when deploying, it writes the following errors:
...
java.nio.file.NoSuchFileException: C:\tomcat\apache-tomcat-9.0.14\lib\hk2-core.jar
...
java.nio.file.NoSuchFileException: C:\tomcat\apache-tomcat-9.0.14\lib\class-model.jar
...
java.nio.file.NoSuchFileException: C:\tomcat\apache-tomcat-9.0.14\lib\config.jar
...
java.nio.file.NoSuchFileException: C:\tomcat\apache-tomcat-9.0.14\lib\auto-depends.jar
...
java.nio.file.NoSuchFileException: C:\tomcat\apache-tomcat-9.0.14\lib\javax.inject.jar
...
java.nio.file.NoSuchFileException: C:\tomcat\apache-tomcat-9.0.14\lib\hk2-api.jar
...
java.nio.file.NoSuchFileException: C:\tomcat\apache-tomcat-9.0.14\lib\osgi-resource-locator.jar
....
java.nio.file.NoSuchFileException: C:\tomcat\apache-tomcat-9.0.14\lib\tiger-types.jar
...
java.nio.file.NoSuchFileException: C:\tomcat\apache-tomcat-9.0.14\lib\bean-validator.jar
...
 java.nio.file.NoSuchFileException: C:\tomcat\apache-tomcat-9.0.14\lib\jtype.jar
...

I tried searching for these libraries on the internet, but it's quite laborious. I found something, put it in the lib folder, but it still wrote these errors. Then I noticed that the names of the jars did not match - I had more versions added. But I didn’t change the names: I’m no longer sure that this is the right way, and it’s also quite tedious and time-consuming.
5cc2ff2d62702451311171.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
MaxLich, 2019-05-06
@MaxLich

Through a long search on the Internet, I found out that these are not errors, and they do not affect anything. Disabled by adding <JarScanner scanManifest="false"/>to context.xml(inside <Context>... </Context>)

L
lexas, 2019-04-28
@lexas

No need to copy anything to tomcat lib.
If I understand correctly, then deployment means deployment of a war file.
The correct way in this case is to build the war file using maven (packaging type war). make sure that the var-file (it's almost a regular zip archive) has the necessary jar files and deploy it already.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question