title: LinkageError when creating web service (Tomcat, CXF and Eclipse)
body: <p>I want to create a simple web service in Eclipse (Helios J2EE), using Apache CXF 2.3.2 and Tomcat 7. 
  However, when I use the 'New web service' wizard, I get the following error at WSDL creation:</p>
  
  <pre><code>java.lang.LinkageError: JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/C:/Users/me/apache-cxf-2.3.2/lib/jaxb-impl-2.2.1.1.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. (See http://java.sun.com/j2se/1.6.0/docs/guide/standards/)
  at com.sun.xml.bind.v2.model.impl.ModelBuilder.&lt;clinit&gt;(ModelBuilder.java:173)
  at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:456)
  at com.sun.xml.bind.v2.runtime.JAXBContextImpl.&lt;init&gt;(JAXBContextImpl.java:302)
  at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1140)
  at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:154)
  at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:121)
  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 javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:210)
  at javax.xml.bind.ContextFinder.find(ContextFinder.java:368)
  at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
  at org.apache.cxf.jaxb.JAXBDataBinding.createContext(JAXBDataBinding.java:557)
  at org.apache.cxf.jaxb.JAXBDataBinding.createJAXBContextAndSchemas(JAXBDataBinding.java:497)
  at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:324)
  at org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings(AbstractServiceFactoryBean.java:87)
  at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:445)
  at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:508)
  at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:245)
  at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
  at org.apache.cxf.frontend.AbstractServiceFactory.createService(AbstractServiceFactory.java:78)
  at org.apache.cxf.tools.java2wsdl.processor.JavaToWSDLProcessor.process(JavaToWSDLProcessor.java:101)
  at org.apache.cxf.tools.java2ws.JavaToWSContainer.processWSDL(JavaToWSContainer.java:110)
  at org.apache.cxf.tools.java2ws.JavaToWSContainer.execute(JavaToWSContainer.java:75)
  at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
  at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:58)
  at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:40)
  at org.apache.cxf.tools.java2ws.JavaToWS.run(JavaToWS.java:77)
  at org.apache.cxf.tools.java2ws.JavaToWS.main(JavaToWS.java:45)
  </code></pre>
  
  <p>I found <a href="https://stackoverflow.com/a/4159043/505893">some posts</a> suggesting to copy <em>jaxb-api-2.2.1.jar</em> in <code>%JAVA_HOME%/lib/endorsed</code>, but that doesn't work for me...</p>
  
  <p>Any idea? Thanks</p>