Focal Point Banner


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.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [SOLVED] Calling a java class from a stored procedure.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Calling a java class from a stored procedure.
 Login/Join
 
Silver Member
posted
Hi,

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.

Tom

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.6.7
Linux
csv/.txt, pdf, Excel
 
Posts: 31 | Registered: June 01, 2009Report This Post
Expert
posted Hide Post
Hi Tom,

The following document may be of help:
Running CALLJAVA produces FOC1522 InvocationTargetException

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.

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1948 | Location: New York | Registered: November 16, 2004Report This Post
Silver Member
posted Hide Post
Hi Kerry,

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.

Thanks for your follow up just the same.

Tom


WebFOCUS 7.6.7
Linux
csv/.txt, pdf, Excel
 
Posts: 31 | Registered: June 01, 2009Report This Post
Member
posted Hide Post
You can call the java class :
wf installed on windows :
DOS JAVA PACKAGE.MYCLASS "PARAM1","PARAM2"
wf installed on unix:
UNIX JAVA PACKAGE.MYCLASS "PARAM1","PARAM2"

Regards,
MtGuy


WF 7.6.2 , iWay 5.5 , Sun Unix , Windows XP , .NET , Oracle , SQL Server and more
 
Posts: 24 | Registered: December 05, 2007Report This Post
Silver Member
posted Hide Post
Hi mtguy,

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.

Thanks for your input just the same.

Tom


WebFOCUS 7.6.7
Linux
csv/.txt, pdf, Excel
 
Posts: 31 | Registered: June 01, 2009Report This Post
Member
posted Hide Post
Hi,
Put the CLASSPATH set statement in a bat file ,
run this bat file before DOS java -jr .


Regards,
MtGUY


WF 7.6.2 , iWay 5.5 , Sun Unix , Windows XP , .NET , Oracle , SQL Server and more
 
Posts: 24 | Registered: December 05, 2007Report This Post
Silver Member
posted Hide Post
Hi mtguy,

I did that and it worked. Thank you for your help on this.

Have a great day!

Regards,

Tom

This issue is closed.


WebFOCUS 7.6.7
Linux
csv/.txt, pdf, Excel
 
Posts: 31 | Registered: June 01, 2009Report This Post
Member
posted Hide Post
I know is working because I had some issue long time ago .

Enjoy ,
MtGuy


WF 7.6.2 , iWay 5.5 , Sun Unix , Windows XP , .NET , Oracle , SQL Server and more
 
Posts: 24 | Registered: December 05, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [SOLVED] Calling a java class from a stored procedure.

Copyright © 1996-2020 Information Builders