agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
[Pljava-dev] java.sql.SQLException: SPI function SPI_prepare failed with error SPI_ERROR_UNCONNECTED
2+ messages / 0 participants
[nested] [flat]

* [Pljava-dev] java.sql.SQLException: SPI function SPI_prepare failed with error SPI_ERROR_UNCONNECTED
@ 2006-11-25 01:05  
  0 siblings, 1 reply; 2+ messages in thread

From:  @ 2006-11-25 01:05 UTC (permalink / raw)

Hello everybody !!!

My name is Cl?udio Ferraz, i m  from Brazil.
I am receiving the following error when execute my java procedure

INFO:  24 Nov 06 22:43:38 java.sql.SQLException: SPI function SPI_prepare
failed with error SPI_ERROR_UNCONNECTED

My procedure is a schedule that execute a taks every X seconds.
The schedule  works, but every X secunds i receive the error message,  and
my task breaks.


INFO:  24 Nov 06 22:43:38 axml.AgenteVerificador Agente still running...
INFO:  24 Nov 06 22:43:38 axml.AgenteVerificador Erro ao pegar
servi?os...java.sql.SQLException: SPI function SPI_prepare failed with error
SPI_ERROR_UNCONNECTED
INFO:  24 Nov 06 22:43:43 axml.AgenteVerificador Agente still running...
INFO:  24 Nov 06 22:43:43 axml.AgenteVerificador Erro ao pegar
servi?os...java.sql.SQLException: SPI function SPI_prepare failed with error
SPI_ERROR_UNCONNECTED

Sorry my poor english,  thanks everybody !

-- 
Cl?udio A. Ferraz - Analista de Sistemas
Mestrando em Banco de Dados COPPE/UFRJ
"Se n?o puder fazer tudo, fa?a tudo o que puder."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20061124/761552e4/attachment.html;



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* [Pljava-dev] java.sql.SQLException: SPI function SPI_prepare failed with error SPI_ERROR_UNCONNECTED
@ 2006-11-25 16:16  
  parent: 
  0 siblings, 0 replies; 2+ messages in thread

From:  @ 2006-11-25 16:16 UTC (permalink / raw)

Hi Claudio,
Have you thought about the transaction semantics of this procedure? A transaction will 
always be active when you call the procedure. It will remain active during the call. When 
the call returns, the transaction will (perhaps) end.

So, if you for instance have a call that never returns (it iterates forever and does 
something each second instead), that means your transaction will never commit. If you 
instead spawn a new thread and then return and that thread sits in the background and 
attempts to access the database once every second, then it's very likely that you get the 
errors that you now see. The transaction is no longer active. It ended when the main thread 
did returned from the initial call.

Kind Regards,
Thomas Hallgren

claudio ferraz wrote:
> Hello everybody !!!
> 
> My name is Cl?udio Ferraz, i m  from Brazil.
> I am receiving the following error when execute my java procedure
> 
> INFO:  24 Nov 06 22:43:38 java.sql.SQLException: SPI function 
> SPI_prepare failed with error SPI_ERROR_UNCONNECTED
> 
> My procedure is a schedule that execute a taks every X seconds.
> The schedule  works, but every X secunds i receive the error message,  
> and my task breaks.
>
> 
> INFO:  24 Nov 06 22:43:38 axml.AgenteVerificador Agente still running...
> INFO:  24 Nov 06 22:43:38 axml.AgenteVerificador Erro ao pegar 
> servi?os...java.sql.SQLException: SPI function SPI_prepare failed with 
> error SPI_ERROR_UNCONNECTED
> INFO:  24 Nov 06 22:43:43 axml.AgenteVerificador Agente still running...
> INFO:  24 Nov 06 22:43:43 axml.AgenteVerificador Erro ao pegar 
> servi?os...java.sql.SQLException: SPI function SPI_prepare failed with 
> error SPI_ERROR_UNCONNECTED
> 
> Sorry my poor english,  thanks everybody !
> 
> -- 
> Cl?udio A. Ferraz - Analista de Sistemas
> Mestrando em Banco de Dados COPPE/UFRJ
> "Se n?o puder fazer tudo, fa?a tudo o que puder."
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at gborg.postgresql.org
> http://gborg.postgresql.org/mailman/listinfo/pljava-dev





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2006-11-25 16:16 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-11-25 01:05 [Pljava-dev] java.sql.SQLException: SPI function SPI_prepare failed with error SPI_ERROR_UNCONNECTED 
2006-11-25 16:16 ` 

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox