Strange error message with Java UDR
Posted in 2012
I have developed a couple of Java UDR's for a customer. When i install the
UDR's in their production database it works fine. When i execute the UDR i
receive this error message:
(IX000) - java.lang.ClassNotFoundException: java.sql.SQLException: The
specified table (sqlj.alter_java_paths) is not in the databa se.
There is a system function named alter_java_path (the message say
alter_java_paths with a 's' in the end).
I can't figure out what causes this error. It works in another database of the
same version (IDS 11.70.FC5 Ultimate Edition)
Here is how i install the UDR:
execute procedure sqlj.install_jar("file:$INFORMIXDIR/extend/krakatoa/plexor/PlxWMS01.jar", "plexor_jar", 0);
create function xs_wms_palldata(conn_name varchar(100), pr_seq_no integer)returns int
external name 'p_bt.informix.plexor_jar:se.plexor.PlxWMS01.Main()'
language java;
Here is what the Java-code looks like (only the first rows):
package se.plexor;
import java.sql.*;
public class PlxWMS01 {
static int con_no;
static String remURL;
static String remJDBCdriver;
static String remDBtype;
static Connection ifxConn = null;
static Connection remConn = null;
public static int Main(String connName, int PrSeqNo) throws SQLException {
String ifxURL = "jdbc:informix-direct:";
int rc = 0;
try {
// Loading JDBC Driver for Informix
Class.forName("com.informix.jdbc.IfxDriver");
// Establishing a connection to Informix database
ifxConn = DriverManager.getConnection(ifxURL);
// Create new static Logrec object
Logrec LOG = new Logrec();
// Fetch connection information
if (getConnection(LOG, connName) != 0) {
return (2);
}
.... etc
Anyone who have a clue how to solve this problem ?
Regards
Plexor AB / Jimmy Jonsson