I'm having a horrible time figuring out a problem that makes it impossible for me to use the new android application wizard in ADT to create a new android project. First a little background. I've been using ADT (the ADT bundle) for about 6 months and haven't had a problem. Because the current issue only manifests when trying to create new projects (there are no issues with building existing projects), and I hadn't created a new project for a while, I don't know what may have precipitated it. Two things I can think of are:
I recently updated my OS to Mavericks.
I recently installed JDK 7 (I had been using 6)
Similar questions have been asked here and here, but the quality of answers don't seem very good to me. For one thing, I don't really want a workaround unless this is a legitimate bug. It doesn't seem to be a bug to me because I think a lot more people would be having issues. It's a pretty big problem. I think I must be missing something fairly obvious.
I can see that after it attempts to create the project, the directory structure of the project in the workspace appears correct, but almost all the files are missing, including project.properties, which seems to be involved in the problem I'm having based on the error log (below).
I've done the following:
First I tried updating both eclipse and the ADT. No luck
I tried creating projects in new workspaces
I deleted and re-downloaded the ADT bundle
I deleted and re-installed JDK 7 (following oracle's uninstall directions)
Upon clicking finish using the new android application wizard I get the following error message:
Errors occurred during the build.
Errors running builder 'Android Resource Manager' on project 'test'.
java.lang.NullPointerException
The error log looks like this (I wanted to include a screenshot, but the site won't let me because I'm a new user. Instead, I'm copying and pasting the messages in the order they appear in my log (from most recent to least recent):
Errors occurred during the build.
Errors running builder 'Android Resource Manager' on project 'test'.
Failed to load properties file for project 'test'
Failed to load properties file for project 'test'
Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
Failed to load properties file for project 'test'
[No message for this one, but stack trace is for an InvocationTargetException]
Failed to load properties file for project 'test'
Failed to load properties file for project 'test'
Finally, here are the stack traces for NPE and InvocationTargetException.
java.lang.NullPointerException
at com.android.ide.eclipse.adt.internal.build.builders.BaseBuilder.abortOnBadSetup(BaseBuilder.java:327)
at com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder.build(ResourceManagerBuilder.java:92)
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)
java.lang.reflect.InvocationTargetException
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1028)
at com.android.ide.eclipse.adt.internal.wizards.templates.TemplateWizard.performFinish(TemplateWizard.java:197)
at com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.performFinish(NewProjectWizard.java:1)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:628)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4166)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1489)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1474)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1279)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4012)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3651)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:826)
at org.eclipse.jface.window.Window.open(Window.java:802)
at org.eclipse.ui.internal.actions.NewWizardShortcutAction.run(NewWizardShortcutAction.java:135)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4166)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1489)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1474)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1279)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4012)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3651)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
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)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.android.xml.AndroidXPathFactory
at com.android.manifmerger.ManifestMerger.process(ManifestMerger.java:332)
at com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandler.mergeManifest(TemplateHandler.java:909)
at com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandler.merge(TemplateHandler.java:745)
at com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandler.access$7(TemplateHandler.java:690)
at com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandler$2.startElement(TemplateHandler.java:614)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1342)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2770)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:648)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:332)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
at com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandler.execute(TemplateHandler.java:580)
at com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandler.access$1(TemplateHandler.java:563)
at com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandler$1.startElement(TemplateHandler.java:489)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1342)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2770)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:648)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:332)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
at com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandler.processVariables(TemplateHandler.java:456)
at com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandler.render(TemplateHandler.java:310)
at com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.generateActivity(NewProjectWizard.java:418)
at com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.access$5(NewProjectWizard.java:401)
at com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard$2.populate(NewProjectWizard.java:354)
at com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectCreator.createEclipseProject(NewProjectCreator.java:759)
at com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectCreator.access$1(NewProjectCreator.java:712)
at com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectCreator$5.run(NewProjectCreator.java:914)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2345)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2327)
at com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectCreator.create(NewProjectCreator.java:933)
at com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.performFinish(NewProjectWizard.java:359)
at com.android.ide.eclipse.adt.internal.wizards.templates.TemplateWizard$1.run(TemplateWizard.java:201)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
This is my first question on stackoverflow. Please let me know how I can improve it. I'm using eclipse version 22.6.2-1085508 and
java version 1.7.0_60
Okay, so because I could not resolve this issue I had switched over to Android Studio and wasn't having any problems there, but when I got a new computer recently I figured I could just go back to the ADT bundle with no problem. Wrong. I had the exact same issue.
I don't understand why, but uninstalling jdk1.7.0_60.jdk "solved" this problem. I got the idea to try this from some other answers to questions (unfortunately, I'm having trouble finding them again to link). In any case, I haven't found an explanation for why this worked or any suggestion as to how to achieve it without uninstalling my JDK (which I need). Any answers or hints that would lead me in the right direction in figuring the cause out would be much appreciated. Otherwise, I guess I'll be making a new question.
Update
I've reinstalled the jdk and do not appear to be having problems.
You only fix eclipse.ini
...
openFile
--launcher.appendVmargs
-vm
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Commands/java
-vmargs
-Dosgi.requiredJavaVersion=1.6
-XstartOnFirstThread
...
Good luck
I opened de eclipse.ini and changed the -Dosgi.requiredJavaVersion= parameter from 1.7 to 1.6, of course I have java 6 installed on machine, it works for me. I hope it helps you.
Related
I am a d00b at modding and I'm using the Minecraft Mastery book.
when I try to run the unedited minecraft on eclipse, I get this first:
[07:09:48] [main/ERROR]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
[07:09:52] [main/ERROR]: The minecraft jar file:/C:/Users/minecraft/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.2-10.12.2.1147/forgeBin-1.7.2-10.12.2.1147.jar!/net/minecraft/client/ClientBrandRetriever.class appears to be corrupt! There has been CRITICAL TAMPERING WITH MINECRAFT, it is highly unlikely minecraft will work! STOP NOW, get a clean copy and try again!
[07:09:52] [main/ERROR]: FML has been ordered to ignore the invalid or missing minecraft certificate. This is very likely to cause a problem!
[07:09:52] [main/ERROR]: Technical information: ClientBrandRetriever was at jar:file:/C:/Users/minecraft/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.2-10.12.2.1147/forgeBin-1.7.2-10.12.2.1147.jar!/net/minecraft/client/ClientBrandRetriever.class, there were 0 certificates for it
[07:09:52] [main/ERROR]: FML appears to be missing any signature data. This is not a good thing
then after 3 more lines of normal, I get this:
[07:09:55] [main/ERROR]: Unable to launch
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_71]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_71]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_71]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_71]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
Caused by: java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886) ~[?:1.7.0_71]
at java.lang.Runtime.loadLibrary0(Runtime.java:849) ~[?:1.7.0_71]
at java.lang.System.loadLibrary(System.java:1088) ~[?:1.7.0_71]
at org.lwjgl.Sys$1.run(Sys.java:73) ~[lwjgl-2.9.0.jar:?]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.7.0_71]
at org.lwjgl.Sys.doLoadLibrary(Sys.java:66) ~[lwjgl-2.9.0.jar:?]
at org.lwjgl.Sys.loadLibrary(Sys.java:95) ~[lwjgl-2.9.0.jar:?]
at org.lwjgl.Sys.<clinit>(Sys.java:112) ~[lwjgl-2.9.0.jar:?]
at net.minecraft.client.Minecraft.getSystemTime(Minecraft.java:2523) ~[Minecraft.class:?]
at net.minecraft.client.main.Main.main(SourceFile:36) ~[Main.class:?]
... 6 more
I have also added C:\Program Files\Java\jre7\bin; to the path variable witch now looks like this:
C:\Program Files\Java\jre7\bin;C:\ProgramData\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\NVIDIA Corporation\PhysX\Common;C:\PROGRAM FILES\NOKIA\PC CONNECTIVITY SOLUTION\;C:\PROGRAM FILES\COMMON FILES\MICROSOFT SHARED\WINDOWS LIVE;C:\Windows\SYSTEM32;C:\Windows;C:\Windows\SYSTEM32\WBEM;C:\Windows\SYSTEM32\WINDOWSPOWERSHELL\V1.0\;C:\PROGRAM FILES\WINDOWS LIVE\SHARED;C:\PROGRAM FILES\IVI FOUNDATION\VISA\WINNT\BIN;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\VXIPNP\WinNT\Bin;C:\Users\Kieran (Admin)\AppData\Local\Smartbar\Application\;C:\Program Files\QuickTime\QTSystem\C:\Program Files\Java\jre8;C:\Program Files\QuickTime\QTSystem\
I've already tried downgrading java from 1.8 to 0.7, but it just changed the error slightly.
please help :)
You are missing native libraries required by lwjgl.
Extract libraries/org/lwjgl/lwjgl/lwjgl-platform/2.9.1/lwjgl-platform-2.9.1-natives-linux.jar to some directory in your project. The name might differ. It should have a bunch of .so or .dll files inside.
Left click on it -> "Build Path" -> "Configure Build Path..."
Expand "lwjgl-2.9.1.jar"
Select "Native library location: (None)"
Click "Edit" and set it to directory which you just created.
As the first log states:
The minecraft jar file:/C:/Users/minecraft/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.2-10.12.2.1147/forgeBin-1.7.2-10.12.2.1147.jar!/net/minecraft/client/ClientBrandRetriever.class appears to be corrupt! There has been CRITICAL TAMPERING WITH MINECRAFT, it is highly unlikely minecraft will work! STOP NOW, get a clean copy and try again!
Did you try reinstalling Minecraft?
Looks like you need to add the lwjgl.jar to your classpath.
I have a problem about eclipse IDE, I can't open any file in my work space; if I try to open file, eclipse will alert the following error dialog
"An error has occurred. See error log for more details. java.lang.NullPointerException"
I go to see .log file in .meta at workspace and I see a paragraph in the file like this:
!ENTRY org.eclipse.jface 4 2 2557-04-09 11:40:49.422
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.NullPointerException
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.internalFixContext(PartServiceImpl.java:380)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:341)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1029)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3047)
at org.eclipse.ui.internal.WorkbenchPage.access$22(WorkbenchPage.java:2969)
at org.eclipse.ui.internal.WorkbenchPage$8.run(WorkbenchPage.java:2951)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2947)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2911)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2902)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:655)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:614)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:360)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:167)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:249)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:228)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:376)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:538)
at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:866)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:864)
at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152)
at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1256)
at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:309)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
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:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
How can I solve this problem - any idea?
There is a bug filed for Eclipse:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=385680
You could try restarting Eclipse, it helped the original poster of the issue there.
Better you update your eclipse by clicking it on help >> check for updates, also you can start eclipse by entering command in command prompt eclipse -clean.
Hope this will help you.
I have also encountered this error . Just i opened the new window ie Window -> New Window in eclipse .Then , I closed my old window. This solved my problem.
hiļ¼that maybe the project's problem,
chose the project and setting you eclipse:
project -> clean...
After exiting eclipse I moved .eclipse (found in the user's home directory) to .eclipse.old (just in case I may have had to undo). The error does not show up any more and my projects are working fine after restarting eclipse.
Caution: I have a simple setup and this may not be the best for environments with advanced settings.
I am posting this as a separate answer as previously listed methods did not work for me.
I faced the same error, but only with files cloned from git that were assigned to a proprietary plugin.
I realized that even after cloning the files from git, I needed to create a new project or import a project in eclipse and this resolved the error.
Lately I have been having more and more issues with the content assist in Eclipse. In some of my projects, I get no proposals from the content assist, and in other projects I get some or all of the expected proposals. Typically there is no "error" in Eclipse, but here is an example of one when I do get an error:
"Content Assist" did not complete normally. Please see the log for more information.
Pb(324) The type android.support.v4.app.LoaderManager$LoaderCallbacks cannot be resolved. It is indirectly referenced from required .class files
I have tried the various suggestions (including but not limited to the two below) from similar questions with no luck. I have even gone as far as removing and re-installing eclipse and re-creating the projects without any of the Eclipse metadata or settings.
Eclipse Content Assist not working with Android
Eclipse/Java code completion not working
Any help is greatly appreciated.
Eclipse SDK
Version: 3.7.2
Build id: M20120208-0800
Android Development Toolkit
Version: 18.0.0.v201203301601-306762
Error Log:
!ENTRY org.eclipse.ui 4 0 2012-05-22 09:25:34.061
!MESSAGE Pb(324) The type android.support.v4.app.LoaderManager$LoaderCallbacks cannot be resolved. It is indirectly referenced from required .class files
!STACK 0
org.eclipse.jdt.internal.compiler.problem.AbortCompilation: Pb(324) The type android.support.v4.app.LoaderManager$LoaderCallbacks cannot be resolved. It is indirectly referenced from required .class files
at org.eclipse.jdt.internal.compiler.problem.ProblemHandler.handle(ProblemHandler.java:121)
at org.eclipse.jdt.internal.compiler.problem.ProblemHandler.handle(ProblemHandler.java:179)
at org.eclipse.jdt.internal.compiler.problem.ProblemReporter.handle(ProblemReporter.java:2062)
at org.eclipse.jdt.internal.compiler.problem.ProblemReporter.isClassPathCorrect(ProblemReporter.java:4039)
at org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:54)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:122)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getTypeFromTypeSignature(LookupEnvironment.java:1335)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.createMethod(BinaryTypeBinding.java:536)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.createMethods(BinaryTypeBinding.java:638)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.cachePartsFrom(BinaryTypeBinding.java:365)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:688)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:667)
at org.eclipse.jdt.internal.codeassist.impl.Engine.accept(Engine.java:60)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:142)
at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:183)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java:2688)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getType(Scope.java:2405)
at org.eclipse.jdt.internal.compiler.ast.SingleTypeReference.getTypeBinding(SingleTypeReference.java:44)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.internalResolveType(TypeReference.java:132)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:204)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypeFor(SourceTypeBinding.java:1374)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.fields(SourceTypeBinding.java:699)
at org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.availableFields(ReferenceBinding.java:166)
at org.eclipse.jdt.internal.codeassist.InternalExtendedCompletionContext.searchVisibleFields(InternalExtendedCompletionContext.java:518)
at org.eclipse.jdt.internal.codeassist.InternalExtendedCompletionContext.searchVisibleVariablesAndMethods(InternalExtendedCompletionContext.java:807)
at org.eclipse.jdt.internal.codeassist.InternalExtendedCompletionContext.computeVisibleElementBindings(InternalExtendedCompletionContext.java:179)
at org.eclipse.jdt.internal.codeassist.InternalExtendedCompletionContext.getVisibleElements(InternalExtendedCompletionContext.java:365)
at org.eclipse.jdt.internal.codeassist.InternalCompletionContext.getVisibleElements(InternalCompletionContext.java:318)
at org.eclipse.jdt.internal.ui.text.java.ParameterGuessingProposal.getAssignableElements(ParameterGuessingProposal.java:110)
at org.eclipse.jdt.internal.ui.text.java.ParameterGuessingProposal.guessParameters(ParameterGuessingProposal.java:293)
at org.eclipse.jdt.internal.ui.text.java.ParameterGuessingProposal.computeGuessingCompletion(ParameterGuessingProposal.java:228)
at org.eclipse.jdt.internal.ui.text.java.ParameterGuessingProposal.computeReplacementString(ParameterGuessingProposal.java:194)
at org.eclipse.jdt.internal.ui.text.java.LazyJavaCompletionProposal.getReplacementString(LazyJavaCompletionProposal.java:330)
at org.eclipse.jdt.internal.ui.text.java.AbstractJavaCompletionProposal.apply(AbstractJavaCompletionProposal.java:364)
at org.eclipse.jdt.internal.ui.text.java.JavaMethodCompletionProposal.apply(JavaMethodCompletionProposal.java:57)
at org.eclipse.jdt.internal.ui.text.java.ParameterGuessingProposal.apply(ParameterGuessingProposal.java:121)
at org.eclipse.jdt.internal.ui.text.java.AbstractJavaCompletionProposal.apply(AbstractJavaCompletionProposal.java:477)
at org.eclipse.jdt.internal.ui.text.java.LazyJavaCompletionProposal.apply(LazyJavaCompletionProposal.java:488)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertProposal(CompletionProposalPopup.java:930)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$21(CompletionProposalPopup.java:894)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(CompletionProposalPopup.java:495)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:482)
at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssistant.java:1656)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer.doOperation(CompilationUnitEditor.java:183)
at org.eclipse.ui.texteditor.ContentAssistAction$1.run(ContentAssistAction.java:82)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.texteditor.ContentAssistAction.run(ContentAssistAction.java:80)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:185)
at org.eclipse.ui.internal.handlers.LegacyHandlerWrapper.execute(LegacyHandlerWrapper.java:109)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:468)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:786)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:885)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:567)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:508)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:123)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1262)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1104)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1100)
at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1509)
at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4640)
at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:345)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4528)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4972)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
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:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Try this
Window >> Preferences >> Java >> Editor >> Content Assist >> Restore defaults
Window >> Preferences >> Java >> Editor >> Content Assist >> Advanced >> Restore defaults
I ended up upgrading the ActionBarSherlock library to the latest 4.1 (http://actionbarsherlock.com/) and it has fixed my eclipse troubles.
I had a similar problem with projects that used the V4 compatibility library when it was updated. Try removing the project dependency on the library, restarting Eclipse, and then adding the dependency back in. (I think this is what I did to resolve the issue, but if that doesn't work, I'll try to think of what else I might have done.)
I had this problem too, with Pb(324) message. It turned out, that reading the message with understanding was enough to fix it. However what I did first was going to stackoverflow. No good :)
In my groovy project the dependent libraries were not automatically visible by autocompletion. Not sure why, I'm new to this stuff. So I was adding them manually. But I did not add manually the indirect dependencies. The error message specifies the class causing the problem. I added a reference to the jar containing the problematic class and bingo - no more code assist errors.
To be specific: Project, Properties, Java Build Path, Libraries, Add External JARs. Then I pointed to the directory, where gradle downloaded the lib.
For me updating Eclipse worked.
In our application we sometimes (about 1 out of 10 times) get a NoClassDefFoundError when trying to instantiate a class. It happens when a project is opened from without our application.
The full stack trace looks like this:
!ENTRY org.eclipse.jface 4 2 2011-11-18 12:45:33.941
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.NoClassDefFoundError: com.mycompany.products.myapp.gui.model.provider.EMyAppObjectItemProvider
at com.mycompany.products.myapp.gui.model.provider.MyappguimodelItemProviderAdapterFactory.createMyAppGuiPortAdapter(MyappguimodelItemProviderAdapterFactory.java:159)
at com.mycompany.products.myapp.gui.model.util.MyappguimodelAdapterFactory$1.caseMyAppGuiPort(MyappguimodelAdapterFactory.java:185)
at com.mycompany.products.myapp.gui.model.util.MyappguimodelAdapterFactory$1.caseMyAppGuiPort(MyappguimodelAdapterFactory.java:1)
at com.mycompany.products.myapp.gui.model.util.MyappguimodelSwitch.doSwitch(MyappguimodelSwitch.java:226)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:59)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:75)
at com.mycompany.products.myapp.gui.model.util.MyappguimodelAdapterFactory.createAdapter(MyappguimodelAdapterFactory.java:462)
at org.eclipse.emf.common.notify.impl.AdapterFactoryImpl.createAdapter(AdapterFactoryImpl.java:133)
at org.eclipse.emf.common.notify.impl.AdapterFactoryImpl.adaptNew(AdapterFactoryImpl.java:107)
at org.eclipse.emf.common.notify.impl.AdapterFactoryImpl.adapt(AdapterFactoryImpl.java:93)
at com.mycompany.products.myapp.gui.model.provider.MyappguimodelItemProviderAdapterFactory.adapt(MyappguimodelItemProviderAdapterFactory.java:1127)
at org.eclipse.emf.edit.provider.ComposedAdapterFactory.adapt(ComposedAdapterFactory.java:300)
at org.eclipse.emf.edit.provider.ComposedAdapterFactory.adapt(ComposedAdapterFactory.java:277)
at org.eclipse.emf.edit.provider.ComposedAdapterFactory.adapt(ComposedAdapterFactory.java:264)
at org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider.getColumnText(AdapterFactoryLabelProvider.java:496)
at org.eclipse.jface.viewers.TableColumnViewerLabelProvider.update(TableColumnViewerLabelProvider.java:70)
at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:152)
at org.eclipse.jface.viewers.AbstractTableViewer.doUpdateItem(AbstractTableViewer.java:399)
at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:485)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2167)
at org.eclipse.jface.viewers.AbstractTableViewer.createItem(AbstractTableViewer.java:277)
at org.eclipse.jface.viewers.AbstractTableViewer.internalRefreshAll(AbstractTableViewer.java:757)
at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:649)
at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:636)
at org.eclipse.jface.viewers.AbstractTableViewer$2.run(AbstractTableViewer.java:592)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1443)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1404)
at org.eclipse.jface.viewers.AbstractTableViewer.inputChanged(AbstractTableViewer.java:590)
at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:280)
at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1690)
at com.mycompany.products.myapp.gui.views.port.composites.Ipv4PortComposite.projectOpenedOrClosed(Ipv4PortComposite.java:732)
at com.mycompany.products.myapp.gui.project.MyAppResourceController.tellOpenCloseListeners(MyAppResourceController.java:186)
at com.mycompany.products.myapp.gui.actions.project.MyAppGuiResourceController.openProject(MyAppGuiResourceController.java:266)
at com.mycompany.products.myapp.gui.project.MyAppResourceController.open(MyAppResourceController.java:592)
at com.mycompany.products.myapp.gui.project.MyAppResourceController.openWithoutUpdating(MyAppResourceController.java:612)
at com.mycompany.products.myapp.gui.actions.file.MyAppRecentProjectAction.run(MyAppRecentProjectAction.java:55)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.mycompany.products.myapp.gui.MyAppApplication.start(MyAppApplication.java:175)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
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:344)
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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.M
These related questions didn't answer my problem:
NoClassDefFoundError on JFace FontRegistry
Getting class not found Exception when running in eclipse
From what I've read this exception occurs when the class is not found in the runtime class-path. So I think it would be useful if I could print the runtime search paths before the actual attempt at instantiation. This way I can check if there is any difference in the 1/10 times it fails. However, I haven't found yet how to get the list of runtime search paths. Any hints on how to get them?
Can anyone help me fix this problem?
For classloading issues Java offers some tools. Look Do you really get class loaders on Slideshare. I once had a similar problem with the help system of Eclipse which I integrated in my RCP product. When started within the IDE everything worked fine but when starting the exported product the help system just doesn't come up.
Do you get this when starting the application? This sounds like some bundles haven't been initialized at that point. OSGi will start modules based on the dependencies, but there's a random element when you don't have the proper dependencies set in place. I would suggest looking at that. If you want more info, you can use the OSGi console to examine your environment:
http://www.ibm.com/developerworks/library/os-ecl-osgiconsole/index.html
Hope this helps.
Try to run your application in the debugger with the OSGi console enabled (-console). Add a Class breakpoint for NoClassDefFoundError or alternatively on the offending line of code (MyappguimodelItemProviderAdapterFactory.java:159).
And, when the breakpoint is hit:
find the bundle ID of the bundle with MyappguimodelItemProviderAdapterFactory - e.g. with the ss OSGi command
find the complete status of the bundle with the bundle <id> OSGi command
check whether the package in question - com.mycompany.products.myapp.gui.model.provider - is wired correctly in the "Imported Packages" section
I don't know what can be wrong, but you should check that
the correct package wiring has been set up - possibly using packages com.mycompany.products.myapp.gui.model.provider OSGi command to find all the providers
the bundle with EMyAppObjectItemProvider actually includes the class - you can find the jar used by OSGi with the status OSGi command (don't assume you know :-))
I have this error creating a new project on netbeans 6.10M (on 25% of project creation), on other versions, the creation of a new project just fails.. some other functionalities of netbeans are also not working..
im using Snow Leopard, last version
java.lang.NoSuchMethodError: org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar([Lorg/apache/xerces/xni/parser/XMLInputSource;)V
at org.apache.xerces.jaxp.validation.XMLSchemaFactory.newSchema(Unknown Source)
at org.netbeans.modules.project.ant.ProjectXMLCatalogReader.projectXmlCombinedSchema(ProjectXMLCatalogReader.java:189)
at org.netbeans.modules.project.ant.ProjectXMLCatalogReader.validate(ProjectXMLCatalogReader.java:154)
at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.loadProjectXml(AntBasedProjectFactorySingleton.java:384)
at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.loadProject(AntBasedProjectFactorySingleton.java:237)
at org.netbeans.api.project.ProjectManager.createProject(ProjectManager.java:361)
at org.netbeans.api.project.ProjectManager.access$300(ProjectManager.java:85)
at org.netbeans.api.project.ProjectManager$2.run(ProjectManager.java:282)
at org.netbeans.api.project.ProjectManager$2.run(ProjectManager.java:233)
at org.openide.util.Mutex.readAccess(Mutex.java:330)
at org.netbeans.api.project.ProjectManager.findProject(ProjectManager.java:233)
at org.netbeans.spi.project.support.ant.ProjectGenerator$1.run(ProjectGenerator.java:190)
at org.netbeans.spi.project.support.ant.ProjectGenerator$1.run(ProjectGenerator.java:120)
at org.openide.util.Mutex.writeAccess(Mutex.java:436)
at org.netbeans.spi.project.support.ant.ProjectGenerator.createProject0(ProjectGenerator.java:120)
at org.netbeans.spi.project.support.ant.ProjectGenerator.createProject(ProjectGenerator.java:114)
at org.netbeans.modules.java.j2seproject.J2SEProjectGenerator.createProject(J2SEProjectGenerator.java:235)
at org.netbeans.modules.java.j2seproject.J2SEProjectGenerator.access$000(J2SEProjectGenerator.java:87)
at org.netbeans.modules.java.j2seproject.J2SEProjectGenerator$1.run(J2SEProjectGenerator.java:108)
at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:125)
at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:566)
at org.netbeans.modules.java.j2seproject.J2SEProjectGenerator.createProject(J2SEProjectGenerator.java:106)
at org.netbeans.modules.java.j2seproject.ui.wizards.NewJ2SEProjectWizardIterator.instantiate(NewJ2SEProjectWizardIterator.java:185)
at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1019)
at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:591)
at org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:412)
at org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:256)
at org.openide.loaders.TemplateWizardIteratorWrapper.instantiate(TemplateWizardIteratorWrapper.java:168)
at org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1541)
at org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1498)
at org.openide.WizardDescriptor.access$1700(WizardDescriptor.java:130)
at org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:2069)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1426)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968)
Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to
at org.openide.util.RequestProcessor.post(RequestProcessor.java:421)
at org.openide.WizardDescriptor$Listener$2.run(WizardDescriptor.java:2115)
at org.openide.WizardDescriptor$8.run(WizardDescriptor.java:1430)
at org.openide.WizardDescriptor.lazyValidate(WizardDescriptor.java:1470)
at org.openide.WizardDescriptor.access$1300(WizardDescriptor.java:130)
at org.openide.WizardDescriptor$Listener.actionPerformed(WizardDescriptor.java:2125)
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.openide.util.WeakListenerImpl$ProxyListener.invoke(WeakListenerImpl.java:459)
at $Proxy14.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6348)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6113)
at java.awt.Container.processEvent(Container.java:2085)
at java.awt.Component.dispatchEventImpl(Component.java:4714)
at java.awt.Container.dispatchEventImpl(Container.java:2143)
at java.awt.Component.dispatchEvent(Component.java:4544)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4618)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4282)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
at java.awt.Container.dispatchEventImpl(Container.java:2129)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4544)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:137)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:205)
at java.awt.Dialog$1.run(Dialog.java:1046)
at java.awt.Dialog$3.run(Dialog.java:1098)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Dialog.java:1096)
at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:1006)
at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:1040)
at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:1028)
at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:121)
at org.openide.util.Mutex.doEventAccess(Mutex.java:1361)
at org.openide.util.Mutex.readAccess(Mutex.java:271)
at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:1013)
at java.awt.Component.show(Component.java:1563)
at java.awt.Component.setVisible(Component.java:1515)
at java.awt.Window.setVisible(Window.java:842)
at java.awt.Dialog.setVisible(Dialog.java:986)
at org.openide.loaders.TemplateWizard.instantiateImpl(TemplateWizard.java:498)
at org.openide.loaders.TemplateWizard.instantiate(TemplateWizard.java:365)
at org.netbeans.modules.project.ui.actions.NewProject$2.run(NewProject.java:139)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:137)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
NetBeans 6.9 works nicely here on 10.6.
I would uninstall everything related to Netbeans (throw the installed folders in the Trash and empty it), and then install just 6.9 again.
NetBeans IDE 6.10M1 is not a stable version of NetBeans IDE, this version is released for early access by the community to test it and report bugs to the NetBeans Development team through the NetBeans Issue system. If you have found a bug you should file a bug report and help the developers identify scenarios which they may fix eventually. By old versions do you mean any version before 6.10M1?
If you want to use NetBeans IDE for production you should use the latest stable version of NetBeans IDE that is NetBeans IDE 6.9.1. I am using Snow Leopard on MacBook pro and I am able to create Java Projects as well as NetBeans Platform Project.
Please elaborate your project scenario so more detailed answer can be written. Many a times just deleting the user directory $HOME/.netbeans help in fixing configuration issues
Hope this helps
with regards
Tushar