Announcement Announcement Module
Collapse
No announcement yet.
Problem running spring batch football example with DB2 database Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem running spring batch football example with DB2 database

    Hi,

    we are experimenting spring batch to use in our project and trying to run football example with DB2 database.

    we have created a new batch-db2.properties file as this file does not seem to exist and configured as follows:

    # Placeholders batch.*
    # for DB2:
    batch.jdbc.driver=com.ibm.db2.cc.DB2Driver
    batch.jdbc.url=jdbc:db2://XX.X..X.XXX:50000/DATABASE
    batch.jdbc.user=USERNAME
    batch.jdbc.password=SSSSSS
    batch.schema=
    batch.jndi.name=
    batch.naming.factory.initial=
    batch.naming.provider.url=
    batch.schema.script=schema-db2.sql
    batch.business.schema.script=business-schema-db2.sql
    batch.database.incrementer.class=org.springframewo rk.jdbc.support.incrementer.DB2SequenceMaxValueInc rementer
    batch.lob.handler.class=org.springframework.jdbc.s upport.lob.DefaultLobHandler

    # Bean Properties for override
    # when not using sequences:
    incrementerParent.columnName=ID

    I have also added db2 jar files to the eclipse classpath.

    I have changed the default database in data-source-context.xml to db2.

    when i try to run Footballexample unit test case, I am getting the following error: Caused by: java.lang.ClassNotFoundException: com.ibm.db2.cc.DB2Driver

    Could someone let me know where else I have to configure DB2 jar files? Is there anything else i need to do to run this example to work with DB2 database?

  • #2
    ClassNotFoundException tends to suggest that the driver is in fact not on the classpath. Double check that and/or give us some more information about how you launch the job.

    Comment


    • #3
      Thanks for the reply. Its just me not setting classpath correctly.

      Comment

      Working...
      X