Earlier I wrote: I took the source code of fop-1.0, replaced lib/build/qdox-1.6.3.jar with lib/build/qdox-1.12.jar from fop's development code, and ran ant compile and ant junit. Both were successfull. There is a warning about a deprecated method, but that is not fatal. The answer to your question is: yes, fop-1.0 can be successfully built with qdox-1.12.
I now did as you describe below, on a debian testing system, and got your error indeed. >ls -l /usr/share/java/qdox.jar lrwxrwxrwx 1 root root 13 mei 3 23:53 /usr/share/java/qdox.jar -> qdox-1.12.jar Conclusion: There is a difference between lib/build/qdox-1.12.jar in fop's development code and /usr/share/java/qdox-1.12.jar in debian testing. Looking at the code, the NPE is generated by the call method.getReturns().isVoid(). method is not null, because it has been referenced in the preceding line. So method.getReturns() is null. method.getReturns() is the deprecated method, but one would expect that such a method would always return a non-null object, since any method has a return type, even if void. You can check why debian's qdox-1.12 is different from fop's, or patch fop's code at org.apache.fop.tools.EventProducerCollector.createMethodModel(EventProducerCollector.java:142) (src/codegen/java/org/apache/fop/tools/EventProducerCollector.java) to use method.getReturnType() instead of method.getReturns(). FOP's development code uses method.getReturnType() and qdox-1.12. Simon On Fri, Aug 26, 2011 at 01:45:04PM +0200, Mathieu Malaterre wrote: > Dear all, > > I am trying to build fop from source using qdox 1.11. On my debian > system here is what I did: > > $ wget > http://mir2.ovh.net/ftp.apache.org/dist//xmlgraphics/fop/source/fop-1.0-src.tar.gz > $ tar xfz fop-1.0-src.tar.gz > $ cd fop-1.0 > $ export CLASSPATH=/usr/share/java/qdox.jar:/usr/share/java/commons-io.jar > $ ant resourcegen > > This leads to the following error (*). I would like to know whether: > > - building fop from source using qdox version != 1.6.3 is actually supported ? > - did anyone tried to compile fop with a more recent qdox version ? > > If not, where can I download source code for qdox 1.6.3, I could not > find it on the official website: > http://snapshots.repository.codehaus.org/com/thoughtworks/qdox/qdox/ > > Thank you very much for your time, > -Mathieu > > (*) > BUILD FAILED > /tmp/test/fop-1.0/build.xml:374: java.lang.NullPointerException > at > org.apache.fop.tools.EventProducerCollector.createMethodModel(EventProducerCollector.java:142) > at > org.apache.fop.tools.EventProducerCollector.processEventProducerInterface(EventProducerCollector.java:130) > at > org.apache.fop.tools.EventProducerCollector.scanFile(EventProducerCollector.java:100) > at > org.apache.fop.tools.EventProducerCollectorTask.processFileSets(EventProducerCollectorTask.java:213) > at > org.apache.fop.tools.EventProducerCollectorTask.execute(EventProducerCollectorTask.java:69) > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) > at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:616) > at > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) > at org.apache.tools.ant.Task.perform(Task.java:348) > at org.apache.tools.ant.Target.execute(Target.java:390) > at org.apache.tools.ant.Target.performTasks(Target.java:411) > at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1360) > at org.apache.tools.ant.Project.executeTarget(Project.java:1329) > at > org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) > at org.apache.tools.ant.Project.executeTargets(Project.java:1212) > at org.apache.tools.ant.Main.runBuild(Main.java:801) > at org.apache.tools.ant.Main.startAnt(Main.java:218) > at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) > at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) > > Total time: 13 seconds > > --------------------------------------------------------------------- > To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org > For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org