public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/13011] New: gij -jar simple.jar  generates: Exception during runtime initialization
@ 2003-11-11 20:00 andreast at gcc dot gnu dot org
  2003-11-12  7:51 ` [Bug libgcj/13011] " andreast at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: andreast at gcc dot gnu dot org @ 2003-11-11 20:00 UTC (permalink / raw)
  To: gcc-bugs

This happens on mainline on ppclinux and solaris9.

Running the new test case simple.jar in testsuite/libjava.jar fails horribly.
In the testsuite itself it affects the following jni testcases.

ppc linux spits the following trace:

[andreas@pm8600 libjava]$
/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu//libjava/gij -jar
/mnt/cvs/gcc-trunk/gcc/libjava/testsuite/libjava.jar/simple.jarException during
runtime initialization
java.lang.ExceptionInInitializerError
   at java.lang.Class.initializeClass()
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at java.lang.VMClassLoader.getSystemClassLoaderInternal()
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at java.lang.VMClassLoader.getSystemClassLoader()
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at java.lang.ClassLoader.<clinit>()
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at java.lang.Class.initializeClass()
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean)
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at main (/mnt/cvs/gcc-trunk/gcc/libjava/gij.cc:167)
   at __libc_start_main (/lib/libc-2.2.5.so)
Caused by: java.lang.NullPointerException
   at java.lang.ClassLoader.getSystemResource(java.lang.String)
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at java.lang.ClassLoader.getSystemResourceAsStream(java.lang.String)
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at java.util.ResourceBundle.tryBundle(java.lang.String, java.util.Locale,
java.lang.ClassLoader, java.util.ResourceBundle, java.util.HashMap)
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at java.util.ResourceBundle.tryLocalBundle(java.lang.String,
java.util.Locale, java.lang.ClassLoader, java.util.ResourceBundle,
java.util.HashMap)
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at java.util.ResourceBundle.getBundle(java.lang.String, java.util.Locale,
java.lang.ClassLoader)
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at java.util.ResourceBundle.getBundle(java.lang.String, java.util.Locale)
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at java.util.Calendar.getBundle(java.util.Locale)
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at java.util.Calendar.getInstance(java.util.TimeZone, java.util.Locale)
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at java.util.Calendar.getInstance()
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at java.util.zip.ZipEntry.getCalendar()
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at java.util.zip.ZipEntry.setTime(long)
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at java.util.zip.ZipEntry.setExtra(byte[])
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at java.util.zip.ZipFile.readEntries()
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at java.util.zip.ZipFile.getEntries()
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at java.util.zip.ZipFile.getEntry(java.lang.String)
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at java.util.jar.JarFile.readManifest()
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at java.util.jar.JarFile.JarFile(java.lang.String, boolean)
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at java.util.jar.JarFile.JarFile(java.lang.String)
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at gnu.java.net.protocol.jar.Connection.getJarFile()
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at
java.net.URLClassLoader$JarURLLoader.URLClassLoader$JarURLLoader(java.net.URLClassLoader,
java.net.URL)
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at java.net.URLClassLoader.addURLImpl(java.net.URL)
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at java.net.URLClassLoader.addURLs(java.net.URL[])
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at java.net.URLClassLoader.URLClassLoader(java.net.URL[])
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at gnu.gcj.runtime.VMClassLoader.VMClassLoader()
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at gnu.gcj.runtime.VMClassLoader.<clinit>()
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)
   at java.lang.Class.initializeClass()
(/mnt/cvs/gcc-trunk/objdir/powerpc-unknown-linux-gnu/libjava/.libs/libgcj.so.4.0.0)

-- 
           Summary: gij -jar simple.jar  generates: Exception during runtime
                    initialization
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: critical
          Priority: P1
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: andreast at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-unknown-linux-gnu
  GCC host triplet: powerpc-unknown-linux-gnu
GCC target triplet: powerpc-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13011


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libgcj/13011] gij -jar simple.jar  generates: Exception during runtime initialization
  2003-11-11 20:00 [Bug libgcj/13011] New: gij -jar simple.jar generates: Exception during runtime initialization andreast at gcc dot gnu dot org
@ 2003-11-12  7:51 ` andreast at gcc dot gnu dot org
  2003-11-14 11:11 ` andreast at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: andreast at gcc dot gnu dot org @ 2003-11-12  7:51 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From andreast at gcc dot gnu dot org  2003-11-12 07:51 -------
Darwin ppc is also affected, see gcc-testresults. (I guess others as well)

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13011


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libgcj/13011] gij -jar simple.jar  generates: Exception during runtime initialization
  2003-11-11 20:00 [Bug libgcj/13011] New: gij -jar simple.jar generates: Exception during runtime initialization andreast at gcc dot gnu dot org
  2003-11-12  7:51 ` [Bug libgcj/13011] " andreast at gcc dot gnu dot org
@ 2003-11-14 11:11 ` andreast at gcc dot gnu dot org
  2003-11-18  8:40 ` andreast at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: andreast at gcc dot gnu dot org @ 2003-11-14 11:11 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |3.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13011


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libgcj/13011] gij -jar simple.jar  generates: Exception during runtime initialization
  2003-11-11 20:00 [Bug libgcj/13011] New: gij -jar simple.jar generates: Exception during runtime initialization andreast at gcc dot gnu dot org
  2003-11-12  7:51 ` [Bug libgcj/13011] " andreast at gcc dot gnu dot org
  2003-11-14 11:11 ` andreast at gcc dot gnu dot org
@ 2003-11-18  8:40 ` andreast at gcc dot gnu dot org
  2003-11-28 21:04 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: andreast at gcc dot gnu dot org @ 2003-11-18  8:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From andreast at gcc dot gnu dot org  2003-11-18 08:40 -------
ok, the testcase still fails but the behavior is not that worse anymore.
A corrupted jar file caused this. The jar file is still not ok. We guess it's
the manifest which is not ok, Tom?

Anyway, such a behavior on a corrupted file should not cause a
NullPointerException. If the machinerie would work correct, we would throw the
right exception.

But this goes into this thread: http://gcc.gnu.org/ml/java/2003-11/msg00105.html

I change herewith the Severity to normal. If someone objects, please adjust again.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13011


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libgcj/13011] gij -jar simple.jar  generates: Exception during runtime initialization
  2003-11-11 20:00 [Bug libgcj/13011] New: gij -jar simple.jar generates: Exception during runtime initialization andreast at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2003-11-18  8:40 ` andreast at gcc dot gnu dot org
@ 2003-11-28 21:04 ` pinskia at gcc dot gnu dot org
  2003-12-19  7:00 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-28 21:04 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-11-28 21:04:00
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13011


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libgcj/13011] gij -jar simple.jar  generates: Exception during runtime initialization
  2003-11-11 20:00 [Bug libgcj/13011] New: gij -jar simple.jar generates: Exception during runtime initialization andreast at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2003-11-28 21:04 ` pinskia at gcc dot gnu dot org
@ 2003-12-19  7:00 ` pinskia at gcc dot gnu dot org
  2003-12-19 17:31 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-19  7:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-12-19 06:40 -------
Also effects i686-pc-linux-gnu.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2003-11-28 21:04:00         |2003-12-19 06:41:00
               date|                            |
   Target Milestone|3.4.0                       |---


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13011


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libgcj/13011] gij -jar simple.jar  generates: Exception during runtime initialization
  2003-11-11 20:00 [Bug libgcj/13011] New: gij -jar simple.jar generates: Exception during runtime initialization andreast at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2003-12-19  7:00 ` pinskia at gcc dot gnu dot org
@ 2003-12-19 17:31 ` pinskia at gcc dot gnu dot org
  2004-01-04 15:13 ` andreast at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-19 17:31 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |3.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13011


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libgcj/13011] gij -jar simple.jar  generates: Exception during runtime initialization
  2003-11-11 20:00 [Bug libgcj/13011] New: gij -jar simple.jar generates: Exception during runtime initialization andreast at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2003-12-19 17:31 ` pinskia at gcc dot gnu dot org
@ 2004-01-04 15:13 ` andreast at gcc dot gnu dot org
  2004-01-04 21:30 ` andreast at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: andreast at gcc dot gnu dot org @ 2004-01-04 15:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From andreast at gcc dot gnu dot org  2004-01-04 15:13 -------
Modifying the MANIFEST to:
----
Manifest-Version: 1.0
Created-By: 0.92-gcc
Main-Class: simple
----

The original MANIFEST contains an empty line between Created and Main-Class.
Also a bogus (from my understanding) @ at the end.

Cleaning this and creating a new jar file makes the test pass on darwin. Though
on ppclinux I see a linking failure.

I don't know whether it is the MANIFEST which is wrong (generated via gcc/jar)
or if the method isn't flexible enough.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13011


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libgcj/13011] gij -jar simple.jar  generates: Exception during runtime initialization
  2003-11-11 20:00 [Bug libgcj/13011] New: gij -jar simple.jar generates: Exception during runtime initialization andreast at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2004-01-04 15:13 ` andreast at gcc dot gnu dot org
@ 2004-01-04 21:30 ` andreast at gcc dot gnu dot org
  2004-01-07 18:54 ` cvs-commit at gcc dot gnu dot org
  2004-01-07 19:03 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: andreast at gcc dot gnu dot org @ 2004-01-04 21:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From andreast at gcc dot gnu dot org  2004-01-04 21:30 -------
Some further comments from Zurich :)

The modified simple.jar with the sun java:
[titanium:libjava/testsuite/libjava.jar] andreast% java -jar simple.jar
hi

The original one:

[titanium:libjava/testsuite/libjava.jar] andreast% java -jar simple.orig 
Exception in thread "main" java.io.IOException: invalid manifest format
        at java.util.jar.Manifest.read(Manifest.java:186)
        at java.util.jar.Manifest.<init>(Manifest.java:52)
        at java.util.jar.JarFile.getManifest(JarFile.java:148)

And here the diff of the MANIFEST:

damn, I can't diff!
Binary files META-INF/MANIFEST.MF and META-INF.new/MANIFEST.MF differ

old:

Manifest-Version: 1.0
Created-By: 0.92-gcc

Main-Class: simple
^@

new:

Manifest-Version: 1.0
Created-By: 0.92-gcc
Main-Class: simple

So, I'm not sure who is the guilty one, either the fastjar or fastjar. Since it
fails with the sun one too I'd say fastjar.

I'd have a patch. Simply replace the simple.jar with one that contains a valid
MANIFEST.





-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2003-12-19 06:41:00         |2004-01-04 21:30:07
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13011


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libgcj/13011] gij -jar simple.jar  generates: Exception during runtime initialization
  2003-11-11 20:00 [Bug libgcj/13011] New: gij -jar simple.jar generates: Exception during runtime initialization andreast at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2004-01-04 21:30 ` andreast at gcc dot gnu dot org
@ 2004-01-07 18:54 ` cvs-commit at gcc dot gnu dot org
  2004-01-07 19:03 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-01-07 18:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-01-07 18:54 -------
Subject: Bug 13011

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	andreast@gcc.gnu.org	2004-01-07 18:54:00

Modified files:
	libjava/testsuite: ChangeLog 
	libjava/testsuite/libjava.jar: simple.jar 

Log message:
	2004-01-07  Andreas Tobler  <a.tobler@schweiz.ch>
	
	PR libgcj/13011:
	* libjava.jar/simple.jar: Add a working MANIFEST.MF.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.307&r2=1.308
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/testsuite/libjava.jar/simple.jar.diff?cvsroot=gcc&r1=1.2&r2=1.3



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13011


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libgcj/13011] gij -jar simple.jar  generates: Exception during runtime initialization
  2003-11-11 20:00 [Bug libgcj/13011] New: gij -jar simple.jar generates: Exception during runtime initialization andreast at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2004-01-07 18:54 ` cvs-commit at gcc dot gnu dot org
@ 2004-01-07 19:03 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-07 19:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-07 19:03 -------
Fixed for 3.4.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13011


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2004-01-07 19:03 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-11 20:00 [Bug libgcj/13011] New: gij -jar simple.jar generates: Exception during runtime initialization andreast at gcc dot gnu dot org
2003-11-12  7:51 ` [Bug libgcj/13011] " andreast at gcc dot gnu dot org
2003-11-14 11:11 ` andreast at gcc dot gnu dot org
2003-11-18  8:40 ` andreast at gcc dot gnu dot org
2003-11-28 21:04 ` pinskia at gcc dot gnu dot org
2003-12-19  7:00 ` pinskia at gcc dot gnu dot org
2003-12-19 17:31 ` pinskia at gcc dot gnu dot org
2004-01-04 15:13 ` andreast at gcc dot gnu dot org
2004-01-04 21:30 ` andreast at gcc dot gnu dot org
2004-01-07 18:54 ` cvs-commit at gcc dot gnu dot org
2004-01-07 19:03 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).