Results 1 to 2 of 2

Thread: Advanced alternative to org.springframework.batch.test.DataSourceInitializ er

  1. #1
    Join Date
    Jun 2010
    Posts
    5

    Default 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:

    Code:
    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.

    --
    Sergei
    Last edited by sergionni; Sep 23rd, 2010 at 07:28 AM.

  2. #2
    Join Date
    Sep 2009
    Location
    Vilnius, Lithuania
    Posts
    118

    Default

    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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •