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

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).

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

Cannot add Module to Java EE Enterprise Application - nullPointer when creating Enterprise Application Project

We have been using RAD 7.5.5/WebSphere 6.1, but are upgrade our dev environment to Eclipse Juno/WAS 8.5. While everything works in RAD/WAS 6.1, I am having trouble getting our website running locally in Eclipse/WAS 8.5.
I took a screencast of my creation process, see the link below. The nullPointerException stack trace is included as well.
http://screencast.com/t/VE5KxmCCSsQ
Here are some images of my project settings. CBSWebApp is the Java/JSP application, and eCB is the Enterprise Application Project.
http://imgur.com/Ol0pDbt,mC4cT1b,WXMYvbQ#0
eclipse.buildId=M20130204-1200
java.version=1.7.0_25
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
Error
Thu Jul 18 15:18:02 EDT 2013
java.lang.NullPointerException
at org.eclipse.jst.j2ee.application.internal.operations.AddComponentToEnterpriseApplicationOp.findReferencedComponent(AddComponentToEnterpriseApplicationOp.java:413)
at org.eclipse.jst.j2ee.application.internal.operations.AddComponentToEnterpriseApplicationOp.updateEARDD(AddComponentToEnterpriseApplicationOp.java:140)
at org.eclipse.jst.j2ee.application.internal.operations.AddComponentToEnterpriseApplicationOp.execute(AddComponentToEnterpriseApplicationOp.java:87)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl$1.run(DataModelPausibleOperationImpl.java:385)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.runOperation(DataModelPausibleOperationImpl.java:410)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.runOperation(DataModelPausibleOperationImpl.java:360)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.doExecute(DataModelPausibleOperationImpl.java:247)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.executeImpl(DataModelPausibleOperationImpl.java:219)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.cacheThreadAndContinue(DataModelPausibleOperationImpl.java:89)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.execute(DataModelPausibleOperationImpl.java:207)
at org.eclipse.jst.j2ee.project.facet.EarFacetPostInstallDelegate.execute(EarFacetPostInstallDelegate.java:75)
at org.eclipse.wst.common.project.facet.core.events.internal.LegacyEventHandlerAdapter.handleEvent(LegacyEventHandlerAdapter.java:69)
at org.eclipse.wst.common.project.facet.core.events.internal.ProjectListenerRegistry.notifyListeners(ProjectListenerRegistry.java:76)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.notifyListeners(FacetedProject.java:1327)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.modifyInternal(FacetedProject.java:454)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.mergeChangesInternal(FacetedProject.java:1181)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.access$2(FacetedProject.java:1117)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProject$5.run(FacetedProject.java:1099)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.mergeChanges(FacetedProject.java:1109)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProjectWorkingCopy.commitChanges(FacetedProjectWorkingCopy.java:2020)
at org.eclipse.wst.common.project.facet.ui.ModifyFacetedProjectWizard.performFinish(ModifyFacetedProjectWizard.java:400)
at org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard.performFinish(NewProjectDataModelFacetWizard.java:282)
at org.eclipse.wst.common.project.facet.ui.ModifyFacetedProjectWizard$3.run(ModifyFacetedProjectWizard.java:331)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.wst.common.project.facet.ui.ModifyFacetedProjectWizard$4.run(ModifyFacetedProjectWizard.java:345)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
I also get the below nullPointerException when trying to set the context root to CBSWebApp in Eclipse. When looking at my settings in the working RAD environment, I noticed this field was successfully filled out as 'CBSWebApp', but remains a blank default in Eclipse, and I cannot change it without generating the below error.
null
Error
Thu Jul 18 16:06:44 EDT 2013
java.lang.NullPointerException
at org.eclipse.wst.common.componentcore.internal.resources.VirtualComponent.setMetaProperty(VirtualComponent.java:283)
at org.eclipse.wst.common.componentcore.internal.operation.ServerContextRootUpdateOperation.execute(ServerContextRootUpdateOperation.java:40)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl$1.run(DataModelPausibleOperationImpl.java:385)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.runOperation(DataModelPausibleOperationImpl.java:410)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.runOperation(DataModelPausibleOperationImpl.java:360)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.doExecute(DataModelPausibleOperationImpl.java:247)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.executeImpl(DataModelPausibleOperationImpl.java:219)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.cacheThreadAndContinue(DataModelPausibleOperationImpl.java:89)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.execute(DataModelPausibleOperationImpl.java:207)
at org.eclipse.wst.common.componentcore.internal.util.ComponentUtilities.setServerContextRoot(ComponentUtilities.java:337)
at org.eclipse.jst.j2ee.internal.ui.refactoring.RenameContextRootChange.perform(RenameContextRootChange.java:125)
at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:278)
at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:278)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation$1.run(PerformChangeOperation.java:258)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation.executeChange(PerformChangeOperation.java:306)
at org.eclipse.ltk.internal.ui.refactoring.UIPerformChangeOperation.executeChange(UIPerformChangeOperation.java:92)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:223)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Your help is greatly appreciated in this - this is causing a lot of problems for me and my team. Thanks!
Root cause is that the WTP project configuration fails due to the wrong java web facet being installed.
You could try to determine if the EAR project has deployment descriptor, if so, then force save.
final ReferencedComponent ref = AddComponentToEnterpriseApplicationOp.findReferencedComponent(earwc, wc, se, compse);
I had to delete the project facet .xml file so I could recreate it with the correct facets

Ecilpse Java Builder started failing

I've been using this Eclipse installation for over a year now. All of the sudden the builder started failing. I haven't changed any settings. The only thing could have created this situation is Eclipse had a hard crash and then the builder started producing these NPE's...
!SESSION 2012-09-12 13:40:37.149 -----------------------------------------------
eclipse.buildId=M20120208-0800
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product
!ENTRY org.eclipse.core.resources 4 2 2012-09-12 13:46:08.705
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 0
java.lang.NullPointerException
at org.eclipse.jdt.internal.compiler.apt.dispatch.AnnotationDiscoveryVisitor.visit(AnnotationDiscoveryVisitor.java:61)
at org.eclipse.jdt.internal.compiler.ast.Argument.traverse(Argument.java:160)
at org.eclipse.jdt.internal.compiler.ast.TryStatement.traverse(TryStatement.java:1080)
at org.eclipse.jdt.internal.compiler.ast.Block.traverse(Block.java:112)
at org.eclipse.jdt.internal.compiler.ast.Initializer.traverse(Initializer.java:128)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1304)
at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:690)
at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundEnvImpl.<init>(RoundEnvImpl.java:58)
at org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:148)
at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:134)
at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:813)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:432)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:364)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:178)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:301)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:60)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:254)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:173)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
!ENTRY org.eclipse.core.resources 4 75 2012-09-12 13:46:09.643
!MESSAGE Errors occurred during the build.
!SUBENTRY 1 org.eclipse.jdt.core 4 75 2012-09-12 13:46:09.643
!MESSAGE Errors running builder 'Java Builder' on project 'cust_Windchill_src'.
!STACK 0
java.lang.NullPointerException
at org.eclipse.jdt.internal.compiler.apt.dispatch.AnnotationDiscoveryVisitor.visit(AnnotationDiscoveryVisitor.java:61)
at org.eclipse.jdt.internal.compiler.ast.Argument.traverse(Argument.java:160)
at org.eclipse.jdt.internal.compiler.ast.TryStatement.traverse(TryStatement.java:1080)
at org.eclipse.jdt.internal.compiler.ast.Block.traverse(Block.java:112)
at org.eclipse.jdt.internal.compiler.ast.Initializer.traverse(Initializer.java:128)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1304)
at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:690)
at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundEnvImpl.<init>(RoundEnvImpl.java:58)
at org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:148)
at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:134)
at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:813)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:432)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:364)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:178)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:301)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:60)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:254)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:173)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Can anyone help me figure out how to get the builder working again?
Figured it out after hours of banging my head.
Eclipse crashed while I was in the middle of writing code. So the code that existed when I restarted Eclipse looked something like this...
public abstract class AbstractAmbassadorQueueTask implements AmbassadorQueueTask{
// BEGIN: This is where I was working when Eclipse crashed.
private static SessionListenerIfc l = new SessionListenerAdapter(){
} // <<< **Note the missing semicolon after the last brace.**
// END: This is where I was working when Eclipse crashed.
public AbstractAmbassadorQueueTask() {
super();
}
}
When I restarted Eclipse I saw all the compilation NPE's and never thought to look at the code I was working on. I would have expected Eclipse to tell me about the syntax error before recompiling the project.
I discovered the syntax error when I attempted to compile my project via the command line and outside of Eclipse.
IMHO its a bug.
The crash could have left your workspace in an inconsistent state, which may be resulting you in finding a corner case in the Java Builder that isn't handled correctly.
Try refreshing all of your projects and then running clean build.
Hi this is the problem created by heapdumps delete the temp files and restart the eclipse and build ur project again if u face the issue after 4 5 builds do the same thing

How to Fix Eclipse Debug Hang

I'm running Ubuntu 10.04 LTS and Eclipse Version: Helios Service Release 2
Build id: 20110218-091, debugging PHP. While it doesn't happen every time, after I'm done debugging when I click the red square to stop the process the Eclipse screen goes grey, and stays there. A top, or System Monitor shows Eclipse is using whatever CPU cycles remain, which in my case is between 67-85%. It'll stay this way until I kill the process (I've waited up to 10 or more minutes). The last error in the log is:
Plug-in net.sf.simpletest.eclipse was unable to load class net.sf.simpletest.eclipse.launcher.SimpletestLaunchShortcut.Plug-in net.sf.simpletest.eclipse was unable to load class net.sf.simpletest.eclipse.launcher.SimpletestLaunchShortcut.
This just started happening today so I'm inclined to think something's up with my machine, an update from Ubuntu, memory???
Output from Eclipse Event Details is below.
Any suggestions would be most welcome.
eclipse.buildId=M20110210-1200
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -os linux -ws gtk -arch x86 -product org.eclipse.epp.package.java.product
Error
Tue Oct 11 14:35:03 EDT 2011
Plug-in net.sf.simpletest.eclipse was unable to load class net.sf.simpletest.eclipse.launcher.SimpletestLaunchShortcut.
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle net.sf.simpletest.eclipse (505).
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:121)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:453)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:338)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:232)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1197)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:904)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.getDelegate(LaunchShortcutExtension.java:410)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.getLaunchConfigurations(LaunchShortcutExtension.java:505)
at org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager.getParticipatingLaunchConfigurations(LaunchingResourceManager.java:486)
at org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager.getLabel(LaunchingResourceManager.java:320)
at org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager.computeLabels(LaunchingResourceManager.java:241)
at org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager$2.run(LaunchingResourceManager.java:138)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.osgi.framework.BundleException: The activator net.sf.simpletest.eclipse.SimpletestPlugin for bundle net.sf.simpletest.eclipse is invalid
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:156)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:751)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:417)
at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:265)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:106)
... 22 more
Caused by: java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:151)
... 28 more
Caused by: org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4083)
at org.eclipse.swt.SWT.error(SWT.java:3998)
at org.eclipse.swt.SWT.error(SWT.java:3969)
at org.eclipse.swt.widgets.Display.error(Display.java:1203)
at org.eclipse.swt.widgets.Display.checkDevice(Display.java:751)
at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:2068)
at net.sf.simpletest.eclipse.SimpletestPlugin.<clinit>(SimpletestPlugin.java:65)
... 35 more
The reason is very clear. An exception was thrown when initializing a class, which is caused by accessing SWT Display in a non-UI thread.

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.