I am developing simple JAX-WS webservice. I am creating WAR file using ANT build script. The file when deployed to Tomcat 7 server, throws following exception and there is deployment error as follows.
JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/D:/DreamSoln/Server/apache-tomcat-7.0.29/webapps/WebserviceDemo/WEB-INF/lib/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader.
I have JDK 1.6 installed, I tried endorsed mechanism i.e. I created lib/endorsed directory and copied jaxb-api.jar and jaxws-api.jar in it. But still it does not work.
Do I need to remove jaxb-api.jar and jaxws-api.jar from WEB-INF/lib of my web-app?
What else needs to be done?