Bug 173889 - Problem with J9 VM and Equinox
Summary: Problem with J9 VM and Equinox
Status: RESOLVED WORKSFORME
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.2.1   Edit
Hardware: Other Windows Mobile 2003
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: equinox.framework-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2007-02-12 12:15 EST by Carlos CLA
Modified: 2010-04-12 13:04 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos CLA 2007-02-12 12:15:01 EST
Hi!
I'm trying to run Equinox framework in a PDA with Windows Mobile 2003 and IBM j9, but I'm always getting this problem, could you help me, please? is there any solution?.


!SESSION 2007-01-18 11:00:05.552 -----------------------------------------------
eclipse.buildId=unknown
java.fullversion=IBM J9 2.2 arm-32 build 20040706_1503_lEdFMq (JIT disabled - r7.k1_level20040630_1801)
BootLoader constants: OS=win32, ARCH=arm, WS=win32, NL=es_ES
Command-line arguments:  -console -configuration \SD\MiniEquinox\configuration

!ENTRY org.eclipse.osgi 4 0 2007-01-18 11:00:09.678
!MESSAGE Startup error
!STACK 1
java.lang.NoSuchMethodError: java/io/RandomAccessFile.getChannel()Ljava/nio/channels/FileChannel;
	at org.eclipse.core.runtime.internal.adaptor.Locker_JavaNio.lock(Unknown Source)
	at org.eclipse.osgi.storagemanager.StorageManager.lock(Unknown Source)
	at org.eclipse.osgi.storagemanager.StorageManager.open(Unknown Source)
	at org.eclipse.osgi.internal.baseadaptor.BaseStorage.initFileManager(Unknown Source)
	at org.eclipse.osgi.internal.baseadaptor.BaseStorage.initialize(Unknown Source)
	at org.eclipse.osgi.baseadaptor.BaseAdaptor.initializeStorage(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.Framework.initialize(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.Framework.<init>(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.OSGi.createFramework(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.OSGi.<init>(Unknown Source)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(Unknown Source)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.main(Unknown Source)
	at java.lang.reflect.AccessibleObject.invokeV(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.ibm.oti.vm.JarRunner.main(Unknown Source)
Comment 1 Thomas Watson CLA 2007-02-12 13:37:57 EST
What profile are you attempting to launch J9 with (cdc/foundation ...)?

The stacktrace seems to indicate that you have java.nio.channels.FileLock class but do not have the method java/io/RandomAccessFile.getChannel()?  That is strange.

Can you try running with the following system property set:

osgi.locking=java.io

You should be able to add this to your config.ini file.
Comment 2 Mark Rogalski CLA 2007-02-12 14:01:33 EST
java.nio.* is not in Foundation profile. Has this dependency for nio been recently added into the eclipse core runtime?
Comment 3 Thomas Watson CLA 2007-02-12 14:40:50 EST
No, this has been there all along.  We do a check to see if we can load the java.nio.channels.FileLock before using anything from java.nio.  If we cannot load this class then we default to java.io locking. 
Comment 4 Carlos CLA 2007-02-13 02:58:34 EST
Hi again, 
yes, I'm using CDC/Foundation profile.
I have just tried adding that property to the config.ini file and that's what happens now:

!SESSION 2007-02-13 08:50:40.778 -----------------------------------------------
eclipse.buildId=unknown
java.fullversion=IBM J9 2.2 arm-32 build 20040706_1503_lEdFMq (JIT disabled - r7.k1_level20040630_1801)
BootLoader constants: OS=win32, ARCH=arm, WS=win32, NL=es_ES
Command-line arguments:  -console -configuration \SD\MiniEquinox\configuration

!ENTRY org.eclipse.osgi 4 0 2007-02-13 08:50:50.829
!MESSAGE Error reading configuration: Unable to create lock manager.
!STACK 0
java.io.IOException: Unable to create lock manager.
	at org.eclipse.osgi.storagemanager.StorageManager.open(Unknown Source)
	at org.eclipse.osgi.internal.baseadaptor.BaseStorage.initFileManager(Unknown Source)
	at org.eclipse.osgi.internal.baseadaptor.BaseStorage.initialize(Unknown Source)
	at org.eclipse.osgi.baseadaptor.BaseAdaptor.initializeStorage(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.Framework.initialize(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.Framework.<init>(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.OSGi.createFramework(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.OSGi.<init>(Unknown Source)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(Unknown Source)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.main(Unknown Source)
	at java.lang.reflect.AccessibleObject.invokeV(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.ibm.oti.vm.JarRunner.main(Unknown Source)

!ENTRY system.bundle 4 0 2007-02-13 08:50:54.484
!MESSAGE FrameworkEvent.ERROR
!STACK 0
org.osgi.framework.BundleException: Exception in org.eclipse.osgi.framework.internal.core.SystemBundleActivator.start() of bundle system.bundle.
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.launch(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.SystemBundle.resume(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.Framework.launch(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.OSGi.launch(Unknown Source)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(Unknown Source)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.main(Unknown Source)
	at java.lang.reflect.AccessibleObject.invokeV(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.ibm.oti.vm.JarRunner.main(Unknown Source)
Root exception:
java.lang.IllegalStateException
	at org.eclipse.osgi.internal.baseadaptor.BaseStorage.checkSystemState(Unknown Source)
	at org.eclipse.osgi.internal.baseadaptor.BaseStorage.getStateManager(Unknown Source)
	at org.eclipse.osgi.baseadaptor.BaseAdaptor.getPlatformAdmin(Unknown Source)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAdaptorHook.frameworkStart(Unknown Source)
	at org.eclipse.osgi.baseadaptor.BaseAdaptor.frameworkStart(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.SystemBundleActivator.start(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.launch(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.SystemBundle.resume(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.Framework.launch(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.OSGi.launch(Unknown Source)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(Unknown Source)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.main(Unknown Source)
	at java.lang.reflect.AccessibleObject.invokeV(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.ibm.oti.vm.JarRunner.main(Unknown Source)

!ENTRY org.eclipse.osgi 4 0 2007-02-13 08:50:54.616
!MESSAGE Startup error
!STACK 1
java.lang.RuntimeException: Exception in org.eclipse.osgi.framework.internal.core.SystemBundleActivator.start() of bundle system.bundle.
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.launch(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.SystemBundle.resume(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.Framework.launch(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.OSGi.launch(Unknown Source)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(Unknown Source)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.main(Unknown Source)
	at java.lang.reflect.AccessibleObject.invokeV(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.ibm.oti.vm.JarRunner.main(Unknown Source)


I don't understand what is happening. I hope you could help me. Thank you in advance.
Comment 5 Thomas Watson CLA 2007-03-30 16:25:06 EDT
See bug 151413 for the IllegalStateException fix.

The error "java.io.IOException: Unable to create lock manager."  Looks like it is happening because your configuration area is read-only.
Comment 6 Thomas Watson CLA 2007-08-03 16:56:15 EDT
Carlos, have you been able to make any progress.  Can you confirm you are not running with a read-only configuration?
Comment 7 Miguel Garcia CLA 2007-08-21 09:45:19 EDT
Hi Thomas,

I have had the same problems but I have solved it with the indications of this bug and the one you pointed (https://bugs.eclipse.org/bugs/show_bug.cgi?id=151413)

Adding this two system properties

osgi.locking=java.io
org.osgi.framework.executionenvironment = OSGi/Minimum-1.0, OSGi/Minimum-1.1,
CDC-1.0/Foundation-1.0, CDC-1.0/PersonalProfile-1.0

it works fine.

I'm running Equinox 3.3 by the way
Comment 8 Thomas Watson CLA 2010-04-12 13:04:41 EDT
Please reopen if there are still issues here.