-->
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: Need Help! proxy error under JBoss/Hibernate
PostPosted: Tue Dec 23, 2003 1:31 pm 
Pro
Pro

Joined: Mon Sep 08, 2003 4:30 pm
Posts: 203
Hi,

I am getting this when running HIbernate objects under JBoss as a MBean:

java.lang.ClassCastException: cannot assign instance of net.sf.hibernate.proxy.SerializableProxy to field com.db.device.NetPortalSubnetwork.network of type com.db.device.NetPortalNetwork in instance of com.db.device.NetPortalSubnetwork

If I run the same code outside of JBoss everything works fine !

pls help,

TIA,

--steve p.

(mappings)

Code:
   <class name="com.db.device.NetPortalSubnetwork" table="subnet" mutable="true" polymorphism="implicit" dynamic-update="false" dynamic-insert="false" proxy="com.db.device.NetPortalSubnetwork">
      <id name="id" type="long" unsaved-value="0">
         <generator class="native">
         </generator>
      </id>
      
        <property name="name" column="name" type="string"/>
        <property name="description" column="description" type="string"/>
      <many-to-one name="network" class="com.db.device.NetPortalNetwork" column="net_subnet_id"/>

      <set name="mgmtInfo" table="ne_subnet" inverse="true" lazy="false">
         <key column="subnet_id"/>
         <many-to-many class="com.db.device.NEMgmtInfo" column="ne_subnet"/>
      </set>

      <set name="ems" table="subnet_ems" inverse="true" lazy="false">
         <key column="ems_id"/>
         <many-to-many class="com.db.device.Ems" column="ne_subnet"/>
      </set>

        <property name="netPortalControlled" type="boolean"/>
        <property name="layerNumber" type="int"/>
        <property name="topologyType" type="com.db.device.TopologyEnum"/>
        <property name="technologyType" type="com.db.qos.DomainType"/>
      <many-to-one name="moHistory" class="com.db.device.MOHistory" cascade="all"/>
      
    </class>

and
Code:
   <class name="com.db.device.NetPortalNetwork" table="network" mutable="true" polymorphism="implicit" dynamic-update="false" dynamic-insert="false" proxy="com.db.device.NetPortalNetwork">
      <id name="id" type="long" unsaved-value="0">
         <generator class="native">
         </generator>
      </id>
      
        <!--property name="name" column="name" type="string"/-->
      <many-to-one name="netName" class="com.db.device.NEName"  column="net_name" cascade="all"/>
       
        <property name="description" column="description" type="string"/>

       <set name="subnet" cascade="all-delete-orphan" inverse="true" lazy="true">
         <key column="net_subnet_id"/>
         <one-to-many class="com.db.device.NetPortalSubnetwork"/>
       </set>
      
       <set name="sites" cascade="all-delete-orphan" inverse="true" lazy="true">
         <key column="net_site_id"/>
         <one-to-many class="com.db.device.NetPortalSite"/>
       </set>

       <set name="pools" cascade="all-delete-orphan" lazy="true">
         <key column="pool_info_id"/>
         <one-to-many class="com.db.device.NetPortalPoolInfo"/>
       </set>

       <set name="ems" cascade="all-delete-orphan" lazy="true">
         <key column="net_ems_id"/>
         <one-to-many class="com.db.device.Ems"/>
       </set>

       <set name="networkElements" inverse="false" lazy="true">
         <key column="network_ne_id"/>
         <one-to-many class="com.db.device.NEMgmtInfo"/>
       </set>
      <many-to-one name="moHistory" class="com.db.device.MOHistory" cascade="all"/>

    </class>


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