[kaffe] Eclipse and strange ClassCastException

Mark Wielaard mark@klomp.org
Mon Jul 7 04:07:02 2003


--=-dlE3toB5BADSDCyTaPPQ
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi,

On Mon, 2003-07-07 at 12:39, Mark Wielaard wrote:
> The workaround for IKVM.NET was to add the xmlParserAPIs.jar and
> xercesImpl.jar to the bootclasspath but that doesn't work for kaffe.

O, spoke to soon... It does work. I can see BOTH the Eclipse splash
screens now! Admittedly it crashes soon after that, but this means that
it actually finishes the installation process and tries to actually
start the real application now. Joy!

Attached is the small patch that I made to the source.
And the workspace/.metadata/.log file which shows the errors while
running.

The following is my command line and the console output:

$ BOOTCLASSPATH=plugins/org.apache.xerces_4.0.7/xmlParserAPIs.jar:plugins/org.apache.xerces_4.0.7/xercesImpl.jar ./eclipse -debug
Start VM: /usr/local/kaffe/bin/java
-cp /tmp/eclipse/./startup.jar org.eclipse.core.launcher.Main
-os linux
-ws gtk
-arch x86
-showsplash /tmp/eclipse/./eclipse -showsplash 600
-debug
Startup: unable to load configuration
java.io.FileNotFoundException: /tmp/eclipse/.config/platform.cfg: No such file or directory
Boot URL:
    file:/tmp/eclipse/plugins/org.eclipse.core.boot_2.1.0/boot.jar
Startup: splash path = /tmp/eclipse/plugins/org.eclipse.core.boot_2.1.0/splash.bmp
Workspace location:
   /tmp/eclipse/workspace
Debug-Options:
    file:/tmp/eclipse/.options
Install URL:
    file:/tmp/eclipse/
Start VM: /usr/local/kaffe/bin/java
-cp /tmp/eclipse/./startup.jar org.eclipse.core.launcher.Main
-os linux
-ws gtk
-arch x86
-showsplash /tmp/eclipse/./eclipse -showsplash 600
-debug
Startup: using configuration file:/tmp/eclipse/workspace/.metadata/.config/platform.cfg
Boot URL: file:/tmp/eclipse/plugins/org.eclipse.core.boot_2.1.0/boot.jar
Startup: splash path = /tmp/eclipse/plugins/org.eclipse.platform_2.1.0/splash.bmp
Workspace location:
   /tmp/eclipse/workspace
Debug-Options:
    file:/tmp/eclipse/.options
Install URL:
    file:/tmp/eclipse/


Cheers,

Mark

--=-dlE3toB5BADSDCyTaPPQ
Content-Disposition: attachment; filename=eclipse.patch
Content-Type: text/x-patch; name=eclipse.patch; charset=iso-8859-1
Content-Transfer-Encoding: 7bit

Index: libraries/clib/native/System.c
===================================================================
RCS file: /cvs/kaffe/kaffe/libraries/clib/native/System.c,v
retrieving revision 1.35
diff -u -r1.35 System.c
--- libraries/clib/native/System.c	11 Jun 2003 16:08:56 -0000	1.35
+++ libraries/clib/native/System.c	7 Jul 2003 11:02:21 -0000
@@ -234,7 +234,7 @@
 	 *
 	 */
 
-	setProperty(p, "java.version", kaffe_version);
+	setProperty(p, "java.version", "1.3");
 	setProperty(p, "java.vendor", kaffe_vendor);
 	setProperty(p, "java.vendor.url", kaffe_vendor_url);
 	setProperty(p, "java.vendor.url.bug", kaffe_vendor_url_bug);
Index: libraries/javalib/java/net/URL.java
===================================================================
RCS file: /cvs/kaffe/kaffe/libraries/javalib/java/net/URL.java,v
retrieving revision 1.30
diff -u -r1.30 URL.java
--- libraries/javalib/java/net/URL.java	11 May 2003 16:26:23 -0000	1.30
+++ libraries/javalib/java/net/URL.java	7 Jul 2003 11:02:21 -0000
@@ -205,6 +205,16 @@
 	return (file);
 }
 
+public String getPath() {
+	int query = file.indexOf('?');
+	return query == -1 ? file : file.substring(0, query);
+}
+
+public String getQuery() {
+	int query = file.indexOf('?');
+	return query == -1 ? null : file.substring(query + 1);
+}
+
 public String getHost() {
 	return (host);
 }

--=-dlE3toB5BADSDCyTaPPQ
Content-Disposition: attachment; filename=.log
Content-Type: text/plain; name=.log; charset=iso-8859-1
Content-Transfer-Encoding: 7bit

!SESSION Jul 07, 2003 11:01:50.387 ---------------------------------------------
java.version=1.3
java.vendor=Kaffe.org project
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Command-line arguments: -os linux -ws gtk -arch x86 -debug -install file:/tmp/eclipse/
!ENTRY org.eclipse.core.runtime 4 4 Jul 07, 2003 11:01:50.395
!MESSAGE Unable to read authorization database: /tmp/eclipse/workspace/.metadata/.keyring.
!STACK 0
java.io.StreamCorruptedException: bad magic in stream header (-14967, expected -21267)
	at java.lang.Throwable.fillInStackTrace(Throwable.java:native)
	at java.lang.Throwable.<init>(Throwable.java:44)
	at java.lang.Exception.<init>(Exception.java:24)
	at java.io.IOException.<init>(IOException.java:24)
	at java.io.ObjectStreamException.<init>(ObjectStreamException.java:23)
	at java.io.StreamCorruptedException.<init>(StreamCorruptedException.java:21)
	at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:298)
	at java.io.ObjectInputStream.<init>(ObjectInputStream.java:185)
	at org.eclipse.core.internal.runtime.AuthorizationDatabase.load(AuthorizationDatabase.java:268)
	at org.eclipse.core.internal.runtime.AuthorizationDatabase.load(AuthorizationDatabase.java:252)
	at org.eclipse.core.internal.runtime.AuthorizationDatabase.<init>(AuthorizationDatabase.java:77)
	at org.eclipse.core.internal.runtime.InternalPlatform.loadKeyring(InternalPlatform.java:618)
	at org.eclipse.core.internal.runtime.InternalPlatform.loaderStartup(InternalPlatform.java:591)
	at java.lang.reflect.Method.invoke0(Method.java:native)
	at java.lang.reflect.Method.invoke(Method.java:255)
	at org.eclipse.core.internal.boot.InternalBootLoader.startup(InternalBootLoader.java:1011)
	at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:838)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
	at java.lang.reflect.Method.invoke0(Method.java:native)
	at java.lang.reflect.Method.invoke(Method.java:255)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
	at org.eclipse.core.launcher.Main.run(Main.java:747)
	at org.eclipse.core.launcher.Main.main(Main.java:583)
!ENTRY org.eclipse.core.runtime 4 2 Jul 07, 2003 11:01:51.155
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.runtime".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:46)
	at org.eclipse.ui.plugin.AbstractUIPlugin.refreshPluginActions(AbstractUIPlugin.java:739)
	at org.eclipse.ui.plugin.AbstractUIPlugin.startup(AbstractUIPlugin.java:793)
	at org.eclipse.core.internal.plugins.PluginDescriptor$1.run(PluginDescriptor.java:728)
	at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:889)
	at org.eclipse.core.internal.plugins.PluginDescriptor.internalDoPluginActivation(PluginDescriptor.java:740)
	at org.eclipse.core.internal.plugins.PluginDescriptor.doPluginActivation(PluginDescriptor.java:188)
	at org.eclipse.core.internal.plugins.PluginClassLoader.activatePlugin(PluginClassLoader.java:112)
	at org.eclipse.core.internal.plugins.PluginClassLoader.internalFindClassParentsSelf(PluginClassLoader.java:185)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClassParentsSelf(DelegatingURLClassLoader.java:490)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:882)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.access$0(DelegatingURLClassLoader.java:876)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader$DelegateLoader.loadClass(DelegatingURLClassLoader.java:90)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClassPrerequisites(DelegatingURLClassLoader.java:554)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:890)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:862)
	at java.lang.ClassLoader.defineClass0(ClassLoader.java:native)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:179)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:33)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:98)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClass(DelegatingURLClassLoader.java:922)
	at org.eclipse.core.internal.plugins.PluginClassLoader.internalFindClassParentsSelf(PluginClassLoader.java:166)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClassParentsSelf(DelegatingURLClassLoader.java:490)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:882)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:862)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:121)
	at org.eclipse.core.internal.plugins.PluginDescriptor.internalDoPluginActivation(PluginDescriptor.java:692)
	at org.eclipse.core.internal.plugins.PluginDescriptor.doPluginActivation(PluginDescriptor.java:188)
	at org.eclipse.core.internal.plugins.PluginClassLoader.activatePlugin(PluginClassLoader.java:112)
	at org.eclipse.core.internal.plugins.PluginClassLoader.internalFindClassParentsSelf(PluginClassLoader.java:185)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClassParentsSelf(DelegatingURLClassLoader.java:490)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:882)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:862)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:121)
	at org.eclipse.core.internal.plugins.PluginDescriptor.createExecutableExtension(PluginDescriptor.java:130)
	at org.eclipse.core.internal.plugins.PluginDescriptor.createExecutableExtension(PluginDescriptor.java:167)
	at org.eclipse.core.internal.plugins.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:103)
	at org.eclipse.core.internal.runtime.InternalPlatform.loaderGetRunnable(InternalPlatform.java:472)
	at java.lang.reflect.Method.invoke0(Method.java:native)
	at java.lang.reflect.Method.invoke(Method.java:255)
	at org.eclipse.core.internal.boot.InternalBootLoader.getRunnable(InternalBootLoader.java:471)
	at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:841)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
	at java.lang.reflect.Method.invoke0(Method.java:native)
	at java.lang.reflect.Method.invoke(Method.java:255)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
	at org.eclipse.core.launcher.Main.run(Main.java:747)
	at org.eclipse.core.launcher.Main.main(Main.java:583)
!ENTRY org.eclipse.core.runtime 4 2 Jul 07, 2003 11:01:51.307
!MESSAGE Plug-in org.eclipse.ui was unable to load class org.eclipse.ui.internal.Workbench.
!STACK 0
org.eclipse.core.internal.boot.DelegatingLoaderException: org.eclipse.core.runtime.CoreException: Problems encountered starting up plug-in: "org.eclipse.ui.views".
	at java.lang.Throwable.fillInStackTrace(Throwable.java:native)
	at java.lang.Throwable.<init>(Throwable.java:44)
	at java.lang.Exception.<init>(Exception.java:24)
	at org.eclipse.core.runtime.CoreException.<init>(CoreException.java:35)
	at org.eclipse.core.internal.plugins.PluginDescriptor.internalDoPluginActivation(PluginDescriptor.java:746)
	at org.eclipse.core.internal.plugins.PluginDescriptor.doPluginActivation(PluginDescriptor.java:188)
	at org.eclipse.core.internal.plugins.PluginClassLoader.activatePlugin(PluginClassLoader.java:112)
	at org.eclipse.core.internal.plugins.PluginClassLoader.internalFindClassParentsSelf(PluginClassLoader.java:185)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClassParentsSelf(DelegatingURLClassLoader.java:490)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:882)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.access$0(DelegatingURLClassLoader.java:876)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader$DelegateLoader.loadClass(DelegatingURLClassLoader.java:90)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClassPrerequisites(DelegatingURLClassLoader.java:554)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:890)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:862)
	at java.lang.ClassLoader.defineClass0(ClassLoader.java:native)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:179)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:33)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:98)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClass(DelegatingURLClassLoader.java:922)
	at org.eclipse.core.internal.plugins.PluginClassLoader.internalFindClassParentsSelf(PluginClassLoader.java:166)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClassParentsSelf(DelegatingURLClassLoader.java:490)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:882)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:862)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:121)
	at org.eclipse.core.internal.plugins.PluginDescriptor.internalDoPluginActivation(PluginDescriptor.java:692)
	at org.eclipse.core.internal.plugins.PluginDescriptor.doPluginActivation(PluginDescriptor.java:188)
	at org.eclipse.core.internal.plugins.PluginClassLoader.activatePlugin(PluginClassLoader.java:112)
	at org.eclipse.core.internal.plugins.PluginClassLoader.internalFindClassParentsSelf(PluginClassLoader.java:185)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClassParentsSelf(DelegatingURLClassLoader.java:490)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:882)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:862)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:121)
	at org.eclipse.core.internal.plugins.PluginDescriptor.createExecutableExtension(PluginDescriptor.java:130)
	at org.eclipse.core.internal.plugins.PluginDescriptor.createExecutableExtension(PluginDescriptor.java:167)
	at org.eclipse.core.internal.plugins.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:103)
	at org.eclipse.core.internal.runtime.InternalPlatform.loaderGetRunnable(InternalPlatform.java:472)
	at java.lang.reflect.Method.invoke0(Method.java:native)
	at java.lang.reflect.Method.invoke(Method.java:255)
	at org.eclipse.core.internal.boot.InternalBootLoader.getRunnable(InternalBootLoader.java:471)
	at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:841)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
	at java.lang.reflect.Method.invoke0(Method.java:native)
	at java.lang.reflect.Method.invoke(Method.java:255)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
	at org.eclipse.core.launcher.Main.run(Main.java:747)
	at org.eclipse.core.launcher.Main.main(Main.java:583)
!ENTRY org.eclipse.core.runtime 4 2 Jul 07, 2003 11:01:51.311
!MESSAGE Plug-in org.eclipse.ui was unable to load class org.eclipse.ui.internal.Workbench.
!STACK 0
org.eclipse.core.internal.boot.DelegatingLoaderException: org.eclipse.core.runtime.CoreException: Problems encountered starting up plug-in: "org.eclipse.ui.views".
	at java.lang.Throwable.fillInStackTrace(Throwable.java:native)
	at java.lang.Throwable.<init>(Throwable.java:44)
	at java.lang.Exception.<init>(Exception.java:24)
	at org.eclipse.core.runtime.CoreException.<init>(CoreException.java:35)
	at org.eclipse.core.internal.plugins.PluginDescriptor.internalDoPluginActivation(PluginDescriptor.java:746)
	at org.eclipse.core.internal.plugins.PluginDescriptor.doPluginActivation(PluginDescriptor.java:188)
	at org.eclipse.core.internal.plugins.PluginClassLoader.activatePlugin(PluginClassLoader.java:112)
	at org.eclipse.core.internal.plugins.PluginClassLoader.internalFindClassParentsSelf(PluginClassLoader.java:185)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClassParentsSelf(DelegatingURLClassLoader.java:490)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:882)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.access$0(DelegatingURLClassLoader.java:876)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader$DelegateLoader.loadClass(DelegatingURLClassLoader.java:90)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClassPrerequisites(DelegatingURLClassLoader.java:554)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:890)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:862)
	at java.lang.ClassLoader.defineClass0(ClassLoader.java:native)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:179)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:33)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:98)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClass(DelegatingURLClassLoader.java:922)
	at org.eclipse.core.internal.plugins.PluginClassLoader.internalFindClassParentsSelf(PluginClassLoader.java:166)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClassParentsSelf(DelegatingURLClassLoader.java:490)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:882)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:862)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:121)
	at org.eclipse.core.internal.plugins.PluginDescriptor.internalDoPluginActivation(PluginDescriptor.java:692)
	at org.eclipse.core.internal.plugins.PluginDescriptor.doPluginActivation(PluginDescriptor.java:188)
	at org.eclipse.core.internal.plugins.PluginClassLoader.activatePlugin(PluginClassLoader.java:112)
	at org.eclipse.core.internal.plugins.PluginClassLoader.internalFindClassParentsSelf(PluginClassLoader.java:185)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClassParentsSelf(DelegatingURLClassLoader.java:490)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:882)
	at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:862)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:121)
	at org.eclipse.core.internal.plugins.PluginDescriptor.createExecutableExtension(PluginDescriptor.java:130)
	at org.eclipse.core.internal.plugins.PluginDescriptor.createExecutableExtension(PluginDescriptor.java:167)
	at org.eclipse.core.internal.plugins.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:103)
	at org.eclipse.core.internal.runtime.InternalPlatform.loaderGetRunnable(InternalPlatform.java:472)
	at java.lang.reflect.Method.invoke0(Method.java:native)
	at java.lang.reflect.Method.invoke(Method.java:255)
	at org.eclipse.core.internal.boot.InternalBootLoader.getRunnable(InternalBootLoader.java:471)
	at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:841)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
	at java.lang.reflect.Method.invoke0(Method.java:native)
	at java.lang.reflect.Method.invoke(Method.java:255)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
	at org.eclipse.core.launcher.Main.run(Main.java:747)
	at org.eclipse.core.launcher.Main.main(Main.java:583)
!SESSION ----------------------------------------------------------------------
!ENTRY org.eclipse.core.launcher 4 0 Jul 07, 2003 11:01:51.398
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.reflect.InvocationTargetException: java.lang.IllegalArgumentException: Application not found: org.eclipse.ui.workbench.
	at java.lang.Throwable.fillInStackTrace(Throwable.java:native)
	at java.lang.Throwable.<init>(Throwable.java:44)
	at java.lang.Exception.<init>(Exception.java:24)
	at java.lang.RuntimeException.<init>(RuntimeException.java:21)
	at java.lang.IllegalArgumentException.<init>(IllegalArgumentException.java:21)
	at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:843)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
	at java.lang.reflect.Method.invoke0(Method.java:native)
	at java.lang.reflect.Method.invoke(Method.java:255)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
	at org.eclipse.core.launcher.Main.run(Main.java:747)
	at org.eclipse.core.launcher.Main.main(Main.java:583)


--=-dlE3toB5BADSDCyTaPPQ--