HEADS-project / heads_ide

http://heads-project.eu
9 stars 2 forks source link

Cannot kev:run HelloWorld Java from the HEADS IDE #35

Closed brice-morin closed 9 years ago

brice-morin commented 9 years ago

mvn clean install works well. When I try mvn kev:run from the HEADS IDE (or from the CLI outside Eclipse), it fails to deploy the hello world:

It seems there is a ClassNotFoundException, probably linked to an inconsistency in the typeDefinition of the kevs model. But it is not clear to me what is the problem...

[INFO] Scanning for projects...
[INFO] 
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Kevoree :: helloworld 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- org.kevoree.tools.mavenplugin:5.1.4:run (default-cli) @ helloworld ---
00:00 INFO: Bootstrap Kevoree node : node0, version 5.1.4
00:01 INFO: Resolved 19 typeDefinitions from Kevoree Registry http://registry.kevoree.org/v5/ (JavaNode/5.1.1,JavaNode/5.0.3,JavaNode/5.1.2,JavaNode/5.1.3,JavaNode/5.0.4,JavaNode/5.0.5,JavaNode/5.0.6,JavaNode/5.0.6-SNAPSHOT,JavaNode/5.0.7,JavaNode/5.1.2-SNAPSHOT,JavaNode/5.1.4-SNAPSHOT,JavaNode/5.0.5-SNAPSHOT,JavaNode/5.0.8-SNAPSHOT,JavaNode/5.0.4-SNAPSHOT,JavaNode/5.1.1-SNAPSHOT,JavaNode/5.0.3-SNAPSHOT,JavaNode/5.1.0,JavaNode/5.0.7-SNAPSHOT,HelloWorld/0.0.1-SNAPSHOT)
00:01 WARN: Try to select snapshot in best effort mode for org.kevoree.example.HelloWorld
00:18 INFO: Resolving ............. /packages[org]/packages[kevoree]/packages[library]/packages[java]/deployUnits[hashcode=,name=org.kevoree.library.java.javaNode,version=5.1.3]
00:18 INFO: Resolved in 0ms
00:18 INFO: JavaNode, changing LOG level to INFO
00:18 INFO: Starting node type of node0
00:18 ERROR: Error while creating instance HelloWorld
java.lang.ClassNotFoundException: org.kevoree.example.HelloWorld
    at org.kevoree.kcl.impl.FlexyClassLoaderImpl.loadClass(FlexyClassLoaderImpl.java:111)
    at org.kevoree.kcl.impl.FlexyClassLoaderImpl.loadClass(FlexyClassLoaderImpl.java:22)
    at org.kevoree.bootstrap.kernel.KevoreeCLKernel.createInstance(KevoreeCLKernel.java:172)
    at org.kevoree.library.java.command.AddInstance.run(AddInstance.java:98)
    at java.lang.Thread.run(Thread.java:745)
00:18 ERROR: Inconsistency in typeDefinition 
{"class":"org.kevoree.ComponentType@name=HelloWorld,version=0.0.1-SNAPSHOT","name":"HelloWorld","abstract":"false","version":"0.0.1-SNAPSHOT","deployUnits":["/packages[org]/packages[kevoree]/packages[sample]/deployUnits[hashcode=,name=helloworld,version=0.0.1-SNAPSHOT]"],"superTypes":[],"dictionaryType":[
{"class":"org.kevoree.DictionaryType@20004215231418391615188","generated_KMF_ID":"20004215231418391615188","attributes":[
{"class":"org.kevoree.DictionaryAttribute@greetMessage","datatype":"STRING","defaultValue":"Hello, world!","name":"greetMessage","fragmentDependant":"false","optional":"true","state":"false","genericTypes":[]}
]}
],"metaData":[
{"class":"org.kevoree.Value@java.class","name":"java.class","value":"org.kevoree.example.HelloWorld"}
],"required":[
{"class":"org.kevoree.PortTypeRef@hello","noDependency":"false","name":"hello","optional":"true","ref":[],"mappings":[]}
],"provided":[]}

00:18 ERROR: Error while adding instance myComp
java.lang.NullPointerException
    at org.kevoree.library.java.wrapper.KInstanceWrapper.setTargetObj(KInstanceWrapper.java:69)
    at org.kevoree.library.java.wrapper.WrapperFactory.wrap(WrapperFactory.java:40)
    at org.kevoree.library.java.command.AddInstance.run(AddInstance.java:99)
    at java.lang.Thread.run(Thread.java:745)
00:18 WARN: Error during execution of AddInstance myComp
00:18 WARN: JavaSENode is aborting last update...
00:18 INFO: Remove instance /nodes[node0]/components[myComp]
00:18 WARN: JavaSENode update aborted in 14 ms
00:18 INFO: End deploy result=false-12
00:18 INFO: Bootstrap completed
maxleiko commented 9 years ago

Have you cleansed your .m2/repository/org/kevoree before running mvn clean install kev:run (just to be sure)

barais commented 9 years ago

juste update the plugin.

Can you share me the example to verify that it works now

maxleiko commented 9 years ago

https://github.com/HEADS-project/training/tree/master/2.Kevoree_Basics/1.HelloWorld/java

barais commented 9 years ago

Ok works perfectly on the new heads ide