7

I am using Jaxb-impl-2.1.3.jar in the maven library.. every thing looks fine in pom entry.. if anyone come across with this error pleas give me an idea..

java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    at org.springframework.aop.aspectj.AspectJAfterAdvice.invoke(AspectJAfterAdvice.java:42)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
    at 

Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.internal.ws.fault.SOAPFaultBuilder
    at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:107)
    at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
    at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
3
  • 1
    What version of java are you using? Do you have any other WS related jars on your classpath? Commented Jul 5, 2011 at 22:58
  • I am using JDK 1.6.. In the class path maven dependencies are jaxb-api-2.1.jar and jaxrpc-api-1.1.jar.. Commented Jul 6, 2011 at 9:33
  • 2
    Don't use <pre> or other HTML tags to format code. Use SO's markdown, as suggested by the right column block during editing... Commented Jul 6, 2011 at 10:15

1 Answer 1

13

You need to add following jars into your application's classpath to make it work:

jaxws-api.jar
jaxws-rt.jar
jaxws-tools.jar
Sign up to request clarification or add additional context in comments.

2 Comments

I've just added the jaxws-rt.jar to a Java 7 project to get around this issue. Would you (or anyone else!) be able to shed any light on why this is necessary? I thought that SOAPFaultBuilder would be in the jre?
"jaxws-rt.jar" suffice for mee too. Seems SOAPFaultBuilder exists in jdk1.7, but in my cas, my model was 1.5 level, and adding this dependency fixed the NCDFError. Thanks :)

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.