Configure eclipse osgi log - eclipse

I am using eclipse osgi jar. How to redirect the log generated by osgi to a file?
Whenever I start the osgi framework, it generates a log like 1317008078357.log. How to redirect this log to a custom file. Do I need to use log4j as a osgi bundle? what will be the log4j.xml configuration ?
log file contains:
!SESSION 2011-09-26 11:34:38.232 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_26
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -configuration D:/CommonNBI/Trunck/release_structure/server/nbi/snmp/conf -console
!ENTRY org.eclipse.osgi 2 0 2011-09-26 11:34:44.029
!MESSAGE While loading class .... may not be fully initialized.
!STACK 0
org.osgi.framework.BundleException: State change in progress for bundle ..

Eclipse (Equinox) uses his own logger. To configure it you can define the logger options in config.ini:
osgi.logfile
file name
eclipse.log.level
sets the level used when logging messages to the eclipse log.
eclipse.log.backup.max
the max number of backup log files to allow.
eclipse.log.size.max
the max size in Kb that the log file is allowed to grow.
more details in Eclipse Help (http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html)
also here: Logging in Eclipse/OSGi plugins
and here: http://www.eclipsezone.com/eclipse/forums/t99588.html

Related

Cloudant Java API with Eclipse E4 RCP Application NoClassDefFoundError: okhttp3/JavaNetCookieJar

I am trying to create an Eclipse E4 RCP application that connects to a CouchDB server using the Cloudant Java API. I am able to pull in the Cloudant jar via Maven in the target-platform file, but I have 2 issues.
The annotations in com.google.code.findbugs:jsr305:3.0.2 conflict with the required #PostConstruct annotations in javax.annotation. To work around this I excluded jsr305 using the target-platform file. Without doing this, the standard E4 UI Part class would not compile with the #PostConstruct annotation.
Now I can get the GUI to run and have it set to test a connection to the DB when a button is pressed, but when I press the button and try to connect to a DB using the Cloudant API, I receive NoClassDefFoundError: okhttp3/JavaNetCookieJar Looking at the stack trace (below) the Cloudant classes are available, but not the okhttp3 JavaNetCookieJar class. This seems weird in that some of the classes pulled in via maven dependencie are available but not all of them.
Here is the relevant part of my target-platform file:
<location includeDependencyDepth="infinite" includeDependencyScopes="compile" includeSource="true" missingManifest="generate" type="Maven">
<dependencies>
<dependency>
<groupId>com.ibm.cloud</groupId>
<artifactId>cloudant</artifactId>
<version>0.2.0</version>
<type>jar</type>
</dependency>
</dependencies>
<exclude>com.google.code.findbugs:jsr305:3.0.2</exclude>
</location>
I have tried to build this using a standard "Hello World" maven project and the same example DB code, and it works fine when telling maven to bundle all the jars together.
All the classes are listed under Plug-in Dependencies, see image here.
Note that the package name okhttp3 exists in 2 jars (okhttp-4.10.0 and okhttp-urlconnection-4.10.0), It seems like eclipse (and Tycho) only pull in the first instance of the package name.
Full stack trace (with proprietary info removed):
eclipse.buildId=unknown
java.version=17.0.2
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product com.name.ui.product -clearPersistedState
Command-line arguments: -product com.name.ui.product -data C:\name/../runtime-name.product -dev file:C:/name/.metadata/.plugins/org.eclipse.pde.core/name.product/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog -clearPersistedState
!ENTRY org.eclipse.e4.ui.workbench 4 0 2022-07-26 10:33:00.794
!MESSAGE Internal Error
!STACK 0
java.lang.NoClassDefFoundError: okhttp3/JavaNetCookieJar
at com.ibm.cloud.sdk.core.http.ServiceCookieJar.<init>(ServiceCookieJar.java:37)
at com.ibm.cloud.cloudant.security.CouchDbSessionAuthenticator.<init>(CouchDbSessionAuthenticator.java:84)
at com.ibm.cloud.cloudant.security.CouchDbSessionAuthenticator.newAuthenticator(CouchDbSessionAuthenticator.java:69)
at com.ibm.cloud.cloudant.internal.DelegatingAuthenticatorFactory.createAuthenticator(DelegatingAuthenticatorFactory.java:54)
at com.ibm.cloud.cloudant.internal.DelegatingAuthenticatorFactory.getAuthenticator(DelegatingAuthenticatorFactory.java:40)
at com.ibm.cloud.cloudant.v1.Cloudant.newInstance(Cloudant.java:185)
at com.ibm.cloud.cloudant.v1.Cloudant.newInstance(Cloudant.java:174)
at com.name.db.DbTest.doTest(DbTest.java:28)
at com.name.ui.parts.ViewPart$1.widgetSelected(ViewPart.java:38)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4243)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1063)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4060)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3632)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:168)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
at org.eclipse.equinox.launcher.Main.main(Main.java:1440)
Caused by: java.lang.ClassNotFoundException: okhttp3.JavaNetCookieJar cannot be found by wrapped.com.ibm.cloud.sdk-core_9.17.3
at org.eclipse.osgi.internal.loader.BundleLoader.generateException(BundleLoader.java:529)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:475)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:416)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:168)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 33 more

how to add poi library to eclipse rcp project?

i'm trying to debug/run my app with poi libraries.
I added jar files downloaded from POI Official Site, and I put it in lib folder.
I also configure build path and add manually each one of the jar files.
This are the libraries ...
NOTE: In my libraries I allready have poi-3.0.1-FINAL.jar.
When I edit the class, i have no errors.
but when I run or debug app, i get this in console:
java.version=1.6.0_45 java.vendor=Sun Microsystems Inc. BootLoader
constants: OS=win32, ARCH=x86, WS=win32, NL=es_AR Framework arguments:
-product AgroTracker.product Command-line arguments: -product AgroTracker.product -data
C:\Users\Nico\AgroTrackerWrkSpace/../runtime-AgroTracker.product -dev
file:C:/Users/Nico/AgroTrackerWrkSpace/.metadata/.plugins/org.eclipse.pde.core/AgroTracker.product/dev.properties
-os win32 -ws win32 -arch x86 -consoleLog
!ENTRY org.eclipse.ui 4 0 2017-06-28 08:12:55.143 !MESSAGE Unhandled
event loop exception !STACK 0 java.lang.NoClassDefFoundError:
org/apache/poi/ss/usermodel/Workbook at
ar.com.cse.cseagro.view.ensayo.CargaEnsayoView$13.widgetSelected(CargaEnsayoView.java:491)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
Caused by: java.lang.ClassNotFoundException:
org.apache.poi.ss.usermodel.Workbook at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
What I'm missing to do in eclipse ?
What are the minimum jar files necesary to write and read .XLSX files ?
Best regards!
Binaries !!
In a plug-in you must add the library jars to the plug-in's classpath rather than just adding them to the build path.
Open the MANIFEST.MF editor. On the 'Runtime' tab look at the 'Classpath' section. Click Add... and add the jars to the class path. Make sure you do not delete the '.' entry. This will add the jars to the 'Bundle-Classpath' in the MANIFEST.MF
On the 'Build' tab add the jars to the 'Binary Build' list. This will update the 'build.properties' file to make sure the files are included in the plug-in when it is built.
Step 1: Download latest version
Step 2: Unzip (unpack) files to what ever directory you want
Step 3: Right-click on you eclipse project in the eclipse package explorer
Step 4: Select Build Path >> Add External Archives...
Step 5: Navigate to the unzipped folder
Step 6: Select all files
Step 7: Click "Open"
Step 8: Rejoice

Eclipse OSGi Bundle Console Exception

I am using Eclipse Juno to run the OSGi. But while running i am not able to see the console and getting the below error:
I'm trying to run my bundle as OSGI framework but i got the following output and i don't know where is the mistake:
!SESSION 2015-08-05 17:54:16.831 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_65
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Command-line arguments: -console -configuration runtime
!ENTRY org.eclipse.osgi 4 0 2015-08-05 17:54:17.182
!MESSAGE Could not find bundle: unknown
!STACK 0
org.osgi.framework.BundleException: Could not find bundle: unknown
at org.eclipse.core.runtime.internal.adaptor.ConsoleManager.checkForConsoleBundle(ConsoleManager.java:58)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:331)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:231)
at org.eclipse.core.runtime.adaptor.EclipseStarter.main(EclipseStarter.java:208)
!ENTRY org.eclipse.osgi 4 0 2015-08-05 17:54:17.198
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:78)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at org.eclipse.core.runtime.adaptor.EclipseStarter.main(EclipseStarter.java:208)
Please help.
You need expose your services in the MANIFEST.MF, this file is located into META-INF directory, you can use this plugin of maven for do this work automatically:
http://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html

com.worklight.studio.plugin thread hangs on eclipse startup if existing worklight projects in workspace

I have eclipse Juno and the IBM Worklight studio plugin v5.0.5 installed. The worklight documentation specific that eclipse Juno is supported, but if I create a worklight project and then close eclipse, and then try to start it up again a thread hangs on startup loading things from com.worklight.studio.plugin and I end up having to kill eclipse since it just hangs on the loading screen. It is not the same package loaded everytime either that it hangs on, it seems to be random. Here is a stacktrace from when it happened once:
!MESSAGE While loading class "com.worklight.studio.plugin.classpaths.ServerAPIContainer", thread "Thread[org.eclipse.wst.sse.ui.internal.reconcile.StructuredRegionProcessor,1,main]" timed out waiting (5000ms) for thread "Thread[Worker-0,5,main]" to finish starting bundle "com.worklight.studio.plugin_5.0.5.20121129-1027 [882]". To avoid deadlock, thread "Thread[org.eclipse.wst.sse.ui.internal.reconcile.StructuredRegionProcessor,1,main]" is proceeding but "com.worklight.studio.plugin.classpaths.ServerAPIContainer" may not be fully initialized.
!STACK 0
org.osgi.framework.BundleException: State change in progress for bundle "reference:file:plugins/com.worklight.studio.plugin_5.0.5.20121129-1027/" by thread "Worker-0".
at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1088)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:298)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:263)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:469)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:464)
...
Caused by: org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException
... 45 more
Root exception:
org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException
at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1088)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:298)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:263)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:469)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
...
eclipse.buildId=M20130204-1200
java.version=1.7.0_15
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
It's a very long stack trace so I just included the parts I thought were relevant above. I can start eclipse again by deleting the worklight projects from my workspace, but this means I can only ever work on a project for a single session. I've seen other posts about this issue, but they all give the same solution of just deleting the projects. Is there any more permanent solution to this issue?
Thanks,
Alex
Uninstall it and try the latest version, 5.0.6.1, however also make sure to delete from the Eclipse-workspace the WorklightServerHome folder (due to schema changes between 5.0.5 and 5.0.6.x).

Eclipse RPC bundle activation error: "The System Bundle was updated"

I get the following error when I try to launch my Eclipse RPC application:
!SESSION 2011-05-05 17:07:38.649 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_IE
Framework arguments: -application org.eclipse.ui.ide.workbench
Command-line arguments: -application org.eclipse.ui.ide.workbench -data C:\Users\eramkoh\PCI Workspace/../runtime-EclipseApplication -dev file:C:/Users/eramkoh/PCI Workspace/.metadata/.plugins/org.eclipse.pde.core/Eclipse Application/dev.properties -os win32 -ws win32 -arch x86 -consoleLog
!ENTRY org.eclipse.equinox.simpleconfigurator 4 0 2011-05-05 17:07:39.492
!MESSAGE
!STACK 0
org.osgi.framework.BundleException: Exception in org.eclipse.equinox.internal.simpleconfigurator.Activator.start() of bundle org.eclipse.equinox.simpleconfigurator.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:374)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1067)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:561)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:546)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:459)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:440)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
Caused by: java.lang.IllegalStateException: The System Bundle was updated. The framework must be restarted to finalize the configuration change
at org.eclipse.equinox.internal.simpleconfigurator.ConfigApplier.install(ConfigApplier.java:71)
at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:129)
at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:143)
at org.eclipse.equinox.internal.simpleconfigurator.Activator.start(Activator.java:48)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
... 11 more
Root exception:
java.lang.IllegalStateException: The System Bundle was updated. The framework must be restarted to finalize the configuration change
at org.eclipse.equinox.internal.simpleconfigurator.ConfigApplier.install(ConfigApplier.java:71)
at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:129)
at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:143)
at org.eclipse.equinox.internal.simpleconfigurator.Activator.start(Activator.java:48)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:374)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1067)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:561)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:546)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:459)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:440)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
!ENTRY org.eclipse.osgi 4 0 2011-05-05 17:07:39.492
!MESSAGE Bundle org.eclipse.equinox.simpleconfigurator_1.0.101.R35x_v20090807-1100 [127] is not active.
!ENTRY org.eclipse.osgi 4 0 2011-05-05 17:07:39.523
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
What should I do to resolve it?
I had exactly the same problem and I realized what causes it. If you have some system related bundle more than once (org.eclipse.osgi for example) in your target file, then if you let your application running, then by default Eclipse adds all of the bundles to the launch configuration. So steps to take:
Open launch config and go to plugins tab
click on validate
See which plugin is duplicated
Leave only one checked, which is appropiate
See the picture below for details:
I've got a similar problem when trying to launch Eclipse CDT 4.1.1 (with couple 4.2.2 and several own plug-ins) from Eclipse SDK 4.2.2 on 32bit Java 7 VM in 32bit Windows Vista. I'm not sure what the root cause is, but I can reliably reproduce and solve it using the following steps.
Set a new target platform definition, or reload an existing one.
Try running JUnit4 plug-in tests in debug mode (Ctrl+F11), and observe everything working well.
Restart Eclipse.
Repeat step 2 and get the same java.lang.IllegalStateException as the topic starter.
Reload the target platform definition, and click OK on "Target Definition Out Of Synch: The active target platform is out of synch with the file system. Pressing ok on the preference page will update the target platform"
Repeat step 2 and observe that the error is gone again.
Since I don't get this error in a similar scenario with Eclipse 3.6, I would guess that the target platform code in Eclipse Juno does not handle NTFS file timestamps well enough. So, when an Eclipse instance is actually loaded, a changed bundle is erroneously detected and an attempt to reinstall it is made, leading to this error later.
Summary: try reloading the target platform if you get this error.
Try adding org.eclipse.core.runtime on the configuration tab of your product, and set it to a default start level (0) and auto start set to true.