-->
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.  [ 3 posts ] 
Author Message
 Post subject: Fail to convert to internal representation; nested exception
PostPosted: Fri Jun 27, 2008 12:25 am 
Newbie

Joined: Fri Jun 27, 2008 12:15 am
Posts: 5
Location: India
i have table IPAdmission , while fetching the data from oracle 9i
using hibernate 3 it shows following error


Hibernate operation: could not execute query; uncategorized SQLException for SQL
[select this_.IP_NO as IP1_1029_1_, this_.RS_CODE as RS42_1029_1_, this_.BD_CODE as BD40_1029_1_, this_.DO_CODE as DO45_1029_1_, this_.PTC_LOADD1 as PTC2_1029_1_, this_.PTC_LOADD2 as PTC3_1029_1_, this_.PTC_LOADD3 as PTC4_1029_1_, this_.PTC_LOADD4 as PTC5_1029_1_, this_.DMC_CACR as DMC6_1029_1_, this_.CU_CODE as CU7_1029_1_, this_.IP_CUREF as IP8_1029_1_, this_.IPC_DICREQSTATUS as IPC9_1029_1_, this_.IPD_DISC as IPD10_1029_1_, this_.DIS_USCODE as DIS11_1029_1_, this_.DMD_DATE as DMD12_1029_1_, this_.DMC_SLNO as DMC13_1029_1_, this_.IPD_DATE as IPD14_1029_1_, this_.PTD_DOB as PTD15_1029_1_, this_.PTN_DAYAGE as PTN16_1029_1_, this_.IPC_DISSUMM as IPC17_1029_1_, this_.IPD_DISCSUMM as IPD18_1029_1_, this_.IPC_ICDCODE as IPC19_1029_1_, this_.IPD_APPROXIMATE as IPD20_1029_1_, this_.PTN_MONTHAGE as PTN21_1029_1_, this_.IPC_PASS as IPC22_1029_1_, this_.PTC_PETNAME as PTC23_1029_1_, this_.PTC_LOPIN as PTC24_1029_1_, this_.IPD_PART as IPD25_1029_1_, this_.PTC_LOPHONE as PTC26_1029_1_, this_.PTC_REFDOCTOR as PTC27_1029_1_, this_.PTC_RELATION as PTC28_1029_1_, this_.IP_REMARKS as IP29_1029_1_, this_.SC_CODE as SC30_1029_1_, this_.PTC_SEX as PTC31_1029_1_, this_.IPC_STATUS as IPC32_1029_1_, this_.IP_STAY as IP33_1029_1_, this_.US_CODE as US34_1029_1_, this_.PTN_YEARAGE as PTN35_1029_1_, this_.PT_CODE as PT39_1029_1_, this_.PT_NO as PT38_1029_1_, this_.PTC_PTNAME as PTC36_1029_1_, this_.PTC_TYPE as PTC37_1029_1_, this_.RE_CODE as RE44_1029_1_, this_.RC_CODE as RC41_1029_1_, this_.SA_CODE as SA43_1029_1_, patient1_.PT_NO as PT1_1084_0_, patient1_.MS_CODE as MS83_1084_0_, patient1_.RK_CODE as RK82_1084_0_, patient1_.PTC_BLOODGROUP as PTC88_1084_0_, patient1_.CU_CODE as CU79_1084_0_, patient1_.DO_CODE as DO78_1084_0_, patient1_.PTC_LADOCODE as PTC77_1084_0_, patient1_.OR_CODE as OR86_1084_0_, patient1_.OC_CODE as OC80_1084_0_, patient1_.PT_CODE as PT90_1084_0_, patient1_.OLD_RLCODE as OLD2_1084_0_, patient1_.BARCODE_PRINTED as BARCODE3_1084_0_, patient1_.BG_CODE as BG4_1084_0_, patient1_.PTC_BLOODRHTYPE as PTC5_1084_0_, patient1_.CT_CODE as CT6_1084_0_, patient1_.PTC_CHAR as PTC7_1084_0_, patient1_.CITYID as CITYID1084_0_, patient1_.PTD_DOB as PTD9_1084_0_, patient1_.PTD_DATE as PTD10_1084_0_, patient1_.PTN_DAYAGE as PTN11_1084_0_, patient1_.PTN_DEPOSIT as PTN12_1084_0_, patient1_.PTC_DESIG as PTC13_1084_0_, patient1_.DISC_BAL as DISC14_1084_0_, patient1_.PTC_DOCNAME as PTC15_1084_0_, patient1_.SRM_ED_VC_RELATION as SRM16_1084_0_, patient1_.PTD_EDDATE as PTD17_1084_0_, patient1_.PTC_EMAIL as PTC18_1084_0_, patient1_.PTC_EMPID as PTC19_1084_0_, patient1_.PTC_ENT as PTC20_1084_0_, patient1_.PTC_FILETYPE as PTC21_1084_0_, patient1_.FIRSTNAME as FIRSTNAME1084_0_, patient1_.PTC_FLAG as PTC23_1084_0_, patient1_.PTC_FOREIGNER as PTC24_1084_0_, patient1_.PT_GRPNO as PT25_1084_0_, patient1_.PTC_HOSADD1 as PTC26_1084_0_, patient1_.PTC_HOSADD2 as PTC27_1084_0_, patient1_.PTC_HOSNAME as PTC28_1084_0_, patient1_.IN_CODE as IN29_1084_0_, patient1_.PTC_IPNUMBER as PTC30_1084_0_, patient1_.PTC_INSURANCE as PTC31_1084_0_, patient1_.PTC_INSURANCECOMPANY as PTC32_1084_0_, patient1_.LASTNAME as LASTNAME1084_0_, patient1_.PTC_LOADD1 as PTC34_1084_0_, patient1_.PTC_LOADD2 as PTC35_1084_0_, patient1_.PTC_LOADD3 as PTC36_1084_0_, patient1_.PTC_LOADD4 as PTC37_1084_0_, patient1_.PTC_LOPHONE as PTC38_1084_0_, patient1_.PTC_LOPIN as PTC39_1084_0_, patient1_.MIDDLENAME as MIDDLENAME1084_0_, patient1_.PTC_MOBILE as PTC41_1084_0_, patient1_.DISC_MODIDT as DISC42_1084_0_, patient1_.PTN_MONTHAGE as PTN43_1084_0_, patient1_.PTC_PTNAME as PTC44_1084_0_, patient1_.PTC_NATIONALITY as PTC45_1084_0_, patient1_.PTC_OCCODE as PTC46_1084_0_, patient1_.OLD_BGCODE as OLD47_1084_0_, patient1_.OLD_MSCODE as OLD48_1084_0_, patient1_.OLD_OCCODE as OLD49_1084_0_, patient1_.OLD_PATTYPCD as OLD50_1084_0_, patient1_.PTD_OLDRNW as PTD51_1084_0_, patient1_.OLD_SACODE as OLD52_1084_0_, patient1_.PTC_PATIENT as PTC53_1084_0_, patient1_.PTC_PRADD1 as PTC54_1084_0_, patient1_.PTC_PRADD2 as PTC55_1084_0_, patient1_.PTC_PRADD3 as PTC56_1084_0_, patient1_.PTC_PRADD4 as PTC57_1084_0_, patient1_.PTC_PRADD5 as PTC58_1084_0_, patient1_.PTC_PRPHONE as PTC59_1084_0_, patient1_.PTC_PRPIN as PTC60_1084_0_, patient1_.PTC_PETNAME as PTC61_1084_0_, patient1_.SRM_ED_C_PHY_HANDI as SRM62_1084_0_, patient1_.PTC_PRECAUTIONALERT as PTC63_1084_0_, patient1_.RPC_SLNO as RPC64_1084_0_, patient1_.PTN_REGFEE as PTN65_1084_0_, patient1_.PTN_RELAGE as PTN66_1084_0_, patient1_.PTC_RELATION as PTC67_1084_0_, patient1_.PTD_RENW as PTD68_1084_0_, patient1_.SC_CODE as SC69_1084_0_, patient1_.PTC_SERVNO as PTC70_1084_0_, patient1_.PTC_SEX as PTC71_1084_0_, patient1_.PTN_TOTAL as PTN72_1084_0_, patient1_.PTC_TYPE as PTC73_1084_0_, patient1_.VSD_DATE as VSD74_1084_0_, patient1_.VSC_SLNO as VSC75_1084_0_, patient1_.PTN_YEARAGE as PTN76_1084_0_, patient1_.RG_CODE as RG87_1084_0_, patient1_.RE_CODE as RE85_1084_0_, patient1_.RL_CODE as RL89_1084_0_, patient1_.SA_CODE as SA84_1084_0_, patient1_.US_CODE as US81_1084_0_ from IPADMISS this_ inner join PATIENT patient1_ on this_.PT_NO=patient1_.PT_NO where patient1_.PT_NO=?]; SQL state [null]; error code [17059]; Fail to convert to internal representation; nested exception is java.sql.SQLException: Fail to convert to internal representation
Back


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 27, 2008 1:52 am 
Newbie

Joined: Thu Jun 26, 2008 8:10 am
Posts: 4
Can you give more details like the java code that you have written and the hibernate mapping and configuration files?

_________________
Regards,
pravsemilo.


Top
 Profile  
 
 Post subject: check this info enough
PostPosted: Fri Jun 27, 2008 4:52 am 
Newbie

Joined: Fri Jun 27, 2008 12:15 am
Posts: 5
Location: India
applicationContext-Struts.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/b ... ns-2.0.xsd"
default-lazy-init="true">
<bean id="surgeryRequisitionAction" class="com.cpt.his.webapp.action.SurgeryRequisitionAction" scope="prototype" parent="baseActionMediware"/>

</beans>

--IPAdmission and Patient are two tables
--IPAdmission.java and patient.java are two java file generated using hibernate reverse engineering.

IPAdmission.java - contains number of sets for one-to-many realtionship.


In my Action i getting the patient no from url and setting value in patient object. where ipAdmission model and Patient model has one to many realtionship. using that fetching values from ipAdmission.


SurgeryRequisitionAction.java

public class SurgeryRequisitionAction extends BaseAction {
String patientNo=getRequest().getParameter("patientNo");
patient=new Patient();
patient.setPatientNo(patientNo);
ipAdmission=new IPAdmission();
ipAdmission.setPatient(patient);
List<BaseObject> lstPatientDetails = manager.getObjects(ipAdmission, null, null, 0, 0);
log.debug(lstPatientDetails );

return SUCCESS;
}



defaultdao-hibernate.java---
public BaseObject getObject(BaseObject baseObject) {
return (BaseObject) getHibernateTemplate().execute(
getHibernateCallBackForGetObject(baseObject));

}


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.