Re: Problem with driver

Поиск
Список
Период
Сортировка
От Barry Lind
Тема Re: Problem with driver
Дата
Msg-id 3E6EF4B8.2000609@xythos.com
обсуждение исходный текст
Ответ на Re: Problem with driver  (J M Okomba <Okomba@kabage.co.ke>)
Список pgsql-jdbc
Can you be more specific.  I don't know what you mean by 'latin1 errors'
or 'sql_ascii errors' or 'unicode errors'?  What are these attached
files showing us?  Can you provide test cases (simple code examples that
we can compile and run here) that demonstrate your problem?

thanks,
--Barry

J M Okomba wrote:
> After some more trials I have found out that the problem is with the
> encoding. The problematic table has a £ (pound) entry, which pg73jdbc3 is
> having difficulties retrieving. I did tests with pg73jdbc3 using different
> encoding and found the attached results:
>
>          <<LATIN1-errors.txt>>                    <<SQL_ASCII-errors.txt>>
>  <<UNICODE-errors.txt>>
>
> Tests with pgjdbc2 gave the attached results:
>
>       <<pgjdbc2-LATIN1.txt>>
> <<pgjdbc2-UNICODE-errors.txt>>
> It appears that UNICODE has a problem even with pgjdbc2.
>
> Attached is the Java file
>
>  <<TestJDBC.java>>
> Please help.
>
>
>
>>-----Original Message-----
>>From:    J M Okomba [SMTP:Okomba@kabage.co.ke]
>>Sent:    11 March 2003 15:48
>>To:    'pgsql-jdbc'
>>Subject:    Re: [JDBC] Problem with driver
>>
>>
>>After doing some more tests I have discovered that the problem is most
>>likely being caused by the context  (environment) of the application I am
>>calling. I have managed to access the problematic table from a bare Java
>>application. I will try to find out why I can't access it from a
>>JSP/servlet.
>>
>>Thanks.
>>
>>
>>>-----Original Message-----
>>>From:    Dave Cramer [SMTP:Dave@micro-automation.net]
>>>Sent:    11 March 2003 12:14
>>>To:    J M Okomba
>>>Cc:    'pgsql-jdbc'
>>>Subject:    Re: [JDBC] Problem with driver
>>>
>>>Can you send us a test case so we can replicate the problem here
>>>
>>>Dave
>>>On Tue, 2003-03-11 at 01:40, J M Okomba wrote:
>>>
>>>>I keep getting this error:
>>>>
>>>>Database error in EmbeddedData.fetchData Invalid character data was
>>>
>>>found.
>>>
>>>>This is most likely caused by stored data containing characters that
>>
>>are
>>
>>>>invalid for the character set the database was created in. The most
>>>
>>>common
>>>
>>>>example of this is storing 8bit data in a SQL_ASCII database
>>>>
>>>>with current postgres drivers downloaded from
>>>>http://jdbc.postgresql.org/download/ (like pg73jdbc3.jar and others).
>>>
>>>The
>>>
>>>>error is only thrown when I try to access one table (other tables in
>>
>>the
>>
>>>>database work fine).
>>>>
>>>>However I don't get this error with pgjdbc2.jar, which I downloaded
>>>
>>>about 8
>>>
>>>>months ago.
>>>>
>>>>I will appreciate any help to resolve the problem. I really need to
>>
>>use
>>
>>>new
>>>
>>>>features in the updated drivers.
>>>>
>>>>
>>>>---------------------------(end of
>>
>>broadcast)---------------------------
>>
>>>>TIP 3: if posting/reading through Usenet, please send an appropriate
>>>>subscribe-nomail command to majordomo@postgresql.org so that your
>>>>message can get through to the mailing list cleanly
>>>
>>>--
>>>Dave Cramer <Dave@micro-automation.net>
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 4: Don't 'kill -9' the postmaste
>
> r
>
>
> ------------------------------------------------------------------------
>
>
>
> 2 - entry
> DM - entry
> Deutsch Marks - entry
> null - entry
> 000.00 - entry
> false - entry
> null - entry
> =====================================================
> 5 - entry
> Invalid character data was found.  This is most likely caused by stored data containing characters that are invalid
forthe character set the database was created in.  The most common example of this is storing 8bit data in a SQL_ASCII
database.- sqle.getMessage()   
> Invalid character data was found.  This is most likely caused by stored data containing characters that are invalid
forthe character set the database was created in.  The most common example of this is storing 8bit data in a SQL_ASCII
database.
>         at org.postgresql.core.Encoding.decodeUTF8(Encoding.java:270)
>         at org.postgresql.core.Encoding.decode(Encoding.java:165)
>         at org.postgresql.core.Encoding.decode(Encoding.java:181)
>         at org.postgresql.jdbc1.AbstractJdbc1ResultSet.getString(AbstractJdbc1ResultSet.java:97)
>         at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getObject(AbstractJdbc2ResultSet.java:120)
>         at org.postgresql.jdbc1.AbstractJdbc1ResultSet.getObject(AbstractJdbc1ResultSet.java:514)
>         at temp.TestJDBC.main(TestJDBC.java:105)
>
>
>
> ------------------------------------------------------------------------
>
>
> 2 - entry
> DM - entry
> Deutsch Marks - entry
> null - entry
> 000.00 - entry
> false - entry
> null - entry
> =====================================================
> 5 - entry
> Invalid character data was found.  This is most likely caused by stored data containing characters that are invalid
forthe character set the database was created in.  The most common example of this is storing 8bit data in a SQL_ASCII
database.- sqle.getMessage()   
> Invalid character data was found.  This is most likely caused by stored data containing characters that are invalid
forthe character set the database was created in.  The most common example of this is storing 8bit data in a SQL_ASCII
database.
>         at org.postgresql.core.Encoding.decodeUTF8(Encoding.java:270)
>         at org.postgresql.core.Encoding.decode(Encoding.java:165)
>         at org.postgresql.core.Encoding.decode(Encoding.java:181)
>         at org.postgresql.jdbc1.AbstractJdbc1ResultSet.getString(AbstractJdbc1ResultSet.java:97)
>         at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getObject(AbstractJdbc2ResultSet.java:120)
>         at org.postgresql.jdbc1.AbstractJdbc1ResultSet.getObject(AbstractJdbc1ResultSet.java:514)
>         at temp.TestJDBC.main(TestJDBC.java:105)
>
>
> ------------------------------------------------------------------------
>
>
> Something unusual has occured to cause the driver to fail. Please report this exception: Exception:
java.sql.SQLException: 
> Stack Trace:
> java.sql.SQLException:
>         at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131)
>         at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:482)
>         at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:461)
>         at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Connection.java:375)
>         at org.postgresql.Driver.connect(Driver.java:122)
>         at java.sql.DriverManager.getConnection(DriverManager.java:512)
>         at java.sql.DriverManager.getConnection(DriverManager.java:171)
>         at temp.TestJDBC.main(TestJDBC.java:76)
> End of Stack Trace
>  - sqle.getMessage()
> Something unusual has occured to cause the driver to fail. Please report this exception: Exception:
java.sql.SQLException: 
> Stack Trace:
> java.sql.SQLException:
>         at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131)
>         at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:482)
>         at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:461)
>         at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Connection.java:375)
>         at org.postgresql.Driver.connect(Driver.java:122)
>         at java.sql.DriverManager.getConnection(DriverManager.java:512)
>         at java.sql.DriverManager.getConnection(DriverManager.java:171)
>         at temp.TestJDBC.main(TestJDBC.java:76)
> End of Stack Trace
>         at org.postgresql.Driver.connect(Driver.java:141)
>         at java.sql.DriverManager.getConnection(DriverManager.java:512)
>         at java.sql.DriverManager.getConnection(DriverManager.java:171)
>         at temp.TestJDBC.main(TestJDBC.java:76)
>
>
> ------------------------------------------------------------------------
>
>
>
> 2 - entry
> DM - entry
> Deutsch Marks - entry
> null - entry
> 000.00 - entry
> false - entry
> null - entry
> =====================================================
> 5 - entry
> UK£ - entry
> Pounds Sterling - entry
> null - entry
> 000.00 - entry
> false - entry
> null - entry
> =====================================================
> 6 - entry
> US$ - entry
> US Dollars - entry
> null - entry
> 000.01 - entry
> false - entry
> null - entry
> =====================================================
> 7 - entry
> USH - entry
> Uganda Shillings - entry
> null - entry
> 001.00 - entry
> false - entry
> null - entry
> =====================================================
> 8 - entry
> ZIM$ - entry
> Zimbabwe Dollars - entry
> null - entry
> 001.00 - entry
> false - entry
> null - entry
> =====================================================
> 3 - entry
> KSH - entry
> Kenya Shillings - entry
> KENYA - entry
> 000.05 - entry
> true - entry
>  - entry
> =====================================================
> 4 - entry
> RAND - entry
> South African Rand - entry
> RSA - entry
> 000.00 - entry
> false - entry
>  - entry
> =====================================================
> 9 - entry
> T.Shs - entry
> Tanzania Shillings - entry
> TANZ - entry
> 000.00 - entry
> false - entry
>  - entry
> =====================================================
> 12 - entry
> USHSs - entry
> Uganda Shillings - entry
> UG - entry
>  - entry
> false - entry
>  - entry
> =====================================================
>
>
>
>
> ------------------------------------------------------------------------
>
>
>
>  - sqle.getMessage()
> java.sql.SQLException:
>         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.executeQuery(Statement.java:54)
>         at temp.TestJDBC.main(TestJDBC.java:82)
>
>
>
>
> ------------------------------------------------------------------------
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly



В списке pgsql-jdbc по дате отправления:

Предыдущее
От: J M Okomba
Дата:
Сообщение: Re: Problem with driver
Следующее
От: J M Okomba
Дата:
Сообщение: Re: Problem with driver