This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes xml reading and doing validation with dtd/schema Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "xml reading and doing validation with dtd/schema" Watch "xml reading and doing validation with dtd/schema" New topic
Author

xml reading and doing validation with dtd/schema

anish reddy
Ranch Hand

Joined: Apr 19, 2008
Posts: 74
when i tied to read an xml with validation using xom iam getting exception ,

nu.xom.ValidityException: Document is invalid: no grammar found. at line 2, column 9
at nu.xom.Builder$ValidityRequired.error(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at nu.xom.Builder.build(Unknown Source)
at nu.xom.Builder.build(Unknown Source)
at com.cisco.caf.xml.XOMXmlValidate.main(XOMXmlValidate.java:35)
Caused by: org.xml.sax.SAXParseException: Document is invalid: no grammar found.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
... 18 more
Exception in thread "main" java.lang.NullPointerException
at com.cisco.caf.xml.XOMXmlValidate.main(XOMXmlValidate.java:47)

please give an idea to resolve it.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: xml reading and doing validation with dtd/schema
 
Similar Threads
Hibernate App Issue
Exception while loading the validation.xml in strusts
Document is invalid: no grammar found nu.xom.ValidityException
xml validation error:Caused by: nu.xom.ValidityException: Document is invalid: no grammar found
Tomcat 4.1 startup error - TLD parsing error