HEADS-project / training

Training material to get started with the HEADS technologies
10 stars 16 forks source link

Null pointer when deploying HelloWorld samples #18

Closed brice-morin closed 9 years ago

brice-morin commented 9 years ago

Even though this does not seem to be blocking (the rest of the deployment is done properly), this does not look very serious :-)

00:03 ERROR: No field corresponding to annotation, consistency error greetMessage on org.kevoree.example.HelloWorld
java.lang.NullPointerException
        at org.kevoree.bootstrap.kernel.KevoreeCLKernel.internalInjectField(KevoreeCLKernel.java:322)
        at org.kevoree.bootstrap.kernel.KevoreeCLKernel.injectDictionaryValue(KevoreeCLKernel.java:234)
        at org.kevoree.library.java.command.UpdateDictionary.execute(UpdateDictionary.java:70)
        at org.kevoree.core.impl.deploy.KevoreeSeqDeployPhase.runPhase(KevoreeSeqDeployPhase.kt:43)
        at org.kevoree.core.impl.deploy.PrimitiveCommandExecutionHelper.executeStep(PrimitiveCommandExecutionHelper.kt:7
9)
        at org.kevoree.core.impl.deploy.PrimitiveCommandExecutionHelper.executeStep(PrimitiveCommandExecutionHelper.kt:9
1)
        at org.kevoree.core.impl.deploy.PrimitiveCommandExecutionHelper.executeStep(PrimitiveCommandExecutionHelper.kt:9
1)
        at org.kevoree.core.impl.deploy.PrimitiveCommandExecutionHelper.executeStep(PrimitiveCommandExecutionHelper.kt:9
1)
        at org.kevoree.core.impl.deploy.PrimitiveCommandExecutionHelper.executeStep(PrimitiveCommandExecutionHelper.kt:9
1)
        at org.kevoree.core.impl.deploy.PrimitiveCommandExecutionHelper.executeStep(PrimitiveCommandExecutionHelper.kt:9
1)
        at org.kevoree.core.impl.deploy.PrimitiveCommandExecutionHelper.executeStep(PrimitiveCommandExecutionHelper.kt:9
1)
        at org.kevoree.core.impl.deploy.PrimitiveCommandExecutionHelper.executeStep(PrimitiveCommandExecutionHelper.kt:9
1)
        at org.kevoree.core.impl.deploy.PrimitiveCommandExecutionHelper.executeStep(PrimitiveCommandExecutionHelper.kt:9
1)
        at org.kevoree.core.impl.deploy.PrimitiveCommandExecutionHelper.execute(PrimitiveCommandExecutionHelper.kt:44)
        at org.kevoree.core.impl.KevoreeCoreBean.internal_update_model(KevoreeCoreBean.java:406)
        at org.kevoree.core.impl.KevoreeCoreBean$UpdateModelRunnable.run(KevoreeCoreBean.java:166)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
maxleiko commented 9 years ago

Can you describe the process to get this ?

brice-morin commented 9 years ago

mvn clean install kev:run on exercise 1 produced (I just re-did it):

00:16 INFO: Resolved in 2075ms
00:16 WARN: A required Port is defined at the model level but is not available at the implementation level
00:16 ERROR: No field corresponding to annotation, consistency error greetMessage on org.kevoree.example.HelloWorld
java.lang.NullPointerException
        at org.kevoree.bootstrap.kernel.KevoreeCLKernel.internalInjectField(KevoreeCLKernel.java:322)
        at org.kevoree.bootstrap.kernel.KevoreeCLKernel.injectDictionary(KevoreeCLKernel.java:218)
        at org.kevoree.library.java.command.AddInstance.run(AddInstance.java:102)
        at java.lang.Thread.run(Thread.java:745)
00:16 INFO: Add instance /nodes[node0]/components[myComp]
00:16 INFO: Starting /nodes[node0]/components[myComp]
00:16 INFO: Hello, world!
00:16 INFO: JavaNode Update completed in 2095 ms
00:16 INFO: End deploy result=true-2095
00:16 INFO: Bootstrap completed

The same command on exercice 2 produced:

00:15 INFO: Resolved in 1920ms
00:15 WARN: A required Port is defined at the model level but is not available at the implementation level
00:15 INFO: Add instance /nodes[node0]/components[myComp]
00:15 ERROR: No field corresponding to annotation, consistency error greetMessage on org.kevoree.example.HelloWorld
java.lang.NullPointerException
        at org.kevoree.bootstrap.kernel.KevoreeCLKernel.internalInjectField(KevoreeCLKernel.java:322)
        at org.kevoree.bootstrap.kernel.KevoreeCLKernel.injectDictionaryValue(KevoreeCLKernel.java:234)
        at org.kevoree.library.java.command.UpdateDictionary.execute(UpdateDictionary.java:70)
        at org.kevoree.core.impl.deploy.KevoreeSeqDeployPhase.runPhase(KevoreeSeqDeployPhase.kt:43)
        at org.kevoree.core.impl.deploy.PrimitiveCommandExecutionHelper.executeStep(PrimitiveCommandExecutionHelper.kt:7
9)
        at org.kevoree.core.impl.deploy.PrimitiveCommandExecutionHelper.executeStep(PrimitiveCommandExecutionHelper.kt:9
1)
        at org.kevoree.core.impl.deploy.PrimitiveCommandExecutionHelper.executeStep(PrimitiveCommandExecutionHelper.kt:9
1)
        at org.kevoree.core.impl.deploy.PrimitiveCommandExecutionHelper.executeStep(PrimitiveCommandExecutionHelper.kt:9
1)
        at org.kevoree.core.impl.deploy.PrimitiveCommandExecutionHelper.executeStep(PrimitiveCommandExecutionHelper.kt:9
1)
        at org.kevoree.core.impl.deploy.PrimitiveCommandExecutionHelper.executeStep(PrimitiveCommandExecutionHelper.kt:9
1)
        at org.kevoree.core.impl.deploy.PrimitiveCommandExecutionHelper.executeStep(PrimitiveCommandExecutionHelper.kt:9
1)
        at org.kevoree.core.impl.deploy.PrimitiveCommandExecutionHelper.executeStep(PrimitiveCommandExecutionHelper.kt:9
1)
        at org.kevoree.core.impl.deploy.PrimitiveCommandExecutionHelper.executeStep(PrimitiveCommandExecutionHelper.kt:9
1)
        at org.kevoree.core.impl.deploy.PrimitiveCommandExecutionHelper.execute(PrimitiveCommandExecutionHelper.kt:44)
        at org.kevoree.core.impl.KevoreeCoreBean.internal_update_model(KevoreeCoreBean.java:406)
        at org.kevoree.core.impl.KevoreeCoreBean$UpdateModelRunnable.run(KevoreeCoreBean.java:166)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
00:15 INFO: Starting /nodes[node0]/components[myComp]
00:15 INFO: Hello, world!
00:15 INFO: JavaNode Update completed in 1946 ms
00:15 INFO: End deploy result=true-1945
00:15 INFO: Bootstrap completed
kgiannakakisATC commented 9 years ago

I am also getting the same error for exercise 1

maxleiko commented 9 years ago

That's because you've gone through all the tutorials. So you've applied some modifications to your HelloWorld TypeDefinition. Resulting in a local model that has a defined greetMessage port, but the model of the HelloWorld TypeDefinition in ex1 does not have any ports.

maxleiko commented 9 years ago

If you clean your local Maven repository and then mvn clean install kev:run on exercise 1, it should not display the error.

brice-morin commented 9 years ago

OK, then the error message makes sense... but the NPE can be discussed....