Is it possible to call oracle function other than procedure with Hibernate JPA?
How?
I'm developing a web app with JBoss seam + Hibernate JPA, and I'd like to call
an oracle function with JPA 's entityManager.createNativeQuery APIã But I
failed.
The code has follows:
//===Java code with JPA
entityManager.createNativeQuery("{call get_filelist(?)}")
.setParameter(1, dirName)
.getSingleResult();
The oracle function is defined as follows:
//===Oracle function def
CREATE OR REPLACE FUNCTION get_filelist (p_path IN VARCHAR2)
RETURN VARCHAR2
AS
LANGUAGE JAVA
NAME 'FileList.RunThis(java.lang.String) return String';
The error code is as follows:
PLS-00221: 'GET_FILELIST' is not a procedure or is undefined .
In fact, I can see the get_filelist with sqlplus when typing 'desc
get_filelist'.
Thanks for your suggestion.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138491#4138491
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4138491
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user