Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Run Java app in Oracle 12c

 
Krzysiek Keisyzrk
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone, i try to write java class and deploy and run it in oracle database.
This is my method, nothing special, try to connect, simple select.


To upload class to Oracle i used Toad.
When upload finished, i run this sql command on database.



Everything is ok but, when i tried to used this function a get this error:

ORA-29541: klasa C##KRZYSIEK.ParsowanieXSLX nie mogła być rozstrzygnięta ( Class C##..... could not be resolver ) - i used polish version and this is translate.
29541. 00000 - "class %s.%s could not be resolved"
*Cause: An attempt was made to execute a method in a Java class
that had not been previously and cannot now be compiled
or resolved successfully.
*Action: Adjust the call or make the class resolvable.


Anyone knows something what could i do?. And i have second question. How can i add a java library to Oracle like ApachPOI.
 
Zachary Pry
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Krzysiek,

I would like to clarify few points:
1. Can you share full file - I would like to see class name.
2. Why you don't close ResultSet ?

Regarding creation of the function itself - you might want to use:
Using upper case improves readability plus 'internal' might be reserved word (I don't think this is the case for Oracle though) and it doesn't quite explain what function does.



And i have second question. How can i add a java library to Oracle like ApachPOI.

I believe it can be done via:
loadjava –u <username> some_library.jar
 
Krzysiek Keisyzrk
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why i don't close RS? - it's my mistake, i resolve problem with this method it's work fine, but my main problem is how to add library to oracle ?, my second method ( test metod) use ApachPoi library - how can i add it to oracle ??.

This is the code


I tried, build it to jar with all dependency load this file to oracle - in sql developer i see this library but it doesn't work. Also i tried to load library one by one but the effect is the same.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic