472,119 Members | 1,588 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

Problem with Java UDFs failing after a few hundred calls

Hi,

I created a Java UDF (PARAMETER STYLE JAVA) for DB2 9 Express-C. I
finally does what I want it to do. However, after a few hundred calls to
the UDF, it fails and raises an SQL error, SQLCODE: -4302, SQLSTATE:
38501. The SQLSTATE translates to

"Error occurred while calling a user-defined function, external
procedure, or trigger (using the SIMPLE CALL or SIMPLE CALL WITH NULLS
calling convention)."

This says about nothing. So I checked the db2diag.log, which gives me a
number of these:

***************
2007-03-15-08.13.43.906000+060 I1212472H299 LEVEL: Warning
PID : 6108 TID : 3620 PROC : db2fmp.exe
INSTANCE: DB2 NODE : 000
FUNCTION: DB2 UDB, BSU Java support, sqlejCallJavaRoutine_dll, probe:370
MESSAGE : Java routine exited with exception.

2007-03-15-08.13.44.015000+060 I1212773H375 LEVEL: Warning
PID : 6108 TID : 3620 PROC : db2fmp.exe
INSTANCE: DB2 NODE : 000
FUNCTION: DB2 UDB, BSU Java support, sqlejLogException, probe:5
MESSAGE : Stack traceback method failed.
DATA #1 : Hexdump, 4 bytes
0x030FD6F0 : 0000 0000

***************

So my routine has failed (for whatever reason).

If I repeat the offending statement with the routine call, I will also
receive SQLCODE: -4304, SQLSTATE: 42724:

"Unable to access an external program used for a user-defined function
or a procedure."

and sometimes

SQLCODE: -4301, SQLSTATE: 58004

"A system error (that does not necessarily preclude the successful
execution of subsequent SQL statements) occurred."

Well... the error _does_ preclude the successful execution of subsequent
SQL statements.

In db2diag.log, I find this:

*************
2007-03-15-08.21.51.531000+060 I1217253H768 LEVEL: Warning
PID : 6108 TID : 5184 PROC : db2fmp.exe
INSTANCE: DB2 NODE : 000
FUNCTION: DB2 UDB, BSU Java support, sqlejCallJavaRoutine_dll, probe:40
MESSAGE : Class loader loadClass failed. class:
DATA #1 : Hexdump, 91 bytes
0x03560C10 : 433A 5C50 726F 6772 616D 6D65 5C49 424D C:\Programme\IBM
0x03560C20 : 5C53 514C 4C49 425C 6675 6E63 7469 6F6E \SQLLIB\function
0x03560C30 : 5C6A 6172 5C44 4232 5553 4552 5C50 414C \jar\DB2USER\PAL
0x03560C40 : 4144 494E 2E6A 6172 3A70 616C 6164 696E ADIN.jar:paladin
0x03560C50 : 2E75 7469 6C2E 6772 6170 6865 6469 742E .util.graphedit.
0x03560C60 : 5061 6C61 6469 6E55 7469 6C PaladinUtil

2007-03-15-08.21.51.531000+060 I1218023H610 LEVEL: Warning
PID : 6108 TID : 5184 PROC : db2fmp.exe
INSTANCE: DB2 NODE : 000
FUNCTION: DB2 UDB, BSU Java support, sqlejCallJavaRoutine_dll, probe:41
MESSAGE : Class loader loadClass failed. class:
DATA #1 : Hexdump, 49 bytes
0x03560C6C : 6973 5375 6263 6C61 7373 284C 6A61 7661 isSubclass(Ljava
0x03560C7C : 2F6C 616E 672F 5374 7269 6E67 3B4C 6A61 /lang/String;Lja
0x03560C8C : 7661 2F6C 616E 672F 5374 7269 6E67 3B29 va/lang/String;)
0x03560C9C : 49 I

************

So apparently DB2 suddenly cannot find my class anymore! The only way I
can get DB2 to work again (for a few hundred invocations...) is to
restart the database manager.

Searching in the usual sources for reasons of this problem turned up
nothing and I am pretty much lost right now.
Regarding my UDF method: I make no database accesses, but I am using
singletons (via static fields) to store some metadata for later reuse.
My method uses classes created with the Eclipse Modeling Framework (EMF)
to obtain its results. EMF itself makes heavy use of static
initializers. Could that be a problem.

Any help appreciated.

Regards

BN
Mar 15 '07 #1
0 1791

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Li Ma | last post: by
4 posts views Thread by Abram Friesen | last post: by
4 posts views Thread by Rhino | last post: by
5 posts views Thread by jcccs05 | last post: by
6 posts views Thread by Rhino | last post: by
5 posts views Thread by Ian Stanley | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.