JBoss Portal 2.4
DB2 8

When the portal starts, there are some errors with some types used in portal, 
that don't fit with hibernate + DB2.
Error : "ERROR [org.hibernate.util.JDBCExceptionReporter] DB2 SQL error: 
SQLCODE: -204,..." 
Error 204 is : "The object identified by _name_ is not found in the database".

Some tables cannot be created, because the fields mapping is not correct.
A string type (default type) with length 50000000 cannot be created in DB2, 
hence the whole table is not created.

In jboss-portal.sar\conf\hibernate_db2\instance\domain.hbm.xml
In table="JBP_INSTANCE", change 
        <property
  |             name="state"
  |             column="SER_STATE"
  |             not-null="false"
  |             unique="false"
  |             length="50000000"/>
with 
        <property
  |             name="state"
  |             column="SER_STATE"
  |             not-null="false"
  |             unique="false"
  |             type="text"
  |             />
And in table="JBP_INSTANCE_PER_USER", change
      <property
  |             name="state"
  |             column="SER_STATE"
  |             not-null="false"
  |             unique="false"
  |             length="50000000"/>
with
      <property
  |             name="state"
  |             column="SER_STATE"
  |             not-null="false"
  |             unique="false"
  |             type="text"/>  
       
Put type="text" instead of length="50000000" (and default type="string").

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984609#3984609

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984609
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to