Ok, so issue was wrong database name.
Have since gotten callable statements working,
some caveats:
Sun Application server:
while it's much better then tomcat still has some flakiness issues...
It seems that about every 10th restart or so it locks up and won't load/unload my app.
And that wasn't the only thing...
Also, after noticing that my callable statments were hanging at the server I restarted and with no changes to the code
everythingstarted "magically" working fine...
Thanks all,
Gary
----- Forwarded message from Dave Cramer <pg@fastcrypt.com> -----
Date: Wed, 30 Mar 2005 14:12:45 -0500
From: Dave Cramer <pg@fastcrypt.com>
Reply-To: pg@fastcrypt.com
Organization: Postgres International
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
To: fake@dusk.homelinux.org
Subject: Re: [JDBC] jdbc/callable statment error
In-Reply-To: <20050330180708.GA18364@dusk.homelinux.org>
Can you do me a favour and forward this to the list, might as well let
your learning experience help everyone else.
Dave
fake@dusk.homelinux.org wrote:
>Indeed that was my problem... I was specifying databasename as bank when
>in fact it should have been bankDB... There was some sort of default db
>under bank that had nothing in it...
>
>I'll consider it a learning experience and thanks for your time.
>
>Gary
>
>
>On Wed, Mar 30, 2005 at 12:08:08PM -0500, Dave Cramer wrote:
>
>
>>Well, the only thing I can think of is that you aren't connecting to the
>>same database.
>>
>>is that possible?
>>
>>Dave
>>
>>fake@dusk.homelinux.org wrote:
>>
>>
>>
>>>LOG: statement: select * from test_function ( 'thisTest' ) as result;
>>>DEBUG: parse tree:
>>>DETAIL: {QUERY :commandType 1 :querySource 0 :canSetTag true
>>>:utilityStmt <>
>>> :resultRelation 0 :into <> :hasAggs false :hasSubLinks false
>>> :rtable ({RTE
>>> :alias {ALIAS :aliasname result :colnames <>} :eref {ALIAS
>>> :aliasname result
>>> :colnames ("result")} :rtekind 4 :funcexpr {FUNCEXPR :funcid 18643
>>> :funcresulttype 16 :funcretset false :funcformat 0 :args ({CONST
>>> :consttype
>>> 1043 :constlen -1 :constbyval false :constisnull false :constvalue
>>> 12 [ 12 0 0
>>> 0 116 104 105 115 84 101 115 116 ]})} :coldeflist <> :inh false
>>> :inFromCl true
>>> :checkForRead true :checkForWrite false :checkAsUser 0}) :jointree
>>> {FROMEXPR
>>> :fromlist ({RANGETBLREF :rtindex 1}) :quals <>} :rowMarks ()
>>> :targetList
>>> ({TARGETENTRY :resdom {RESDOM :resno 1 :restype 16 :restypmod -1
>>> :resname
>>> result :ressortgroupref 0 :resorigtbl 0 :resorigcol 0 :resjunk
>>> false} :expr
>>> {VAR :varno 1 :varattno 1 :vartype 16 :vartypmod -1 :varlevelsup 0
>>> :varnoold 1
>>> :varoattno 1}}) :groupClause <> :havingQual <> :distinctClause <>
>>> :sortClause
>>> <> :limitOffset <> :limitCount <> :setOperations <>
>>> :resultRelations ()}
>>>
>>>DEBUG: PortalRun
>>>LOG: statement: insert into test_Table (user_id) VALUES ( $1 )
>>>CONTEXT: PL/pgSQL function "test_function" line 5 at SQL statement
>>>DEBUG: parse tree:
>>>etc,etc
>>>
>>>
>>>On Wed, Mar 30, 2005 at 06:10:13AM -0500, Dave Cramer wrote:
>>>
>>>
>>>
>>>
>>>>What do the logs say when you excecute this from psql ?
>>>>
>>>>Dave
>>>>
>>>>fake@dusk.homelinux.org wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>When executing the following statments from netbeans 4.1 sun app server
>>>>>8.1
>>>>>
>>>>>CallableStatement proc = con.prepareCall("{ ? = call test_function ( ?
>>>>>) }");
>>>>>proc.registerOutParameter(1, Types.BOOLEAN);
>>>>>proc.setString(2, "testthis");
>>>>>proc.execute();
>>>>>
>>>>>This shows up in my server log.
>>>>>
>>>>>LOG: statement: select * from test_function ( 'thisTest' ) as result;
>>>>>ERROR: function test_function("unknown") does not exist
>>>>>HINT: No function matches the given name and argument types. You may
>>>>>need to add explicit type casts.
>>>>>
>>>>>
>>>>>And I get an exception from my app server that states "No function"
>>>>>etc, etc...
>>>>>
>>>>>Now, if I cut and paste that into my psql terminal it appears to
>>>>>work... So I'm really curious as to why it doesn't work through jdbc...
>>>>>
>>>>>Couple of things: I'm getting my connection through a connection pool
>>>>>on my app server and that appears to be in working order...
>>>>>
>>>>>Any suggestions?
>>>>>
>>>>>
>>>>>Gary Lucas
>>>>>
>>>>>---------------------------(end of broadcast)---------------------------
>>>>>TIP 8: explain analyze is your friend
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>--
>>>>Dave Cramer
>>>>http://www.postgresintl.com
>>>>519 939 0336
>>>>ICQ#14675561
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>--
>>Dave Cramer
>>http://www.postgresintl.com
>>519 939 0336
>>ICQ#14675561
>>
>>
>
>
>
>
--
Dave Cramer
http://www.postgresintl.com
519 939 0336
ICQ#14675561
----- End forwarded message -----