Announcement Announcement Module
Collapse
No announcement yet.
JobRepositoryFactoryBean problems Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JobRepositoryFactoryBean problems

    To all the helpful people on this forum,

    I've been building a proof-of-concept and up until now I have been using the MapJobRepositoryFactoryBean with success. But now it's time to use an RDBMS, so I created a new Job Repository with the JobRepositoryFactoryBean using an Oracle datasource. Here is what the bean definitions look like:

    Code:
    <bean id="dbJobRepository"
    class="org.springframework.batch.core.repository.support.JobRepositoryFactoryBean">
            <property name="databaseType" value="oracle"/>
            <property name="dataSource" ref="oraDataSource"/>
            <property name="incrementerFactory" ref="incrementerFactory"/>
            <property name="transactionManager" ref="oraTransactionManager"/>
    </bean>
    
    <bean id="incrementerFactory" class="org.springframework.batch.item.database.support.DefaultDataFieldMaxValueIncrementerFactory">
            <constructor-arg ref="oraDataSource"/>
    </bean>
    	
    <bean id="oraTransactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    		<property name="dataSource" ref="oraDataSource"/>
    </bean>
    At first, I got a ClassNotFoundException on a class that lives in xstream.jar. Couldn't figure out why that was needed, but what the heck, it's just a jar, so I added it - let's get this thing working.

    Now I get:

    Code:
    java.lang.ClassNotFoundException: 
      org.codehaus.jettison.mapped.Configuration
    What is the need for these (XML parsing/mapping/marshalling) classes?

    Brian Gardner
    Java Architect, Verizon Wireless

  • #2
    No action necessary

    I went ahead and added the jettison.jar from codehaus, and my repository works fine. I still don't know why these jars (xstream and jettison) are needed, and it would be nice if the reference documentation explained their inclusion. For now, things work, so it's not a big deal.

    Brian

    Comment


    • #3
      You need 2 jar files.

      See the org.springframework.batch-2.0.0.RELEASE\sources\lib folder.

      Then you can find jar files of

      com.springsource.com.thoughtworks.xstream-1.3.0.jar
      and
      com.springsource.org.codehaus.jettison-1.0.0.jar.

      Comment


      • #4
        Did you guys come to know why we need these two jars for DB Job repository.

        Comment


        • #5
          No, I never found out. Somebody at Springsource was going to check in to it (we have a support contract with them) but it wasn't high priority, and the request for more information went the way of all non-urgent things.

          Brian

          Comment

          Working...
          X