(46103) - Error loading Java UDR class (
Posted in 2009
Topics: Installation, Setup & Upgrades, Stored Procedures & SPL, Server Administration, Java & JDBC Development
I have been trying to create a Java UDR and keep getting the same error. So I
finally created what I thing is the simplest jar and udr and still have the
same problem.
I set JAR_TEMP_PATH to the directory where my source code is:
$INFORMIXDIR/extend/java
finderr -46103 says to make sure the three part name (<dbname.username.jarid>)
is in JAR_TEMP_PATH or /tmp but I can't find it anywhere.
I've Googled and none of the articles I've read says anything about setting up
an environment for udr; all the examples seem straight forward.
Can anyone tell me what I'm doing wrong?
Here are the rest of the details:
IBM Informix Dynamic Server Version 10.00.FC8
java version 1.4
=====================================================
The java class:
package foopkg;
public class Fooclass {
/**
* @param args
*/
public static void main(String[] args) {
System.out.println(dofoo(5));
}
public static int dofoo(int pfoo){
return pfoo;
}
}
=====================================================
I used Eclipse to create foo.jar with .manifest:
Manifest-Version: 1.0
Main-Class: foopkg.Fooclass
======================================================
I tested the jar with java -jar foo.jar and it worked so I installed the jar
using dbaccess:
execute procedure install_jar(
'file:/home/informix/extend/java/foo.jar','foo_jar', 0);
=======================================================
And then created fooudr:
CREATE FUNCTION fooudr (pfoo int) RETURNING INT
WITH(class='jvp')
EXTERNAL NAME 'foo_jar:
foopkg.Fooclass.dofoo(int)'
LANGUAGE JAVA;
========================================================
But when I 'execute function fooudr(5)' I get the 46103 error.
Was the JAR_TEMP_PATH set when the IDS instance was started up? If not, you
may have to shutdown IDS and restart it with that environment variable set
and exported in the it's environment before startup.
Art
On Thu, Feb 19, 2009 at 11:37 AM, BEVIS KENNEDY <bkennedy@utah.gov> wrote:
> I have been trying to create a Java UDR and keep getting the same error. So
> I
> finally created what I thing is the simplest jar and udr and still have the
> same problem.
>
> I set JAR_TEMP_PATH to the directory where my source code is:
> $INFORMIXDIR/extend/java
>
> finderr -46103 says to make sure the three part name
> (<dbname.username.jarid>)
> is in JAR_TEMP_PATH or /tmp but I can't find it anywhere.
>
> I've Googled and none of the articles I've read says anything about setting
> up
> an environment for udr; all the examples seem straight forward.
>
> Can anyone tell me what I'm doing wrong?
>
> Here are the rest of the details:
>
> IBM Informix Dynamic Server Version 10.00.FC8
> java version 1.4
>
> =====================================================
> The java class:
> package foopkg;
>
> public class Fooclass {
>
> /**
>
> * @param args
>
> */
>
> public static void main(String[] args) {
>
> System.out.println(dofoo(5));
>
> }
>
> public static int dofoo(int pfoo){
>
> return pfoo;
>
> }
> }
> =====================================================
>
> I used Eclipse to create foo.jar with .manifest:
>
> Manifest-Version: 1.0
> Main-Class: foopkg.Fooclass
>
> ======================================================
>
> I tested the jar with java -jar foo.jar and it worked so I installed the
> jar
> using dbaccess:
>
> execute procedure install_jar(
> 'file:/home/informix/extend/java/foo.jar',> 'foo_jar', 0);
> =======================================================
>
> And then created fooudr:
>
> CREATE FUNCTION fooudr (> pfoo int) RETURNING INT
> WITH(class='jvp')
> EXTERNAL NAME 'foo_jar:
> foopkg.Fooclass.dofoo(int)'
> LANGUAGE JAVA;
> ========================================================
>
> But when I 'execute function fooudr(5)' I get the 46103 error.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.
--0016364ee0221f98db046348e085
Permissions are read/execute for everyone. This is really strange.
Bevis
>>> Art Kagel <art.kagel@gmail.com> 02/19/09 12:07 PM >>>
Errno 2 is a permissions problem. Make sure the permissions on
libhpu.slpermit the engine, running as user informix, to execute the
file.
Art
On Thu, Feb 19, 2009 at 1:59 PM, Bevis Kennedy <bkennedy@utah.gov> wrote:
> That didn't work. I added the export JAR_TEMP_PATH to informix .profile
> and made sure it was set in my environment. Then after bumping the server I
> tried:
>
> execute procedure install_jar(
> 'file:/home/informix/extend/java/foo.jar',> 'foo_jar', 0);
>
> and got:
>
> Cannot load lib /home/informix/extend/krakatoa/jre/bin//native_threads/
> libhpi.sl: error : 2
>
> Bevis
I got the JAR_TEMP_PATH set properly ( /home/informix/extend/java ) my
onconfig parameter JVPJAVALIB set ( /lib/PA_RISC2.0W ). I installed foo.jar
and created fooudr() again but I am still getting the 46103 error.
However, now at least I have bevis_test.informix.foo_jar.jar in JAR_TEMP_PATH.
I setup my java env to use krakatoa and can successfully execute
bevis_test.informix.foo_jar.jar from the command line.
I thought maybe bevis_test.informix.foo_jar.jar had to be in krakatoa
directory so I copied it there and tried executing fooudr(5) in dbaccess; same
46103 error.
There's probably just one more onconfig or environment paramter that needs
setting. Anybody have any ideas?
Here's the particulars:
===========================================
java_env.sh:
export JAVA_BINDIR=/home/informix/extend/krakatoa/jre/bin
export JAVA_HOME=/home/informix/extend/krakatoa/jre
export JAVA_ROOT=/home/informix/extend/krakatoa/jre
export PATH=$JAVA_BINDIR:$PATH
from cmd line:
java -jar bevis_test.informix.foo_jar.jar
===========================================
in dbaccess:
execute procedure install_jar(
'file:/home/informix/extend/java/foo.jar','foo_jar.jar', 0);
( at this point I do get ' Loading Module <foo_jar:
foopkg.Fooclass>' in thte informix log )
CREATE FUNCTION fooudr (pfoo int) RETURNING INT
EXTERNAL NAME 'foo_jar:
foopkg.Fooclass.dofoo(int)'
LANGUAGE JAVA;
execute function fooudr(5);
(46103) - Error loading Java UDR class (<bevis_test.informix.foo_jar: