hi
this error is occuring when i used the gethibernateTemplate().find()
the code :
String sQry = "select p from Patient p where p.sPatientFullId=?";
List resultList = getHibernateTemplate().find(sQry,sPatientFullId);
if(resultList.size() > 0){
Patient pt = (Patient) resultList.get(0);
deleteThis = pt.getiPatientId();
}
the error:
2006-06-20 05:07:50,531 INFO [org.springframework.web.context.ContextLoader] - Root WebApplicationContext: initialization started
2006-06-20 05:07:50,531 INFO [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/irisemr]] - Loading Spring root WebApplicationContext
2006-06-20 05:07:50,656 INFO [org.springframework.core.CollectionFactory] - JDK 1.4+ collections available
2006-06-20 05:07:50,671 INFO [org.springframework.core.CollectionFactory] - Commons Collections 3.x available
2006-06-20 05:07:50,734 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from ServletContext resource [/WEB-INF/dataAccessContext-local.xml]
2006-06-20 05:07:50,843 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
2006-06-20 05:07:50,859 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - Bean factory for application context [Root WebApplicationContext]: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [dataSource,sessionFactory,transactionManager,baseTransactionProxy,patientDao,patientService,urlMapping,clientController]; root of BeanFactory hierarchy
2006-06-20 05:07:50,875 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - 8 beans defined in application context [Root WebApplicationContext]
2006-06-20 05:07:50,984 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@137d090]
2006-06-20 05:07:50,984 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@1f48262]
2006-06-20 05:07:50,984 INFO [org.springframework.ui.context.support.UiApplicationContextUtils] - Unable to locate ThemeSource with name 'themeSource': using default [org.springframework.ui.context.support.ResourceBundleThemeSource@127fa12]
2006-06-20 05:07:51,000 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [dataSource,sessionFactory,transactionManager,baseTransactionProxy,patientDao,patientService,urlMapping,clientController]; root of BeanFactory hierarchy]
2006-06-20 05:07:51,093 INFO [org.springframework.jdbc.datasource.DriverManagerDataSource] - Loaded JDBC driver: com.mysql.jdbc.Driver
2006-06-20 05:07:51,140 INFO [net.sf.hibernate.cfg.Environment] - Hibernate 2.1.6
2006-06-20 05:07:51,140 INFO [net.sf.hibernate.cfg.Environment] - hibernate.properties not found
2006-06-20 05:07:51,140 INFO [net.sf.hibernate.cfg.Environment] - using CGLIB reflection optimizer
2006-06-20 05:07:51,375 INFO [net.sf.hibernate.cfg.Binder] - Mapping class: com.iris.emr.patient.business.Patient -> PATIENT
2006-06-20 05:07:51,484 INFO [org.springframework.orm.hibernate.LocalSessionFactoryBean] - Building new Hibernate SessionFactory
2006-06-20 05:07:51,484 INFO [net.sf.hibernate.cfg.Configuration] - processing one-to-many association mappings
2006-06-20 05:07:51,484 INFO [net.sf.hibernate.cfg.Configuration] - processing one-to-one association property references
2006-06-20 05:07:51,484 INFO [net.sf.hibernate.cfg.Configuration] - processing foreign key constraints
2006-06-20 05:07:51,515 INFO [net.sf.hibernate.dialect.Dialect] - Using dialect: net.sf.hibernate.dialect.MySQLDialect
2006-06-20 05:07:51,515 INFO [net.sf.hibernate.cfg.SettingsFactory] - Maximim outer join fetch depth: 2
2006-06-20 05:07:51,515 INFO [net.sf.hibernate.cfg.SettingsFactory] - Use outer join fetching: true
2006-06-20 05:07:51,531 INFO [net.sf.hibernate.connection.ConnectionProviderFactory] - Initializing connection provider: org.springframework.orm.hibernate.LocalDataSourceConnectionProvider
2006-06-20 05:07:51,531 INFO [net.sf.hibernate.transaction.TransactionManagerLookupFactory] - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
2006-06-20 05:07:51,812 INFO [net.sf.hibernate.cfg.SettingsFactory] - Use scrollable result sets: true
2006-06-20 05:07:51,812 INFO [net.sf.hibernate.cfg.SettingsFactory] - Use JDBC3 getGeneratedKeys(): true
2006-06-20 05:07:51,812 INFO [net.sf.hibernate.cfg.SettingsFactory] - Optimize cache for minimal puts: false
2006-06-20 05:07:51,812 INFO [net.sf.hibernate.cfg.SettingsFactory] - echoing all SQL to stdout
2006-06-20 05:07:51,812 INFO [net.sf.hibernate.cfg.SettingsFactory] - Query language substitutions: {}
2006-06-20 05:07:51,812 INFO [net.sf.hibernate.cfg.SettingsFactory] - cache provider: net.sf.hibernate.cache.EhCacheProvider
2006-06-20 05:07:51,812 INFO [net.sf.hibernate.cfg.Configuration] - instantiating and configuring caches
2006-06-20 05:07:51,968 INFO [net.sf.hibernate.impl.SessionFactoryImpl] - building session factory
2006-06-20 05:07:52,421 INFO [net.sf.hibernate.impl.SessionFactoryObjectFactory] - Not binding factory to JNDI, no JNDI name configured
2006-06-20 05:07:52,453 INFO [org.springframework.orm.hibernate.HibernateTransactionManager] - Using DataSource [org.springframework.jdbc.datasource.DriverManagerDataSource@1c3e9ba] of Hibernate SessionFactory for HibernateTransactionManager
2006-06-20 05:07:52,515 INFO [org.springframework.web.context.ContextLoader] - Using context class [org.springframework.web.context.support.XmlWebApplicationContext] for root WebApplicationContext
2006-06-20 05:07:52,515 INFO [org.springframework.web.context.ContextLoader] - Root WebApplicationContext: initialization completed in 1984 ms
2006-06-20 05:07:52,656 INFO [org.springframework.web.servlet.DispatcherServlet] - Initializing servlet 'irisemr'
2006-06-20 05:07:52,671 INFO [org.springframework.web.servlet.DispatcherServlet] - FrameworkServlet 'irisemr': initialization started
2006-06-20 05:07:52,671 INFO [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/irisemr]] - Loading WebApplicationContext for Spring FrameworkServlet 'irisemr'
2006-06-20 05:07:52,687 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from ServletContext resource [/WEB-INF/irisemr-servlet.xml]
2006-06-20 05:07:52,703 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - Bean factory for application context [WebApplicationContext for namespace 'irisemr-servlet']: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [viewResolver,messageSource,propertyConfigurer]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [dataSource,sessionFactory,transactionManager,baseTransactionProxy,patientDao,patientService,urlMapping,clientController]; root of BeanFactory hierarchy
2006-06-20 05:07:52,703 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - 3 beans defined in application context [WebApplicationContext for namespace 'irisemr-servlet']
2006-06-20 05:07:52,734 INFO [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] - Loading properties file from ServletContext resource [/WEB-INF/classes/jdbc.properties]
2006-06-20 05:07:52,750 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - Using MessageSource [org.springframework.context.support.ResourceBundleMessageSource: basenames=[messages]]
2006-06-20 05:07:52,750 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@504ec1]
2006-06-20 05:07:52,750 INFO [org.springframework.ui.context.support.UiApplicationContextUtils] - Unable to locate ThemeSource with name 'themeSource': using default [org.springframework.ui.context.support.DelegatingThemeSource@628704]
2006-06-20 05:07:52,750 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [viewResolver,messageSource,propertyConfigurer]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [dataSource,sessionFactory,transactionManager,baseTransactionProxy,patientDao,patientService,urlMapping,clientController]; root of BeanFactory hierarchy]
2006-06-20 05:07:52,765 INFO [org.springframework.web.servlet.DispatcherServlet] - Using context class [org.springframework.web.context.support.XmlWebApplicationContext] for servlet 'irisemr'
2006-06-20 05:07:52,765 INFO [org.springframework.web.servlet.DispatcherServlet] - Unable to locate MultipartResolver with name 'multipartResolver': no multipart request handling provided
2006-06-20 05:07:52,781 INFO [org.springframework.web.servlet.DispatcherServlet] - Unable to locate LocaleResolver with name 'localeResolver': using default [org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver@1e2afb2]
2006-06-20 05:07:52,781 INFO [org.springframework.web.servlet.DispatcherServlet] - Unable to locate ThemeResolver with name 'themeResolver': using default [org.springframework.web.servlet.theme.FixedThemeResolver@56b93a]
2006-06-20 05:07:52,812 INFO [org.springframework.web.servlet.DispatcherServlet] - No HandlerAdapters found in servlet 'irisemr': using default
2006-06-20 05:07:52,812 INFO [org.springframework.web.servlet.DispatcherServlet] - Unable to locate RequestToViewNameTranslator with name 'viewNameTranslator': using default [org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator@17c2891]
2006-06-20 05:07:52,812 INFO [org.springframework.web.servlet.DispatcherServlet] - FrameworkServlet 'irisemr': initialization completed in 141 ms
2006-06-20 05:07:52,812 INFO [org.springframework.web.servlet.DispatcherServlet] - Servlet 'irisemr' configured successfully
2006-06-20 05:07:53,140 WARN [org.apache.axis.utils.JavaUtils] - Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.
2006-06-20 05:07:55,421 INFO [com.iris.emr.patient.services.soap.client.ClientController] - Patient info created!
2006-06-20 05:07:55,437 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]
2006-06-20 05:07:55,484 INFO [org.springframework.jdbc.support.SQLErrorCodesFactory] - SQLErrorCodes loaded: [DB2, HSQL, MS-SQL, MySQL, Oracle, Informix, PostgreSQL, Sybase]
2006-06-20 05:07:55,781 INFO [com.iris.emr.patient.services.soap.client.ClientController] - Patient info added to the database!
2006-06-20 05:07:55,781 INFO [com.iris.emr.patient.services.soap.client.ClientController] - Deleting Starts!
2006-06-20 05:07:55,859 ERROR [StandardWrapper[/irisemr:irisemr]] - Servlet.service() for servlet irisemr threw exception
net.sf.hibernate.QueryException: query must begin with SELECT or FROM: 6 [6]
at net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:84)
at net.sf.hibernate.hql.PreprocessingParser.end(PreprocessingParser.java:142)
at net.sf.hibernate.hql.ParserHelper.parse(ParserHelper.java:30)
at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:149)
at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:138)
at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:294)
at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1562)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1533)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1521)
at net.sf.hibernate.impl.SessionImpl.delete(SessionImpl.java:1668)
at net.sf.hibernate.impl.SessionImpl.delete(SessionImpl.java:1654)
at org.springframework.orm.hibernate.HibernateTemplate$27.doInHibernate(HibernateTemplate.java:961)
at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:364)
at org.springframework.orm.hibernate.HibernateTemplate.delete(HibernateTemplate.java:954)
at org.springframework.orm.hibernate.HibernateTemplate.delete(HibernateTemplate.java:939)
at com.iris.emr.patient.data.hibernate.HibernatePatientDao.deletePatient(HibernatePatientDao.java:37)
at com.iris.emr.patient.services.impl.PatientServiceImpl.deletePatient(PatientServiceImpl.java:16)
at com.iris.emr.patient.services.soap.client.ClientController.handleRequest(ClientController.java:89)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:45)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:797)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:727)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:350)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:731)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
Please give some solution..
|