Announcement Announcement Module
No announcement yet.
Advanced alternative to org.springframework.batch.test.DataSourceInitializ er Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Advanced alternative to org.springframework.batch.test.DataSourceInitializ er

    Hi dear forummates.
    We use org.springframework.batch.test.DataSourceInitializ er class in order to init DB on basis of .sql scripts.

    After trigger was added to .sql,init failed.

    After debugging,the cause of error while was found here:

    try {
    scripts = StringUtils.delimitedListToStringArray(stripComments(IOUtils.readLines(scriptResource.getInputStream())), ";");
    This error happened,because delimiter is ";" symbol,so trigger was cut on part on basis of ";" and treated uncorrectly.

    Can you advise me more advanced data source initializer,that will undersnad triggers correctly?

    Our Spring version is 2.5.6

    I have found org.springframework.jdbc.datasource.init.DataSourc eInitializer ,but it's active from 3.0 (((

    Thank you for help.

    Last edited by sergionni; Sep 23rd, 2010, 08:28 AM.

  • #2
    Even though you're not using Spring 3.0, there's nothing preventing you from downloading its source code and copying the source of DataSourceInitializer and the related ResourceDatabasePopulator class to your project.

    That's the beauty of open source