Spring Batch Admin
  1. Spring Batch Admin
  2. BATCHADM-151

Error instantiating Bean 'jobService' with Spring Batch 2.2.0 M1

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 1.3.0
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Sprint 1

      Description

      Spring Batch Admin breaks when upgrading to Spring Batch 2.2.0 M1. The 'jobService' bean can no longer be instantiated because the SimpleJdbcOperations variable in SimpleJobServiceFactoryBean is no longer supported.

      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jobService': FactoryBean threw exception on object creation; nested exception is java.lang.NoSuchMethodError: org.springframework.batch.admin.service.JdbcSearchableJobInstanceDao.setJdbcTemplate(Lorg/springframework/jdbc/core/simple/SimpleJdbcOperations;)V
      	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149)
      	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1442)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:248)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
      	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
      	... 86 more
      Caused by: java.lang.NoSuchMethodError: org.springframework.batch.admin.service.JdbcSearchableJobInstanceDao.setJdbcTemplate(Lorg/springframework/jdbc/core/simple/SimpleJdbcOperations;)V
      	at org.springframework.batch.admin.service.SimpleJobServiceFactoryBean.createJobInstanceDao(SimpleJobServiceFactoryBean.java:195)
      	at org.springframework.batch.admin.service.SimpleJobServiceFactoryBean.getObject(SimpleJobServiceFactoryBean.java:255)
      	at org.springframework.batch.admin.service.SimpleJobServiceFactoryBean.getObject(SimpleJobServiceFactoryBean.java:54)
      	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
      	... 91 more
      

        Activity

        Hide
        John Schleifer added a comment -

        The Spring Batch Admin code needs to be updated to remove all references to SimpleJdbcOperations and replace them with JdbcOperations as SimpleJdbcOperations is deprecated.

        http://static.springsource.org/spring/docs/3.1.2.RELEASE/javadoc-api/org/springframework/jdbc/core/simple/SimpleJdbcOperations.html

        Deprecated. since Spring 3.1 in favor of JdbcOperations and NamedParameterJdbcOperations. The JdbcTemplate and NamedParameterJdbcTemplate now provide all the functionality of the SimpleJdbcTemplate.

        Show
        John Schleifer added a comment - The Spring Batch Admin code needs to be updated to remove all references to SimpleJdbcOperations and replace them with JdbcOperations as SimpleJdbcOperations is deprecated. http://static.springsource.org/spring/docs/3.1.2.RELEASE/javadoc-api/org/springframework/jdbc/core/simple/SimpleJdbcOperations.html Deprecated. since Spring 3.1 in favor of JdbcOperations and NamedParameterJdbcOperations. The JdbcTemplate and NamedParameterJdbcTemplate now provide all the functionality of the SimpleJdbcTemplate.
        Show
        Michael Minella added a comment - https://github.com/SpringSource/spring-batch-admin/pull/8

          People

          • Assignee:
            Michael Minella
            Reporter:
            John Schleifer
          • Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Agile