Bug#729171: jruby -S gem: EOFException in org.joda.time.tz.ZoneInfoProvider.readZoneInfoMap
Gabriel Corona
gabriel.corona at enst-bretagne.fr
Wed Mar 19 13:38:51 UTC 2014
Hi,
The copy of joda-time embedded in the jruby.jar seems to be broken.
Rebuilding jruby with a non-broken joda-time shoud fix the issue.
When trying to run this bsh script:
echo "System.out.println(org.joda.time.DateTimeZone.getDefault());"
with Jruby, I get the same error:
$ bsh -classpath /usr/share/java/jruby.jar script.bsh
BeanShell 2.0b4 - by Pat Niemeyer (pat at pat.net)
bsh % System.out.println(org.joda.time.DateTimeZone.getDefault());
Exception in thread "main" java.io.EOFException
at java.io.DataInputStream.readFully(DataInputStream.java:197)
at java.io.DataInputStream.readUTF(DataInputStream.java:609)
at java.io.DataInputStream.readUTF(DataInputStream.java:564)
at
org.joda.time.tz.ZoneInfoProvider.readZoneInfoMap(ZoneInfoProvider.java:278)
at
org.joda.time.tz.ZoneInfoProvider.loadZoneInfoMap(ZoneInfoProvider.java:256)
[...]
UTC
But with joda time, it works as expected:
$ bsh -classpath /usr/share/java/jruby.jar
Europe/Paris
For some reason the "ZoneInfoMap" file seems to be broken in the
copy of joda-time embedded in jruby.
As a quickfix, I added joda-time in the classpath in /usr/bin/jruby,
exec "$JAVA_CMD" $JAVA_OPTS "$JFFI_OPTS" "${java_args[@]}"
-Xbootclasspath/a:"/usr/share/java/joda-time.jar:$JRUBY_CP" -classpath
"$CP$CP_DELIMITER$CLASSPATH"
and now jruby works as expected:
$ jruby -S gem
RubyGems is a sophisticated package manager for Ruby. This is a
basic help message containing pointers to more information.
Cheers.
--
Gabriel
More information about the pkg-java-maintainers
mailing list