agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feedSubject: [Pljava-dev] java.sql.SQLException: SPI function SPI_prepare failed with error SPI_ERROR_UNCONNECTED
Date: Sat, 25 Nov 2006 17:16:34 +0100
Message-ID: <45686C62.6050806@tada.se> (raw)
In-Reply-To: <d522589d0611241705h3fd69568qf4883031587845f8@mail.gmail.com>
References: <d522589d0611241705h3fd69568qf4883031587845f8@mail.gmail.com>
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
view thread (2+ messages)
Message-ID: <45686C62.6050806@tada.se>
Permalink: ../45686C62.6050806@tada.se/
Also on: postgresql.org/message-id/45686C62.6050806@tada.se
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pljava-dev@postgresql.org
Subject: Re: [Pljava-dev] java.sql.SQLException: SPI function SPI_prepare failed with error SPI_ERROR_UNCONNECTED
In-Reply-To: <45686C62.6050806@tada.se>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox