Java.lang.NoClassDefFoundError: javax / XML / bind / JAXBContext

I use JDK 1.5 in my web project and use maven to compile.

I came across this:

WebServiceException ("javax.xml.ws.WebServiceException: Provider com.sun.xml.ws.spi.ProviderImpl not found")

in my project. To fix this, I used two approaches:

  • First, I add jaxws-rt-2.1.4 to my class path. (Also made an entry in POM.xml)
  • Second, added jar in jre / lib folder

But after that I came across this:

java.lang.NoClassDefFoundError:javax/xml/bind/JAXBContext

Does anyone have any ideas that could help me?

+5
source share
2 answers

jaxb-impl , jaxb-api, JAR, it . Java 6, javax.xml.bind JRE , .

+2

pom

    <dependency>
        <groupId>javax.xml</groupId>
        <artifactId>jaxb-impl</artifactId>
        <version>2.1</version>
    </dependency>
0

All Articles