Community
Participate
Working Groups
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)
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.