Announcement Announcement Module
Collapse
No announcement yet.
Adding a new database type Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Adding a new database type

    Hi,
    I'm looking for an elegant way of adding a new database type. I'm using version 2.1.2-RELEASE and an Ingres 9.2 database. I've created a custom incrementer and incrementer factory as described in other posts, but am now getting tripped up by the JobRepositoryFactory.

    If I don't inject a database type when using the JobRepositoryFactoryBean bean, the database type "INGRES" is read successfully from the DatabaseType.fromMetaData(...) method, but then falls over in DatabaseType.fromProductName:

    Caused by: java.lang.IllegalArgumentException: DatabaseType not found for product name: [INGRES]
    at org.springframework.batch.support.DatabaseType.fro mProductName(DatabaseType.java:77)
    at org.springframework.batch.support.DatabaseType.fro mMetaData(DatabaseType.java:108)


    If I do specify a database type when creating the JobRepositoryFactoryBean (i.e. "ingres"), then it falls over the in JobRepositoryFactoryBean.determineClobTypeToUse:

    Caused by: java.lang.IllegalArgumentException: No enum const class org.springframework.batch.support.DatabaseType.ING RES
    at java.lang.Enum.valueOf(Enum.java:196)
    at org.springframework.batch.support.DatabaseType.val ueOf(DatabaseType.java:36)
    at org.springframework.batch.core.repository.support. JobRepositoryFactoryBean.determineClobTypeToUse(Jo bRepositoryFactoryBean.java:212)


    Obviously I can get around it by saying the my database type is DB2 or other and hacking my Incrementer to make this one of the supported databases, but it may confusing in the long-term and isn't the most elegant of solutions? I can't extend JobRepositoryFactoryBean as determineClobTypeToUse is private, so is there something I'm issing?

    Thanks,
    Eoin

  • #2
    probably not. On the other hand, I am sure if you report the request in Jira it will be added.

    Comment


    • #3
      I am also trying to use Roo with Ingres.

      Can anyone direct me to where I can submit a request to have
      Ingres added as one of the database types?

      Thanks.

      Comment

      Working...
      X