0 Replies Latest reply on Jun 11, 2009 6:37 AM by 843789

    JAXB exception

    843789
      Hi i'm getting following exception when i try to run the following java class through ANT acript. surprisingly i'm able to run the program successfully in my eclipse IDE.
      can anyone tell me, whats wrong?
      JAXBContext jc = JAXBContext.newInstance( "JAXBGenerated" ); 
           Unmarshaller u = jc.createUnmarshaller(); 
           BufferedWriter out = new BufferedWriter(new FileWriter("c:\\URL.properties"));
           PropertyLoad pl=new PropertyLoad();
           Testsuite obj =(Testsuite)u.unmarshal(new FileInputStream( "result_org.xml" ) );
      [java] Provider com.sun.xml.internal.bind.v2.ContextFactory not found
      [java] javax.xml.bind.JAXBException: Provider com.sun.xml.internal.bind.v2.
      ContextFactory not found
      [java] - with linked exception:
      [java] [java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.Cont
      extFactory]
      [java] at javax.xml.bind.ContextFinder.newInstance(Unknown Source)
      [java] at javax.xml.bind.ContextFinder.find(Unknown Source)
      [java] at javax.xml.bind.JAXBContext.newInstance(Unknown Source)
      [java] at javax.xml.bind.JAXBContext.newInstance(Unknown Source)
      [java] at javax.xml.bind.JAXBContext.newInstance(Unknown Source)