• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 886
  • Last Modified:

Provider com.bea.xml.stream.MXParserFactory not found

Hi,

Sorry to come back.

I set the class path as follows XMLBEANDIR C:\tech\struts\Contribution\lib\xbean.jar;
Here below the code

public class main
{
   public  static void  main (String  [ ] args) throws IOException,  XMLStreamException
    {
       
     String nick = "neliw";
     String file = "neliw";
         
        ContsProcessor processor = new ContsProcessor (nick);
       
        // Use the reference implementation for the XML input factory
      System.setProperty("javax.xml.stream.XMLInputFactory",
                                     "com.bea.xml.stream.MXParserFactory");
       // Create the XML input factory
     XMLInputFactory factory = XMLInputFactory.newInstance();
         // Create the XML event reader
      FileReader reader = new FileReader(file);
     XMLStreamReader r =    factory.createXMLStreamReader (reader);
             //.createXMLEventReader(reader);
     
     
        ForumDocument doc = processor.parseDocument (r);
        System.out.println (doc);
    }
   
0
Eugenio_Magnone
Asked:
Eugenio_Magnone
1 Solution
 
phuocnhCommented:
Please check your classpath if com.bea.xml.stream.MXParserFactory is included
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now