org.apache.commons.lang.SerializationException: java.lang.ClassNotFoundException
Working on the spring batch examples, and got the following error. To summarize, the classloader that the serializationtutils is using is not able to find this class. I got around this error by creating my own copy of "SerializationUtils.java" in a new package and using this. Since my SerializationUtils is in my webapp, there are no classloader issues.
2009-12-29 09:05:04,489 [main] ERROR step.AbstractStep - Encountered an error executing the step
org.apache.commons.lang.SerializationException: java.lang.ClassNotFoundException
: org.springframework.batch.sample.domain.trade.Trade
at org.apache.commons.lang.SerializationUtils.deserialize(SerializationUtils.java:165)
at org.apache.commons.lang.SerializationUtils.deserialize(SerializationUtils.java:192)
at org.springframework.batch.sample.common.StagingItemReader$2.mapRow(StagingItemReader.java:118)
at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:92)
at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:1)
at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:648)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:586)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:636)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:665)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:673)
at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:716)
at org.springframework.jdbc.core.simple.SimpleJdbcTemplate.queryForObject(SimpleJdbcTemplate.java:169)
at org.springframework.jdbc.core.simple.SimpleJdbcTemplate.queryForObject(SimpleJdbcTemplate.java:174)
Opened a jira for it: http://jira.springframework.org/browse/BATCH-1469
- Categories:

Comments
Post new comment