×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
I developed a java class, compile it, and register it as a Java stored
procedure. This java class contains 4 static methods (denoted as m1, m2, m3,
and m4): m1 is a utility method; m2 is registered with the "create stored
procedure" procedure; m2 calls m3 or m4 depending on the value of input
parameters.
I encounter an java.lang.UnknownError when I run this stored procedure at
50% chance! It means, sometimes I can get the result I want, and sometimes
it generates an error.
I wonder if anyone has some insights about this problem. Many thanks!
More detailed information:
When I run the corresponding java stored procedure from the "Run SQL
scripts" window, it generates following error message:
-------------------------------------------------
Java stored procedure or user-defined function IDIGPROC.JAVAMTDCOMPARISON5,
specific name JAVAMTDCOMPARISON5 aborted with an exception
"java.lang.UnknownError". Cause . . . . . : The Java stored procedure or
user-defined function aborted with a Java exception. If SQJAVA component
trace is on, then the component trace for the job contains a Java stack
traceback for the aborted method. Recovery . . . : Debug the Java method
to eliminate the exception.-------------------------------------------------
When I call the same java stored procedure through a client java class, it
generates following error message:
---------------------------------------------------------------------------
java.sql.SQLException: [SQL4302] Java stored procedure or user-defined
function IDIGPROC.JAVAMTDCOMPARISON5, specific name JAVAMTDCOMPARISON5
aborted with an exception "java.lang.UnknownError".
at
com.ibm.as400.access.JDError.createSQLExceptionSubClass(JDError.java:811)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:665)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:635)
at
com.ibm.as400.access.AS400JDBCStatement.commonExecute(AS400JDBCStatement.java:917)
at
com.ibm.as400.access.AS400JDBCPreparedStatement.execute(AS400JDBCPreparedStatement.java:828)
at vip.Client.main(Client.java:46)
----------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------
My pseudo java code:
------------------------------------------------------------------------------------------------------------
// the debugtable is predefined. It is used to keep track of the
actual sql query has been run.
PreparedStatement traceStmt = null;
String traceStr = " INSERT INTO IDIGPROC.DEBUGTABLE VALUES (?,?,
CURRENT TIMESTAMP )" ;
traceStmt = con.prepareStatement(traceStr);
traceStmt.setString(1, "MTDcomparison5 "+listDist+" "+dateThrough+"
"+rptype);
traceStmt.setString(2, sql);
traceStmt.executeUpdate();
traceStmt.close();
//////////////////////////////////////////////////
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.