org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of java.lang.String[] out of START_OBJECT token at [Source: java.io.StringReader@2cdea607; line: 1, column: 1]


Samebug tips1

Types used for deserialization should be used in the way such that the annotation @JsonTypeInfo is visible.


2 months ago
Expert tip

Solutions on the web146

Solution icon of github
Can not deserialize instance of java.lang.String[] out of START_OBJECT token at [Source: java.io.StringReader@2cdea607; line: 1, column: 1]

Solution icon of stackoverflow
Can not deserialize instance of java.lang.String[] out of START_OBJECT token at [Source: java.io.StringReader@4bdc0bc7; line: 1, column: 437]

Solution icon of web
Can not deserialize instance of java.lang.String[] out of START_OBJECT token at [Source: java.io.StringReader@4bdc0bc7; line: 1, column: 437]

Solution icon of github
via GitHub by dtamajon
, 1 year ago
Can not deserialize instance of java.util.ArrayList out of START_OBJECT token at [Source: java.io.StringReader@532c780f; line: 1, column: 1]

Solution icon of stackoverflow
Can not deserialize instance of java.util.List out of START_OBJECT token at [Source: java.io.StringReader@d324076; line: 1, column: 1]

Solution icon of stackoverflow
Can not deserialize instance of byte out of START_OBJECT token at [Source: java.io.StringReader@33b39883; line: 1, column: 1]

Solution icon of stackoverflow
via Stack Overflow by Ravi
, 1 year ago
Can not deserialize instance of java.util.List out of START_OBJECT token at [Source: java.io.StringReader@7a84e4; line: 1, column: 1]**

Solution icon of stackoverflow
Can not deserialize instance of java.util.ArrayList out of START_OBJECT token at [Source: java.io.StringReader@314ed053; line: 2, column: 1]

Solution icon of stackoverflow
Can not deserialize instance of java.lang.String out of START_OBJECT token at [Source: N/A; line: -1, column: -1]


Stack trace

org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of java.lang.String[] out of START_OBJECT token
 at [Source: java.io.StringReader@2cdea607; line: 1, column: 1]
	at org.codehaus.jackson.map.JsonMappingException.from(JsonMappingException.java:163)
	at org.codehaus.jackson.map.deser.StdDeserializationContext.mappingException(StdDeserializationContext.java:219)
	at org.codehaus.jackson.map.deser.StdDeserializationContext.mappingException(StdDeserializationContext.java:212)
	at org.codehaus.jackson.map.deser.std.PrimitiveArrayDeserializers$StringDeser.handleNonArray(PrimitiveArrayDeserializers.java:153)
	at org.codehaus.jackson.map.deser.std.PrimitiveArrayDeserializers$StringDeser.deserialize(PrimitiveArrayDeserializers.java:119)
	at org.codehaus.jackson.map.deser.std.PrimitiveArrayDeserializers$StringDeser.deserialize(PrimitiveArrayDeserializers.java:107)
	at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2732)
	at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1877)
	at au.org.ala.biocache.util.Json$.toArray(Json.scala:91)
	at au.org.ala.biocache.poso.POSO$class.setProperty(POSO.scala:62)
	at au.org.ala.biocache.model.Occurrence.setProperty(Occurrence.scala:11)
	at au.org.ala.biocache.poso.CompositePOSO$class.setNestedProperty(CompositePOSO.scala:123)
	at au.org.ala.biocache.model.FullRecord.setNestedProperty(FullRecord.scala:15)
	at au.org.ala.biocache.poso.CompositePOSO$class.setProperty(CompositePOSO.scala:97)
	at au.org.ala.biocache.model.FullRecord.setProperty(FullRecord.scala:15)
	at au.org.ala.biocache.load.FullRecordMapper$$anonfun$createFullRecord$4.apply(FullRecordMapper.scala:189)
	at au.org.ala.biocache.load.FullRecordMapper$$anonfun$createFullRecord$4.apply(FullRecordMapper.scala:145)
	at scala.collection.Iterator$class.foreach(Iterator.scala:727)
	at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
	at scala.collection.MapLike$DefaultKeySet.foreach(MapLike.scala:174)
	at au.org.ala.biocache.load.FullRecordMapper$.createFullRecord(FullRecordMapper.scala:145)
	at au.org.ala.biocache.dao.OccurrenceDAOImpl$$anonfun$pageOverRawProcessed$1.apply(OccurrenceDAOImpl.scala:420)
	at au.org.ala.biocache.dao.OccurrenceDAOImpl$$anonfun$pageOverRawProcessed$1.apply(OccurrenceDAOImpl.scala:417)
	at au.org.ala.biocache.persistence.CassandraPersistenceManager$$anonfun$pageOver$1.apply(CassandraPersistenceManager.scala:344)
	at au.org.ala.biocache.persistence.CassandraPersistenceManager$$anonfun$pageOver$1.apply(CassandraPersistenceManager.scala:336)
	at scala.collection.immutable.List.foreach(List.scala:318)
	at au.org.ala.biocache.persistence.CassandraPersistenceManager.pageOver(CassandraPersistenceManager.scala:336)
	at au.org.ala.biocache.persistence.CassandraPersistenceManager.pageOverAll(CassandraPersistenceManager.scala:482)
	at au.org.ala.biocache.dao.OccurrenceDAOImpl.pageOverRawProcessed(OccurrenceDAOImpl.scala:417)
	at au.org.ala.biocache.index.ProcessRecordsRunner.run(IndexRecordMultiThreaded.scala:392)
	at java.lang.Thread.run(Thread.java:745)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

22 times, 3 weeks ago
10 times, 4 months ago
177 times, 4 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
24 more bugmates