Bug 54223 - error in SQL statement in LocalHandle.computeHistory
Summary: error in SQL statement in LocalHandle.computeHistory
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Stellation (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Annie Ying CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-09 19:08 EST by Annie Ying CLA
Modified: 2005-08-31 16:38 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Annie Ying CLA 2004-03-09 19:08:42 EST
When I was attempting to run the Junit merge test 1 (tclient's
MergeTest.testMergeOne()), I got an exception (see stack below) because there
was an access on ProjectHistory which was null.  The ProjectHistory wasn't
properly set up because the SQL statement in LocalHandle.computeHistory because
a field mentioned in the ORDER clause wasn't not specified in the SELECT clause
(There was an propagated SQLException that slipped through the code: "Column
'B.S_ID' is not in the result of the query expression.")


java.lang.NullPointerException
	at
org.eclipse.stellation.repos.LocalHandle.nearestCommonAncestor(LocalHandle.java:1745)
	at
org.eclipse.stellation.repos.LocalHandle.nearestCommonAncestor(LocalHandle.java:1705)
	at org.eclipse.stellation.repos.MergeManager.mergeChanges(MergeManager.java:83)
	at org.eclipse.stellation.repos.LocalHandle.realMergeChanges(LocalHandle.java:1650)
	at org.eclipse.stellation.repos.LocalHandle.mergeChanges(LocalHandle.java:1633)
	at org.eclipse.stellation.scm.tcore.MergeHelper.merge(MergeHelper.java:90)
	at org.eclipse.stellation.scm.tcore.ScmProject.merge(ScmProject.java:474)
	at org.eclipse.stellation.scm.tests.MergeTest.mergeBranchToMain(MergeTest.java:180)
	at org.eclipse.stellation.scm.tests.MergeTest.testMergeOne(MergeTest.java:103)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41)
	at java.lang.reflect.Method.invoke(Method.java:371)
	at junit.framework.TestCase.runTest(TestCase.java:154)
	at junit.framework.TestCase.runBare(TestCase.java:127)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:397)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:281)
	at
org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:30)
	at
org.eclipse.pde.internal.junit.runtime.UITestApplication$1.run(UITestApplication.java:92)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:102)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1822)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1628)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1506)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1482)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:246)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:139)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:47)
	at
org.eclipse.pde.internal.junit.runtime.UITestApplication.run(UITestApplication.java:34)
	at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:85)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41)
	at java.lang.reflect.Method.invoke(Method.java:371)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:279)
	at org.eclipse.core.launcher.Main.run(Main.java:742)
	at org.eclipse.core.launcher.Main.main(Main.java:581)
Comment 1 Annie Ying CLA 2004-04-06 11:37:30 EDT
I fixed it by adding "B.S_ID" to the end of the SELECT clause.  t should to work
okay, because the database will just return extra info that is not needed.