xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mathieu Malaterre <mathieu.malate...@gmail.com>
Subject Re: Building fop from source using qdox 1.11
Date Fri, 26 Aug 2011 21:46:39 GMT
Hi Simon,

  Great we are making some progress. Since you are using debian, this
will be even easier. Try the attached script.

  If you are on a debian machine with:

$ apt-cache policy libqdox-java
libqdox-java:
  Installed: 1.12-1

  You should quickly discover that indeed qdox-1.12 from debian allows
proper compilation of fop, *if and only if* copied to lib/build.

  When using the second version (via export CLASSPATH), one indeed get
the error you have seen. I could even reproduce the error using some
precompile qdox jar file:

mkdir /tmp/cp
cd /tmp/cp
wget http://mirrors.ibiblio.org/pub/mirrors/maven2/com/thoughtworks/qdox/qdox/1.12/qdox-1.12.jar
export CLASSPATH=/tmp/cp/qdox-1.12.jar

leads also to the exact same error (*).

So now the question, is how did I misread the instructions from:

http://xmlgraphics.apache.org/fop/1.0/compiling.html#env-classpath

How should I be setting up my CLASSPATH to compile fop ?

Thanks again very much for your time,


(*)
BUILD FAILED
/tmp/clean/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)


On Fri, Aug 26, 2011 at 8:09 PM, Simon Pepping <spepping@leverkruid.eu> wrote:
> 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-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>



-- 
Mathieu

Mime
View raw message