简体   繁体   中英

New Maven web project not working in NetBeans

I am attempting to run a newly created Maven web application within NetBeans. I keep getting the following error:

java.lang.NoClassDefFoundError: javax/xml/ws/WebServiceRef

Further investigation shows that this error can apparently be sorted by adding dependencies which I did, as shown in the following screenshot:

在此处输入图像描述

However, the same error is still being shown.

For information, I am using the following:

  • NetBeans 16
  • Java 11
  • Tomcat 9.0

Try to add this fromhttps://mvnrepository.com/artifact/javax.xml.ws/jaxws-api/2.3.1

<dependency>
    <groupId>javax.xml.ws</groupId>
    <artifactId>jaxws-api</artifactId>
    <version>2.3.1</version>
</dependency>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM