amityadav1983 / probatron4j

Automatically exported from code.google.com/p/probatron4j
0 stars 0 forks source link

FATAL java.lang.IllegalArgumentException: Cannot register a prefix or Namespace #11

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
tried to run

java -jar probatron.jar 
https://www.seegrid.csiro.au/subversion/GeoSciML/branches/3.0.0/instances/TB4_GS
C_WaterAnalytical_isotopes_swe.xml 
https://www.seegrid.csiro.au/subversion/GeoSciML/branches/3.0.0/schematron/GeoSc
iML_v3_Testbed_4.sch

and got

FATAL java.lang.IllegalArgumentException: Cannot register a prefix or Namespace
name that has already been registered
java.lang.IllegalArgumentException: Cannot register a prefix or Namespace name 
that has already been registered
        at org.probatron.NamespacePrefixMappings.registerMapping(Unknown Source)

        at org.probatron.LocationMapHandler.startElement(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startEle
ment(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.
emptyElement(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scan
StartElement(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l$FragmentContentDriver.next(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(U
nknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next
(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l.scanDocument(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(U
nknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(U
nknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown So
urce)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Un
known Source)
        at org.probatron.ValidationReport.annotateWithLocators(Unknown Source)
        at org.probatron.Session.doValidation(Unknown Source)
        at org.probatron.Driver.main(Unknown Source)
Exception in thread "main" java.lang.RuntimeException: Cannot register a prefix
or Namespace name that has already been registered
        at org.probatron.ValidationReport.annotateWithLocators(Unknown Source)
        at org.probatron.Session.doValidation(Unknown Source)
        at org.probatron.Driver.main(Unknown Source)

Original issue reported on code.google.com by denevers...@gmail.com on 14 Aug 2012 at 3:20

GoogleCodeExporter commented 8 years ago
check out the source code and in the class 
org.probatron.NamespacePrefixMappings comment out ln 55 and 56.

then build it with ant.

hope this helps

Original comment by klaus....@gmail.com on 4 Apr 2013 at 7:49