In your code call. AddNamedArgumentValue(pair0, pair1) sounds strange Don't you need to do this instead? Call.
AddNamedArgument(procedureParameterName, argumentFieldName, argumentType) It enables the mapping between your stored procedure parameters and the args you want to use For example, for you, it gives : call. AddNamedArgument(procedureUserParameterName, "user", String. Class); call.
AddNamedArgument(procedureUserParameterName, "application", String. Class); call. AddNamedArgument(procedureUserParameterName, "locale", String.
Class) You keep this : DataReadQuery query = new DataReadQuery(call); for (String pair : args) { query. AddArgument(pair0); } Then to call your Stored Procedure : Session session = jpaEntityManager. GetActiveSession(); List args = new ArrayList(); args.
Add(“ae01403�); args. Add(“app_code�); args. Add(“it_IT�); List results = (List) session.
ExecuteQuery(query, args).
In your code, call. AddNamedArgumentValue(pair0, pair1); sounds strange. Don't you need to do this instead?Call.
AddNamedArgument(procedureParameterName, argumentFieldName, argumentType); It enables the mapping between your stored procedure parameters and the args you want to use. For example, for you, it gives : call. AddNamedArgument(procedureUserParameterName, "user", String.
Class); call. AddNamedArgument(procedureUserParameterName, "application", String. Class); call.
AddNamedArgument(procedureUserParameterName, "locale", String. Class); You keep this : DataReadQuery query = new DataReadQuery(call); for (String pair : args) { query. AddArgument(pair0); } Then to call your Stored Procedure : Session session = jpaEntityManager.
GetActiveSession(); List args = new ArrayList(); args. Add(“ae01403â€); args. Add(“app_codeâ€); args.
Add(“it_ITâ€); List results = (List) session. ExecuteQuery(query, args).
Thanks, but nope, no luck. I think call. AddNamedArgumentValue(pair0, pair1); does the same thing than passing a list of arguments as a parameter to session.executeQuery(), binding values to parameters.
Type defaults to String when not specified and I intended to use the same name for procedure parameter name and argument field name anyways. The error and generated code were also the same... I'm at a loss. I edited the question to include the stored procedure signature.
– Silma Dec 30 '10 at 8:55.
I have succesfully created an EJB 3 project using EclipseLink which will call a number of stored procedures from an Oracle database. I've configured the datasource correctly, I can connect and execute simple stored procedures and functions (without parameters and returning a cursor); however, I am currently unable to execute stored procedures with parameters. I'm using the EclipseLink wiki as a reference http://wiki.eclipse.org/Using_Basic_Query_API_(ELUG) .
Based on database documentation, as I have no access to the database itself, the procedure takes 3 VARCHAR IN parameters of the specified name. I then call the executeQuery method on the active session, but receive the "Wrong type or number of arguments" error. What am I doing wrong?
Any help is appreciated.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.