-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Composite Element Issue & DB2 - Can not init collection
PostPosted: Mon Jan 08, 2007 10:24 am 
Beginner
Beginner

Joined: Thu Oct 23, 2003 11:22 am
Posts: 20
I am trying to get OpenReports running in an antiquated DB2 (v7) and Websphere (V 5.1) installation. I have run the program to bind the jdbc libraries in DB2 and now when I go run it I am getting the follow errors:

Server side (in websphere)
-------------------------------
[1/8/07 6:51:33:547 CST] 23b1854 JDBCException W org.hibernate.util.JDBCExceptionReporter SQL Error: -351, SQLState: 56084
[1/8/07 6:51:33:547 CST] 23b1854 JDBCException E org.hibernate.util.JDBCExceptionReporter DB2 SQL error: SQLCODE: -351, SQLSTATE: 56084, SQLERRMC: 10

Client side (browser)
------------------------
org.efs.openreports.providers.ProviderException: could not initialize a collection: [org.efs.openreports.objects.ReportUser.alerts#1]

I have included the mapping doc for the ReportUser which is the object currently generating this issue (although I think others will too).

It appears that when the select is performed and the driver is unmarshalling and building the object graph that it is having problems with building the composite element components. I am thinking this is an issue with the DB2 driver.

Has anyone else run into this or similar issues? What is the work around without rewriting all of the openreports code/schema mappings?


Hibernate version: 3.1.3

Mapping documents:

<hibernate-mapping default-lazy="false">

<class name="org.efs.openreports.objects.ReportUser" table="REPORT_USER">

<id name="id" column="REPORTUSER_ID" type="java.lang.Integer">
<generator class="native"/>
</id>

<property name="name" column="NAME" not-null="true" unique="true"/>

<property name="password" column="PASSWORD" not-null="true" unique="false"/>

<!--property name="password" column="PASSWORD" type="org.efs.openreports.util.EncryptedStringUserType" not-null="true" unique="false"/-->

<property name="externalId" column="EXTERNAL_ID"/>

<property name="email" column="EMAIL_ADDRESS"/>

<property name="pdfExportType" column="PDF_EXPORT_TYPE" not-null="true"/>

<list name="groups" table="USER_GROUP_MAP">
<key column="USER_ID"/>
<index column="MAP_ID" type="java.lang.Integer"/>
<many-to-many column="GROUP_ID" class="org.efs.openreports.objects.ReportGroup"/>
</list>

<list name="alerts" table="USER_ALERT_MAP">
<key column="USER_ID"/>
<index column="MAP_ID" type="integer"/>
<composite-element class="org.efs.openreports.objects.ReportUserAlert">
<many-to-one name="alert" column="ALERT_ID" class="org.efs.openreports.objects.ReportAlert"/>
<many-to-one name="report" column="REPORT_ID" class="org.efs.openreports.objects.Report"/>
<property name="limit" column="ALERT_LIMIT" />
<property name="operator" column="ALERT_OPERATOR" />
</composite-element>
</list>

<set name="roles" table="USER_SECURITY">
<key column="USER_ID"/>
<element column="ROLE_NAME" type="string"/>
</set>

<many-to-one name="defaultReport" class="org.efs.openreports.objects.Report" column="DEFAULT_REPORT_ID"/>

</class>

</hibernate-mapping>

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Problems with Session and transaction handling?

Read this: http://hibernate.org/42.html


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.