2 Replies Latest reply on Aug 11, 2005 6:37 AM by thomas.diesler

    JAXB UnMarshalling error  com/sun/msv/datatype/xsd/DateType

    amvzw

      try {
      JAXBContext jc = JAXBContext.newInstance("com.vzw.xmlmapping");
      Unmarshaller unmarshaller = jc.createUnmarshaller();
      HostInformation collection= (HostInformation)unmarshaller.unmarshal(new File("c:/sample.xml"));
      System.out.println("Testing");
      } catch (Exception ex) {
      System.out.println(" Testing" + ex.toString());
      }

      Steps Followed :

      Tools used( (JAXB,Jboss4.0.1sp1,JWSDp1.6,java "1.5.0_02")

      1) I generated all the java bindings using JAXB compiler in jwsdp1.6 package
      2) copied them over to eclipse project ,packaged the web service in a jar and deployed it to jboss
      3) in one of the server side classes i have the code pasted above to unmarshal the xml file
      4) I copied all the JAXB 'jars' from jwsdp1.6 to jboss/server/default/lib
      and also the xsdlib.jar
      5)Whenever the execution or debugger steps over this particular line

      HostInformation collection= (HostInformation)unmarshaller.unmarshal(new File("c:/sample.xml"));

      I get the following error

      java.lang.NoClassDefFoundError: com/sun/msv/datatype/xsd/DateType

      I tried to include all the jars mentioned above inside the edorsed folder of jboss/lib but did not help.



      Thank's a head .

        • 1. Re: JAXB UnMarshalling error  com/sun/msv/datatype/xsd/DateT
          clairecostello

          Hi,

          I am also using the JWSDP JAXB implementation and have created a JAR containing appropriate WS file descriptors. This deployed fine before I added JAXB unmarshalling code and the JBoss deployer can't find the JAXB classes. More specifically the error is (of course):

          java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException

          Essentially, I want to know where to add the JAXB jar files. I don't want to "randomly" add them to folders in my server configuration. I'd prefer a more supported answer.

          TIA, Claire.

          • 2. Re: JAXB UnMarshalling error  com/sun/msv/datatype/xsd/DateT
            thomas.diesler

            javax.xml.bind.JAXBException must be loadable by the LoaderRepository that is used for your deployment. If have not configured scoped class loading than there is only one LR in your server.

            server/yourconfig/lib is a good place