I am having issues calling an Oracle FUNCTION (not a Stored Procedure) from Java 1.6, using ojdbc14.jar.
I do not know what the function contains as I am calling it
There are actually multiple ways of doing so. But the easiest of them all is firing a query. Here's how to do it.
String sql="select myFunction('"+number+"','"+date"') from dual";
statement.execute(sql);
Set the input and output parameters if you are using JDBC.
If you are using hibernate use Named Queries something like this: YourMapping.hbm.xml
{?=call demoFunc(:param1,:param2)}
Now this will create a Named Query for the function
Next thing to do is simply call it using following code
Query query=session.getNamedQuery("my_function");
query.setParameter("parma1",date);
query.setParameter("parma2",number);
query.executeUpdate();
Note that in hbm.xml file the return class name and properties exists only apply if you have mapped the returning values if the function returning appropriate values.