Hi all, I am doing my application with ClassAd java library from http://www.cs.wisc.edu/condor/classad/. The ClassAdParser.parse() throws IllegalArgumentException
when parsing the result of condor_q –xml: java.lang.IllegalArgumentException: null value for attribute
Iwd at
condor.classad.RecordExpr.insertAttribute(RecordExpr.java:130) at
condor.classad.ClassAdSAXHandler.addElement(ClassAdSAXHandler.java:264) at
condor.classad.ClassAdSAXHandler.endElement(ClassAdSAXHandler.java:203) at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633) at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1241) at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685) at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368) at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834) at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242) at
javax.xml.parsers.SAXParser.parse(SAXParser.java:375) at
condor.classad.ClassAdParser.parse(ClassAdParser.java:272) at
condor.classad.ClassAdParser.parse(ClassAdParser.java:297) The code works well in Linux but always throws this
exception in my windows xp. I noticed the parser only cannot deal with the
“Iwd” and “Userlog” maybe because the values are
windows path. At
condor.classad.ClassAdSAXHandler.endElement(ClassAdSAXHandler.java:203), Constant.unquoteString(String)
method returns null when the parameter is the path string like “E:\\condor\\my”.
The cause is in the method Constant.unquoteString(char[], int, int),
where the “\\c” is illegal. I think
the string is good enough and doesn’t need to be unquoted….not sure…. Anyone can help? Yaoheng Zhang |