Bug 47098 - java.lang.IllegalArgumentException: Error creating InputHandler object
Summary: java.lang.IllegalArgumentException: Error creating InputHandler object
Status: CLOSED INVALID
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: general (show other bugs)
Version: 0.95
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-26 14:08 UTC by Johan
Modified: 2012-04-01 13:55 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johan 2009-04-26 14:08:42 UTC
Trying to run fop-0.95 on a open suse 11.1 installation always causes

java.lang.IllegalArgumentException: Error creating InputHandler object

Even running fop without any arguments (which only causes the help screen to be shown throws this error. So the easiest step to reproduce is just to call

$>fop
... help text removed ...
Apr 26, 2009 18:44:07 PM org.apache.fop.cli.Main startFOP
SEVERE: Exception
java.lang.IllegalArgumentException: Error creating InputHandler object.
        at org.apache.fop.cli.CommandLineOptions.createInputHandler(CommandLineOptions.java:849)
        at
org.apache.fop.cli.CommandLineOptions.parse(CommandLineOptions.java:167)
        at org.apache.fop.cli.Main.startFOP(Main.java:154)
        at org.apache.fop.cli.Main.main(Main.java:197)


A similar problem for Solaris was discussed on the mailing list in 2007 concerning 0.94 and there were some ideas floating that it was caused by erroneous handling of space in the wrapper shell script. However, the mentioned workaround in that thread (to add a space in the IFS definition) does not make any difference. As I can read from the thread and some of the committ notes in 0.95 some changes should have been made to fix this but apparently its not quite working.
Comment 1 Johan 2009-04-26 14:11:55 UTC
This has also been reported to the Novell SuSE bugzilla as bug 498327
Comment 2 Johan 2009-04-26 15:09:11 UTC
Looking some more at this and running fop with --execdebug reveals that the final exec that sets up the classpath and runs Java is something like

exec "/usr/lib/jvm/java/bin/java" -classpath "..." org.apache.fop.cli.Main -Xmx512m "mm.fo" "-pdf" "mm.pdf"

where I have omitted the long classpath. It seems like the problem is caused by having the Java maximum heap argument (-Xmx the wrong place - as an argument to the fop client. If the exec call instead would be

exec "/usr/lib/jvm/java/bin/java" -Xmx512m -classpath "..." org.apache.fop.cli.Main  "mm.fo" "-pdf" "mm.pdf"

Then things start working the way the should.
Comment 3 Johan 2009-04-26 15:33:26 UTC
It turns out that I had messed up. When I was configuring FOP I mistakenly caused my own problem by setting the Java max heap argument.
Comment 4 Glenn Adams 2012-04-01 13:55:32 UTC
batch transition to closed remaining pre-FOP1.0 resolved bugs