Actions
Bug #20009
closedIn CI, technique migration test sometimes throw an NPE
Status:
Released
Priority:
N/A
Assignee:
Category:
Architecture - Internal libs
Target version:
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
Description
The NPE is:
initializationError(bootstrap.liftweb.checks.migration.TestMigrateSystemTechniques7_0) Time elapsed: 0.008 sec <<< ERROR! org.specs2.control.UserException: cannot create an instance for class bootstrap.liftweb.checks.migration.TestMigrateSystemTechniques7_0 at org.specs2.reflect.Classes.newInstance(Classes.scala:102) at org.specs2.reflect.Classes.createInstanceForConstructor(Classes.scala:77) at org.specs2.reflect.Classes.findInstance(Classes.scala:58) at org.specs2.reflect.Classes.createInstanceFromClass(Classes.scala:38) at org.specs2.reflect.Classes.createInstanceFromClass$(Classes.scala:37) at org.specs2.reflect.Classes$.createInstanceFromClass(Classes.scala:126) at org.specs2.reflect.Classes.$anonfun$createInstance$1(Classes.scala:31) at org.specs2.control.eff.Arrs.go$1(Eff.scala:383) at org.specs2.control.eff.Arrs.apply(Eff.scala:399) at org.specs2.control.eff.IntoPolyLower2$$anon$3.$anonfun$apply$8(IntoPoly.scala:60) at org.specs2.control.eff.Arrs.go$1(Eff.scala:380) at org.specs2.control.eff.Arrs.apply(Eff.scala:399) at org.specs2.control.eff.Arrs.apply(Eff.scala:348) at org.specs2.control.eff.CollectedUnions.$anonfun$continuation$1(Unions.scala:84) at org.specs2.control.eff.Arrs.go$1(Eff.scala:380) at org.specs2.control.eff.Arrs.apply(Eff.scala:399) at org.specs2.control.eff.Interpret$$anon$1.$anonfun$onEffect$1(Interpret.scala:53) at org.specs2.fp.EitherOps$.bimap$extension(EitherSyntax.scala:82) at org.specs2.control.eff.Interpret$$anon$1.onEffect(Interpret.scala:53) at org.specs2.control.eff.Interpret$$anon$1.onApplicativeEffect(Interpret.scala:61) at org.specs2.control.eff.Interpret$$anon$1.onApplicativeEffect(Interpret.scala:45) at org.specs2.control.eff.Interpret.go$1(Interpret.scala:200) at org.specs2.control.eff.Interpret.interpretLoop(Interpret.scala:207) at org.specs2.control.eff.Interpret.interpretLoop$(Interpret.scala:142) at org.specs2.control.eff.Interpret$.interpretLoop(Interpret.scala:635) at org.specs2.control.eff.Interpret.interpret(Interpret.scala:71) at org.specs2.control.eff.Interpret.interpret$(Interpret.scala:44) at org.specs2.control.eff.Interpret$.interpret(Interpret.scala:635) at org.specs2.control.eff.Interpret.interpret1(Interpret.scala:78) at org.specs2.control.eff.Interpret.interpret1$(Interpret.scala:77) at org.specs2.control.eff.Interpret$.interpret1(Interpret.scala:635) at org.specs2.control.eff.ErrorInterpretation.runError(ErrorEffect.scala:87) at org.specs2.control.eff.ErrorInterpretation.runError$(ErrorEffect.scala:68) at org.specs2.control.eff.ErrorEffect$.runError(ErrorEffect.scala:187) at org.specs2.control.eff.syntax.error$ErrorEffectOps.runError(error.scala:14) at org.specs2.control.ExecuteActions.attemptExecuteAction(ExecuteActions.scala:59) at org.specs2.control.ExecuteActions.attemptExecuteAction$(ExecuteActions.scala:56) at org.specs2.control.ExecuteActions$.attemptExecuteAction(ExecuteActions.scala:93) at org.specs2.control.ExecuteActions.runAction(ExecuteActions.scala:52) at org.specs2.control.ExecuteActions.runAction$(ExecuteActions.scala:51) at org.specs2.control.ExecuteActions$.runAction(ExecuteActions.scala:93) at org.specs2.runner.JUnitRunner.specification$lzycompute(JUnitRunner.scala:25) at org.specs2.runner.JUnitRunner.specification(JUnitRunner.scala:23) at org.specs2.runner.JUnitRunner.specStructure$lzycompute(JUnitRunner.scala:48) at org.specs2.runner.JUnitRunner.specStructure(JUnitRunner.scala:47) at org.specs2.runner.JUnitRunner.getDescription(JUnitRunner.scala:43) at org.specs2.runner.JUnitRunner.getDescription$lzycompute(JUnitRunner.scala:40) at org.specs2.runner.JUnitRunner.getDescription(JUnitRunner.scala:39) at org.junit.runners.model.RunnerBuilder.configureRunner(RunnerBuilder.java:81) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:72) at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:37) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70) at org.junit.internal.requests.ClassRequest.createRunner(ClassRequest.java:28) at org.junit.internal.requests.MemoizingRequest.getRunner(MemoizingRequest.java:19) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:250) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75) Caused by: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) at org.specs2.reflect.Classes.$anonfun$createInstanceForConstructor$2(Classes.scala:77) at org.specs2.reflect.Classes.newInstance(Classes.scala:100) ... 65 more Caused by: java.lang.NullPointerException at java.base/java.io.File.<init>(File.java:278) at com.unboundid.ldap.sdk.schema.Schema.getSchema(Schema.java:1105) at com.normation.ldap.listener.InMemoryDsConnectionProvider$.apply(InMemoryDsConnectionProvider.scala:81) at com.normation.rudder.repository.ldap.InitTestLDAPServer$.newLdapConnectionProvider(LoadDemoDataTest.scala:103) at bootstrap.liftweb.checks.migration.TestMigrateSystemTechniques7_0.<init>(TestMigrateSystemTechnique7_0.scala:192) ... 71 more
It looks like that depending about how mvn runs, it comes back to the sub project with a `mvn -pl rudder-web` kind of command.
In that case, the `rudder-core` test jar is used in place of the sources, and the in memory directory is unable to find schema (because paths don't exist within a jar).
Actions