Did the exception occur in the same place or on a different property? You have several property mappings that don't have a type attribute. If it occurred in the same place then I'm not sure. I'd have to debug your code to really figure it out. You might also post your table definitions so we can all look at them too.
Bansi, based on your posts, I'd refactor your hibernate mapping to mirror what I've included in my post. I can't promise it will fix your problem but give it a try anyway.
Grant
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="test">
<class name="DeviceType" table="DEVICE_TYPE">
<id name="id" column="ID" type="long">
<generator class="increment"/>
</id>
<property name="deviceType" column="NAME" type="string"/>
<property name="description" column="DESC" type="string"/>
<set name="roles" table="DEVICETYPE_ROLES" cascade="all">
<key column="DEVICETYPE_ID" />
<many-to-many column="ROLE_ID" class="Role"/>
</set>
</class>
<class name="Role" table="ROLE">
<id name="id" column="ID" type="long">
<generator class="assigned"/>
</id>
<property name="name" column="NAME" type="string"/>
</class>
</hibernate-mapping>