Bug 242738 - Gria vo.getServices() issues NullPointer exception
Summary: Gria vo.getServices() issues NullPointer exception
Status: ASSIGNED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Geclipse (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Mathias Stümpert CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-31 11:10 EDT by Jie Tao CLA
Modified: 2014-01-09 16:01 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jie Tao CLA 2008-07-31 11:10:18 EDT
I tested the Gria  functionality using Junit test. I get the services with vo.getServices(). An example is in GriaDataService_PDETest.  

the getServices method calls infoService.fetchResources( this,
                                                    this,
                                                    GridResourceCategoryFactory
                                                      .getCategory( GridResourceCategoryFactory.ID_SERVICES ),
                                                    false,
                                                    IGridService.class,
                                                    monitor )
                                                    
  where the first parameter "parent" is the Gria VO. This caused the exception later when the GriaDataService constructor is called. Since the new AAI, this constructor is added with " this.voName = parent.getProject().getVO().getName();"
Comment 1 Mathias Stümpert CLA 2008-08-01 08:45:32 EDT
Where is the stacktrace of the NPE?
Comment 2 Jie Tao CLA 2008-08-04 03:08:39 EDT
java.lang.NullPointerException
	at eu.geclipse.gria.services.GriaDataService.<init>(GriaDataService.java:46)
	at eu.geclipse.gria.info.GriaInfoService.newFetchStorage(GriaInfoService.java:967)
	at eu.geclipse.gria.info.GriaInfoService.fetchResources(GriaInfoService.java:226)
	at eu.geclipse.core.model.impl.AbstractGridInfoService.fetchResources(AbstractGridInfoService.java:44)
	at eu.geclipse.gria.info.GriaInfoService.fetchResources(GriaInfoService.java:244)
	at eu.geclipse.core.model.impl.AbstractVirtualOrganization.getServices(AbstractVirtualOrganization.java:190)
	at eu.geclipse.gria.GriaOperation_PDETest.setUpBeforeClass(GriaOperation_PDETest.java:57)
	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.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
	at org.junit.internal.runners.BeforeAndAfterRunner.runBefores(BeforeAndAfterRunner.java:50)
	at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:33)
	at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:58)
	at org.eclipse.pde.internal.junit.runtime.UITestApplication$1.run(UITestApplication.java:122)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
	at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
	at org.eclipse.pde.internal.junit.runtime.UITestApplication.start(UITestApplication.java:52)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
	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:504)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1144)