As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at firstname.lastname@example.org and provide your corporate email address, company, and name.
I am trying to call a java class from a stored procedure and am getting the below listed error.
InvocationTargetException: ibi.ntj2c.ntjprerr: CALLPGM execution error CPJAVA: Error in processing EXECUTE command for class MyClass
Looking into the documentation I see that the above error may be due to classpath issues. I have set my class to include the jar files for the ntj2c.jar, ibtrace.jar, and the jar file that holds the MyClass class. This was verified by going into the console and seeing the classpath entries listed in the Java Services Configuration area. At this point it looks like I have things set up correctly.
Here is the code within the stored procedure...
CALLJAVA mypackage.MyClass " ", " ", " " -EXIT
Somewhere there is a disconnect and I am not sure where that is.
Also, in the examples in the documentation, the cjsamp class is implementing the callpgm class. Is this required for all java classes call by a stored procesdure with the DM tool?
Any information anyone can provide will be appreciated.
Thank you in advance.
TomThis message has been edited. Last edited by: Kerry,
If this does not work for you, then you may want to open a case with Information Builders' Customer Support Services for assistance, as this issue can be more involved and will need further research. The phone number is 1-800-736-6130, or access online at InfoResponse.
Kerry Zhan Focal Point Moderator Information Builders, Inc.
Posts: 1948 | Location: New York | Registered: November 16, 2004
I had actually started with the documentation you provided a link for before posting to this forum. With my not getting any success from following that information and trying a few other things, I ended up opening up a ticket with IBI last week.
I did give that a try with no success. There is somthing missing that I cannot put my finger on.
As listed in my initial entry, the package name and class name are included in the call statement and with this in mind, the syntax looks correct.
Plus the classpath is all set and I can run the class from DOS using the 'java -jar ...' command.
One note though and not sure if this matters. The jar file is located in a directory completely outside of the DM directory structure. I am thinking that this should not matter but will mention it just the same.