Werner,
Thx. for your reply. Okay. I am doing this for an app that I am trying to
port to derby and postgresql. I will make a simple project.
Steve
----- Original Message -----
From: "Werner Guttmann" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, January 25, 2008 6:22 PM
Subject: Re: [castor-user] read-only connection for generating keys for
postgres.
I think I'll need a full test case so that I am able to run it against e.g.
Derby. Can you please supply us with one ?
Werner
Stephen Ince wrote:
Werner,
The read-only connection error showed up again on postgres. So "<param
name="same-connection" value="false"/>" didn't resolve the problem. This
problem only occurs with postgresql and derby. Hsqldb, db2, oracle and
sqlserver all work fine. I think it has something to do with getting a
connection from a pool that was previously set to read-only.
Steve
A fatal error occurred while creating/updating
com.opendemand.security.UserProfi
le using SQL: UPDATE "users" SET
"user_name"=?,"title"=?,"fname"=?,"minitial"=?,
"lname"=?,"passwd"=?,"role"=?,"status"=?,"license"=?,"total_test_ran"=?,"test_ti
me"=?,"last_login_time"=?,"test_time_elapsed"=?,"group_id"=?,"company"=?,"accept
_license"=?,"email"=?,"url"=?,"referred_by"=?,"telephone"=?,"fax"=?,"address"=?,
"city"=?,"state"=?,"zipcode"=?,"country"=? WHERE "user_id"=?
org.postgresql.util.PSQLException: ERROR: transaction is read-only
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryEx
ecutorImpl.java:1548)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutor
Impl.java:1316)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.ja
Steve
----- Original Message ----- From: "Werner Guttmann"
<[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, January 25, 2008 4:30 PM
Subject: Re: [castor-user] read-only connection for generating keys for
postgres.
Interesting, indeed. How did you come about this solution for
postgreSQL, if I may ask ?
Werner
Stephen Ince wrote:
Werner,
I think I solved the problem for postgres but not derby.
<mapping>
<key-generator name="HIGH-LOW" alias="keygen">
:
<param name="same-connection" value="false"/>
</key-generator>
</mapping>
This seemed to worked for postgres. With derby I get a similiar error.
Nested error: java.sql.SQLException: An SQL data change is not
permitted for a read-only connection, user or database.: An SQL data
change is not permitted for a read-only connection, user or database.
Steve
----- Original Message -----
From: "Werner Guttmann" <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>>
To: <[email protected] <mailto:[email protected]>>
Sent: Friday, January 25, 2008 3:48 PM
Subject: Re: [castor-user] read-only connection for generating keys for
postgres.
> Stephen,
>
> can you supply me with a test case (packaged as part of a Jira
issue) so
> that I could easily replay this problem ?
>
> Regards
> Werner
>
> Stephen Ince wrote:
>> I am getting the following error when I try to save an object using
a
>> key sequence.
>> This works fine for oracle, sqlserver, hsqldb and db2.
>>
>> Here is my database.xml. Is there something I can do it to force
castor
>> to use a different connection to get the keys or change connection
from
>> read-only to non read-only?
>>
>> org.exolab.castor.jdo.keygen.MaxKeyGenerator:
>> org.postgresql.util.PSQLException: ERROR: transaction is
read-only.:
>> ERROR: transaction is read-only
>>
>> <!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Mapping DTD Version
1.0//EN"
>> "http://castor.exolab.org/mapping.dtd">
>> <mapping>
>> <key-generator name="HIGH-LOW" alias="keygen">
>> <param name="table" value="seq"/>
>> <param name="key-column" value="seq_table_name"/>
>> <param name="value-column" value="max_pk_value"/>
>> <param name="grab-size" value="50"/>
>> <param name="same-connection" value="true"/>
>> </key-generator>
>> </mapping>
>>
>> Steve
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list please visit:
>>
>> http://xircles.codehaus.org/manage_email
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email