Results 1 to 2 of 2
  1. #1
    xcallmejudasx's Avatar
    xcallmejudasx is offline Senior Member
    Join Date
    Oct 2008
    Location
    Houston, TX & Flint, MI
    Posts
    609
    Rep Power
    7

    Default [SOLVED] Unable to instantiate class?

    So ya I open up Eclipse and run my program only to get this
    Java Code:
    java.lang.NullPointerException
    	at views.NavigationView.<init>(NavigationView.java:39)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    	at java.lang.reflect.Constructor.newInstance(Unknown Source)
    	at java.lang.Class.newInstance0(Unknown Source)
    	at java.lang.Class.newInstance(Unknown Source)
    	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:170)
    	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:867)
    	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
    	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
    	at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:259)
    	at org.eclipse.ui.internal.registry.ViewDescriptor.createView(ViewDescriptor.java:63)
    	at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:328)
    	at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:230)
    	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:594)
    	at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:306)
    	at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:531)
    	at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
    	at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
    	at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
    	at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
    	at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1256)
    	at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:668)
    	at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:576)
    	at org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:568)
    	at org.eclipse.ui.internal.PerspectiveHelper.activate(PerspectiveHelper.java:271)
    	at org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:964)
    	at org.eclipse.ui.internal.WorkbenchPage.onActivate(WorkbenchPage.java:2593)
    	at org.eclipse.ui.internal.WorkbenchWindow$25.run(WorkbenchWindow.java:2873)
    	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    	at org.eclipse.ui.internal.WorkbenchWindow.setActivePage(WorkbenchWindow.java:2854)
    	at org.eclipse.ui.internal.WorkbenchWindow$19.runWithException(WorkbenchWindow.java:2171)
    	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
    	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133)
    	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3800)
    	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3425)
    	at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
    	at org.eclipse.ui.internal.Workbench$27.runWithException(Workbench.java:1361)
    	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
    	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133)
    	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3800)
    	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3425)
    	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2293)
    	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
    	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
    	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
    	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
    	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    	at novlayout.Application.start(Application.java:20)
    	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
    	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:386)
    	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:549)
    	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
    	at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
    	at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
    It worked Friday when I left work and nothing has been changed over the weekend. I just opened it and compiled it. Help?

  2. #2
    xcallmejudasx's Avatar
    xcallmejudasx is offline Senior Member
    Join Date
    Oct 2008
    Location
    Houston, TX & Flint, MI
    Posts
    609
    Rep Power
    7

    Default

    Fixed it. For some reason have
    Java Code:
    	final IActionBars bars = getViewSite().getActionBars();
    up where my variables were defined worked friday but today it wants to be defined the line before bars >_<...This is going to be a loooooonng day

Similar Threads

  1. How to instantiate Class, into jsp, java script
    By silvia in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 01-04-2014, 09:08 AM
  2. Replies: 5
    Last Post: 11-20-2011, 10:22 PM
  3. Unable to get connection
    By chennee72 in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 09-24-2008, 03:33 AM
  4. Replies: 2
    Last Post: 07-04-2007, 04:47 AM
  5. Replies: 0
    Last Post: 06-23-2007, 10:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •