agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
Subject: [Pljava-dev] java.sql.SQLException: An attempt was made to call a PostgreSQL backend function while main thread was not in the JVM
Date: Sun, 19 Sep 2004 18:19:04 +0200
Message-ID: <thhal-0+kkpAhmuUykhor5MHRmPbFrDeYAmqu@mailblocks.com> (raw)
In-Reply-To: <414DAD18.6080405@click.cz>
References: <414DAD18.6080405@click.cz>
	<414DB178.7030908@mailblocks.com>
	<thhal-0+UkpAheuUykbbOnnjLzP0lZe6ZTvie@mailblocks.com>

Petr,

> Hi!
>
> I am repeatedly calling SQL function, and trigger function fired by 
> "UPDATE" in sql function crashes with folowing exception. Crash is 
> reliable after 100 calls.
>
> java.sql.SQLException: ERROR: java.sql.SQLException: An attempt was 
> made to call a PostgreSQL backend function while main thread was not 
> in the JVM
> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1130) 
> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:933) 
>
> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:139) 
>
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:346) 
>
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:294) 
>
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:285) 
>
>
> Exception is generated by native method in class 
> org.postgresql.pljava.internal.TriggerData function
>
>     public boolean isFiredAfter() throws SQLException
>     {
>         synchronized(Backend.THREADLOCK)
>         {
> >>>            return this._isFiredAfter();
>         }
>     }

I'd like to see the error generated by the backend (the backtrace above 
is from the client driver). Can you copy that from the backend log and 
email it to me? Also, info concerning the versions of postgresql, 
pljava, and java is helpful. A code example that I can run in order to 
reproduce your problem is of course ideal.

Thanks,

Thomas Hallgren






view thread (4+ messages)  latest in thread

Message-ID: <thhal-0+kkpAhmuUykhor5MHRmPbFrDeYAmqu@mailblocks.com>
Permalink:  ../thhal-0+kkpAhmuUykhor5MHRmPbFrDeYAmqu@mailblocks.com/
Also on:    postgresql.org/message-id/thhal-0+kkpAhmuUykhor5MHRmPbFrDeYAmqu@mailblocks.com

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: An attempt was made to call a PostgreSQL backend function while main thread was not in the JVM
  In-Reply-To: <thhal-0+kkpAhmuUykhor5MHRmPbFrDeYAmqu@mailblocks.com>

* 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