Showing posts with label Spring Batch. Show all posts
Showing posts with label Spring Batch. Show all posts

Sunday, May 30, 2010

當使用SpringSource Tool Suite 2.3.3M1練習Spring Batch 2.1的Sample時(特別是來自於Spring Template Project)
必須注意以下事項:
  1. Spring Batch 2.1的POM內似乎有對於Spring 2.5.6的依賴,因為spring-aop, spring-context會錯誤地參考了2.5.6的版本,會產生以下例外狀況
    java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.InjectionMetadata.(Ljava/lang/Class;)V
    ...
    解決方案是設別再POM中強制加入spring-aop 3.0, spring-context 3.0版的相依。
  2. 在執行JUint TestCase時,由於DataSourceInitializer預設由Classpath Root開始尋找schema-hsqldb.sql,應該會找不到,因此要另外由JAR檔中取出,複製一份到Classpath Root下,JUnit才會正常通過。或將/SampleBatch/src/main/resources/batch.properties下的batch.schema.script設定為org/springframework/batch/core/schema-hsqldb.sql