Tengo este codigo:
Código:
Y obtengo este error:InputStream is = this.getClass().getClassLoader().getResourceAsStream(filename); String jsonTxt = IOUtils.toString(is); JSONArray json = (JSONArray) JSONSerializer.toJSON(jsonTxt); JSONObject metadatacontent = json.getJSONObject(0); ObjectMapper mapper = new ObjectMapper(); mapper.readValue(metadatacontent.toString(), MetadataContentBean.class);
org.codehaus.jackson.map.JsonMappingException: Can not construct instance of com.playence.bean.SourceFileBean, problem: no suitable creator method found
at [Source: java.io.StringReader@171bbc9; line: 1, column: 2]
at org.codehaus.jackson.map.JsonMappingException.from (JsonMappingException.java:159)
at org.codehaus.jackson.map.deser.StdDeserializationC ontext.instantiationException(StdDeserializationCo ntext.java:212)
at org.codehaus.jackson.map.deser.BeanDeserializer.de serializeFromString(BeanDeserializer.java:415)
at org.codehaus.jackson.map.deser.BeanDeserializer.de serialize(BeanDeserializer.java:291)
at org.codehaus.jackson.map.deser.SettableBeanPropert y.deserialize(SettableBeanProperty.java:135)
at org.codehaus.jackson.map.deser.SettableBeanPropert y$MethodProperty.deserializeAndSet(SettableBeanPro perty.java:221)
at org.codehaus.jackson.map.deser.BeanDeserializer.de serializeFromObject(BeanDeserializer.java:390)
at org.codehaus.jackson.map.deser.BeanDeserializer.de serialize(BeanDeserializer.java:286)
at org.codehaus.jackson.map.ObjectMapper._readMapAndC lose(ObjectMapper.java:1588)
at org.codehaus.jackson.map.ObjectMapper.readValue(Ob jectMapper.java:1116)
at com.playence.parser.JSon.Parser(JSon.java:64)
at com.playence.parser.JSon.main(JSon.java:28)
Alguna idea de por q??
He buscado pero no encuentro ni siquiera el significado del error...
Un saludo y gracias de antemano!