Hi,
The PracticeInfoDTO has no explicit constructor declared.
All the persistance classes (viz. com.mymedwork.hibernate.PracticeInfo) have a no argument constructor.
I am posting contents of .hbm.xml files.
practiceInfo.hbm.xml
Code:
<hibernate-mapping>
<class name="com.mymedwork.hibernate.PracticeInfo" table="t_practice_info">
<id name="userId" column="USERID">
<generator class="foreign">
<param name="property">user</param>
</generator>
</id>
<property name="branchName" type="string" column="BRANCH_NAME"/>
<property name="departmentName" type="string" column="DEPARTMENT_NAME"/>
<property name="soloPractice" type="char" column="SOLO_PRACTICE"/>
<property name="groupPractice" type="char" column="GROUP_PRACTICE"/>
<property name="multiSpecialtyGroup" type="char" column="MULTI_SPECIALTY_GROUP"/>
<property name="hospital" type="char" column="HOSPITAL"/>
<property name="researchInstitution" type="char" column="RESEARCH_INSTITUTION"/>
<property name="address" type="string" column="ADDRESS"/>
<property name="city" type="string" column="CITY"/>
<property name="state" type="string" column="STATE"/>
<property name="zipCode" type="integer" column="ZIPCODE"/>
<property name="country" type="string" column="COUNTRY"/>
<property name="phone" type="string" column="PHONE"/>
<property name="fax" type="string" column="FAX"/>
<property name="pager" type="string" column="PAGER"/>
<property name="websiteURL" type="string" column="WEBSITE_URL"/>
<one-to-one name="user" class="com.mymedwork.hibernate.User"/>
<many-to-one name="hospitalID"
column="HOSPITALID"
class="com.mymedwork.hibernate.Hospital"/>
<many-to-one name="healthInsurance"
column="HEALTHINSURANCEID"
class="com.mymedwork.hibernate.HealthInsurance"/>
</class>
</hibernate-mapping>
user.hbm.xmlCode:
<hibernate-mapping>
<class name="com.mymedwork.hibernate.User" table="t_users">
<id name="id" type="string" column="ID">
<generator class="assigned"/>
</id>
<property name="firstName" type="string" column="FIRST_NAME"/>
<property name="middleName" type="string" column="MIDDLE_NAME"/>
<property name="lastName" type="string" column="LAST_NAME"/>
<property name="suffix" type="string" column="SUFFIX"/>
<property name="licenseNumber" type="string" column="LICENSE_NUMBER"/>
<property name="emailID" type="string" column="EMAIL_ID"/>
<property name="password" type="string" column="PASSWORD"/>
<one-to-one name="userProfile" class="com.mymedwork.hibernate.UserProfile"/>
</class>
</hibernate-mapping>
hospital.hbm.xml (healthInsurance.hbm.xml - is a similar one)Code:
<hibernate-mapping>
<class name="com.mymedwork.hibernate.Hospital" table="t_hospital">
<id name="id" type="integer" column="ID">
<generator class="native"/>
</id>
<property name="hospitalName" type="string" column="HOSPITAL_NAME"/>
</class>
<query name="com.mymedwork.hibernate.getAllHospitals">
<![CDATA[
from com.mymedwork.hibernate.Hospital as hospital
order by hospital.hospitalName
]]>
</query>
<query name="com.mymedwork.hibernate.getHospitalsByName">
<![CDATA[
from com.mymedwork.hibernate.Hospital as hospital
where hospital.hospitalName = :hospitalName
]]>
</query>
</hibernate-mapping>
Note: the error message for "ram03" is just one instance, I am not hardcoding the UserID value, it comes from a JSP.
Hope the info I have posted will be sufficient to give a clear picture of my problem.