473,549 Members | 3,749 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with Java UDFs failing after a few hundred calls


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- +060 I1212472H299 LEVEL: Warning
PID : 6108 TID : 3620 PROC : db2fmp.exe
FUNCTION: DB2 UDB, BSU Java support, sqlejCallJavaRo utine_dll, probe:370
MESSAGE : Java routine exited with exception.

2007-03-15- +060 I1212773H375 LEVEL: Warning
PID : 6108 TID : 3620 PROC : db2fmp.exe
FUNCTION: DB2 UDB, BSU Java support, sqlejLogExcepti on, 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- +060 I1217253H768 LEVEL: Warning
PID : 6108 TID : 5184 PROC : db2fmp.exe
FUNCTION: DB2 UDB, BSU Java support, sqlejCallJavaRo utine_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\IB M
0x03560C20 : 5C53 514C 4C49 425C 6675 6E63 7469 6F6E \SQLLIB\functio n
0x03560C30 : 5C6A 6172 5C44 4232 5553 4552 5C50 414C \jar\DB2USER\PA L
0x03560C40 : 4144 494E 2E6A 6172 3A70 616C 6164 696E ADIN.jar:paladi n
0x03560C50 : 2E75 7469 6C2E 6772 6170 6865 6469 742E .util.graphedit .
0x03560C60 : 5061 6C61 6469 6E55 7469 6C PaladinUtil

2007-03-15- +060 I1218023H610 LEVEL: Warning
PID : 6108 TID : 5184 PROC : db2fmp.exe
FUNCTION: DB2 UDB, BSU Java support, sqlejCallJavaRo utine_dll, probe:41
MESSAGE : Class loader loadClass failed. class:
DATA #1 : Hexdump, 49 bytes
0x03560C6C : 6973 5375 6263 6C61 7373 284C 6A61 7661 isSubclass(Ljav a
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.


Mar 15 '07 #1
0 1955

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

Similar topics

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 Java, C/C++, VB, Delphi on both Windows or Unix platforms. Seams like XML-RPC( similiar to SOAP as you know) was a good choice for us. But while the...
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 code for a UDF that simply returns the integer value you pass it:
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 that said I could either manage my scratchpad with the getScratchpad() and setScratchpad() methods *OR* set up my own class variables to keep the...
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 trouble finding anything about return tables. Can such a thing be done in Java? If so, can someone direct me to an example or have an example of...
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. I'm wondering if I'm trying to do the impossible or if my technique is just wrong. One of the common code classes I want to write contains code...
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. I read up on the documentation, and found out that I can't have SQL in my Java UDFs and Stored procedures anymore? Is that really true?!?
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 it B) I have a class that contains some UDFs. I want these UDFs to call static methods on class B. Its very important that the static...
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 am having trouble fixing(program below) The idea of the program is to convert input(integers) into words eg: # 101 returns #one hundred one I...
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 procedures. It is enabled for SQL stored procedures. It is possible to "Build" and "Run" the Java SPs, it just isn't possible to click on the...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.