[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [tycho-user] NullPointerException
|
The NPE is thrown because the session object is null. When you follow the stack trace up, you'll see that the session object is supposed to come from a Maven LegacySupport object. I am not sure when and how this object is initialized.
The instance in which the problem occurs is a test of something in your forked Tycho code. AFAIK, none of Tycho's own test do what you are trying to achieve: to bring up the Equinox runtime in a Mojo tests. We use full integration tests whenever the Equinox runtime is needed.
Regards
Tobias
-----Original Message-----
From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Krzysztof Daniel
Sent: Dienstag, 9. Juli 2013 14:27
To: tycho-user
Subject: [tycho-user] NullPointerException
I'm trying to write a small utility plugin based on the eclipse-runner,
but during tests execution I get:
java.lang.RuntimeException: java.lang.NullPointerException
at
org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.checkStarted(DefaultEquinoxEmbedder.java:301)
at
org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.getService(DefaultEquinoxEmbedder.java:275)
at
org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.getService(DefaultEquinoxEmbedder.java:270)
at
org.fedoraproject.installer.InstallMojo.constructP2DirectorApp(InstallMojo.java:181)
at
org.fedoraproject.installer.InstallMojo.execute(InstallMojo.java:156)
at
org.fedoraproject.installer.InstallMojoTest.testSimpleScenario(InstallMojoTest.java:47)
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 junit.framework.TestCase.runTest(TestCase.java:176)
at junit.framework.TestCase.runBare(TestCase.java:141)
at junit.framework.TestResult$1.protect(TestResult.java:122)
at junit.framework.TestResult.runProtected(TestResult.java:142)
at junit.framework.TestResult.run(TestResult.java:125)
at junit.framework.TestCase.run(TestCase.java:129)
at junit.framework.TestSuite.runTest(TestSuite.java:255)
at junit.framework.TestSuite.run(TestSuite.java:250)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
at
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
at
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
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.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
at org.apache.maven.surefire.booter.ProviderFactory
$ProviderProxy.invoke(ProviderFactory.java:110)
at
org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
at
org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
at
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
Caused by: java.lang.NullPointerException
at
org.eclipse.tycho.osgi.runtime.TychoOsgiRuntimeLocator.resolveDependency(TychoOsgiRuntimeLocator.java:207)
at
org.eclipse.tycho.osgi.runtime.TychoOsgiRuntimeLocator.addRuntimeArtifact(TychoOsgiRuntimeLocator.java:159)
at
org.eclipse.tycho.osgi.runtime.TychoOsgiRuntimeLocator.addRuntimeArtifacts(TychoOsgiRuntimeLocator.java:153)
at
org.eclipse.tycho.osgi.runtime.TychoOsgiRuntimeLocator.addRuntimeArtifacts(TychoOsgiRuntimeLocator.java:118)
at
org.eclipse.tycho.osgi.runtime.TychoOsgiRuntimeLocator.locateRuntime(TychoOsgiRuntimeLocator.java:103)
at
org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.doStart(DefaultEquinoxEmbedder.java:79)
at
org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.start(DefaultEquinoxEmbedder.java:67)
at
org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.checkStarted(DefaultEquinoxEmbedder.java:299)
... 30 more
What may be the cause?
--
Krzysztof Daniel <kdaniel@xxxxxxxxxx>
Red Hat
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user