In my postgreSQL there is a blob field with data-type bytea (byte array). So i tried mapping with byte[], string, binary but none of them worked. Almost all my tables have atleast one bytea data type field.
Hibernate version: 3.2
Mapping documents: <property name="seriesAttrs" column="series_attrs" type="binary" not-null="false" />
Code between sessionFactory.openSession() and session.close(): session = HibernateUtil.getSessionFactory().openSession(); instList = session.createQuery( "from Series").list();
Full stack trace of any exception that occurs: 14:03:28,390 INFO ByteType:132 - could not read column value from result set: all15_5_0_; Bad value for type byte : f 14:03:28,406 WARN JDBCExceptionReporter:77 - SQL Error: 0, SQLState: 22003 14:03:28,406 ERROR JDBCExceptionReporter:78 - Bad value for type byte : f 14:03:28,406 ERROR SeriesDAO:92 - Unable to find the institute name in each series : Courtesy : findFramesInSeries of SeriesDAO could not initialize a collection: [com.qvantel.nomir.arc.vo.Series.instance#9] org.hibernate.exception.DataException: could not initialize a collection: [com.qvantel.nomir.arc.vo.Series.instance#9] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:77) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.loader.Loader.loadCollection(Loader.java:1992) at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36)
Using database PostgreSQL version 8.2
The generated SQL : Hibernate: select series0_.pk as pk2_, series0_.series_iuid as series2_2_, series0_.series_no as series3_2_, series0_.modality as modality2_, series0_.body_part as body5_2_, series0_.laterality as laterality2_, series0_.series_desc as series7_2_, series0_.institution as institut8_2_, series0_.department as department2_, series0_.pps_start as pps10_2_, series0_.pps_iuid as pps11_2_, series0_.series_custom1 as series12_2_, series0_.series_custom2 as series13_2_, series0_.series_custom3 as series14_2_, series0_.num_instances as num15_2_, series0_.src_aet as src16_2_, series0_.ext_retr_aet as ext17_2_, series0_.retrieve_aets as retrieve18_2_, series0_.fileset_iuid as fileset19_2_, series0_.fileset_id as fileset20_2_, series0_.availability as availab21_2_, series0_.series_status as series22_2_, series0_.created_time as created23_2_, series0_.updated_time as updated24_2_, series0_.series_attrs as series25_2_, series0_.study_fk as study26_2_ from series series0_ Hibernate: select study0_.pk as pk0_0_, study0_.study_iuid as study2_0_0_, study0_.study_id as study3_0_0_, study0_.study_datetime as study4_0_0_, study0_.accession_no as accession5_0_0_, study0_.ref_physician as ref6_0_0_, study0_.ref_phys_i_name as ref7_0_0_, study0_.ref_phys_p_name as ref8_0_0_, study0_.study_desc as study9_0_0_, study0_.study_custom1 as study10_0_0_, study0_.study_custom2 as study11_0_0_, study0_.study_custom3 as study12_0_0_, study0_.study_status_id as study13_0_0_, study0_.mods_in_study as mods14_0_0_, study0_.num_series as num15_0_0_, study0_.num_instances as num16_0_0_, study0_.ext_retr_aet as ext17_0_0_, study0_.retrieve_aets as retrieve18_0_0_, study0_.fileset_iuid as fileset19_0_0_, study0_.fileset_id as fileset20_0_0_, study0_.availability as availab21_0_0_, study0_.study_status as study22_0_0_, study0_.checked_time as checked23_0_0_, study0_.updated_time as updated24_0_0_, study0_.created_time as created25_0_0_, study0_.study_attrs as study26_0_0_, study0_.patient_fk as patient27_0_0_ from study study0_ where study0_.pk=? Hibernate: select patient0_.pk as pk1_0_, patient0_.pat_id as pat2_1_0_, patient0_.pat_id_issuer as pat3_1_0_, patient0_.pat_name as pat4_1_0_, patient0_.pat_i_name as pat5_1_0_, patient0_.pat_p_name as pat6_1_0_, patient0_.pat_birthdate as pat7_1_0_, patient0_.pat_sex as pat8_1_0_, patient0_.pat_custom1 as pat9_1_0_, patient0_.pat_custom2 as pat10_1_0_, patient0_.pat_custom3 as pat11_1_0_, patient0_.updated_time as updated12_1_0_, patient0_.created_time as created13_1_0_, patient0_.pat_attrs as pat14_1_0_ from patient patient0_ where patient0_.pk=? Hibernate: select study0_.pk as pk0_0_, study0_.study_iuid as study2_0_0_, study0_.study_id as study3_0_0_, study0_.study_datetime as study4_0_0_, study0_.accession_no as accession5_0_0_, study0_.ref_physician as ref6_0_0_, study0_.ref_phys_i_name as ref7_0_0_, study0_.ref_phys_p_name as ref8_0_0_, study0_.study_desc as study9_0_0_, study0_.study_custom1 as study10_0_0_, study0_.study_custom2 as study11_0_0_, study0_.study_custom3 as study12_0_0_, study0_.study_status_id as study13_0_0_, study0_.mods_in_study as mods14_0_0_, study0_.num_series as num15_0_0_, study0_.num_instances as num16_0_0_, study0_.ext_retr_aet as ext17_0_0_, study0_.retrieve_aets as retrieve18_0_0_, study0_.fileset_iuid as fileset19_0_0_, study0_.fileset_id as fileset20_0_0_, study0_.availability as availab21_0_0_, study0_.study_status as study22_0_0_, study0_.checked_time as checked23_0_0_, study0_.updated_time as updated24_0_0_, study0_.created_time as created25_0_0_, study0_.study_attrs as study26_0_0_, study0_.patient_fk as patient27_0_0_ from study study0_ where study0_.pk=? Hibernate: select patient0_.pk as pk1_0_, patient0_.pat_id as pat2_1_0_, patient0_.pat_id_issuer as pat3_1_0_, patient0_.pat_name as pat4_1_0_, patient0_.pat_i_name as pat5_1_0_, patient0_.pat_p_name as pat6_1_0_, patient0_.pat_birthdate as pat7_1_0_, patient0_.pat_sex as pat8_1_0_, patient0_.pat_custom1 as pat9_1_0_, patient0_.pat_custom2 as pat10_1_0_, patient0_.pat_custom3 as pat11_1_0_, patient0_.updated_time as updated12_1_0_, patient0_.created_time as created13_1_0_, patient0_.pat_attrs as pat14_1_0_ from patient patient0_ where patient0_.pk=? Hibernate: select study0_.pk as pk0_0_, study0_.study_iuid as study2_0_0_, study0_.study_id as study3_0_0_, study0_.study_datetime as study4_0_0_, study0_.accession_no as accession5_0_0_, study0_.ref_physician as ref6_0_0_, study0_.ref_phys_i_name as ref7_0_0_, study0_.ref_phys_p_name as ref8_0_0_, study0_.study_desc as study9_0_0_, study0_.study_custom1 as study10_0_0_, study0_.study_custom2 as study11_0_0_, study0_.study_custom3 as study12_0_0_, study0_.study_status_id as study13_0_0_, study0_.mods_in_study as mods14_0_0_, study0_.num_series as num15_0_0_, study0_.num_instances as num16_0_0_, study0_.ext_retr_aet as ext17_0_0_, study0_.retrieve_aets as retrieve18_0_0_, study0_.fileset_iuid as fileset19_0_0_, study0_.fileset_id as fileset20_0_0_, study0_.availability as availab21_0_0_, study0_.study_status as study22_0_0_, study0_.checked_time as checked23_0_0_, study0_.updated_time as updated24_0_0_, study0_.created_time as created25_0_0_, study0_.study_attrs as study26_0_0_, study0_.patient_fk as patient27_0_0_ from study study0_ where study0_.pk=? Hibernate: select patient0_.pk as pk1_0_, patient0_.pat_id as pat2_1_0_, patient0_.pat_id_issuer as pat3_1_0_, patient0_.pat_name as pat4_1_0_, patient0_.pat_i_name as pat5_1_0_, patient0_.pat_p_name as pat6_1_0_, patient0_.pat_birthdate as pat7_1_0_, patient0_.pat_sex as pat8_1_0_, patient0_.pat_custom1 as pat9_1_0_, patient0_.pat_custom2 as pat10_1_0_, patient0_.pat_custom3 as pat11_1_0_, patient0_.updated_time as updated12_1_0_, patient0_.created_time as created13_1_0_, patient0_.pat_attrs as pat14_1_0_ from patient patient0_ where patient0_.pk=? Hibernate: select study0_.pk as pk0_0_, study0_.study_iuid as study2_0_0_, study0_.study_id as study3_0_0_, study0_.study_datetime as study4_0_0_, study0_.accession_no as accession5_0_0_, study0_.ref_physician as ref6_0_0_, study0_.ref_phys_i_name as ref7_0_0_, study0_.ref_phys_p_name as ref8_0_0_, study0_.study_desc as study9_0_0_, study0_.study_custom1 as study10_0_0_, study0_.study_custom2 as study11_0_0_, study0_.study_custom3 as study12_0_0_, study0_.study_status_id as study13_0_0_, study0_.mods_in_study as mods14_0_0_, study0_.num_series as num15_0_0_, study0_.num_instances as num16_0_0_, study0_.ext_retr_aet as ext17_0_0_, study0_.retrieve_aets as retrieve18_0_0_, study0_.fileset_iuid as fileset19_0_0_, study0_.fileset_id as fileset20_0_0_, study0_.availability as availab21_0_0_, study0_.study_status as study22_0_0_, study0_.checked_time as checked23_0_0_, study0_.updated_time as updated24_0_0_, study0_.created_time as created25_0_0_, study0_.study_attrs as study26_0_0_, study0_.patient_fk as patient27_0_0_ from study study0_ where study0_.pk=? Hibernate: select patient0_.pk as pk1_0_, patient0_.pat_id as pat2_1_0_, patient0_.pat_id_issuer as pat3_1_0_, patient0_.pat_name as pat4_1_0_, patient0_.pat_i_name as pat5_1_0_, patient0_.pat_p_name as pat6_1_0_, patient0_.pat_birthdate as pat7_1_0_, patient0_.pat_sex as pat8_1_0_, patient0_.pat_custom1 as pat9_1_0_, patient0_.pat_custom2 as pat10_1_0_, patient0_.pat_custom3 as pat11_1_0_, patient0_.updated_time as updated12_1_0_, patient0_.created_time as created13_1_0_, patient0_.pat_attrs as pat14_1_0_ from patient patient0_ where patient0_.pk=? Hibernate: select study0_.pk as pk0_0_, study0_.study_iuid as study2_0_0_, study0_.study_id as study3_0_0_, study0_.study_datetime as study4_0_0_, study0_.accession_no as accession5_0_0_, study0_.ref_physician as ref6_0_0_, study0_.ref_phys_i_name as ref7_0_0_, study0_.ref_phys_p_name as ref8_0_0_, study0_.study_desc as study9_0_0_, study0_.study_custom1 as study10_0_0_, study0_.study_custom2 as study11_0_0_, study0_.study_custom3 as study12_0_0_, study0_.study_status_id as study13_0_0_, study0_.mods_in_study as mods14_0_0_, study0_.num_series as num15_0_0_, study0_.num_instances as num16_0_0_, study0_.ext_retr_aet as ext17_0_0_, study0_.retrieve_aets as retrieve18_0_0_, study0_.fileset_iuid as fileset19_0_0_, study0_.fileset_id as fileset20_0_0_, study0_.availability as availab21_0_0_, study0_.study_status as study22_0_0_, study0_.checked_time as checked23_0_0_, study0_.updated_time as updated24_0_0_, study0_.created_time as created25_0_0_, study0_.study_attrs as study26_0_0_, study0_.patient_fk as patient27_0_0_ from study study0_ where study0_.pk=? Hibernate: select patient0_.pk as pk1_0_, patient0_.pat_id as pat2_1_0_, patient0_.pat_id_issuer as pat3_1_0_, patient0_.pat_name as pat4_1_0_, patient0_.pat_i_name as pat5_1_0_, patient0_.pat_p_name as pat6_1_0_, patient0_.pat_birthdate as pat7_1_0_, patient0_.pat_sex as pat8_1_0_, patient0_.pat_custom1 as pat9_1_0_, patient0_.pat_custom2 as pat10_1_0_, patient0_.pat_custom3 as pat11_1_0_, patient0_.updated_time as updated12_1_0_, patient0_.created_time as created13_1_0_, patient0_.pat_attrs as pat14_1_0_ from patient patient0_ where patient0_.pk=? Hibernate: select instance0_.pk as pk1_, instance0_.pk as pk5_0_, instance0_.sop_iuid as sop2_5_0_, instance0_.sop_cuid as sop3_5_0_, instance0_.inst_no as inst4_5_0_, instance0_.content_datetime as content5_5_0_, instance0_.sr_complete as sr6_5_0_, instance0_.sr_verified as sr7_5_0_, instance0_.inst_custom1 as inst8_5_0_, instance0_.inst_custom2 as inst9_5_0_, instance0_.inst_custom3 as inst10_5_0_, instance0_.ext_retr_aet as ext11_5_0_, instance0_.retrieve_aets as retrieve12_5_0_, instance0_.availability as availab13_5_0_, instance0_.inst_status as inst14_5_0_, instance0_.all_attrs as all15_5_0_, instance0_.commitment as commitment5_0_, instance0_.updated_time as updated17_5_0_, instance0_.created_time as created18_5_0_, instance0_.inst_attrs as inst19_5_0_, instance0_.series_fk as series20_5_0_ from instance instance0_ where instance0_.pk=? order by instance0_.pk asc
What should i configure in order to make this run.
Thanks in advance
|