java.lang.ClassNotFoundException : com/sun/xml/bind/v2/model/annotation/AnnotationReader

Problem

Deploying a JAX-WS web service on Tomcat, hits following error message :


java.lang.ClassNotFoundException: 
	com/sun/xml/bind/v2/model/annotation/AnnotationReader

Solution

The JAX-WS dependency library “jaxb-impl.jar” is missing.

  1. Go here http://jax-ws.java.net/.
  2. Download JAX-WS RI distribution.
  3. Unzip it and copy “jaxb-impl.jar” to Tomcat library folder “{$TOMCAT}/lib“.
  4. Restart Tomcat.

7 comments on “java.lang.ClassNotFoundException : com/sun/xml/bind/v2/model/annotation/AnnotationReader

  1. Hello Mkyong,

    This is out of date for version 2.2.11. Could you please add / update post to support your answer for latest dependencies? No one willing to use old if latest is available.

    Reply
  2. In jaxb-impl.jar file , in com.sun.xml.bind.v2.model.annotation package , I could not found AnnotationReader class.
    I am getting
    “Exception in thread “main” java.lang.NoClassDefFoundError: com/sun/xml/bind/v2/model/annotation/AnnotationReader”

    Reply
  3. hi..”jaxb-impl.jar” is prsent in tomcat-lib..but still its giving the same error..Plz guide me..
    Thanks in advance

    Reply

Leave a Comment

Your email address will not be published. Required fields are marked *