cannot create project netbeans 6.* - java

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

Related

SWT error with eclispe Mars in RCP application java.lang.NoSuchMethodError: org.eclipse.swt.widgets.ToolBar.requestLayout()V

We have an existing RCP application working perfectly working with eclipse Luna.We are planning to migrate the eclipse to Mars.While migrating the eclipse to MARS we are getting SWT exception while launching the tool and the tool window is not getting launched properly.
Please help to resolve this issue.
Exception stack trace is given below.
java.lang.NoSuchMethodError: org.eclipse.swt.widgets.Control.requestLayout()V
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.subscribeChildrenHandler(PartRenderingEngine.java:301)
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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
at org.eclipse.e4.core.di.internal.extensions.EventObjectSupplier$DIEventHandler.handleEvent(EventObjectSupplier.java:80)
at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
The stack trace shows that you are using the PartRenderingEngine from Eclipse Neon (4.6). This requires the Control.requestLayout method in the SWT code. This is a relatively new method and the version of SWT you are using does not have it.
It is not clear from your question how you are managing to end up with an RCP like this. You must build an RCP from a single Eclipse release, you can't mix code from different releases safely.

java.lang.UnsatisfiedLinkError for SQLite on Mac

I have a Java program compiled into a JAR that runs well on Windows. On Mac, it does not run well. I've included the stack trace, I get a
"java.lang.UnsatisfiedLinkError: org.sqlite.core.NativeDB._open(LJava/lang/String;I)V" error
It seems that it's failing at the second of these two lines in my program:
Class.forName("org.sqlite.JDBC").newInstance();
connection = DriverManager.getConnection(dbURL + dbLoc); //fails here
I've never seen one of these errors before, some research revealed that it may be a problem with the SQLite version and that I needed to include another JAR Library for SQLite that was compatible for Mac since the snapshot version below was not compatible. I have both of these libraries included in my project's libraries now:
sqlite-jdbc-3.7.2.jar
sqlite-jdbc4-3.8.2-SNAPSHOT.jar
Unfortunately I'm still getting the same error message. Again, the program runs flawlessly on Windows. This is a Mac issue only.
Anyone have any ideas?
Stack Trace:
java -jar "PRG - RYADD.jar"
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: org.sqlite.core.NativeDB._open(Ljava/lang/String;I)V
at org.sqlite.core.NativeDB._open(Native Method)
at org.sqlite.core.DB.open(DB.java:161)
at org.sqlite.core.CoreConnection.open(CoreConnection.java:145)
at org.sqlite.core.CoreConnection.<init>(CoreConnection.java:66)
at org.sqlite.jdbc3.JDBC3Connection.<init>(JDBC3Connection.java:21)
at org.sqlite.jdbc4.JDBC4Connection.<init>(JDBC4Connection.java:23)
at org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:44)
at org.sqlite.JDBC.createConnection(JDBC.java:113)
at org.sqlite.JDBC.connect(JDBC.java:87)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:207)
at prgryadd.DBConnect.createConnection(DBConnect.java:43)
at prgryadd.DBConnect.<init>(DBConnect.java:32)
at prgryadd.PRGRYADDView.<clinit>(PRGRYADDView.java:756)
at prgryadd.PRGRYADDApp.startup(PRGRYADDApp.java:19)
at org.jdesktop.application.Application$1.run(Application.java:171)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:682)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:643)
at java.awt.EventQueue$1.run(EventQueue.java:641)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:652)
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)
Got it working. Deleted the other SQLite-JDBC libraries and included only the oldest named "sqlite-jdbc-3.7.15-SNAPSHOT.jar" from the following URL:
https://bitbucket.org/xerial/sqlite-jdbc/downloads
This solved the problem. Apparently there are some compatibility issues with the newest SQLite-JDBC library not playing well with Macs. The older versions don't seem to have this problem.

No project.properties file and NullPointerException during build of new android application

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.

Does jetty 6.1.8 supports jdk 1.5?

Hello i install jetty 6.1.8 on windows for development,
I configure it in eclipse to run with jdk 1.5, and my project is configured to build using the same jdk.
my problem is my project can't be runned using jetty server. it complained the below error message. Please note I can start jetty without error when there is no project added. If I configure jetty to use jdk 1.6, then i can add my project and everything works fine. so does it mean that jetty 6.1.8 doesn't support jdk 1.5?
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:366)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
at org.mortbay.util.Loader.loadClass(Loader.java:91)
at org.mortbay.util.Loader.loadClass(Loader.java:71)
at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:73)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:233)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:612)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at org.mortbay.jetty.deployer.ContextDeployer.deploy(ContextDeployer.java:268)
at org.mortbay.jetty.deployer.ContextDeployer.access$000(ContextDeployer.java:67)
at org.mortbay.jetty.deployer.ContextDeployer$ScannerListener.fileAdded(ContextDeployer.java:89)
at org.mortbay.util.Scanner.reportAddition(Scanner.java:417)
at org.mortbay.util.Scanner.reportDifferences(Scanner.java:331)
at org.mortbay.util.Scanner.scan(Scanner.java:286)
at org.mortbay.util.Scanner$1.run(Scanner.java:246)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Yes it does: http://www.eclipse.org/jetty/about.php (bottom of the page)
According to this page, Jetty 6.1.x supported Java 1.6. I suspect that you have downloaded Jetty JAR files that were compiled using the Java 1.6 compilers. Get the 1.5 JARs and all should be well.
EDIT: I just downloaded the 6.1.8 ZIP file from here, and the JAR files therein were compiled for Java 1.4 or later (code version #48). You must have picked up a dodgy JAR file from somewhere!

Fail to install my NetBeans plugin

Playing around with creating a NetBeans plugin but I am making very little progress since the process of installing the module fails. What I am doing is right-clicking on the and choosing the 'Install/Reload in Development IDE' option and it fails with the following exception:
Enabling StandardModule:org.willcodejavaforfood.com jarFile: /Users/Erik/NetBeansProjects/module2/build/cluster/modules/org-willcodejavaforfood-com.jar...
java.io.IOException: Cannot enable StandardModule:org.willcodejavaforfood jarFile: /Users/Erik/NetBeansProjects/module2/build/cluster/modules/org-willcodejavaforfood.jar; problems: [Java > 1.6]
at org.netbeans.core.startup.ModuleSystem.deployTestModule(ModuleSystem.java:358)
at org.netbeans.core.startup.TestModuleDeployer.deployTestModule(TestModuleDeployer.java:68)
at org.netbeans.modules.apisupport.ant.InstallModuleTask.execute(InstallModuleTask.java:77)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor176.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:273)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:499)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
Using NetBeans 6.5 and running Java 1.6 on Mac OS X 10.5.6
Apperently this is a NetBeans issue for Mac OS X...
Answer from netbeans forums
If you make a new NetBeans module project and simply run that does it work? (trying to narrow the issue down, and eliminating anything but the absolute basics is a good place to start)
Looks like your target platform is set to JDK 5 but your module is built against JDK 6.

Categories

Resources