Hi,

 

When I executed the following code :

public class JibxUnmarshall {

 

      public static void main(String args[]) throws JiBXException, FileNotFoundException {

      IBindingFactory bfact =

        BindingDirectory.getFactory(XMLProgList.class);

    IUnmarshallingContext uctx = bfact.createUnmarshallingContext();

    XMLProgList programList = (XMLProgList) uctx.unmarshalDocument

        (new FileInputStream("./conf/test/ressources/program_kiosque.xml"), null);

      List<XMLProgram> programs = programList.getMProgramList();

     

      for (int i = 0; i < programs.size(); i++) {

            XMLProgram lProgram = programs.get(i);

            System.out.println("program : " + lProgram.getId());

      }

     

I had the following error which correspond to the createUnmarshallingContext

 

Exception in thread "main" javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.MXParserFactory not found

      at javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:72)

      at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:176)

      at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:92)

      at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:136)

      at org.jibx.runtime.impl.StAXReaderFactory.<init>(Unknown Source)

      at org.jibx.runtime.impl.StAXReaderFactory.<clinit>(Unknown Source)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

      at java.lang.reflect.Method.invoke(Unknown Source)

      at org.jibx.runtime.impl.UnmarshallingContext.createReaderFactory(Unknown Source)

      at org.jibx.runtime.impl.UnmarshallingContext.<clinit>(Unknown Source)

      at fr.mos.eismo.service.jibxImport.JiBX_bindingFactory.createUnmarshallingContext()

      at fr.mos.eismo.service.jibxImport.JibxUnmarshall.main(JibxUnmarshall.java:19)

 

Can some body tell me why he tries to use the com.bea.xml.stream package ? It’s the first time I try to unmarshall a document with Jibx so I’m following the tutorial on the site and I download the jibx 1.1

 

Thanks

 

Thomas

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to