473,385 Members | 1,372 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 1934

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Li Ma | last post by:
Just want to share my experience on XML-RPC. We were working on a messaging middleware. We were using XML-RPC as communication protocol amoing client apps and server. Client could be written by...
4
by: Abram Friesen | last post by:
Hi all, I'm a newbie at DB2 and trying to create a simple java UDF. When I call my function, I'm receiving SQL4306N. Could someone please tell me what I'm doing wrong here? Here is my java...
4
by: Rhino | last post by:
I've been playing with Java UDFs for the last couple of days and I've got some questions about scratchpads. I'm running DB2 LUW V8 (FP8) on WinXP. Somewhere in the manuals, I found some remarks...
5
by: jcccs05 | last post by:
Hi all I've been searching the Internet for a while and I've been trying to find any resources on return tables using UDF's with Java. I've been sucessful in returning integers, etc, but I have...
6
by: Rhino | last post by:
I am writing Java UDFs using DB2 V8.2 (Fixpack 8) on Windows XP. I would like to create some common code classes that are visible to the UDFs on my system but I'm not having a lot of luck so far....
5
by: jorge | last post by:
I had just recently installed a new database with partitions. I realized that all of my previous Java UDFs failed to install on the new database. Basically, I got SQL0270N with Reason code 59. ...
3
by: Jae | last post by:
Hello, here's what I want to do but I'm not sure if it will work because Im not sure how DB2 works with the JVM. Heres my setup: DB2---->UDF Class (lets call it A)----->Static Class (Lets call...
5
by: Ian Stanley | last post by:
Hi, Having not done any C programming for a while I am trying to get back into it by converting an old java assignment into C. The problem is I am getting a segmentation fault at runtime which I...
2
by: Michael | last post by:
Running DB2 v7 UDB ("DB2 v7.1.0.93", "n031208" and "WR21333") on Windows XP, I am unable to find out why the "Build for Debug" option within Stored Procedure Builder is not enabled on Java stored...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.