Announcement Announcement Module
Collapse
No announcement yet.
Is Spring Batch supports TeraData? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is Spring Batch supports TeraData?

    Hi,
    i wanted to execute batch jobs in teradata using Spring Batch framework. But when the default 'jobRepositoy' trying to connect to the db i am getting the below exception.

    Exception in thread "main" org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'jobRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: DatabaseType not found for product name: [Teradata]
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1420)
    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 93)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:290 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:192)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:567)
    at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:895)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:425)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:139)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:93)
    at com.zzz.xxx.ConfigJobs.main(ConfigJobs.java:10)
    Caused by: java.lang.IllegalArgumentException: DatabaseType not found for product name: [Teradata]
    at org.springframework.batch.support.DatabaseType.fro mProductName(DatabaseType.java:77)
    at org.springframework.batch.support.DatabaseType.fro mMetaData(DatabaseType.java:108)
    at org.springframework.batch.core.repository.support. JobRepositoryFactoryBean.afterPropertiesSet(JobRep ositoryFactoryBean.java:145)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1477)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1417)
    ... 12 more


    DatabaseType.java under org.springframework.batch.support package is a Enum class. Enum entries i found in the source code are

    DERBY("Apache Derby"),
    DB2("DB2"),
    DB2ZOS("DB2ZOS"),
    HSQL("HSQL Database Engine"),
    SQLSERVER("Microsoft SQL Server"),
    MYSQL("MySQL"),
    ORACLE("Oracle"),
    POSTGRES("PostgreSQL"),
    SYBASE("Sybase"), H2("H2");


    I didn't find any entry for Teradata. So i am just curious to know whether Spring Batch frame work supports TeraData or not? If i want to use TeraData, how to tweak the frame work code?
    Last edited by sripy123; Jan 11th, 2012, 03:47 PM.

  • #2
    If i want to use TeraData, how to tweak the frame work code?
    basically you need to create a own spring batch core version with custom Java and SQL, Spring Batch needs proper CREATE_TABLE/READ/UPDATE statements to work with the database.

    if you do this, be so nice and provide the patches to the github source :-)

    Comment

    Working...
    X