Kaffe having trouble with gnujsp.jar
Stuart Ballard
sballard at netreach.net
Mon Apr 3 12:31:04 PDT 2000
Apologies if this arrives twice - this is my first posting to the list
and the subscribe message (which gave the address as
kaffe at transvirtual.com) contradicts the "to" fields of every message I'm
receiving from the list (which say kaffe at rufus.w3.org). Since I didn't
receive a copy of this posting back from the list, I'm assuming that
kaffe at transvirtual.com is wrong.
-------- Original Message --------
Subject: Kaffe having trouble with gnujsp.jar
Date: Mon, 03 Apr 2000 16:21:50 +0000
From: Stuart Ballard <sballard at NetReach.Net>
Organization: NetReach
To: kaffe at transvirtual.com
I am finding that kaffe from the latest CVS (and also 1.0.5) is unable
to load or read the "gnujsp.jar" file that comes with gnujsp 1.0.0. When
I try to use the classes, I get a ClassNotFoundException wrapped in an
ExceptionInInitializerError -
java.lang.ExceptionInInitializerError: [exception was
java.lang.NoClassDefFoundError: org/gjt/jsp/JspFactoryImpl]
at kaffe.lang.SystemClassLoader.findClass(SystemClassLoader.java:93)
at java.lang.ClassLoader.findSystemClass(ClassLoader.java:141)
at
org.apache.java.lang.AdaptiveClassLoader.loadSystemClass(AdaptiveClassLoader.java:462)
at
org.apache.java.lang.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:400)
at java.lang.ClassLoader.loadClass(ClassLoader.java:59)
at
org.apache.jserv.JServServletManager.load_init(JServServletManager.java:526)
at
org.apache.jserv.JServServletManager.loadServlet(JServServletManager.java:488)
at
org.apache.jserv.JServConnection.processRequest(JServConnection.java:266)
at org.apache.jserv.JServConnection.run(JServConnection.java:188)
at java.lang.Thread.run(Thread.java:326)
So I decided to take a look at the jar file with jar...
sballard at rainbow:~$ /usr/lib/kaffe/bin/jar tvf
/usr/share/java/gnujsp.jar
0 Thu Jan 01 0-5:00:00 GMT-5:00 1970 META-INF/
66 Thu Jan 01 0-5:00:00 GMT-5:00 1970 META-INF/MANIFEST.MF
java.io.IOException: LOC header signature bad: 696e614d
at java.lang.Throwable.<init>(Throwable.java:38)
at java.lang.Exception.<init>(Exception.java:24)
at java.io.IOException.<init>(IOException.java:25)
at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:55)
at kaffe.tools.jar.Jar.listFilesInJar(Jar.java:601)
at kaffe.tools.jar.Jar.processJar(Jar.java:402)
at kaffe.tools.jar.Jar.start(Jar.java:60)
at kaffe.tools.jar.Jar.main(Jar.java:39)
(actually, that stack trace came from 1.0.5; I get a different error
from the latest CVS but it seems to be some kind of a configuration
error...
sballard at rainbow:~/kaffe$ jar tvf /usr/share/java/gnujsp.jar
java.lang.UnsatisfiedLinkError: Failed to locate native function:
java/util/zip/Inflater.init(Z)V
at kaffe.util.zip.SwitchInflater.<init>(SwitchInflater.java:23)
at java.util.zip.ZipInputStream.<init>(ZipInputStream.java:33)
at kaffe.tools.jar.Jar.listFilesInJar(Jar.java:597)
at kaffe.tools.jar.Jar.processJar(Jar.java:402)
at kaffe.tools.jar.Jar.start(Jar.java:60)
at kaffe.tools.jar.Jar.main(Jar.java:39)
... So everything I'm doing with jar is the 1.0.5 jar tool)
I tried un-jarring the jar with sun's jar and re-jarring with kaffe:
sballard at rainbow:/tmp/gjsp$ /usr/lib/jdk1.1/bin/jar xvf
/usr/share/java/gnujsp.jar
created: META-INF/
inflated: META-INF/MANIFEST.MF
inflated: org/gjt/jsp/CompileException.class
inflated: org/gjt/jsp/Emitter.class
inflated: org/gjt/jsp/HttpJspPageImpl.class
inflated: org/gjt/jsp/HttpJspPageUtil.class
inflated: org/gjt/jsp/JavaEmitter.class
inflated: org/gjt/jsp/JspClassLoader.class
inflated: org/gjt/jsp/JspConfig.class
inflated: org/gjt/jsp/JspFactoryImpl$1.class
inflated: org/gjt/jsp/JspFactoryImpl.class
inflated: org/gjt/jsp/JspMsg.class
inflated: org/gjt/jsp/JspNode.class
inflated: org/gjt/jsp/JspParser.class
inflated: org/gjt/jsp/JspServlet$MapEntry.class
inflated: org/gjt/jsp/JspServlet$Page.class
inflated: org/gjt/jsp/JspServlet.class
inflated: org/gjt/jsp/JspWriterImpl.class
inflated: org/gjt/jsp/PageContextImpl$StringArrayEnumeration.class
inflated: org/gjt/jsp/PageContextImpl.class
inflated: org/gjt/jsp/ParseException.class
inflated: org/gjt/jsp/Pos.class
inflated: org/gjt/jsp/StackedReader.class
created: org/gjt/jsp/prop/
inflated: org/gjt/jsp/prop/JspMsgRes.properties
inflated: org/gjt/jsp/prop/JspMsgRes_de.properties
created: org/gjt/jsp/jsdk20/
inflated: org/gjt/jsp/jsdk20/ServletContextWrapper.class
inflated: org/gjt/jsp/jsdk20/ServletConfigWrapper.class
inflated: org/gjt/jsp/jsdk20/HttpServletRequestWrapper.class
inflated: org/gjt/jsp/jsdk20/RequestDispatcherImpl.class
inflated: org/gjt/jsp/jsdk20/JspWriterImpl.class
inflated: org/gjt/jsp/jsdk20/ServletOutputStreamImpl.class
inflated: org/gjt/jsp/jsdk20/HttpServletResponseWrapper.class
sballard at rainbow:/tmp/gjsp$ /usr/lib/kaffe/bin/jar cvf ~/gnujsp.jar *
added manifest
adding: META-INF/MANIFEST.MF (in=66) (out=66) (stored 0%)
adding: org/gjt/jsp/jsdk20/HttpServletResponseWrapper.class (in=3006)
(out=1326) (deflated 44%)
adding: org/gjt/jsp/jsdk20/ServletOutputStreamImpl.class (in=1191)
(out=554) (deflated 47%)
adding: org/gjt/jsp/jsdk20/JspWriterImpl.class (in=492) (out=325)
(deflated 66%)
adding: org/gjt/jsp/jsdk20/RequestDispatcherImpl.class (in=1429)
(out=593) (deflated 41%)
adding: org/gjt/jsp/jsdk20/HttpServletRequestWrapper.class (in=5251)
(out=2065) (deflated 39%)
adding: org/gjt/jsp/jsdk20/ServletConfigWrapper.class (in=821) (out=439)
(deflated 53%)
adding: org/gjt/jsp/jsdk20/ServletContextWrapper.class (in=3561)
(out=1517) (deflated 43%)
adding: org/gjt/jsp/prop/JspMsgRes_de.properties (in=4932) (out=1840)
(deflated 37%)
adding: org/gjt/jsp/prop/JspMsgRes.properties (in=3925) (out=1567)
(deflated 40%)
adding: org/gjt/jsp/StackedReader.class (in=2590) (out=1310) (deflated
51%)
adding: org/gjt/jsp/Pos.class (in=1993) (out=994) (deflated 50%)
adding: org/gjt/jsp/ParseException.class (in=1584) (out=918) (deflated
58%)
adding: org/gjt/jsp/PageContextImpl.class (in=9318) (out=4494) (deflated
48%)
adding: org/gjt/jsp/PageContextImpl$StringArrayEnumeration.class
(in=645) (out=411) (deflated 64%)
adding: org/gjt/jsp/JspWriterImpl.class (in=4792) (out=2189) (deflated
46%)
adding: org/gjt/jsp/JspServlet.class (in=16566) (out=8367) (deflated
51%)
adding: org/gjt/jsp/JspServlet$Page.class (in=11731) (out=6020)
(deflated 51%)
adding: org/gjt/jsp/JspServlet$MapEntry.class (in=413) (out=292)
(deflated 71%)
adding: org/gjt/jsp/JspParser.class (in=11872) (out=6356) (deflated 54%)
adding: org/gjt/jsp/JspNode.class (in=2709) (out=1363) (deflated 50%)
adding: org/gjt/jsp/JspMsg.class (in=4772) (out=1738) (deflated 36%)
adding: org/gjt/jsp/JspFactoryImpl.class (in=1044) (out=496) (deflated
48%)
adding: org/gjt/jsp/JspFactoryImpl$1.class (in=398) (out=283) (deflated
71%)
adding: org/gjt/jsp/JspConfig.class (in=1554) (out=850) (deflated 55%)
adding: org/gjt/jsp/JspClassLoader.class (in=1901) (out=1119) (deflated
59%)
adding: org/gjt/jsp/JavaEmitter.class (in=11675) (out=5607) (deflated
48%)
adding: org/gjt/jsp/HttpJspPageUtil.class (in=6128) (out=2793) (deflated
46%)
adding: org/gjt/jsp/HttpJspPageImpl.class (in=1131) (out=581) (deflated
51%)
adding: org/gjt/jsp/Emitter.class (in=3315) (out=1519) (deflated 46%)
adding: org/gjt/jsp/CompileException.class (in=307) (out=228) (deflated
74%)
sballard at rainbow:/tmp/gjsp$ /usr/lib/kaffe/bin/jar tvf ~/gnujsp.jar
0 Thu Jan 01 0-5:00:00 GMT-5:00 1970 META-INF/MANIFEST.MF
java.io.IOException: LOC header signature bad: cbcc4df3
at java.lang.Throwable.<init>(Throwable.java:38)
at java.lang.Exception.<init>(Exception.java:24)
at java.io.IOException.<init>(IOException.java:25)
at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:55)
at kaffe.tools.jar.Jar.listFilesInJar(Jar.java:601)
at kaffe.tools.jar.Jar.processJar(Jar.java:402)
at kaffe.tools.jar.Jar.start(Jar.java:60)
at kaffe.tools.jar.Jar.main(Jar.java:39)
In other words, jar could not even read the file that *it* created!
Now, I'd love to debug this, but I know nothing about zip or jar files.
Does anyone have any clues about it? I can gladly send you a copy of my
gnujsp.jar file (and of course you can get it from the gnujsp website or
in the debian gnujsp package, which is where I got it).
Also, does anyone have any idea about the error in jar from the latest
CVS - the UnsatisfiedLinkError that I quoted above? If I could get the
latest CVS to work, at least I would be able to get gdb onto this...
Thanks in advance for any help,
Stuart.
PS I'm sure I didn't quite re-jar correctly, but I got the same result
whether I included the META-INF directory as a regular directory (as
above) or whether I excluded it and passed -m META-INF/MANIFEST.MF
explicitly.
More information about the kaffe
mailing list