-->
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.  [ 2 posts ] 
Author Message
 Post subject: Problem about useing hibernate under ibm jdk 1.3.1
PostPosted: Fri Oct 17, 2003 4:21 am 
Newbie

Joined: Mon Sep 01, 2003 9:23 pm
Posts: 2
I got a Problem about useing hibernate under ibm jdk 1.3.1 (ship with websphere ) that is throws the exceptions:
Code:
java.lang.IllegalArgumentException: object is not an instance of declaring class
   at java.lang.reflect.Method.invoke(Native Method)
   at net.sf.hibernate.proxy.LazyInitializer.invoke(LazyInitializer.java:105)
   at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:53)
   at com.gdpr.pss.module.PSSTaskRow$$EnhancedByCGLIB$$0.equals()
   at com.ibm.ws.webcontainer.srt.SRTServletRequest.getAttribute(SRTServletRequest.java(Compiled Code))
   at com.ibm.ws.webcontainer.servlet.HttpServletRequestProxy.getAttribute(HttpServletRequestProxy.java(Compiled Code))
   at com.ibm.ws.webcontainer.servlet.HttpServletRequestProxy.getAttribute(HttpServletRequestProxy.java(Compiled Code))
   at com.ibm.ws.webcontainer.servlet.HttpServletRequestProxy.getAttribute(HttpServletRequestProxy.java(Compiled Code))
   at org.apache.jsp._produceTaskItem._jspService(_produceTaskItem.java:137)

But it is OK under sun jdk1.4.2 in jboss .

The *.hbm.xml is as follow
Code:
/********************************/
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>

   <class name="com.gdpr.pss.module.PSSTaskRow"
         table="t_pss_task_row"
         dynamic-update="false" proxy="com.gdpr.pss.module.PSSTaskRow">
         
      <id name="taskRowSn" column="task_row_sn" type="long" unsaved-value="0">
         <generator class="increment"/>           
      </id>      
      <property name="taskSn" type="long" update="true" insert="true" column="task_sn"/>
      <property name="cpSn" type="long" update="true" insert="true" column="cp_sn"/>      
      <property name="taskFieldSn" type="int" update="true" insert="true" column="task_field_sn"/>      
      <property name="planBeginDate" type="date" update="true" insert="true" column="plan_begin_date"/>
      <property name="planEndDate" type="date" update="true" insert="true" column="plan_end_date"/>
      <property name="actBeginDate" type="date" update="true" insert="true" column="act_begin_date"/>
      <property name="actEndDate" type="date" update="true" insert="true" column="act_end_date"/>
      <property name="taskContent" type="string" update="true" insert="true" column="task_content"/>
      <property name="taskCondiction" type="string" update="true" insert="true" column="task_condiction"/>
      <property name="delayCause" type="string" update="true" insert="true" column="delay_cause"/>   
      <property name="state" type="byte" update="true" insert="true" column="state"/>   
      
                                          
      <many-to-one name="taskField"
                class="com.gdpr.pss.module.PSSTaskField"
                cascade="none"
                outer-join="auto"
                update="false"
                insert="false"
                column="task_field_sn"/>
               
      <many-to-one name="controlPoint"
                class="com.gdpr.pss.module.PSSControlPoint"
                cascade="none"
                outer-join="auto"
                update="false"
                insert="false"
                column="cp_sn"/>                                            
      <many-to-one name="produceTask"
                class="com.gdpr.pss.module.PSSProduceTask"
                cascade="none"
                outer-join="auto"
                update="false"
                insert="false"
                column="task_sn"/>                            
      <set name="taskRowScores"
           table="t_pss_task_row_score"
           lazy="true"
           inverse="false"
           cascade="all-delete-orphan"
           sort="unsorted">
         <key column="task_row_sn"/>
         <one-to-many class="com.gdpr.pss.module.PSSTaskRowScore"/>
      </set>                                        
   </class>
      
</hibernate-mapping>

/********************************/


And the PSSTaskRow.java is as the most common cases.

But I warp the PSSTaskRowForm with PSSTaskRow as the delegate like thus to adapt for struts usage.

Code:
public class PSSTaskRowForm extends ActionForm
{
   public PSSTaskRowForm(PSSTaskRow taskRow)
   {
      this.taskRow = taskRow;
   }

   public PSSTaskRowForm()
   {
      this.taskRow = new PSSTaskRow();
   }
                PSSTaskRow taskRow;
                ......ect methods
}

And I recomile the hibernate 2.03 under ibm jdk 1.3.1 ,but the problem still happend.

What shall I do to resolve this problem ?

Expecting your selfless help .

BenHuang from GuangZhou GuangDong China.
BenHuang@GDPR.COM


Top
 Profile  
 
 Post subject: disable reflection optimizer
PostPosted: Fri Oct 17, 2003 12:20 pm 
Senior
Senior

Joined: Sun Aug 31, 2003 3:14 pm
Posts: 151
Location: Earth (at the moment)
Try turning the CGLIB reflection optimizer off and see what happens and what messages you get.

Did you override the equals() method on PSSTaskRow?


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

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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.