The relaxngcc.jar created by the relaxngcc-1.12.ebuild is missing some resources. Namely NGCCGrammar tries to copy the following files using copyResourceAsStream: * NGCCHandler.java * AttributesImpl.java * NGCCRuntime.java * NGCCEventReceiver.java * NGCCEventSource.java * NGCCInterleaveFilter.java Without these resources in place, getResourceAsStream will return null, leading to a null pointer exception with the following backtrace: Exception in thread "main" java.lang.NullPointerException at java.io.Reader.<init>(Reader.java:61) at java.io.InputStreamReader.<init>(InputStreamReader.java:55) at relaxngcc.NGCCGrammar.copyResourceAsFile(Unknown Source) at relaxngcc.NGCCGrammar.output(Unknown Source) at relaxngcc.RelaxNGCC.run(Unknown Source) at relaxngcc.RelaxNGCC.main(Unknown Source) I experienced this when trying to compile jaxb 2.1.9 in order to work on bug 188007. The xjc submodule invokes the equivalent of "java --target somedir src/com/sun/tools/jxc/gen/config/config.rng" from its ngcc ant target. I will attach diffs of build files for a 1.12-r1 revbump, as the problem is a run-time and not a compile-time one. I made a few more modifications than strictly necessary, to improve the readability of the ebuild I think. If you want me to, I could commit these improvements to java-experimental.
Created attachment 177661 [details, diff] Differences from 1.12 to 1.12-r1 ebuild and build.xml This diff compares the original 1.12 ebuild and build.xml to my new 1.12-r1 versions. Changes to the ebuild: 1. Don't throw away *.jar. Especially keep relaxngcc.jar, renamed to relaxngcc.orig.jar, so that ant can extract project.xml from there. 2. Don't use manifest from filesdir, but define manifest in build.xml 3. Use the new build.xml Changes to the build.xml: 4. Don't disable debug information, as that helps stack traces, and disabling it results only in minor space savings. 5. Include resources the same way project.xml defines them.
Comitted to java-experimental: http://overlays.gentoo.org/proj/java/browser/java-experimental/dev-java/relaxngcc?rev=7330
+*relaxngcc-1.12-r1 (05 Apr 2009) + + 05 Apr 2009; Petteri Räty <betelgeuse@gentoo.org> + +files/build.xml-1.12-r1, +relaxngcc-1.12-r1.ebuild: + Include resources in the build jar, migrate to EAPI 2 and add examples use + flag. Fixes bug #254055. Thanks to Martin von Gagern + <Martin.vGagern@gmx.net> for fixing the resources problem. +