Closed sudhanshumonga closed 1 year ago
Please send a test case zipped to tech@maxprograms.com
Update your copy of OpenXLIFF Filters and check if the change just committed fixes your issue.
hi @rmraya, i pulled in the latest code, now I am getting a file not found error. The place it is looking for the .ent file is wrong, as it exists in the correct location. It resolves the file path at the base folder of the repository.
Provide a test case to reproduce the problem. Send files zipped to teh@maxprograms.com if you don't want to make them public.
Without a test case for debugging, there's nothing I can do.
Will be sharing it over the email shortly.
Provide a test case to reproduce the problem. Send files zipped to teh@maxprograms.com if you don't want to make them public.
Without a test case for debugging, there's nothing I can do.
@rmraya I have mailed the testcase.
Conversion works as expected with the provided test case. The problem is in the way you use XML catalogs.
So the content in my custom catalog.xml file needs to be added in the provided catalog.xml file in catalog folder, am I right?
N.. Add your catalog to the catalog
got it, thanks for your help!
Hi, I am getting the following stack trace of the error:
Cannot invoke "Object.hashCode()" because "key" is null at java.base/java.util.Hashtable.containsKey(Hashtable.java:353) at openxliff/com.maxprograms.xml.Catalog.resolveEntity(Catalog.java:334) at java.xml/com.sun.org.apache.xerces.internal.util.EntityResolver2Wrapper.resolveEntity(EntityResolver2Wrapper.java:178) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.resolveEntityAsPerStax(XMLEntityManager.java:1026) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1307) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.startPE(XMLDTDScannerImpl.java:732) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.skipSeparator(XMLDTDScannerImpl.java:2101) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.scanDecls(XMLDTDScannerImpl.java:2064) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.scanDTDExternalSubset(XMLDTDScannerImpl.java:299) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1165) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1040) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:917) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:542) at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:889) at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:825) at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1224) at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:637) at openxliff/com.maxprograms.xml.SAXBuilder.build(SAXBuilder.java:170) at openxliff/com.maxprograms.xml.SAXBuilder.build(SAXBuilder.java:69) at openxliff/com.maxprograms.converters.ditamap.ScopeBuilder.recurse(ScopeBuilder.java:117) at openxliff/com.maxprograms.converters.ditamap.ScopeBuilder.recurse(ScopeBuilder.java:172) at openxliff/com.maxprograms.converters.ditamap.ScopeBuilder.recurse(ScopeBuilder.java:172) at openxliff/com.maxprograms.converters.ditamap.ScopeBuilder.recurse(ScopeBuilder.java:172) at openxliff/com.maxprograms.converters.ditamap.ScopeBuilder.recurse(ScopeBuilder.java:172) at openxliff/com.maxprograms.converters.ditamap.ScopeBuilder.recurse(ScopeBuilder.java:119) at openxliff/com.maxprograms.converters.ditamap.ScopeBuilder.recurse(ScopeBuilder.java:172) at openxliff/com.maxprograms.converters.ditamap.ScopeBuilder.recurse(ScopeBuilder.java:172) at openxliff/com.maxprograms.converters.ditamap.ScopeBuilder.buildScope(ScopeBuilder.java:74) at openxliff/com.maxprograms.converters.ditamap.DitaParser.run(DitaParser.java:154) at openxliff/com.maxprograms.converters.ditamap.DitaMap2Xliff.run(DitaMap2Xliff.java:99) at openxliff/com.maxprograms.converters.Convert.run(Convert.java:405) at openxliff/com.maxprograms.converters.Convert.main(Convert.java:280)
It happens in the function: public InputSource resolveEntity(String name, String publicId, String baseURI, String systemId) in Catalog.java.Apparently the publicId in this case happens to be null whereas the systemId is coming out to be a non null value. And in every case the baseURI is coming out to be null, it seems that it has been set as null by default. So the code ends up at "dtdEntities.containsKey(publicId)" which throws this error. Any ideas how to get about it?