Uploaded image for project: 'JBeret'
  1. JBeret
  2. JBERET-279

java.io.NotSerializableException: org.jberet.support.io.Movie

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.3.0.Beta4
    • 1.3.0.Beta3
    • jberet-support
    • None

      When running tests org.jberet.support.io.MongoItemReaderTest, had the following error:

      Unable to find source-code formatter for language: text. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      WARN: JBERET000028: Failed to serialize exception: java.lang.RuntimeException: IOException encountered while reading from a byte array input stream
      java.io.NotSerializableException: org.jberet.support.io.Movie
      	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
      	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
      	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
      	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
      	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
      	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
      	at java.util.LinkedList.writeObject(LinkedList.java:1131)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1028)
      	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
      	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
      	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
      	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
      	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
      	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
      	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
      	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
      	at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:441)
      	at java.lang.Throwable.writeObject(Throwable.java:985)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1028)
      	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
      	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
      	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
      	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
      	at org.jberet.util.BatchUtil.objectToBytes(BatchUtil.java:90)
      	at org.jberet.runtime.SerializableData.of(SerializableData.java:67)
      	at org.jberet.runtime.AbstractStepExecution.setException(AbstractStepExecution.java:108)
      	at org.jberet.runtime.context.StepContextImpl.setException(StepContextImpl.java:180)
      	at org.jberet.runtime.runner.ChunkRunner.run(ChunkRunner.java:225)
      	at org.jberet.runtime.runner.StepExecutionRunner.runBatchletOrChunk(StepExecutionRunner.java:231)
      	at org.jberet.runtime.runner.StepExecutionRunner.run(StepExecutionRunner.java:150)
      	at org.jberet.runtime.runner.CompositeExecutionRunner.runStep(CompositeExecutionRunner.java:164)
      	at org.jberet.runtime.runner.CompositeExecutionRunner.runFromHeadOrRestartPoint(CompositeExecutionRunner.java:88)
      	at org.jberet.runtime.runner.JobExecutionRunner.run(JobExecutionRunner.java:60)
      	at org.jberet.spi.JobExecutor$1.run(JobExecutor.java:99)
      	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)
      
      Nov 09, 2016 3:52:26 PM org.jberet.runtime.runner.ChunkRunner run
      ERROR: item-count=10, time-limit=0, skip-limit=-1, skipCount=0, retry-limit=-1, retryCount=0
      Nov 09, 2016 3:52:26 PM org.jberet.runtime.runner.ChunkRunner run
      ERROR: JBERET000007: Failed to run job org.jberet.support.io.MongoItemReaderTest, org.jberet.support.io.MongoItemReaderTest.step1, org.jberet.job.model.Chunk@4c5c327
      java.lang.RuntimeException: IOException encountered while reading from a byte array input stream
      	at org.mongojack.internal.stream.JacksonDBDecoder.decode(JacksonDBDecoder.java:67)
      	at com.mongodb.DBDecoderAdapter.decode(DBDecoderAdapter.java:49)
      	at com.mongodb.DBDecoderAdapter.decode(DBDecoderAdapter.java:29)
      	at com.mongodb.connection.ReplyMessage.<init>(ReplyMessage.java:57)
      	at com.mongodb.connection.QueryProtocol.receiveMessage(QueryProtocol.java:290)
      	at com.mongodb.connection.QueryProtocol.execute(QueryProtocol.java:229)
      	at com.mongodb.connection.QueryProtocol.execute(QueryProtocol.java:38)
      	at com.mongodb.connection.DefaultServer$DefaultServerProtocolExecutor.execute(DefaultServer.java:155)
      	at com.mongodb.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:219)
      	at com.mongodb.connection.DefaultServerConnection.query(DefaultServerConnection.java:166)
      	at com.mongodb.operation.FindOperation$1.call(FindOperation.java:397)
      	at com.mongodb.operation.FindOperation$1.call(FindOperation.java:394)
      	at com.mongodb.operation.OperationHelper.withConnectionSource(OperationHelper.java:195)
      	at com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:168)
      	at com.mongodb.operation.FindOperation.execute(FindOperation.java:394)
      	at com.mongodb.operation.FindOperation.execute(FindOperation.java:57)
      	at com.mongodb.Mongo.execute(Mongo.java:738)
      	at com.mongodb.Mongo$2.execute(Mongo.java:725)
      	at com.mongodb.DBCursor.initializeCursor(DBCursor.java:815)
      	at com.mongodb.DBCursor.hasNext(DBCursor.java:149)
      	at org.mongojack.DBCursor.hasNext(DBCursor.java:352)
      	at org.jberet.support.io.MongoItemReader.readItem(MongoItemReader.java:132)
      	at org.jberet.runtime.runner.ChunkRunner.readItem(ChunkRunner.java:359)
      	at org.jberet.runtime.runner.ChunkRunner.readProcessWriteItems(ChunkRunner.java:305)
      	at org.jberet.runtime.runner.ChunkRunner.run(ChunkRunner.java:201)
      	at org.jberet.runtime.runner.StepExecutionRunner.runBatchletOrChunk(StepExecutionRunner.java:231)
      	at org.jberet.runtime.runner.StepExecutionRunner.run(StepExecutionRunner.java:150)
      	at org.jberet.runtime.runner.CompositeExecutionRunner.runStep(CompositeExecutionRunner.java:164)
      	at org.jberet.runtime.runner.CompositeExecutionRunner.runFromHeadOrRestartPoint(CompositeExecutionRunner.java:88)
      	at org.jberet.runtime.runner.JobExecutionRunner.run(JobExecutionRunner.java:60)
      	at org.jberet.spi.JobExecutor$1.run(JobExecutor.java:99)
      	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)
      Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.lang.Long out of VALUE_EMBEDDED_OBJECT token
       at [Source: de.undercouch.bson4jackson.io.LittleEndianInputStream@7208d0b9; pos: 5] (through reference chain: org.jberet.support.io.Movie["_id"])
      	at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148)
      	at com.fasterxml.jackson.databind.DeserializationContext.mappingException(DeserializationContext.java:835)
      	at com.fasterxml.jackson.databind.deser.std.StdDeserializer._parseLong(StdDeserializer.java:471)
      	at com.fasterxml.jackson.databind.deser.std.NumberDeserializers$LongDeserializer.deserialize(NumberDeserializers.java:321)
      	at com.fasterxml.jackson.databind.deser.std.NumberDeserializers$LongDeserializer.deserialize(NumberDeserializers.java:303)
      	at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:523)
      	at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:95)
      	at com.fasterxml.jackson.databind.deser.impl.BeanPropertyMap._findDeserializeAndSet2(BeanPropertyMap.java:313)
      	at com.fasterxml.jackson.databind.deser.impl.BeanPropertyMap.findDeserializeAndSet(BeanPropertyMap.java:291)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:248)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:136)
      	at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:3536)
      	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1938)
      	at org.mongojack.internal.stream.JacksonDBDecoder.decode(JacksonDBDecoder.java:77)
      	at org.mongojack.internal.stream.JacksonDBDecoder.decode(JacksonDBDecoder.java:64)
      	... 33 more
      
      The readCollection movies already contains 100 items, skip adding test data.
      The readCollection githubData already contains 100 items, skip adding test data.
      Nov 09, 2016 3:52:26 PM org.jberet.job.model.PropertyResolver resolve
      WARN: JBERET000008: Possible syntax errors in property: #{jobParameters['projection']
      Nov 09, 2016 3:52:26 PM org.hibernate.validator.internal.util.Version <clinit>
      INFO: HV000001: Hibernate Validator 5.1.2.Final
      The readCollection movies already contains 100 items, skip adding test data.
      Nov 09, 2016 3:52:26 PM org.jberet.job.model.PropertyResolver resolve
      WARN: JBERET000008: Possible syntax errors in property: #{jobParameters['projection']
      Nov 09, 2016 3:52:26 PM org.jberet.runtime.runner.ChunkRunner readProcessWriteItems
      ERROR: ProcessingInfo{count=0, timerExpired=false, itemState=RUNNING, chunkState=RUNNING, checkpointPosition=-1, readPosition=0, failurePoint=null}
      Nov 09, 2016 3:52:26 PM org.jberet.runtime.SerializableData of
      WARN: JBERET000028: Failed to serialize exception: java.lang.RuntimeException: IOException encountered while reading from a byte array input stream
      java.io.NotSerializableException: org.jberet.support.io.Movie
      	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
      	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
      	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
      	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
      	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
      	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
      	at java.util.LinkedList.writeObject(LinkedList.java:1131)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1028)
      	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
      	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
      	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
      	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
      	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
      	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
      	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
      	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
      	at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:441)
      	at java.lang.Throwable.writeObject(Throwable.java:985)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1028)
      	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
      	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
      	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
      	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
      	at org.jberet.util.BatchUtil.objectToBytes(BatchUtil.java:90)
      	at org.jberet.runtime.SerializableData.of(SerializableData.java:67)
      	at org.jberet.runtime.AbstractStepExecution.setException(AbstractStepExecution.java:108)
      	at org.jberet.runtime.context.StepContextImpl.setException(StepContextImpl.java:180)
      	at org.jberet.runtime.runner.ChunkRunner.run(ChunkRunner.java:225)
      	at org.jberet.runtime.runner.StepExecutionRunner.runBatchletOrChunk(StepExecutionRunner.java:231)
      	at org.jberet.runtime.runner.StepExecutionRunner.run(StepExecutionRunner.java:150)
      	at org.jberet.runtime.runner.CompositeExecutionRunner.runStep(CompositeExecutionRunner.java:164)
      	at org.jberet.runtime.runner.CompositeExecutionRunner.runFromHeadOrRestartPoint(CompositeExecutionRunner.java:88)
      	at org.jberet.runtime.runner.JobExecutionRunner.run(JobExecutionRunner.java:60)
      	at org.jberet.spi.JobExecutor$1.run(JobExecutor.java:99)
      	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)
      
      Nov 09, 2016 3:52:26 PM org.jberet.runtime.runner.ChunkRunner run
      ERROR: item-count=10, time-limit=0, skip-limit=-1, skipCount=0, retry-limit=-1, retryCount=0
      Nov 09, 2016 3:52:26 PM org.jberet.runtime.runner.ChunkRunner run
      ERROR: JBERET000007: Failed to run job org.jberet.support.io.MongoItemReaderTest, org.jberet.support.io.MongoItemReaderTest.step1, org.jberet.job.model.Chunk@21c1182f
      java.lang.RuntimeException: IOException encountered while reading from a byte array input stream
      	at org.mongojack.internal.stream.JacksonDBDecoder.decode(JacksonDBDecoder.java:67)
      	at com.mongodb.DBDecoderAdapter.decode(DBDecoderAdapter.java:49)
      	at com.mongodb.DBDecoderAdapter.decode(DBDecoderAdapter.java:29)
      	at com.mongodb.connection.ReplyMessage.<init>(ReplyMessage.java:57)
      	at com.mongodb.connection.QueryProtocol.receiveMessage(QueryProtocol.java:290)
      	at com.mongodb.connection.QueryProtocol.execute(QueryProtocol.java:229)
      	at com.mongodb.connection.QueryProtocol.execute(QueryProtocol.java:38)
      	at com.mongodb.connection.DefaultServer$DefaultServerProtocolExecutor.execute(DefaultServer.java:155)
      	at com.mongodb.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:219)
      	at com.mongodb.connection.DefaultServerConnection.query(DefaultServerConnection.java:166)
      	at com.mongodb.operation.FindOperation$1.call(FindOperation.java:397)
      	at com.mongodb.operation.FindOperation$1.call(FindOperation.java:394)
      	at com.mongodb.operation.OperationHelper.withConnectionSource(OperationHelper.java:195)
      	at com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:168)
      	at com.mongodb.operation.FindOperation.execute(FindOperation.java:394)
      	at com.mongodb.operation.FindOperation.execute(FindOperation.java:57)
      	at com.mongodb.Mongo.execute(Mongo.java:738)
      	at com.mongodb.Mongo$2.execute(Mongo.java:725)
      	at com.mongodb.DBCursor.initializeCursor(DBCursor.java:815)
      	at com.mongodb.DBCursor.hasNext(DBCursor.java:149)
      	at org.mongojack.DBCursor.hasNext(DBCursor.java:352)
      	at org.jberet.support.io.MongoItemReader.readItem(MongoItemReader.java:132)
      	at org.jberet.runtime.runner.ChunkRunner.readItem(ChunkRunner.java:359)
      	at org.jberet.runtime.runner.ChunkRunner.readProcessWriteItems(ChunkRunner.java:305)
      	at org.jberet.runtime.runner.ChunkRunner.run(ChunkRunner.java:201)
      	at org.jberet.runtime.runner.StepExecutionRunner.runBatchletOrChunk(StepExecutionRunner.java:231)
      	at org.jberet.runtime.runner.StepExecutionRunner.run(StepExecutionRunner.java:150)
      	at org.jberet.runtime.runner.CompositeExecutionRunner.runStep(CompositeExecutionRunner.java:164)
      	at org.jberet.runtime.runner.CompositeExecutionRunner.runFromHeadOrRestartPoint(CompositeExecutionRunner.java:88)
      	at org.jberet.runtime.runner.JobExecutionRunner.run(JobExecutionRunner.java:60)
      	at org.jberet.spi.JobExecutor$1.run(JobExecutor.java:99)
      	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)
      Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.lang.Long out of VALUE_EMBEDDED_OBJECT token
       at [Source: de.undercouch.bson4jackson.io.LittleEndianInputStream@1af4232d; pos: 5] (through reference chain: org.jberet.support.io.Movie["_id"])
      	at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148)
      	at com.fasterxml.jackson.databind.DeserializationContext.mappingException(DeserializationContext.java:835)
      	at com.fasterxml.jackson.databind.deser.std.StdDeserializer._parseLong(StdDeserializer.java:471)
      	at com.fasterxml.jackson.databind.deser.std.NumberDeserializers$LongDeserializer.deserialize(NumberDeserializers.java:321)
      	at com.fasterxml.jackson.databind.deser.std.NumberDeserializers$LongDeserializer.deserialize(NumberDeserializers.java:303)
      	at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:523)
      	at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:95)
      	at com.fasterxml.jackson.databind.deser.impl.BeanPropertyMap._findDeserializeAndSet2(BeanPropertyMap.java:313)
      	at com.fasterxml.jackson.databind.deser.impl.BeanPropertyMap.findDeserializeAndSet(BeanPropertyMap.java:291)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:248)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:136)
      	at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:3536)
      	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1938)
      	at org.mongojack.internal.stream.JacksonDBDecoder.decode(JacksonDBDecoder.java:77)
      	at org.mongojack.internal.stream.JacksonDBDecoder.decode(JacksonDBDecoder.java:64)
      	... 33 more
      

              cfang@redhat.com Cheng Fang
              cfang@redhat.com Cheng Fang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: