I have a question regarding the stored procedures in JPA. I have the following Entity called RenGaraza which uses two stored procedures "vrniGarazo" and "vrniGarazoPk" that do basically the same thing. The only difference is in the were part of the procedure - the resultSet is the same in both cases.
The stuff works just fine when I call the procedure directly using the first named query - "vrniGarazo":
However, I need to call the same entity via another Entity "RenDelistavb":
I have tried all kinds of mambo-jumbo like adding the ResultSetMapping to the procedure, adding different loader and so on, but could not make it to work.
I get the NullPointerException and if I do some debugging I can see that "com.sun.jdi.InvocationException occurred invoking method." error.
I additionally debuged the procedure that is called in the second case and it sims that it executes correcly even using the correct id from
the RenDelistavb and that it actually generates the resultSet, but it is not returned correctly.
I intensively debugged the hibernate code and found out that the Set<RenGaraza> is initialized correctly but there is an obvious bug
in the procedure since the Set set in the PersistentSet class is not initialized anywhere and as a consequence
produces an error:
I am using the latest version of hibernate (3.4.0.GA)
Now, obviously my question is what am I doing wrong and if it is even possible to call the original clall (RenGaraza ) in the manner I am trying to do it?
If the answer is not, is there any workaround or another solution?
Thanks for the answers.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com