You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Colm McCartan <co...@owl.co.uk> on 2002/01/16 16:54:15 UTC
Fixed! Re: postgres and turbine
Rhys Dixon wrote:
> hi guys,
>
> if your jdbc driver returns Types.OTHER (1111) then village will convert
> that hashtable to a string. if it returns Types.BINARY (-2) then it
> converts it to a byte[]. the "Unterminated quoted string" error is
> probably a result of the driver reporting Types.OTHER (1111).
>
> i built village from source after adding some debugging printouts at the
> part where it decides how to store a particular object.
> i moved the original village.jar out of the way and added this jar to my
> WEB-INF/lib
>
> http://www.dyxn.net/public/village-debug.jar
Rhys -
Thanks for the info. Eventually I was forced to build my own version of
the jar because, even with yours I was getting strange errors:
java.lang.reflect.InvocationTargetException: java.sql.SQLException:
ERROR: Attribute 'objectdata' is of type 'bytea' but expression is of
type 'int4' You will need to rewrite or cast the expression at
org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:94) at
org.postgresql.Connection.ExecSQL(Connection.java:398) at
org.postgresql.jdbc2.Statement.execute(Statement.java:130) at
org.postgresql.jdbc2.Statement.executeUpdate(Statement.java:73) at
org.postgresql.jdbc2.PreparedStatement.executeUpdate(PreparedStatement.java:113)
at com.workingdogs.village.Record.saveWithUpdate(Record.java:272)
I copied what you had done to the village source to get some visibilty
and was seeing this from the messages:
[Wed Jan 16 15:38:05 GMT 2002] -- INFO -- *** DMS *** null - objectdata
is a bytea (-2)
When I built the postgres.jar from the 7.2b3 src I noticed that it is
only 93K in size - yours is 190K. Is there a possibility that you have
the wrong one at the url (http://www.dyxn.net/public/postgresql.jar)? I
would post a url for mine but I don't have convenient access to a web
area - anyone who would like me to mail it to them please contact me.
Perhaps it could go onto the jakarta site somewhere after further testing?
To anyone interested, I am using my jar to connect to postgres server
7.1.2-4 and I have modified my db.props as per Rhys's instructions
(mapping VARBINARY to bytea).
Should these changes be committed to the 2.1 TDK tree? I'd be happy to
offer the patches and some changes to the postgres howto.
colm
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Fixed! Re: postgres and turbine
Posted by Rhys Dixon <rh...@dyxn.net>.
great! did you also set BINARY=bytea in your db.props?
i compared the jars. you are right, the jar on my website was the one
from the tdk 2.1 distribution.
i apologize. i have replaced it with the one from my working pgsql
webapp in case someone wants it in the future.
rhys
Colm McCartan wrote:
>
>
> Rhys Dixon wrote:
>
>> hi guys,
>>
>> if your jdbc driver returns Types.OTHER (1111) then village will convert
>> that hashtable to a string. if it returns Types.BINARY (-2) then it
>> converts it to a byte[]. the "Unterminated quoted string" error is
>> probably a result of the driver reporting Types.OTHER (1111).
>>
>> i built village from source after adding some debugging printouts at the
>> part where it decides how to store a particular object.
>> i moved the original village.jar out of the way and added this jar to my
>> WEB-INF/lib
>>
>> http://www.dyxn.net/public/village-debug.jar
>
>
>
> Rhys -
>
> Thanks for the info. Eventually I was forced to build my own version
> of the jar because, even with yours I was getting strange errors:
>
> java.lang.reflect.InvocationTargetException: java.sql.SQLException:
> ERROR: Attribute 'objectdata' is of type 'bytea' but expression is of
> type 'int4' You will need to rewrite or cast the expression at
> org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:94) at
> org.postgresql.Connection.ExecSQL(Connection.java:398) at
> org.postgresql.jdbc2.Statement.execute(Statement.java:130) at
> org.postgresql.jdbc2.Statement.executeUpdate(Statement.java:73) at
> org.postgresql.jdbc2.PreparedStatement.executeUpdate(PreparedStatement.java:113)
> at com.workingdogs.village.Record.saveWithUpdate(Record.java:272)
>
> I copied what you had done to the village source to get some visibilty
> and was seeing this from the messages:
>
> [Wed Jan 16 15:38:05 GMT 2002] -- INFO -- *** DMS *** null -
> objectdata is a bytea (-2)
>
> When I built the postgres.jar from the 7.2b3 src I noticed that it is
> only 93K in size - yours is 190K. Is there a possibility that you have
> the wrong one at the url (http://www.dyxn.net/public/postgresql.jar)?
> I would post a url for mine but I don't have convenient access to a
> web area - anyone who would like me to mail it to them please contact
> me. Perhaps it could go onto the jakarta site somewhere after further
> testing?
>
> To anyone interested, I am using my jar to connect to postgres server
> 7.1.2-4 and I have modified my db.props as per Rhys's instructions
> (mapping VARBINARY to bytea).
>
> Should these changes be committed to the 2.1 TDK tree? I'd be happy to
> offer the patches and some changes to the postgres howto.
>
> colm
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Fixed! Re: postgres and turbine
Posted by Daniel Rall <dl...@finemaltcoding.com>.
Colm McCartan <co...@owl.co.uk> writes:
> To anyone interested, I am using my jar to connect to postgres server
> 7.1.2-4 and I have modified my db.props as per Rhys's instructions
> (mapping VARBINARY to bytea).
>
> Should these changes be committed to the 2.1 TDK tree? I'd be happy to
> offer the patches and some changes to the postgres howto.
Please send patches to turbine-dev. I'll take patches to 2.1, but in
the future patches to the stand-alone repositories are preferred (I
realize that this isn't easy for everyone until a release happens, but
just want to point out the quickest route to getting random patches
included).
Daniel
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>