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

Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.