Forum Discussion

RYAN_HORST's avatar
RYAN_HORST
Occasional Contributor
18 years ago

Inserting into Oracle table as DataSink

I created a generic temp table in Oracle to make sure that I am getting a good connection, and I was able to pull data from this table.
However when I try to do an insert I always get the following error.
TestCase failed [Cancelling due to failed test step:java.sql.SQLException: Invalid column index], time taken = 1225

The SQL statement I am using is as follows:
insert into  XXX.temp_table
(MY_FIELD)
values
(${TempTable#MY_FIELD})


I am using a Transfer step from another DataSource to populate the ${TempTable#MY_FIELD} property. 

The Oracle Driver is: oracle.jdbc.driver.OracleDriver

Connection String is: jdbc:oracle:thin:username/pwd@host:port:SID


I am able to insert to this table using standard Oracle tools. Please advise on what my issue might be, and if there are additional logs I should review to help identify the problem.

Regards

17 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi,

    this is an invalid error-message, just ignore it.

    By default new connections are in autoCommit mode (ie each statement gets committed automatically), but maybe the commit is neccessary. So what happens if you put

    insert into xxx.temp_table (MY_FIELD) values ('?');
    commit;


    into the SQL field?

    regards,

    /Ole
    eviware.com
  • RYAN_HORST's avatar
    RYAN_HORST
    Occasional Contributor
    Hi,
    I just get the message under the data log stating "wrote data xxms".  However nothing is populated in the database.

    I found out one more thing. SoapUI Pro uses JDK 1.6.  We are running Oracle 10g, which does not have a driver for JDK 1.6.  It still seems very strange that I am able to access the DB using Groovy scripts and select records using the Data Source GUI. 

    Thanks
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Ryan,

    ok.. I'm going to try to reproduce this with another database before I move on to installing Oracle.. I'll get back to you with my findings..

    regards!

    /Ole
    eviware.com
  • Ryan

    I used insert statement like( below ) for SQL Server 2005.. and was  successful in updating the DB.  readcode and readCity are test properties values read from response..
    Note: 'apupdate[' is the table name.

    insert into apupdate(apcode, apcity) values ('${#TestCase#readCode}','${#TestCase#readCity}')

    hope this might help you...
  • RYAN_HORST's avatar
    RYAN_HORST
    Occasional Contributor
    Thanks, for the suggestion,but still no insert.

    Can someone tell me this.. when you are in the DataSink Tab and you specify the properties and associated values, do the values show up in the DataLog below...mine are not, but did not know if they should?


    Also are there logs that I can enable or view that might help me determine if any communication is happening with the database?


    Regards.
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

    The DataLog should show rows containing the property-values passed to the DataSink for each execution, ie if you have 2 properties in your DataSink the log will show those properties' values..

    Regarding the logging, maybe you could try enabling oracle logging by adding the -Doracle.jdbc.Trace=true argument in soapuipro.bat to the run arguments (read more about this option at http://www.oracle.com/technology/tech/j ... 0paper.pdf)

    Hope this helps,

    regards!

    /Ole
    eviware.com
  • I reproduce this 'BUG' on oracle 10g (works on mysql) on the soapUI PRO 3.6.1, can someone told me is this problem fixed or something?