Menu

Urgent help required

2005-09-20
2013-04-25
  • P E Stephen

    P E Stephen - 2005-09-20

    I was trying to include a file in the setup tag of my text.xml

    <setup>
       <include file="test/oracle/SetUp.sql"></include>
    </setup>

    -----------------
    Suppose the file includes only the following SQL stmt

    DELETE FROM table WHERE column
    LIKE 'string%';

    ---------------------
    The error in the log file is

    *** Running SQLUnit file: test/oracle/test.xml
    Getting connection(DEFAULT)
    Setting up tes  [sqlunit] sqlunit-ant: System error
    (net.sourceforge.sqlunit.parsers.ParseException):
    Encountered "<EOF>" at line 6, column 2.
    [sqlunit] Was expecting one of:
    [sqlunit]     <START_OTHER_SQL_CHAR> ...
    [sqlunit]     <OTHER_SQL_DELIMITER> ...
    [sqlunit]     <OTHER_SQL_CHAR> ...
    [sqlunit]

    -----------------------

    Can u please help me find out a way to eliminate the error.

     
    • David Fishburn

      David Fishburn - 2005-09-20

      Try the following:
      DELETE FROM table WHERE column
      LIKE 'string%'
      ;

      You didn't list version of sqlunit you are using, and I believe it has gotten smarter on this front.

      HTH,
      Dave

       
    • P E Stephen

      P E Stephen - 2005-09-20

      4.9 is the version thats in  my system

       
    • David Fishburn

      David Fishburn - 2005-09-21

      You never indicated if moving the semicolon on to a newline made any difference.

      You should probably also capture the debug information:

      ant sqlunit-flat -Dtestfile=test/ASA/testtypes.xml -Ddebug=true -logfile out.txt

       
    • P E Stephen

      P E Stephen - 2005-09-21

      hi sir

      when i moved the semicolon to a new line also i had the same error.

      the error i have posted is from the log file.

      if there is any other specific error string that u r expecting, please let me know.

      i am using sqlunit 4.9 with oracle 9.2.0.1

      i am also not able to compare two result sets.
      i have posted another thread regarding that.

      i would be greatful if u go through that thread also.

      thankyou
      P E stephen

       
    • Sujit Pal

      Sujit Pal - 2005-12-17

      Hi P E Stephen,

      Sorry about the delay in responding, but I was able to parse your string at my end. As you have probably figured out by now, the problem is that after the semicolon you need an empty line. In fact, you need to terminate your included file with an empty line no matter whether you are using the ; on its own line or terminating the sql with a ;.

      So your file should look like this:
      --BOF
      DELETE FROM table where column LIKE 'string%';

      --EOF

      or as Dave suggested:

      --BOF
      DELETE FROM table where column LIKE 'string%'
      ;

      --EOF

      -sujit

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.