[jboss-dev-forums] [Deployers on JBoss (Deployers/JBoss)] - Error while trying to load schema

mpipes do-not-reply at jboss.com
Fri Sep 15 13:47:39 EDT 2006


Hello, We are trying to run xml validation using xerces within JBoss.  The error that we are getting is as follows:
java.lang.NoSuchMethodError: org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar([Lorg/apache/xerces/xni/p
arser/XMLInputSource;)V
        at org.apache.xerces.jaxp.validation.XMLSchemaFactory.newSchema(Unknown Source)
        at javax.xml.validation.SchemaFactory.newSchema(Unknown Source)
        at javax.xml.validation.SchemaFactory.newSchema(Unknown Source)
        at com.nielsenmedia.services.util.XMLValidator.(Unknown Source)
        at com.nielsenmedia.services.util.XMLFileWriter.initialize(Unknown Source)
        at com.nielsenmedia.services.util.XMLFileWriter.(Unknown Source)


 The code that we are using run's in Eclipse Junit as well as on the command line.  Can anyone tell me what we are doing wrong.  The JBoss version that we are using is 4.01 sp1..

Our code is as follows:

factory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); 
    	File schemaLocation = new File(schemaFileName);
    	schema = factory.newSchema(schemaLocation);
    	validator = schema.newValidator();

Any suggestion would be greatly appreciated....

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971999#3971999

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971999



More information about the jboss-dev-forums mailing list