java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/C:/Dev/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp10795jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to plac e jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.5.0/docs/guide/standards/)

JBoss Issue Tracker | cai jc | 10 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    I created a web service endpoint using JWS: /* * BookWS.java * * * To change this template, choose Tools | Template Manager * and open the template in the editor. */ package net.cjc.ws; import java.util.List; import javax.ejb.*; import javax.jws.*; import javax.jws.soap.SOAPBinding; import net.cjc.beans.AuthorManager; import net.cjc.entity.Book; @WebService(name="BookWS",targetNamespace="http://net.cjc.ws",serviceName="BookWSService") @SOAPBinding(style= SOAPBinding.Style.RPC) @Stateless public class BookWS { /* @EJB private AuthorManager am; @WebMethod public List<Book> getMyBook(String me) { return am.queryBooks(me); }*/ @WebMethod public String getMyBook(String me) { return "you have nothing!"; } } And modified web.xml to configure this endpoint as a servlet. At deploy time,the app server throws an exception: 06:13:45,593 ERROR [MainDeployer] Could not start deployment: file:/D:/jboss-4.2.2.GA/server/default/tmp/deploy/tmp7551cjc.ear-contents/cjc-war.war java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:422) at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:286) at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139) at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:105) at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:116) ... But I still can see this web service from http://localhost:8080/jbossws/services.While I click it to retrieve WSDL,another exception is thrown: 06:25:15,796 ERROR [RequestHandlerImpl] Error processing web service request java.lang.IllegalStateException: Cannot obtain endpoint meta data at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleWSDLRequest(RequestHandlerImpl.java:520) at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doGet(RequestHandlerImpl.java:144) at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:126) at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84) .... Is this a bug? or my fault?

    JBoss Issue Tracker | 10 years ago | cai jc
    java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/C:/Dev/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp10795jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to plac e jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.5.0/docs/guide/standards/)
  2. 0

    I created a web service endpoint using JWS: /* * BookWS.java * * * To change this template, choose Tools | Template Manager * and open the template in the editor. */ package net.cjc.ws; import java.util.List; import javax.ejb.*; import javax.jws.*; import javax.jws.soap.SOAPBinding; import net.cjc.beans.AuthorManager; import net.cjc.entity.Book; @WebService(name="BookWS",targetNamespace="http://net.cjc.ws",serviceName="BookWSService") @SOAPBinding(style= SOAPBinding.Style.RPC) @Stateless public class BookWS { /* @EJB private AuthorManager am; @WebMethod public List<Book> getMyBook(String me) { return am.queryBooks(me); }*/ @WebMethod public String getMyBook(String me) { return "you have nothing!"; } } And modified web.xml to configure this endpoint as a servlet. At deploy time,the app server throws an exception: 06:13:45,593 ERROR [MainDeployer] Could not start deployment: file:/D:/jboss-4.2.2.GA/server/default/tmp/deploy/tmp7551cjc.ear-contents/cjc-war.war java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:422) at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:286) at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139) at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:105) at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:116) ... But I still can see this web service from http://localhost:8080/jbossws/services.While I click it to retrieve WSDL,another exception is thrown: 06:25:15,796 ERROR [RequestHandlerImpl] Error processing web service request java.lang.IllegalStateException: Cannot obtain endpoint meta data at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleWSDLRequest(RequestHandlerImpl.java:520) at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doGet(RequestHandlerImpl.java:144) at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:126) at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84) .... Is this a bug? or my fault?

    JBoss Issue Tracker | 10 years ago | cai jc
    java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/C:/Dev/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp10795jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to plac e jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.5.0/docs/guide/standards/)
  3. 0

    [JBWS-1931] Update to jaxb-2.1 required for certain endpoints - JBoss Issue Tracker

    jboss.org | 1 year ago
    java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar: file:/C:/Dev/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp10795jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class ) needs 2.1 API. Use the endorsed directory mechanism to plac e jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.5.0/docs/guide/standards/ )
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    A problem apear on weblogic 10.3,but tomcat is worked

    Coderanch | 7 years ago | zhiquan mai
    java.lang.LinkageError: loader constraint violation: when resolving field "DATETIME" the class loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) of the referring class, javax/xml/datatype/DatatypeConstants, and the class loader (instance of <bootloader>) for the field's resolved type, javax/xml/namespace/QName, have different Class objects for that type
  6. 0

    A problem apear on weblogic 10.3,but tomcat is worked [Solved] (Web Services forum at JavaRanch)

    coderanch.com | 2 years ago
    java.lang.LinkageError: loader constraint violation: when resolving field "DATETIME" the class loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) of the referring class, javax/xml/datatype/DatatypeConstants, and the class loader (instance of <bootloader>) for the field's resolved type, javax/xml/namespace/QName, have different Class objects for that type

    4 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.LinkageError

      JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/C:/Dev/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp10795jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to plac e jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.5.0/docs/guide/standards/)

      at com.sun.xml.bind.v2.model.impl.ModelBuilder.<clinit>()
    2. Old JAXB Runtime
      ContextFactory.createContext
      1. com.sun.xml.bind.v2.model.impl.ModelBuilder.<clinit>(ModelBuilder.java:172)
      2. com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:422)
      3. com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:286)
      4. com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)
      4 frames