• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to get value from Oracle Procedure output parameter ?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello.
In whole month, i search and testing in many more way's for get this answered. The question is simple :
i just want to get from output parameter using Parameter OUT.
First of all:
1. Primefaces 4
2. JSF 2.2
3. Oracle 11g
4. Eclipselink 2.5.2

My source :

oracle
----

---

----------first call this function.

-------------------


PegawaiFacade.java =======================

=======================


===========================

PegawaiFacadeRemote.java----------------------

.

---------------------------------------------------------

PegawaiProcedure.java ----------

-----

if i deploy above script the result is :
INFO: nama_table :VIEW_PENDIDIKAN_JENJANG
INFO: nomor :KKT900031
INFO: user :SDM
INFO: Parameter[position=4]
WARNING: Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Invalid column index
Error Code: 17003
Call: BEGIN Refresh_Persoeis(nama_tabel=>?, in_nrk=>?, userupd=>?, tgmulai_out=>?); END;
bind => [7 parameters bound]
Query: ResultSetMappingQuery(name="PegawaiProsRefresh_Persoeis" )


Why this happen ? and how to build good script for get value from Oracle Procedure output parameter ?

Thank
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Restroika!

Personally, I don't recommend stored procedures. They split logic between multiple locations (which raises maintenance costs), source change management for the procedure code tends to be very weak compared to application code, they tie you to one specific vendor's database product. And programming the calls in and out can be troublesome.

On the other hand, there are times when stored procedures can be very useful. When you need performance, central co-ordination of data handling between multiple concurrent unrelated apps, or when some idiot has decreed that all database operations absolutely must be stored procedures and you want to keep your current employment position.

JSF doesn't itself get involved with database operations, so I think you're going to have better luck if I move this question to the Oracle forum. I cannot see what's wrong or why an operation of 4 variables says it's binding 7, but maybe someone there can.
 
restroika gheo
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i changed my code to be like this :

and found error :


i try assign that to the object

but show this error:


i see in another function

and get normal result.

my question is why my first function in above showing error whereas my last function is get normal result ?

thanks
reply
    Bookmark Topic Watch Topic
  • New Topic