Why is my JUnit Plugin tests failing with unresolved bundles errors? - eclipse

I'm trying to get my JUnit Plugin-Test launcher to run for my PDE projects. It was working before, but I changed some of the names of my OSGi bundles and now it's failing with the following:
!ENTRY org.eclipse.osgi 2 0 2011-08-09 15:43:59.904
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2011-08-09 15:43:59.904
!MESSAGE Bundle me.gladwell.android.tools_0.1.1.qualifier [76] was not resolved.
!SUBENTRY 2 me.gladwell.android.tools 2 0 2011-08-09 15:43:59.904
!MESSAGE Package uses conflict: Require-Bundle: org.eclipse.persistence.moxy; bundle-version="2.1.0"
!SUBENTRY 1 org.eclipse.osgi 2 0 2011-08-09 15:43:59.904
!MESSAGE Bundle me.gladwell.eclipse.m2e.android_0.3.1.qualifier [77] was not resolved.
!SUBENTRY 2 me.gladwell.eclipse.m2e.android 2 0 2011-08-09 15:43:59.905
!MESSAGE Missing required bundle me.gladwell.android.tools_0.1.1.
!SUBENTRY 1 org.eclipse.osgi 2 0 2011-08-09 15:43:59.905
!MESSAGE Bundle me.gladwell.eclipse.m2e.android.test_0.3.1.qualifier [78] was not resolved.
!SUBENTRY 2 me.gladwell.eclipse.m2e.android.test 2 0 2011-08-09 15:43:59.905
!MESSAGE Missing required bundle me.gladwell.eclipse.m2e.android_0.0.0.
!SUBENTRY 2 me.gladwell.eclipse.m2e.android.test 2 0 2011-08-09 15:43:59.905
!MESSAGE Missing required bundle me.gladwell.android.tools_0.0.0.
Please see full error log
I'm unsure how to diagnose these messages and where/what problems they might refer to. These tests run successfully in my command line, Tycho-Maven build and the project compiles without errors in Eclipse. I've selected "all workspace and enabled target plug-ins" option in my launcher's "Launch with" select box.
Any ideas why I'm getting these error messages?

If you're reusing the launch configuration and you've changed anything with the plug-in metadata (like their names), you need to be sure it's "clearing the configuration space". You'll find this option on the Configuration tab of the launcher.

Related

Mockito bundle cannot find org.hamcrest package even though Hamcrest is a dependency

I work on an Eclipse 4 RCP project with one plugin bundle and a bundle fragment for unit tests. The target platform is defined with an Eclipse target definition (.target file). Maven with Tycho is used to build the project outside of Eclipse (manifest-first with the .target file defining the target platform).
Now I want to include Mockito in the target platform for mocking. Eclipse Orbit provides an org.mockito (1.9.5) bundle. It depends among other things on org.hamcrest (which can also be found on the Orbit p2 site) so I added it to the target definition as well. When I set Eclipse's target platform from the target file the following shows up in the Target Platform State view:
Even though both org.hamcrest.library and org.hamcrest.core are present (both bundles export the org.hamcrest 1.3.0 package) the org.mockito bundle claims to miss the org.hamcrest package.
Nevertheless I added the org.mockito and org.hamcrest.library to the test plugin fragment's dependencies in the MANIFEST.MF.
Require-Bundle: org.junit;bundle-version="4.11.0",
org.hamcrest.library;bundle-version="1.3.0",
org.mockito;bundle-version="1.9.5"
The fragment seems to compile but the tests cannot be run. The tycho-surefire-plugin reports:
An error has occurred. See the log file [...]\target\work\configuration\1405514016520.log.
The log file reads:
!SESSION 2014-07-16 14:33:34.053 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_55
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Framework arguments: -application org.eclipse.tycho.surefire.osgibooter.headlesstest -testproperties F:\Users\Jakob\Documents\Bachelorprojekt\Code\myplugin.tests\target\surefire.properties
Command-line arguments: -data F:\Users\Jakob\Documents\Bachelorprojekt\Code\myplugin.tests\target\work\data -application org.eclipse.tycho.surefire.osgibooter.headlesstest -testproperties F:\Users\Jakob\Documents\Bachelorprojekt\Code\myplugin.tests\target\surefire.properties
!ENTRY org.eclipse.osgi 2 0 2014-07-16 14:33:40.508
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.508
!MESSAGE Bundle initial#reference:file:../../../../../../.m2/repository/p2/osgi/bundle/org.eclipse.swt.gtk.linux.x86_64/3.102.1.v20130827-2048/org.eclipse.swt.gtk.linux.x86_64-3.102.1.v20130827-2048.jar was not resolved.
!SUBENTRY 2 org.eclipse.swt.gtk.linux.x86_64 2 0 2014-07-16 14:33:40.508
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=CDC/Foundation)(version=1.0))(&(osgi.ee=JavaSE)(version=1.3)))".
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.508
!MESSAGE Bundle initial#reference:file:../../../../../../.m2/repository/p2/osgi/bundle/org.eclipse.swt.cocoa.macosx.x86_64/3.102.1.v20130827-2048/org.eclipse.swt.cocoa.macosx.x86_64-3.102.1.v20130827-2048.jar was not resolved.
!SUBENTRY 2 org.eclipse.swt.cocoa.macosx.x86_64 2 0 2014-07-16 14:33:40.508
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=CDC/Foundation)(version=1.0))(&(osgi.ee=JavaSE)(version=1.3)))".
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.508
!MESSAGE Bundle initial#reference:file:../../../../../../.m2/repository/p2/osgi/bundle/org.mockito/1.9.5.v201311280930/org.mockito-1.9.5.v201311280930.jar was not resolved.
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.509
!MESSAGE Missing imported package org.hamcrest_[1.0.0,2.0.0).
!ENTRY org.eclipse.osgi 2 0 2014-07-16 14:33:40.547
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.547
!MESSAGE Bundle myplugin.tests_0.0.1.qualifier [2] was not resolved.
!SUBENTRY 2 myplugin.tests 2 0 2014-07-16 14:33:40.547
!MESSAGE Missing required bundle org.mockito_1.9.5.
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.547
!MESSAGE Bundle org.mockito_1.9.5.v201311280930 [5] was not resolved.
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.547
!MESSAGE Missing optionally imported package COM.jrockit.reflect_0.0.0.
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.547
!MESSAGE Missing optionally imported package jrockit.vm_0.0.0.
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.547
!MESSAGE Missing imported package org.hamcrest_[1.0.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.547
!MESSAGE Missing imported package org.mockito_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.547
!MESSAGE Missing imported package org.mockito.configuration_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.547
!MESSAGE Missing imported package org.mockito.exceptions_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.547
!MESSAGE Missing imported package org.mockito.exceptions.base_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.547
!MESSAGE Missing imported package org.mockito.exceptions.misusing_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.547
!MESSAGE Missing imported package org.mockito.exceptions.stacktrace_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.547
!MESSAGE Missing imported package org.mockito.exceptions.verification_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.548
!MESSAGE Missing imported package org.mockito.exceptions.verification.junit_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.548
!MESSAGE Missing imported package org.mockito.invocation_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.548
!MESSAGE Missing imported package org.mockito.listeners_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.548
!MESSAGE Missing imported package org.mockito.mock_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.548
!MESSAGE Missing imported package org.mockito.plugins_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.548
!MESSAGE Missing imported package org.mockito.runners_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.548
!MESSAGE Missing imported package org.mockito.stubbing_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.548
!MESSAGE Missing imported package org.mockito.stubbing.answers_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.548
!MESSAGE Missing imported package org.mockito.verification_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.548
!MESSAGE Missing optionally imported package sun.reflect_0.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.548
!MESSAGE Bundle org.eclipse.swt.gtk.linux.x86_64_3.102.1.v20130827-2048 [147] was not resolved.
!SUBENTRY 2 org.eclipse.swt.gtk.linux.x86_64 2 0 2014-07-16 14:33:40.548
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=CDC/Foundation)(version=1.0))(&(osgi.ee=JavaSE)(version=1.3)))".
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.548
!MESSAGE Bundle org.eclipse.swt.cocoa.macosx.x86_64_3.102.1.v20130827-2048 [148] was not resolved.
!SUBENTRY 2 org.eclipse.swt.cocoa.macosx.x86_64 2 0 2014-07-16 14:33:40.548
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=CDC/Foundation)(version=1.0))(&(osgi.ee=JavaSE)(version=1.3)))".
!ENTRY org.eclipse.osgi 2 0 2014-07-16 14:33:40.804
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.804
!MESSAGE Bundle initial#reference:file:../../../../../../.m2/repository/p2/osgi/bundle/org.eclipse.swt.gtk.linux.x86_64/3.102.1.v20130827-2048/org.eclipse.swt.gtk.linux.x86_64-3.102.1.v20130827-2048.jar was not resolved.
!SUBENTRY 2 org.eclipse.swt.gtk.linux.x86_64 2 0 2014-07-16 14:33:40.804
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=CDC/Foundation)(version=1.0))(&(osgi.ee=JavaSE)(version=1.3)))".
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.804
!MESSAGE Bundle initial#reference:file:../../../../../../.m2/repository/p2/osgi/bundle/org.eclipse.swt.cocoa.macosx.x86_64/3.102.1.v20130827-2048/org.eclipse.swt.cocoa.macosx.x86_64-3.102.1.v20130827-2048.jar was not resolved.
!SUBENTRY 2 org.eclipse.swt.cocoa.macosx.x86_64 2 0 2014-07-16 14:33:40.804
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=CDC/Foundation)(version=1.0))(&(osgi.ee=JavaSE)(version=1.3)))".
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.804
!MESSAGE Bundle initial#reference:file:../../../../../../.m2/repository/p2/osgi/bundle/org.mockito/1.9.5.v201311280930/org.mockito-1.9.5.v201311280930.jar was not resolved.
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.804
!MESSAGE Missing imported package org.hamcrest_[1.0.0,2.0.0).
!ENTRY org.eclipse.osgi 2 0 2014-07-16 14:33:40.833
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.833
!MESSAGE Bundle myplugin.tests_0.0.1.qualifier [2] was not resolved.
!SUBENTRY 2 myplugin.tests 2 0 2014-07-16 14:33:40.833
!MESSAGE Missing required bundle org.mockito_1.9.5.
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.833
!MESSAGE Bundle org.mockito_1.9.5.v201311280930 [5] was not resolved.
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.833
!MESSAGE Missing optionally imported package COM.jrockit.reflect_0.0.0.
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.833
!MESSAGE Missing optionally imported package jrockit.vm_0.0.0.
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.833
!MESSAGE Missing imported package org.hamcrest_[1.0.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.834
!MESSAGE Missing imported package org.mockito_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.834
!MESSAGE Missing imported package org.mockito.configuration_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.834
!MESSAGE Missing imported package org.mockito.exceptions_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.834
!MESSAGE Missing imported package org.mockito.exceptions.base_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.834
!MESSAGE Missing imported package org.mockito.exceptions.misusing_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.834
!MESSAGE Missing imported package org.mockito.exceptions.stacktrace_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.834
!MESSAGE Missing imported package org.mockito.exceptions.verification_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.834
!MESSAGE Missing imported package org.mockito.exceptions.verification.junit_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.834
!MESSAGE Missing imported package org.mockito.invocation_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.834
!MESSAGE Missing imported package org.mockito.listeners_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.835
!MESSAGE Missing imported package org.mockito.mock_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.835
!MESSAGE Missing imported package org.mockito.plugins_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.835
!MESSAGE Missing imported package org.mockito.runners_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.835
!MESSAGE Missing imported package org.mockito.stubbing_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.835
!MESSAGE Missing imported package org.mockito.stubbing.answers_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.835
!MESSAGE Missing imported package org.mockito.verification_[1.9.0,2.0.0).
!SUBENTRY 2 org.mockito 2 0 2014-07-16 14:33:40.835
!MESSAGE Missing optionally imported package sun.reflect_0.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.835
!MESSAGE Bundle org.eclipse.swt.gtk.linux.x86_64_3.102.1.v20130827-2048 [147] was not resolved.
!SUBENTRY 2 org.eclipse.swt.gtk.linux.x86_64 2 0 2014-07-16 14:33:40.835
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=CDC/Foundation)(version=1.0))(&(osgi.ee=JavaSE)(version=1.3)))".
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-16 14:33:40.835
!MESSAGE Bundle org.eclipse.swt.cocoa.macosx.x86_64_3.102.1.v20130827-2048 [148] was not resolved.
!SUBENTRY 2 org.eclipse.swt.cocoa.macosx.x86_64 2 0 2014-07-16 14:33:40.835
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=CDC/Foundation)(version=1.0))(&(osgi.ee=JavaSE)(version=1.3)))".
!ENTRY org.eclipse.osgi 4 0 2014-07-16 14:33:40.857
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: Bundle myplugin.tests is not found
at org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.getBundleClassLoader(OsgiSurefireBooter.java:149)
at org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.run(OsgiSurefireBooter.java:67)
at org.eclipse.tycho.surefire.osgibooter.HeadlessTestApplication.run(HeadlessTestApplication.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
Launching the plugin test from Eclipse PDE yields effectively the same mockito-related errors (the SWT-related ones are missing but instead there are other bundle resolution errors since I do not usually run these tests from Eclipse and did not eliminate some conflicting bundles from the launch configuration).
What are probable causes for the missing imported-package error even though the package is definitely exported by another required bundle from the target platform and how can I fix this setup?
I was recently having the same problem, in both Tycho build and starting a runtime Eclipse from PDE:
!ENTRY org.mockito 4 0 2018-03-14 11:53:00.671
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.mockito [6]
Unresolved requirement: Import-Package: COM.jrockit.reflect; resolution:="optional"
Unresolved requirement: Import-Package: jrockit.vm; resolution:="optional"
Unresolved requirement: Import-Package: org.apache.tools.ant; resolution:="optional"
Unresolved requirement: Import-Package: org.apache.tools.ant.types; resolution:="optional"
Unresolved requirement: Import-Package: org.hamcrest; version="[1.0.0,2.0.0)"
I was able to solve this in both cases without needing a re-packaged Mockito.
In PDE by adding the org.hamcrest explicity to the target platform instead of just org.hamcrest.core:
corresponding .target code:
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.hamcrest" version="1.1.0.v20090501071000"/>
<unit id="org.mockito" version="1.9.5.v201605172210"/>
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20180206163158/repository/"/>
</location>
And in Tycho by doing the equivalent:
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<dependency-resolution>
<extraRequirements>
<!-- Workaround for an issue with mockito depending on hamcrest -->
<requirement>
<type>eclipse-plugin</type>
<id>org.hamcrest</id>
<versionRange>0.0.0</versionRange>
</requirement>
</extraRequirements>
</dependency-resolution>
</configuration>
</plugin>
The root cause of your problem is that org.hamcrest is a split package. There is obviously a bug in tycho or in eclipse, that prevents that from working. See the followings for details:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=334540
https://bugs.eclipse.org/bugs/show_bug.cgi?id=403196
Please give a try to my re-packaged version of Hamcrest and Mockito (Powermock-OSGI). In my version the Mockito manifest specifies, that only the "core" part of the org.hamcrest package is needed by Mockito:
Orbit version:
Import-Package: COM.jrockit.reflect;resolution:=optional,jrockit.vm;re
solution:=optional,junit.framework;resolution:=optional,org.apache.to
ols.ant;resolution:=optional,org.apache.tools.ant.types;resolution:=o
ptional,org.hamcrest;version="[1.0,2.0)"
My version:
Import-Package: org.hamcrest;core=split,junit.framework,org.junit,org.ju
nit.internal.runners,org.junit.runner,org.junit.runner.manipulation,org
.junit.runner.notification,org.junit.runners,org.junit.runners.model,or
g.objenesis;version="[2.1,3)"
The update site can be found at http://powermock-osgi.googlecode.com/svn/updateSite/1.5.4.1/
Project home: https://code.google.com/p/powermock-osgi/
Before taking my update site, you might need to delete Eclipse and Tycho bundle pools as written at Powermock-OSGI site:
First Time Usage
Tycho and Eclipse PDE caches the bundles based on symbolic name and
version. So if the user already had a 4.11 version of Junit anytime in
the past, our hacked powermock version will not be taken.
So before first usage inside Eclipse the user has to delete the
.metadata.plugins\org.eclipse.pde.core.bundle_pool and
.metadata.plugins\org.eclipse.pde.core.external_libraries in ALL
workspaces of the specific Eclipse installation (bundles are looked up
cross workspace way). BE SURE, that when you run the unit tests in
eclipse the plugins tab in the launch config REALLY contains the
JUnit, Mockito and Hamcrest plugins of the Powermock feature, and not
some other version. Before first usage with Tycho delete the .meta
.cache and p2 folders from the maven local repository
Please send me a feedback if it works.
I had the same problem that Tycho could not resolve Hamcrest correctly. In my project I used my build my own target platform (just a few plugins from Luna SDK). For unit tests I took the JUnit bundle from the SDK. When I added the Mockito library I faced the same problem described above. At first I also experimented with repackaging the Mockito bundle with concrete versions. But I couldn't fix it. Then I found your question and Gábor's answer, which finally solved my problem!
At first I followed the instruction and added the update site and chose the needed feature (Powermock with Mockito and JUnit). Then I ran into unresolved dependency with Objenisis bundle. I don't know if this is my specific problem because I made my own target platform with a few bundles or that Objenisis is just missing in the feature?!
So I copied the needed bundles (incl. Objenisis) from the powermock-osgi update site to my own target platform and now it works as expected!
I also had that problem and couldn't figure out a way by using the orbit R20200224183213 bundles.
Finally I just downloaded mockito-all, placed it into the libs folder and added it to my test plug-in's runtime classpath (MANIFEST.MF -> Bundle-ClassPath).
I hope they will fix it in the next orbit versions so that I can use the orbit bundles again.

Eclipse 4.2.1 plugin execution outside ide bundle not resolved errors

I am facing bundle not resolved errors which ultimately lead to java.lang.RuntimeException: Application "com.xyz.application" could not be found in the registry. after upgrading to Eclipse 4.2.1. I get these issues when I run my application outside Eclipse and the app wont launch, the splash screen appears and I see a message to check logs.. Weirdly though the jars that are missing are found in the plugins directory of my application, I have checked the dependencies tab in Eclipse and added once again the bundles that are logged as not resolved but no luck, I have checked my MANIFEST file, but I see things are right- is bundle-version mandatory in the manifest for every bundle I use? I see some bundles don't have that property set in them.
There is one more thing to note here, in my previous Eclipse 3.7.2 builds the application after launching creates many folders in the configuration folder, I see all those folders in 4.2.1 except for org.eclipse.ui.intro.universal, and I see that during my pde build for 4.2.1 I see that ant tries twice to unzip org.eclipse.ui.intro.universal.nl1 and org.eclipse.ui.intro.universal.nl2.. and my nestedJars directory has just nl1 and nl2 jars for these two bunldes but the org.eclipse.ui.intro.universal.nl1.jar file has lot many files apart from nl*jar - I think nl1 and nl2 jars are supposed to be moved too from nestedJars folder, because I see that all the other bundle folders under nestedJars have no .jar in them and infact only nl1.jar and nl2.jar of org.eclipse.ui.intro.universal.nl1 and org.eclipse.ui.intro.universal.nl2 are remaining in nested jars. So is this someway corrupt that they are ant tries to unzip twice ? or that it can't move the jars out of nestedJars?
Ant trying twice to unzip org.eclipse.ui.intro.universal.nl1 during my pde headless build:
[mkdir] Created dir: C:\vobs\chechand_CM_cm521\vobs\build\AppCE\nestedJars\org.eclipse.ui.intro.universal.nl1_3.2.600.v201209282147
[unzip] Expanding: C:\Users\Administrator\chechand_Common_3PT_3\vobs\fnet_3pt\Eclipse\4.2.1\eclipse\plugins\org.eclipse.ui.intro.universal.nl1_3.2.600.v201209282147.jar into C:\vobs\chechand_CM_cm521\vobs\build\AppCE\nestedJars\org.eclipse.ui.intro.universal.nl1_3.2.600.v201209282147
[unzip] Expanding: C:\Users\Administrator\chechand_Common_3PT_3\vobs\fnet_3pt\Eclipse\4.2.1\eclipse\plugins\org.eclipse.ui.intro.universal.nl1_3.2.600.v201209282147.jar into
Also, here is the detailed error stack I get when I actually run the standalone application
outside Eclipse IDE:
!ENTRY org.eclipse.osgi 2 0 2014-05-11 05:37:42.071
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-05-11 05:37:42.071
!MESSAGE Bundle update#plugins/org.eclipse.ui.workbench_3.103.1.v20120906-120042.jar was not resolved.
!SUBENTRY 2 org.eclipse.ui.workbench 2 0 2014-05-11 05:37:42.071
!MESSAGE Missing imported package org.eclipse.emf.ecore.util_0.0.0.
!SUBENTRY 2 org.eclipse.ui.workbench 2 0 2014-05-11 05:37:42.071
!MESSAGE Missing required bundle org.eclipse.e4.ui.css.swt.theme_0.9.0.
!SUBENTRY 2 org.eclipse.ui.workbench 2 0 2014-05-11 05:37:42.072
!MESSAGE Missing imported package org.eclipse.emf.ecore_0.0.0.
!SUBENTRY 2 org.eclipse.ui.workbench 2 0 2014-05-11 05:37:42.072
!MESSAGE Missing imported package org.w3c.dom.css_2.0.0.
!SUBENTRY 2 org.eclipse.ui.workbench 2 0 2014-05-11 05:37:42.072
!MESSAGE Missing imported package org.eclipse.e4.ui.internal.workbench.renderers.swt_0.0.0.
!SUBENTRY 2 org.eclipse.ui.workbench 2 0 2014-05-11 05:37:42.072
!MESSAGE Missing required bundle org.eclipse.e4.ui.workbench3_0.12.0.
!SUBENTRY 2 org.eclipse.ui.workbench 2 0 2014-05-11 05:37:42.072
!MESSAGE Missing required bundle org.eclipse.e4.ui.bindings_0.9.0.
!SUBENTRY 2 org.eclipse.ui.workbench 2 0 2014-05-11 05:37:42.072
!MESSAGE Missing required bundle org.eclipse.e4.ui.workbench.swt_0.9.1.
!SUBENTRY 2 org.eclipse.ui.workbench 2 0 2014-05-11 05:37:42.072
!MESSAGE Missing required bundle org.eclipse.e4.core.di_1.1.0.
!SUBENTRY 2 org.eclipse.ui.workbench 2 0 2014-05-11 05:37:42.072
!MESSAGE Missing imported package org.eclipse.e4.ui.internal.workbench.swt_0.0.0.
!SUBENTRY 2 org.eclipse.ui.workbench 2 0 2014-05-11 05:37:42.072
!MESSAGE Missing imported package org.eclipse.e4.core.commands_0.0.0.
!SUBENTRY 2 org.eclipse.ui.workbench 2 0 2014-05-11 05:37:42.072
!MESSAGE Missing required bundle org.eclipse.e4.ui.model.workbench_0.9.1.
!SUBENTRY 2 org.eclipse.ui.workbench 2 0 2014-05-11 05:37:42.072
!MESSAGE Missing required bundle org.eclipse.e4.ui.css.core_0.9.0.
!SUBENTRY 2 org.eclipse.ui.workbench 2 0 2014-05-11 05:37:42.072
!MESSAGE Missing imported package javax.inject_1.0.0.
!SUBENTRY 2 org.eclipse.ui.workbench 2 0 2014-05-11 05:37:42.072
!MESSAGE Missing required bundle org.eclipse.e4.core.services_1.0.0.
!SUBENTRY 2 org.eclipse.ui.workbench 2 0 2014-05-11 05:37:42.072
!MESSAGE Missing required bundle org.eclipse.e4.ui.css.swt_0.9.1.
!SUBENTRY 2 org.eclipse.ui.workbench 2 0 2014-05-11 05:37:42.072
!MESSAGE Missing imported package javax.annotation_1.0.0.
!SUBENTRY 2 org.eclipse.ui.workbench 2 0 2014-05-11 05:37:42.072
!MESSAGE Missing required bundle org.eclipse.e4.core.contexts_1.0.0.
!SUBENTRY 2 org.eclipse.ui.workbench 2 0 2014-05-11 05:37:42.072
!MESSAGE Missing imported package org.eclipse.e4.core.commands.internal_0.0.0.
!SUBENTRY 2 org.eclipse.ui.workbench 2 0 2014-05-11 05:37:42.072
!MESSAGE Missing imported package org.eclipse.e4.ui.internal.workbench_0.0.0.
!SUBENTRY 2 org.eclipse.ui.workbench 2 0 2014-05-11 05:37:42.072
!MESSAGE Missing imported package org.eclipse.emf.common.util_0.0.0.
!SUBENTRY 2 org.eclipse.ui.workbench 2 0 2014-05-11 05:37:42.073
!MESSAGE Missing imported package org.eclipse.e4.ui.services_0.0.0.
!SUBENTRY 2 org.eclipse.ui.workbench 2 0 2014-05-11 05:37:42.073
!MESSAGE Missing imported package org.eclipse.e4.ui.workbench.modeling_0.0.0.
Here is the content of my .product file:
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
<product name="%Product.name" uid="CE debug" id="com.ibm.ecm.configmgr.app.ce.product" application="com.ibm.ecm.configmgr.app.ce.application" version="%Product.version" useFeatures="true" includeLaunchers="true">
<aboutInfo>
<image path="/com.ibm.ecm.configmgr.ui/icons/app_about.gif"/>
<text>
%About.text
</text>
</aboutInfo>
<configIni use="default">
<linux>/com.ibm.ecm.configmgr.app.ce/config/config.ini</linux>
<macosx>/com.ibm.ecm.configmgr.app.ce/config/config.ini</macosx>
<solaris>/com.ibm.ecm.configmgr.app.ce/config/config.ini</solaris>
</configIni>
<launcherArgs>
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
</launcherArgs>
<windowImages i16="/com.ibm.ecm.configmgr.ui/icons/app_16.gif" i32="/com.ibm.ecm.configmgr.ui/icons/app_32.gif"/>
<splash
startupProgressRect="6,42,445,15"
startupMessageRect="9,21,445,20"
startupForegroundColor="000000" />
<launcher name="configmgr">
<solaris/>
<win useIco="true">
<ico path="/com.ibm.ecm.configmgr.ui/icons/config_mgmnt_multires.ico"/>
<bmp/>
</win>
</launcher>
<vm>
</vm>
<plugins>
</plugins>
<features>
<feature id="com.ibm.ecm.configmgr.app.ce.feature" version="5.2.0.qualifier"/>
<feature id="org.eclipse.emf.ecore" version="2.8.1.v20120911-0500"/>
<feature id="org.eclipse.emf.ecore.nls1" version="2.8.1.v201209282147"/>
<feature id="org.eclipse.emf.ecore.nls2" version="2.8.1.v201209282147"/>
<feature id="org.eclipse.emf.common" version="2.8.0.v20120911-0500"/>
</features>
</product>
I would appreciate any help from you guys....

can't start eclipse after update - One or more bundles are not resolved

After updating eclipse it doesnt start anymore, i get a window saying
An error has occured
with an reference to a log file (see below)
Any way to get this resolved?
---- Log File -----
!SESSION 2013-01-16 23:31:46.709 -----------------------------------------------
eclipse.buildId=M20120914-1800
java.version=1.6.0_37
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments: -keyring /Users/dorjeduck/.eclipse_keyring -showlocation
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -keyring /Users/dorjeduck/.eclipse_keyring -showlocation
!ENTRY org.eclipse.osgi 2 0 2013-01-16 23:31:48.877
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-01-16 23:31:48.877
!MESSAGE Bundle reference:file:plugins/org.eclipse.ui.ide_3.8.1.v20120828-165804.jar was not resolved.
!SUBENTRY 2 org.eclipse.ui.ide 2 0 2013-01-16 23:31:48.877
!MESSAGE Missing required bundle org.eclipse.jface.text_[3.2.0,4.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-01-16 23:31:48.877
!MESSAGE Bundle reference:file:plugins/org.eclipse.ui.console_3.5.100.v20120521-2012.jar was not resolved.
!SUBENTRY 2 org.eclipse.ui.console 2 0 2013-01-16 23:31:48.877
!MESSAGE Missing required bundle org.eclipse.jface.text_[3.5.0,4.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-01-16 23:31:48.878
!MESSAGE Bundle reference:file:plugins/org.eclipse.jdt.junit_3.7.100.v20120523-1543.jar was not resolved.
!SUBENTRY 2 org.eclipse.jdt.junit 2 0 2013-01-16 23:31:48.878
!MESSAGE Missing required bundle org.eclipse.jface.text_[3.5.0,4.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-01-16 23:31:48.878
!MESSAGE Bundle reference:file:plugins/org.eclipse.pde.api.tools.ui_1.0.400.v20120523-2012.jar was not resolved.
!SUBENTRY 2 org.eclipse.pde.api.tools.ui 2 0 2013-01-16 23:31:48.878
!MESSAGE Missing required bundle org.eclipse.jface.text_[3.4.0,4.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-01-16 23:31:48.878
!MESSAGE Bundle reference:file:plugins/org.eclipse.jdt.ui_3.8.1.v20120814-144251.jar was not resolved.
!SUBENTRY 2 org.eclipse.jdt.ui 2 0 2013-01-16 23:31:48.878
!MESSAGE Missing required bundle org.eclipse.jface.text_[3.8.0,4.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-01-16 23:31:48.878
!MESSAGE Bundle reference:file:plugins/org.eclipse.jdt.debug.ui_3.6.100.v20120530-1425.jar was not resolved.
!SUBENTRY 2 org.eclipse.jdt.debug.ui 2 0 2013-01-16 23:31:48.878
!MESSAGE Missing required bundle org.eclipse.jface.text_[3.5.0,4.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-01-16 23:31:48.878
!MESSAGE Bundle reference:file:plugins/org.eclipse.wst.common.ui_1.1.500.v200911190730.jar was not resolved.
!SUBENTRY 2 org.eclipse.wst.common.ui 2 0 2013-01-16 23:31:48.878
!MESSAGE Missing required bundle org.eclipse.jface.text_[3.4.0,4.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-01-16 23:31:48.878
!MESSAGE Bundle reference:file:plugins/org.eclipse.cdt.ui_5.4.0.201206111645.jar was not resolved.
!SUBENTRY 2 org.eclipse.cdt.ui 2 0 2013-01-16 23:31:48.878
!MESSAGE Missing required bundle org.eclipse.jface.text_[3.4.0,4.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-01-16 23:31:48.878
!MESSAGE Bundle reference:file:plugins/com.android.ide.eclipse.adt_20.0.3.v201208082019-427395.jar was not resolved.
!SUBENTRY 2 com.android.ide.eclipse.adt 2 0 2013-01-16 23:31:48.878
!MESSAGE Missing required bundle org.eclipse.jface.text_0.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2013-01-16 23:31:48.878
!MESSAGE Bundle reference:file:plugins/org.eclipse.pde.ds.ui_1.0.200.v20120530-1435.jar was not resolved.
!SUBENTRY 2 org.eclipse.pde.ds.ui 2 0 2013-01-16 23:31:48.878
!MESSAGE Missing required bundle org.eclipse.jface.text_[3.3.0,4.0.0).
It seems that you are using MAC. I would suggest you to reinstall the Eclipse for MAC from the following eclipse for osx (only if you can afford to do it obviously). From the logs the issue seems to be related to missing plugins. The update may have deleted the older plugin?? Try installing the plugins that eclipse is complaining about like Jface etc manually and putting them under eclipse/plugin folder, and see if that brings down the error logs. Otherwise, the only option would be reinstalling. Eclipse sometimes gets really angry :)
A number of people have reported similar problems. There are several suggestions in that thread, but no definitive solutions. Only one of the suggestions worked for me - it's a way to revert eclipse to a previous state from the command line. It comes from this blog post.
In a terminal:
Go to the folder containing your eclipse install
ls -lt p2/org.eclipse.equinox.p2.engine/profileRegistry/<som_profile_name>.profile/
In my case <som_profile_name> was epp.package.java.profile, in Paul's blog SDKProfile.
You should see files like 1372434812558.profile.gz.
Choose a recent one with a date you feel sure is ok
Put together a command like:
eclipse -noSplash
-application org.eclipse.equinox.p2.director
-repository file:$(pwd)/p2/org.eclipse.equinox.p2.engine/profileRegistry/<som_profile_name>.profile
-profile <som_profile_name>
-revert 1372434812558
If that doesn't work, try adding -destination . (I did it successfully with -destination, but I think it should work without)

Zend studio error - Exception while removing a file from index

Im using Zend studio 7.2.1 and when i try to open it I get a message saying that an error occured , i tried Zend Studio 9 but it gives the same error and in the log it says that an exception is thrown while removing file x from index .
Here's part of the log from my workspace's metadata :
!ENTRY org.eclipse.dltk.core.index.sql 4 0 2011-12-08 17:26:30.140
!MESSAGE An exception thrown while removing file '/Project/web/application/Component/FECH/ondomreadycommun.phtml' from index
!STACK 0
org.h2.jdbc.JdbcSQLException: General error: java.lang.NullPointerException; SQL statement:
DELETE FROM FILES WHERE PATH=? AND CONTAINER_ID=?; [50000-122]
at org.h2.message.Message.getSQLException(Message.java:106)
at org.h2.message.Message.convert(Message.java:283)
at org.h2.command.Command.executeUpdate(Command.java:229)
at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:139)
at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:128)
at org.eclipse.dltk.internal.core.index.sql.h2.H2FileDao.delete(H2FileDao.java:164)
at org.eclipse.dltk.internal.core.index.sql.SqlIndexer.removeDocument(SqlIndexer.java:224)
at org.eclipse.dltk.internal.core.index2.ReconcileSourceModuleRequest.run(ReconcileSourceModuleRequest.java:55)
at org.eclipse.dltk.core.search.indexing.AbstractJob.execute(AbstractJob.java:77)
at org.eclipse.dltk.internal.core.search.processing.JobManager.run(JobManager.java:461)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at org.h2.index.PageDataLeaf.getRowAt(PageDataLeaf.java:300)
at org.h2.index.PageDataLeaf.getRow(PageDataLeaf.java:412)
at org.h2.index.PageDataNode.getRow(PageDataNode.java:284)
at org.h2.index.PageDataIndex.getRow(PageDataIndex.java:361)
at org.h2.index.PageDataIndex.getRow(PageDataIndex.java:350)
at org.h2.table.TableData.getRow(TableData.java:116)
at org.h2.index.PageBtreeIndex.getRow(PageBtreeIndex.java:269)
at org.h2.index.PageBtreeCursor.get(PageBtreeCursor.java:46)
at org.h2.index.IndexCursor.get(IndexCursor.java:147)
at org.h2.table.TableFilter.getValue(TableFilter.java:650)
at org.h2.expression.ExpressionColumn.getValue(ExpressionColumn.java:168)
at org.h2.expression.Comparison.getValue(Comparison.java:215)
at org.h2.expression.ConditionAndOr.getValue(ConditionAndOr.java:86)
at org.h2.expression.Expression.getBooleanValue(Expression.java:188)
at org.h2.command.dml.Delete.update(Delete.java:57)
at org.h2.command.CommandContainer.update(CommandContainer.java:72)
at org.h2.command.Command.executeUpdate(Command.java:209)
... 8 more
......
!ENTRY org.eclipse.osgi 2 0 2011-12-15 09:51:22.358
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2011-12-15 09:51:22.358
!MESSAGE Bundle org.eclipse.jdt.apt.pluggable.core_1.0.201.R35x_v20090818-0225 [341] was not resolved.
!SUBENTRY 2 org.eclipse.jdt.apt.pluggable.core 2 0 2011-12-15 09:51:22.358
!MESSAGE Missing imported package org.eclipse.jdt.internal.compiler.tool_0.0.0.
!SUBENTRY 2 org.eclipse.jdt.apt.pluggable.core 2 0 2011-12-15 09:51:22.358
!MESSAGE Missing imported package org.eclipse.jdt.internal.compiler.apt.dispatch_0.0.0.
!SUBENTRY 2 org.eclipse.jdt.apt.pluggable.core 2 0 2011-12-15 09:51:22.358
!MESSAGE Missing imported package org.eclipse.jdt.internal.compiler.apt.model_0.0.0.
!SUBENTRY 2 org.eclipse.jdt.apt.pluggable.core 2 0 2011-12-15 09:51:22.358
!MESSAGE Missing imported package org.eclipse.jdt.internal.compiler.apt.util_0.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2011-12-15 09:51:22.358
!MESSAGE Bundle org.eclipse.jdt.compiler.apt_1.0.201.R35x_v20090825-1530 [343] was not resolved.
!SUBENTRY 2 org.eclipse.jdt.compiler.apt 2 0 2011-12-15 09:51:22.358
!MESSAGE Missing imported package org.eclipse.jdt.internal.compiler.tool_0.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2011-12-15 09:51:22.358
!MESSAGE Bundle org.eclipse.jdt.compiler.tool_1.0.100.v_972_R35x [344] was not resolved.
How can i fix this ?
Thanks.
I just deleted .metadata folder from my workspace then restarted zend studio and it worked .

Eclipse won't start, log error says: ObjectNotFoundException: Tree element

Last night my machine restarted while Eclipse Galileo was open. No big deal, right?
This morning, I started my machine and tried to open Eclipse. Instead of opening, I see this:
The error log suggests that there is some kind of problem caused by exiting with unsaved changes.
How can I get Eclipse to open and ignore those unsaved changes? I can't even open a text file that is not part of this project with Eclipse? There must be a way to reset this state.
EDIT:
I have tracked down the problem to a single file. When I delete this file below, Eclipse opens but my projects are missing.
.metadata\.plugins\org.eclipse.core.resources\.snap
I do use the subversion plugin, but I don't think that is the problem. Here is what the error log says ( abbreviated ):
!SESSION 2010-08-17 10:13:01.718 -----------------------------------------------
eclipse.buildId=M20100211-1343
java.version=1.4.2_06
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_CA
Command-line arguments: -os win32 -ws win32 -arch x86
!ENTRY org.eclipse.core.resources 2 10035 2010-08-17 10:13:02.656
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
!ENTRY org.eclipse.osgi 4 0 2010-08-17 10:13:02.671
!MESSAGE An error occurred while automatically activating bundle org.eclipse.core.resources (33).
!STACK 0
org.osgi.framework.BundleException: Exception in org.eclipse.core.resources.ResourcesPlugin.start() of bundle org.eclipse.core.resources.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
...
Caused by: org.eclipse.core.internal.dtree.ObjectNotFoundException: Tree element '/reports/src/com/lang/reports/OnlineReport.java' not found.
at org.eclipse.core.internal.dtree.AbstractDataTree.handleNotFound(AbstractDataTree.java:257)
...
Root exception:
org.eclipse.core.internal.dtree.ObjectNotFoundException: Tree element '/reports/src/com/lang/reports/OnlineReport.java' not found.
at org.eclipse.core.internal.dtree.AbstractDataTree.handleNotFound(AbstractDataTree.java:257)
...
!ENTRY org.eclipse.osgi 4 0 2010-08-17 10:13:02.703
!MESSAGE Application error
!STACK 1
java.lang.NoClassDefFoundError: org/eclipse/core/resources/IContainer
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:114)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
!ENTRY org.eclipse.osgi 2 0 2010-08-17 10:13:02.765
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765
!MESSAGE Bundle org.eclipse.jdt.apt.core_3.3.202.R35x_v20091130-2300 [103] was not resolved.
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765
!MESSAGE Bundle org.eclipse.jdt.apt.pluggable.core_1.0.201.R35x_v20090925-1100 [104] was not resolved.
!SUBENTRY 2 org.eclipse.jdt.apt.pluggable.core 2 0 2010-08-17 10:13:02.765
!MESSAGE Missing required bundle org.eclipse.jdt.apt.core_0.0.0.
!SUBENTRY 2 org.eclipse.jdt.apt.pluggable.core 2 0 2010-08-17 10:13:02.765
!MESSAGE Missing imported package org.eclipse.jdt.internal.compiler.tool_0.0.0.
!SUBENTRY 2 org.eclipse.jdt.apt.pluggable.core 2 0 2010-08-17 10:13:02.765
!MESSAGE Missing imported package org.eclipse.jdt.internal.compiler.apt.dispatch_0.0.0.
!SUBENTRY 2 org.eclipse.jdt.apt.pluggable.core 2 0 2010-08-17 10:13:02.765
!MESSAGE Missing imported package org.eclipse.jdt.internal.compiler.apt.model_0.0.0.
!SUBENTRY 2 org.eclipse.jdt.apt.pluggable.core 2 0 2010-08-17 10:13:02.765
!MESSAGE Missing imported package org.eclipse.jdt.internal.compiler.apt.util_0.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765
!MESSAGE Bundle org.eclipse.jdt.apt.ui_3.3.200.v20090930-2100_R35x [105] was not resolved.
!SUBENTRY 2 org.eclipse.jdt.apt.ui 2 0 2010-08-17 10:13:02.765
!MESSAGE Missing required bundle org.eclipse.jdt.apt.core_[3.2.0,4.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765
!MESSAGE Bundle org.eclipse.jdt.compiler.apt_1.0.201.R35x_v20090925-1100 [106] was not resolved.
!SUBENTRY 2 org.eclipse.jdt.compiler.apt 2 0 2010-08-17 10:13:02.765
!MESSAGE Missing imported package org.eclipse.jdt.internal.compiler.tool_0.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765
!MESSAGE Bundle org.eclipse.jdt.compiler.tool_1.0.100.v_981_R35x [107] was not resolved.
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765
!MESSAGE Bundle org.eclipse.jdt.junit4.runtime_1.1.0.v20090513-2000 [116] was not resolved.
!SUBENTRY 2 org.eclipse.jdt.junit4.runtime 2 0 2010-08-17 10:13:02.765
!MESSAGE Missing required bundle org.junit4_[4.4.0,5.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765
!MESSAGE Bundle org.hamcrest.core_1.1.0.v20090501071000 [184] was not resolved.
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765
!MESSAGE Bundle org.junit4_4.5.0.v20090824 [186] was not resolved.
!SUBENTRY 2 org.junit4 2 0 2010-08-17 10:13:02.765
!MESSAGE Missing required bundle org.hamcrest.core_1.1.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765
!MESSAGE Bundle com.collabnet.subversion.merge_2.1.0 [208] was not resolved.
For this issue I had to delete the .snap file located in the directory :
<workspace-directory>\.metadata\.plugins\org.eclipse.core.resources
After deleting that file, I was able to start my Eclipse with no problem.
Recommended: Delete <workspace-directory>\.metadata\.plugins\org.eclipse.core.resources\.snap. This will not reset your workspace and your other projects won't get deleted (as answered by krishna).
Not Recommended: Alternatively, delete the the whole <workspace-directory>\.metadata directory from your workspace and restart.This will reset your workspace and delete all your existing projects in it.
Ran into this error.
There was no .snap file in my .metadata folder.
I had to delete this:
<workspace>/.metadata/.plugins/org.eclipse.core.resources/.root/d+.tree
d+=> some number.
Then I had to re-import the projects and re-assign the working sets. I preferred it over opening a new workspace and redoing settings.
Deleting .snap file worked perfect for me.
Delete .snap file from the directory - workspace.metadata.plugins\org.eclipse.core.resources.
Import the workspace (existing projects into workspace - do not copy folders into workspace again).
For anyone interested, I had the exact same problem and deleting the file .metadata/.plugins/org.eclipse.core.resources/.snap did the trick for me.
Had similar problem.
Log file said exception was caused by corruption in the project tree -- a very vague description.
Deleting individual files and directories in /.metadata/.plugins/org.eclipse.core.resources didn't work for me. I had to delete the entire /.metadata/.plugins/org.eclipse.core.resources directory. I lost the entire project tree but not the projects. They were still in the workspace and just needed to be imported back into Eclipse. I also did not lose the large numbers of plugins configured for working Java, Android, PHP, C++, J2EE, etc.
This is the second time I encountered a project tree related corruption. The first time I deleted the .metadata altogether and then spent a very long time putting back all the plugins and projects. The direction the other answers here were useful in zeroing in on just the org.eclipse.core.resources directory. Seems deleting the whole directory just results in only needing to reimport all the projects.
Your mileage may vary...
This also works when you receive this error from Information Design Tool (IDT) (Business Objects BI4).
Delete .snap file from this directory.
Please note that you Will lose all your local projects. Hopefully your modifications have been recently saved to a repository.
Directory -
C:\Users\xxxxuser.name.businessobjects\bimodeler_14\workspace.metadata.plugins\org.eclipse.core.resources\
Use the clean option
I had this error. I start eclipse with "clean" option and that worked for me.
eclipse.exe -clean
Eclipse starts and all projects ok.
solution: delete .metadata folder in your last workspace.
reason: Maybe you force shutdown/restart your computer, while your eclipse still running.
Just a little tip that might help people avoid an issue that I encountered.
In my case there were multiple workspace directories on my machine. When I ran the mvn sonar:sonar goal then it created its own workspace directory, placed the snapshot (.snap files) in there, and changed a setting to tell maven to look there for changes first. However, this was not my workspace that I was using, so the snapshot was never being updated with my changes. So when maven used that snapshot it could not find the files in their old locations. So I had to eliminate that workspace to resolve the issue. This worked because maven then looked in the next workspace on its list, my workspace, for the snapshot instead of the one added (but never updated) by the sonar goal.
So you might need to search your entire hard drive for *.snap files to see if there is more one workspace being used on your machine.
Check your environment variables _JAVA_OPTION path. I had HP UFT installed on my system and I set _JAVA_OPTION to IGNOREME_JAVA_OPTION for both system and environment variable. After reboot, eclipse showed the same error " check log file". Removed the IGNOREME and eclipse no issues. This could be another possibility that could be looked at to fix the eclipse.
Hope this helps.
I also had the same problem, this happens when you force shutdown/restart your computer, while your eclipse still running.
Deleting .metadata folder worked for me. Delete all the metadata and then import your project from that same workspace.
Rather deleting whole .metadata folder, which in turns delete your projects from workspace, try to find the .snap files and delete them.
.snap files are the snapshot of workspace's temporary instance which will be saved on clean & close of workspace.
Delete all the *.Snap files in the path workspace-directory>.metadata.plugins\org.eclipse.core.resources