Search code examples
stored-proceduresjndiinformixweblogic12c

Java Web with Weblogic, DB Informix stored procedure data — impossible problem


I have Java Web on Weblogic; database is Informix.

The process is as follows:

  1. User query data.

  2. Create serial(only).

  3. Using stored procedure with serial. SP content like: insert reporttable select data from table1

    insert reporttable select data from table2

    if(reporttable.count==0) insert reporttable select 'NO DATA'

  4. Query reporttable with serial.

  5. Show on Web.

Important problem:

table1 has data count 10(data1,data2.......data10)

reporttable result data count 3(data1, data2, NO DATA) impossible

Important!!! The implementation does not process any exceptions.

When the problem occurs, any query on the data shows the same problem.

But when I restart Weblogic (using the same parameters), the query has no problem.

I have no idea to solve the problem; can you help?


Solution

  • I find the error reason.

    Test : rename table name

    1. sp use table1、table2、table3

    2. unknown reason maybe abnormal connection java.sql.SQLSyntaxErrorException: [FMWGEN][Informix JDBC Driver][Informix]The specified table (table1) is not in the database.

    3. Error message only trigger on first

    4. Execute sp again,no error, and executeing neglect table1

    5. weblogic restart jndi connection

    6. Execute sp result normal