Announcement Announcement Module
Collapse
No announcement yet.
jobRepository p:isolationlevelForCreate Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • jobRepository p:isolationlevelForCreate

    I'm setting up SQLFire for my respository, which is very close to the Derby configurations but the default SERIALIZABLE isn't supported in SQLFire. I'm in my simple-job-launcher-context file and am trying this:


    <bean id="jobRepository"
    class="org.springframework.batch.core.repository.s upport.JobRepositoryFactoryBean"
    p:isolationLevelForCreate = "READ_COMMITTED"
    p:dataSource-ref="dataSource" p:transactionManager-ref="transactionManager" p:lobHandler-ref="lobHandler"/>

    but getting the following error:

    Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'jobRepository' defined in class path resource [simple-job-launcher-context.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Invalid transaction attribute token: [READ_COMMITTED]
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1455)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:519)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 94)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:225)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:291 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:193)
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:322)
    ... 41 more
    Caused by: java.lang.IllegalArgumentException: Invalid transaction attribute token: [READ_COMMITTED]
    at org.springframework.transaction.interceptor.Transa ctionAttributeEditor.setAsText(TransactionAttribut eEditor.java:85)
    at org.springframework.transaction.interceptor.NameMa tchTransactionAttributeSource.setProperties(NameMa tchTransactionAttributeSource.java:79)
    at org.springframework.transaction.interceptor.Transa ctionAspectSupport.setTransactionAttributes(Transa ctionAspectSupport.java:171)
    at org.springframework.transaction.interceptor.Transa ctionInterceptor.<init>(TransactionInterceptor.jav a:75)
    at org.springframework.batch.core.repository.support. AbstractJobRepositoryFactoryBean.initializeProxy(A bstractJobRepositoryFactoryBean.java:156)
    at org.springframework.batch.core.repository.support. AbstractJobRepositoryFactoryBean.afterPropertiesSe t(AbstractJobRepositoryFactoryBean.java:186)
    at org.springframework.batch.core.repository.support. JobRepositoryFactoryBean.afterPropertiesSet(JobRep ositoryFactoryBean.java:157)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1514)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1452)
    ... 48 more

    Is this not the right property? And if not what should I be using as the property argument?

  • #2
    jobRepository properties

    It's not READ_COMMITTED. It's ISOLATION_READ_COMMITTED. Thanks to Sumedh Wales for the answer to that one.

    Originally posted by wxlund View Post
    I'm setting up SQLFire for my respository, which is very close to the Derby configurations but the default SERIALIZABLE isn't supported in SQLFire. I'm in my simple-job-launcher-context file and am trying this:


    <bean id="jobRepository"
    class="org.springframework.batch.core.repository.s upport.JobRepositoryFactoryBean"
    p:isolationLevelForCreate = "READ_COMMITTED"
    p:dataSource-ref="dataSource" p:transactionManager-ref="transactionManager" p:lobHandler-ref="lobHandler"/>

    but getting the following error:

    Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'jobRepository' defined in class path resource [simple-job-launcher-context.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Invalid transaction attribute token: [READ_COMMITTED]

    Comment

    Working...
    X