Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
REST with Spring (video course)
this week in the
EJB and other Java EE Technologies
Calling procedure - error
Joined: Jun 05, 2012
Dec 26, 2012 04:08:22
Please help to call a stored procedure
get_ubpi(p_policy_short_no in varchar2, p_category_code in varchar2) with 2 in params and no out param.
The code i used to call the proc is
Query procCallQry = entityManager.createNativeQuery(" CALL get_ubpi(?1, ?2) "); procCallQry.setParameter(1, headerDto.getPolicyShrtNum()); procCallQry.setParameter(2, headerDto.getCategoryCode()); procCallQry.getResultList();
which gave me
15:00:58,989 WARN [JDBCExceptionReporter] SQL Error: 900, SQLState: 42000
15:00:58,989 ERROR [JDBCExceptionReporter] ORA-00900: invalid SQL statement
Joined: Feb 19, 2013
Mar 06, 2013 15:56:15
I think you're using javax.persistence.Query and need to be using org.hibernate.Query. see if this has an answer for you.
I agree. Here's the link:
subject: Calling procedure - error
Error while inserting data through procedure
ORA-01858: a non-numeric character was found where a numeric was expected
Sotre procedure not calling from Linux
Error :java.sql.SQLException: Invalid column index
wrong number or types of arguments in call to 'P_RETRIEVE_OPPTY_ORDER_STATUS'
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015