This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

How to make a call to oracle stored procedures from ireport designer  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have written following stored procedure to test procedure call from iReport designer.

Stored Procedure:

CREATE OR REPLACE PROCEDURE test(cursor1 out sys_refcursor) IS
BEGIN
OPEN cursor1 for
select person_id,first_name
from person
where rownum < 5;
END;




In my query window I am using following line to call this procedure.

{call test($P{cursor})}



where $P{cursor} is a parameter with class java.sql.ResultSet.

I have added ojdbc.jar file into my class path and connection is also successful.

When I run above statement for calling stored procedure it throws the error:


Error: java.sql.SqlException:Invalid column type



Can someone tell me what I did wrong here? AM i supposed to add any file or make any changes in the call to stored procedure?
 
Bartender
Posts: 598
26
Linux Notepad Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Checking against the sample code, it looks fine.

You probably want to ask this in the Jaspersoft forums. Hmm... it looks like you did already. Regardless, this is a question Jasper ought to be able to answer.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!