Home » Developer & Programmer » Forms » How can I call java methods from PL/SQL in Oracle 10g
icon5.gif  How can I call java methods from PL/SQL in Oracle 10g [message #290968] Wed, 02 January 2008 06:41 Go to next message
newbieonPL/SQL
Messages: 5
Registered: January 2008
Junior Member
Hello,
I want to call java class and method from the PL/SQL, but I don't know how I can do this. I'm doing the following operation:
1. In forms I created a text file and move the data from the forms to the file.
2. In the java class I open the text file from given path and file name. After that I created excell file and moved the data from text file to the excell file.
3. Moved the excell file to PL/SQL .
Right now PL/SQL part and java class are ready, but I don't know how I can call java class and method in the PL/SQL.
Can any one help me to solve this problem ?
Many thanks

NewbieonPL/SQL
Re: How can I call java methods from PL/SQL in Oracle 10g [message #291826 is a reply to message #290968] Mon, 07 January 2008 00:19 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have you solved your problem? Do you HAVE to use Java to talk to Excel? Have a look at:
Working with Excel via OLE2
http://www.orafaq.com/forum/t/72811/67467/
http://www.orafaq.com/forum/m/84230/67467/
Merge two cells in Excel using ole2
http://www.orafaq.com/forum/t/77825/67467/
Error closing Excel file generated using OLE2
http://www.orafaq.com/forum/t/77351/67467/
How to wrap text in excel cell using ole2
http://forums.oracle.com/forums/thread.jspa;jsessionid=8d92200830d62336f40f5aad44efb36ee981f4e6c19e.e34QbhuKaxmMai0MaNeMb3eKb390?mess ageID=1242535&#1242535
Forms to Excel example with webutil
http://forums.oracle.com/forums/thread.jspa?messageID=1430799
Another Forms to Excel example
http://www.orafaq.com/forum/t/81537/67467/
http://www.orafaq.com/forum/t/32353/67467/

David

[Updated on: Mon, 07 January 2008 00:19]

Report message to a moderator

Re: How can I call java methods from PL/SQL in Oracle 10g [message #291850 is a reply to message #291826] Mon, 07 January 2008 01:23 Go to previous messageGo to next message
newbieonPL/SQL
Messages: 5
Registered: January 2008
Junior Member
Hello,
I actually create excell file in server side. So I cannot use OLE objects.
Becuase of excell file in created in server side (on linux) I have to use hssfworkbook object. This objects need more memories.

Actually if I've know how to increase JVM heap size in oracle application server I can solve the problem.

I tried to increase OC4J java maximum size. But It doesn't help. and also tried to increse java maximum space size. But they don't help either.

Lastly I determine to developed java programs and create the excell file in that program. Unfortunately I cannot succeed in calling java in PL/SQL stored procedure.
Now I'm searching for it.
Thank you for the link. But they don't help me to solve my problem.
Perihan
Re: How can I call java methods from PL/SQL in Oracle 10g [message #292407 is a reply to message #291850] Tue, 08 January 2008 21:44 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have you been successful in writing a Java stored procedure?

David

Upd: Removed dumb second question.

[Updated on: Tue, 08 January 2008 21:45]

Report message to a moderator

Re: How can I call java methods from PL/SQL in Oracle 10g [message #292480 is a reply to message #292407] Wed, 09 January 2008 00:58 Go to previous messageGo to next message
newbieonPL/SQL
Messages: 5
Registered: January 2008
Junior Member
Yes in PL/SQL developer , you can write java stored procedure in java source field
Re: How can I call java methods from PL/SQL in Oracle 10g [message #292773 is a reply to message #292480] Wed, 09 January 2008 18:17 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
You stated previously "Unfortunately I cannot succeed in calling java in PL/SQL stored procedure." Now you say "Yes in PL/SQL developer , you can write java stored procedure in java source field". If you can do the latter, wouldn't this allow you to solve the prior?

David
Re: How can I call java methods from PL/SQL in Oracle 10g [message #292796 is a reply to message #292773] Wed, 09 January 2008 21:24 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
On the Oracle Forms website http://www.oracle.com/technology/products/forms/index.html there is an entry for "Calling a Web Service from Forms 10.1.2" http://www.oracle.com/technology/products/forms/htdocs/10gr2/howto/webservicefromforms/ws_10_1_3_from_forms.html

Look especially at the section "Calling a Web service from Oracle Forms" as its discussion of 'En[v]ironment Variables', 'Importing the Java code', and 'Calling the imported Java class' may be of assistance to you.

David
Re: How can I call java methods from PL/SQL in Oracle 10g [message #292882 is a reply to message #292773] Thu, 10 January 2008 02:04 Go to previous messageGo to next message
newbieonPL/SQL
Messages: 5
Registered: January 2008
Junior Member
Hi David,
Thank you for the links. I have to say that I know some way to calling java class from Oracle and forms . In forms I can call java class by using beans and FBEAN. I also know to call java class by using java stored procedure. My problem is my java program return hssfworkbook object. Neither bean nor java stored procedure are supports this. They only support to return string, integer or boolean value not arraylist or object. So I'm doing change on my java class.
My another question is how can I include jar file to java stored procedure. Because my java class is in a jar file. it should be in a jar file because it includes a jar objects of poi. And I didn't find the way to include my jar file to java stored procedure . Is anyone know this? Actually I don't know much about using java stored procedure. Inn my search I couldn't find the solution about my problem.

Thank you





Re: How can I call java methods from PL/SQL in Oracle 10g [message #293123 is a reply to message #292882] Thu, 10 January 2008 23:57 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I think that hssfworkbook object is going to be a problem. I think it may be time to 'askTom'.

David
Re: How can I call java methods from PL/SQL in Oracle 10g [message #293148 is a reply to message #293123] Fri, 11 January 2008 00:35 Go to previous message
newbieonPL/SQL
Messages: 5
Registered: January 2008
Junior Member
Thank you for your help David,
I think I found the solution. I will write when I'm sure of it
Regards
Perihan
Previous Topic: Cannot Read Form File Error
Next Topic: How we can send SMS from Oracle forms ?
Goto Forum:
  


Current Time: Sat Dec 03 20:35:31 CST 2016

Total time taken to generate the page: 0.10374 seconds