java - Oracle's function created via jdbc is in an invalid state -


when create oracle's function in sql developer ok, when create same function via jdbc in invalid state

here function sample:

create or replace function test_func return number begin     return 100; end; 

java code:

connection con = ...; statement stmt = con.createstatement(); stmt.execute(sql); 

when execute function:

select test_func() dual; 

i error: ora-06575: package or function test_func in invalid state

can explain i'm doing wrong?

function needed complied use them. not compiled function gives exception. make sure not have terminating cr/lf in query. copy text editor (textpad) see if have any.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -