Subject | Me Too - Re: Text blob NullPointerException |
---|---|
Author | Jeff Roberts |
Post date | 2005-09-07T15:12:09Z |
I am seeing this exact problem. We are using Hibernate 3 with
JayBird 1.5.5 and as stated, you can write to a BLOB but not read.
I re-tried today with the 2.0.0 RC1 driver and with that version I
now get a similar exception in *Output*StreamWriter when I first try
to WRITE to the BLOB.
Both InputStreamReader and OutputStreamWriter appear to have a
constructor that accepts no charset and "uses the default charset".
Is there a known problem? Is there a way to specify a character set
that I'm not aware of, and if so, can it be done via Hibernate or a
setting on the datasource?
-Jeff
--- In Firebird-Java@yahoogroups.com, Grzegorz Kowal
<grzegorz_7_7@o...> wrote:
(Loader.java:133)
JayBird 1.5.5 and as stated, you can write to a BLOB but not read.
I re-tried today with the 2.0.0 RC1 driver and with that version I
now get a similar exception in *Output*StreamWriter when I first try
to WRITE to the BLOB.
Both InputStreamReader and OutputStreamWriter appear to have a
constructor that accepts no charset and "uses the default charset".
Is there a known problem? Is there a way to specify a character set
that I'm not aware of, and if so, can it be done via Hibernate or a
setting on the datasource?
-Jeff
--- In Firebird-Java@yahoogroups.com, Grzegorz Kowal
<grzegorz_7_7@o...> wrote:
>Java/message/7080
> Hi,
>
> JayBird 1.5.5 causes a NPE when reading a text blob on Windows, but
> everything is ok on Linux. Version 1.01 works fine on both systems.
> Same issue: http://groups.yahoo.com/group/Firebird-
>(TranslatingReader.java:79)
> java.lang.NullPointerException: charsetName
> at java.io.InputStreamReader.<init>(Unknown Source)
> at
> org.firebirdsql.jdbc.field.TranslatingReader.<init>
> at(TranslatingReader.java:54)
> org.firebirdsql.jdbc.field.TranslatingReader.getInstance
> at(FBField.java:604)
> org.firebirdsql.jdbc.field.FBField.getCharacterStream
> at(FBResultSet.java:754)
> org.firebirdsql.jdbc.FBResultSet.getCharacterStream
> at(DelegatingResultSet.java:298)
> org.apache.commons.dbcp.DelegatingResultSet.getCharacterStream
> at(DelegatingResultSet.java:298)
> org.apache.commons.dbcp.DelegatingResultSet.getCharacterStream
> at net.sf.hibernate.type.TextType.get(TextType.java:29)(NullableType.java:62)
> at net.sf.hibernate.type.NullableType.nullSafeGet
> at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:53)
> at net.sf.hibernate.type.AbstractType.hydrate(AbstractType.java:66)
> at net.sf.hibernate.loader.Loader.hydrate(Loader.java:686)(Loader.java:627)
> at net.sf.hibernate.loader.Loader.loadFromResultSet
> at net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:586)
> at net.sf.hibernate.loader.Loader.getRow(Loader.java:501)(Loader.java:213)
> at net.sf.hibernate.loader.Loader.getRowFromResultSet
> at net.sf.hibernate.loader.Loader.doQuery(Loader.java:281)net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections
> at
>
(Loader.java:133)
> at net.sf.hibernate.loader.Loader.doList(Loader.java:1033)(QueryTranslator.java:854)
> at net.sf.hibernate.loader.Loader.list(Loader.java:1024)
> at net.sf.hibernate.hql.QueryTranslator.list
> at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1544)
> at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1521)
> at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1513)
>WIN1250,
> CREATE TABLE "SH_SKRYPTY"
> (
> "UID" NUMERIC(18, 0) NOT NULL,
> "VERSION" INTEGER NOT NULL,
> "SID" VARCHAR(80) CHARACTER SET WIN1250 COLLATE PXW_PLK,
> "VTYPE" INTEGER,
> "VTEXT" BLOB SUB_TYPE TEXT SEGMENT SIZE 80 CHARACTER SET
> PRIMARY KEY ("UID")
> );
>
> Windows Xp Pro SP2, Firebird 1.5.2
> JayBird 1.5.5
> Hibernate 2.1.8
> JRE version 1.4.2_06 / 1.5.0_01
>
>
> Thanks,
> Grzegorz