The changes introduced in revision 2354
(http://code.google.com/p/jing-trang/source/detail?r=2354#) result in a
NullPointerException when trang is run without specifying a catalogue URI via
the "-C" argument. This occurs because 'resolver' is set to null in main() and
so the ResolverUriEntityManager object gets constructed with a null resolver.
Therefore a NullPointerException is generated when
ResolverUriEntityManager::open() attempts to call resolver.open(). The stack
trace is as follows:
Exception in thread "main" java.lang.NullPointerException
at com.thaiopensource.xml.em.ResolverUriEntityManager.open(ResolverUriEntityManager.java:56)
at com.thaiopensource.xml.em.ResolverUriEntityManager.open(ResolverUriEntityManager.java:27)
at com.thaiopensource.xml.dtd.parse.DtdParserImpl.parse(DtdParserImpl.java:14)
at com.thaiopensource.relaxng.input.dtd.DtdInputFormat.load(DtdInputFormat.java:144)
at com.thaiopensource.relaxng.translate.Driver.run(Driver.java:135)
at com.thaiopensource.relaxng.translate.Driver.main(Driver.java:44)
The attached patch fixes this problem by instantiating a UriEntityManager
instead of a ResolverUriEntityManager when no resolver is available.
Original issue reported on code.google.com by zztop...@gmail.com on 31 Jan 2014 at 1:18
Original issue reported on code.google.com by
zztop...@gmail.com
on 31 Jan 2014 at 1:18Attachments: