7

I'm using JDK 1.5 in my web project and using maven for compile.

I was facing this:

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

in my project. To fix that I used two approaches:

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

But after this I am facing this:

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

Does anyone have any idea that could help me?

1
  • 1
    you need to add jaxb-impl jar to your classpath Commented Apr 4, 2013 at 11:32

2 Answers 2

3

Adding a dependency on jaxb-impl should be sufficient, as this transitively depends on jaxb-api, which is the JAR containing the class it's complaining about. In Java 6, javax.xml.bind is part of the JRE by default so it would work out of the box there.

Sign up to request clarification or add additional context in comments.

Comments

1

add this dependency to pom

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

1 Comment

Thanks Evgeniy, I followed the same but it not work's at my end:(

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.