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

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

Related

"cannot open git-upload-pack" - Cloning project in Eclipse IDE

I'm making a clone of my project that is in Github in the Eclipse IDE.
After entering all the access data, the following error occurs:
https://github.com/"COMPANY NAME"/"PROJECTNAME".git: cannot open git-upload-pack
I already added the http.sslVerify = false - did not work
I configured the RSA key - did not work either
I use: Windows 10 / Java 7 / Eclipse Luna Luna Service Release 2 (4.4.2)
More details of the error
org.eclipse.jgit.api.errors.TransportException:
https://github.com/"COMPANYNAME"/"PROJECTNAME".git: cannot open git-upload-pack
at org.eclipse.jgit.api.LsRemoteCommand.call(LsRemoteCommand.java:196)
at
org.eclipse.egit.core.op.ListRemoteOperation.run(ListRemoteOperation.java:99)
at org.eclipse.egit.ui.internal.clone.SourceBranchPage$8.run(SourceBranchPage.java:324)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: org.eclipse.jgit.errors.TransportException: https://github.com/"COMPANYNAME"/"PROJECTNAME".git: cannot open git-upload-pack
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:521)
at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:309)
at org.eclipse.jgit.api.LsRemoteCommand.call(LsRemoteCommand.java:175)
... 3 more
Caused by: javax.net.ssl.SSLException: Received fatal alert: protocol_version
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.SSLSocketImpl.recvAlert(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)
at org.eclipse.jgit.transport.http.JDKHttpConnection.getResponseCode(JDKHttpConnection.java:98)
at org.eclipse.jgit.util.HttpSupport.response(HttpSupport.java:168)
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:475)
... 5 more
Session Data:
eclipse.buildId=4.4.2.M20150204-1700
java.version=1.7.0_79
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=pt_BR
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
Try this answer to a related question on Salesforce Stack Exchange. It worked for me.
To elaborate, GitHub recently (as of February 8, 2018) removed support for a number of outdated cryptographic standards. See this announcement for more details on that.
Unfortunately, this list includes TLSv1, which is the default TLS implementation used by Java 7. I encountered the same problem since I was interfacing with GitHub via EGit on a fairly ancient Eclipse build still using Java 7, and sure enough, it was explicitly set to use TLS1.0. I followed the recommended steps to force my Java to use TLS1.1 and 1.2, and the problem was magically solved.
Eclipse 2019-12 has an issue running on IBM JDK that implements
SSLContext.getInstance("TLS")
differently than the other JDKs like Oracle JDK or OpenJDK.
The issue is explained in this Eclipse forum post
To resolve the issue you need to set a runtime parameter:
-Dcom.ibm.jsse2.overrideDefaultTLS=true
in the eclipse.ini file.
also, if still not working, you need to add one of the following parameters:
-Dhttps.protocols=TLSv1.1,TLSv1.2
-Djdk.tls.client.protocols=TLSv1.1,TLSv1.2
Some people observed that in some contexts the order of the items do count, so
-Dhttps.protocols=TLSv1.2,TLSv1.1
is not the same with
-Dhttps.protocols=TLSv1.1,TLSv1.2
The last in the list tend to have priority in front of the others.
Other official articles from IBM explaining the "functionality" are the following:
IBM Article 1
IBM Article 2
IBM Article 3

ScalaIDE and cryptic ClassNotFound errors

The problem
Using Scala IDE, I've been getting a cryptic NullPointerException wherein the classed underneath "src/test/scala" are not found... My IDE Details are :
Related
A related question (see http://www.stackoverflow.com/questions/9686517/scala-eclipse-plugin-java-lang-classnotfoundexception) was answered some time (2 years ago), but it appears I'm seeing the same error in new ScalaIDE (downloaded for 2.10, just a week ago).
System Details and stacktrace
eclipse.buildId=3.0.3-20140327-1716-Typesafe
java.version=1.7.0_55
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments: -keyring /Users/bigpetstore/.eclipse_keyring -showlocation
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -keyring /Users/bigpetstore /.eclipse_keyring -showlocation
And the exception is as follows
java.lang.NullPointerException
at scala.collection.convert.Wrappers$JEnumerationWrapper.hasNext(Wrappers.scala:46)
at scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:327)
at scala.collection.Iterator$class.toStream(Iterator.scala:1143)
at scala.collection.AbstractIterator.toStream(Iterator.scala:1157)
at scala.collection.TraversableOnce$class.toIterable(TraversableOnce.scala:259)
at scala.collection.AbstractIterator.toIterable(Iterator.scala:1157)
at scala.tools.eclipse.ScalaPlugin.sbtCompilerInterface$lzycompute(ScalaPlugin.scala:177)
at scala.tools.eclipse.ScalaPlugin.sbtCompilerInterface(ScalaPlugin.scala:177)
at scala.tools.eclipse.buildmanager.sbtintegration.SbtInputs$$anon$5.scalac(SbtInputs.scala:71)
at scala.tools.eclipse.buildmanager.sbtintegration.SbtInputs$$anon$5.scalac(SbtInputs.scala:63)
at sbt.compiler.IC$.compile(IncrementalCompiler.scala:21)
at scala.tools.eclipse.buildmanager.sbtintegration.EclipseSbtBuildManager.runCompiler(EclipseSbtBuildManager.scala:133)
at scala.tools.eclipse.buildmanager.sbtintegration.EclipseSbtBuildManager.update(EclipseSbtBuildManager.scala:124)
at scala.tools.eclipse.buildmanager.sbtintegration.EclipseSbtBuildManager.build(EclipseSbtBuildManager.scala:178)
at scala.tools.eclipse.ScalaProject.build(ScalaProject.scala:666)
at scala.tools.eclipse.ScalaBuilder.build(ScalaBuilder.scala:119)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:733)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
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:53)
Oddly, I was actually able to fix this, by simply switching from SBT to the refined compiler:
Any thoughts on why the SBT compiler would work but "refined" would fail, I'd like to hear.
There are some related threads, but no definitive answer (yet) that i can see about why it is that SBT would throw an NPE when compiling. Could just be an accidental error or bug in the plugin itslef that I was triggering.
https://groups.google.com/forum/#!msg/scala-ide-user/Tscp9sLixJI/a52OR068dYAJ
https://groups.google.com/forum/#!msg/scala-ide-user/H3ov9hBt5aA/uctURBzV2JwJ

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

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.