[hibernate-issues] [Hibernate-JIRA] Created: (HHH-4480) org.hibernate.exception.SQLGrammarException: could not execute query Caused by: java.sql.SQLException: ORA-00903: invalid table name

venkata rajesh (JIRA) noreply at atlassian.com
Wed Oct 7 07:48:57 EDT 2009


org.hibernate.exception.SQLGrammarException: could not execute query  Caused by: java.sql.SQLException: ORA-00903: invalid table name
-------------------------------------------------------------------------------------------------------------------------------------

                 Key: HHH-4480
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4480
             Project: Hibernate Core
          Issue Type: Bug
          Components: query-hql
    Affects Versions: 3.3.1
         Environment: Struts with hibernate
            Reporter: venkata rajesh
         Attachments: New Text Document.txt

hi 

when iam executing my project iam getting blow error

when i execute my project in mysql it is working fine but oracle10g its giving lot of problems .

connection is conncting but query is not executing 

pls any one help me 




 my database is oracle10g


my query is String query = "SELECT a.Uid, b.Roleid, b.Login, c.Rname, b.Id, b.Pwd FROM Session a, Iuser b, Irole c WHERE a.Rand='"+rand+ "' and a.Uid=b.Id and b.Roleid = c.Roleid";

and 
hibernate cfg.xml file is below


<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
	<session-factory>
		<!--  Database connection settings -->
		<property name="hibernate.dialect">org.hibernate.dialect.OracleDialect</property>
		<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
		<property name="connection.url">jdbc:oracle:thin:@192.168.100.11:1521:cms</property>
		<property name="connection.username">cms</property>
		<property name="connection.password">ptcms09</property>

		

		<!-- JDBC connection pool (use the built-in) -->
		<property name="connection.pool_size">1</property>
		<!-- SQL dialect -->
		

		 <!-- Important! addendum to what is in text -->
      		<property name="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>

		 <!--<property name="hibernate.transaction.factory_class"> org.hibernate.transaction.JTATransactionFactory</property>-->

	
		<!--  Enable Hibernate's automatic session context management -->
		<!--   It tell hibernate that is is being used in a non managed environment e.g.no application server. Then Hibernate manage transaction and keep track ofthreads, session etc. -->
		<property name="current_session_context_class">thread</property>

		<!-- Disable the second-level cache -->
		<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>

		<!-- Echo all executed SQL to stdout -->
		<property name="show_sql">true</property>
		
		<!-- Drop and re-create the database schema on startup  
		<property name="hbm2ddl.auto">create</property> -->

		<mapping resource="hbm/iuser.hbm.xml" />  
		<mapping resource="hbm/session.hbm.xml" />
		<mapping resource="hbm/sessiondetail.hbm.xml" />
		<mapping resource="Pricepointmgmt.hbm.xml" /> 
		<mapping resource="Pricepointmapping.hbm.xml" /> 
		<mapping resource="TelcoInfo.hbm.xml" /> 
		<mapping resource="Itemtype.hbm.xml" /> 
		<mapping resource="Defaultpricepoint.hbm.xml" /> 
		<mapping resource="Itemdetail.hbm.xml" /> 
		<mapping resource="Itemgroup.hbm.xml" /> 
		<mapping resource="Category.hbm.xml" /> 
		<mapping resource="Supercategory.hbm.xml" />
		<mapping resource="Handsetinfo.hbm.xml" /> 
		<mapping resource="Cmsproperties.hbm.xml" /> 
		<mapping resource="Iuserinfo.hbm.xml" />
		<mapping resource="Copyright.hbm.xml" />
		<mapping resource="BulletDetail.hbm.xml" /> 
		<mapping resource="Iuser.hbm.xml" />  
		<mapping resource="Drm.hbm.xml" />  
		<mapping resource="Cpdetail.hbm.xml" />  
		<mapping resource="CircleInfo.hbm.xml" />
		<mapping resource="Taxmgmt.hbm.xml" />  
		<mapping resource="Happyhour.hbm.xml" />
		<mapping resource="Wappushmsisdn.hbm.xml" />
		<mapping resource="Bannercategory.hbm.xml" />
		<mapping resource="Banner.hbm.xml" />
		<mapping resource="Weblog.hbm.xml" />
		<mapping resource="Mobileseriesmaster.hbm.xml" />
		<mapping resource="Handsetsupportinfo.hbm.xml" />
		<mapping resource="TelcoInfomation.hbm.xml" />
		<mapping resource="Imenu.hbm.xml" />
		<mapping resource="Zonedetails.hbm.xml" /> 
		<mapping resource="Zonecategory.hbm.xml" /> 
		<mapping resource="Content.hbm.xml" /> 
		<mapping resource="ZonePackage.hbm.xml" /> 
		<mapping resource="KioskAdmin.hbm.xml" /> 
		<mapping resource="Copyrightgrp.hbm.xml" /> 
		<mapping resource="Session.hbm.xml" />  
		<mapping resource="Sessiondetails.hbm.xml" />
		<mapping resource="Irole.hbm.xml" /> 
		<mapping resource="Portalinfo.hbm.xml" /> 
		<mapping resource="Portletinfo.hbm.xml" />   

	</session-factory>
</hibernate-configuration>














org.hibernate.exception.SQLGrammarException: could not execute query
        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:65)
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
        at org.hibernate.loader.Loader.doList(Loader.java:2153)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
        at org.hibernate.loader.Loader.list(Loader.java:2024)
        at org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:874)
        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1127)
        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
        at com.cmsstrus.hibernate.utils.DataObject.getHqlListResults(DataObject.java:1730)
        at ui.Utilities.SessionMgmt(Utilities.java:35)
        at org.apache.jsp.jsp.success_jsp._jspService(org.apache.jsp.jsp.success_jsp:72)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
        at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
        at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
        at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
        at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        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.valves.AccessLogValve.invoke(AccessLogValve.java:526)
        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:856)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        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(Thread.java:619)
Caused by: java.sql.SQLException: ORA-00903: invalid table name

        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
        at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
        at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
        at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
        at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:830)
        at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391)
        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
        at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
        at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527)
        at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
        at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
        at org.hibernate.loader.Loader.doQuery(Loader.java:662)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
        at org.hibernate.loader.Loader.doList(Loader.java:2150)
        ... 45 more


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list