Hello,
Thanks for your help.
The suggested spaces after the ':' character doesn't change anything.
I refactored now the SnakeYAML-part out of my project (see
https://gist.github.com/1632528 ), and get this exception:
java.lang.reflect.InvocationTargetException
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:616)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:
297)
at java.lang.Thread.run(Thread.java:679)
Caused by: Can't construct a java object for tag:
yaml.org,
2002:test.yaml.Project; exception=java.lang.NoSuchMethodException:
test.yaml.Project.<init>()
in "<string>", line 1, column 1:
name : abc
^
at org.yaml.snakeyaml.constructor.Constructor
$ConstructYamlObject.construct(Constructor.java:333)
at
org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:
183)
at
org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument(BaseConstructor.java:
142)
at
org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:
128)
at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:480)
at org.yaml.snakeyaml.Yaml.load(Yaml.java:399)
at
test.yaml.App$.main(App.scala:13)
at test.yaml.App.main(App.scala)
... 6 more
Caused by: org.yaml.snakeyaml.error.YAMLException:
java.lang.NoSuchMethodException: test.yaml.Project.<init>()
at org.yaml.snakeyaml.constructor.Constructor
$ConstructMapping.createEmptyJavaBean(Constructor.java:220)
at org.yaml.snakeyaml.constructor.Constructor
$ConstructMapping.construct(Constructor.java:190)
at org.yaml.snakeyaml.constructor.Constructor
$ConstructYamlObject.construct(Constructor.java:331)
... 13 more
Caused by: java.lang.NoSuchMethodException: test.yaml.Project.<init>()
at java.lang.Class.getConstructor0(Class.java:2723)
at java.lang.Class.getDeclaredConstructor(Class.java:2002)
at org.yaml.snakeyaml.constructor.Constructor
$ConstructMapping.createEmptyJavaBean(Constructor.java:216)
... 15 more