| 
					
						 Hibernate version: 2.1.6
 
 Mapping documents:
 User.hbm.xml :
 
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
 
 <hibernate-mapping>
   <class name="security.User" table="BC_SECURITY_USERS">
     <!--<jcs-cache usage="read-write"/>-->
 
     <id name="persistId" column="persistId">
       <generator class="assigned"/>
     </id>
 
     <property name="uid" column="userid" type="string" not-null="true" unique="true"/>
     <property name="name" column="name" type="string" not-null="false" unique="false"/>
     <property name="email" column="email" type="string" not-null="false" unique="false"/>
     <property name="password" column="password" length="32" type="string" not-null="true" unique="false"/>
     <property name="passwordIsTemporary" column="passwordIsTemporary" type="boolean" not-null="true"/>
     <property name="retries" column="retries" type="int" not-null="true" unique="false"/>
     <property name="passwordDate" column="passwordDate" type="java.util.Date" not-null="true" unique="false"/>
     <property name="accountIsDisabled" column="accountIsDisabled" type="boolean" not-null="true"/>
     <property name="lastLog" column="lastLog" type="java.util.Date" not-null="false" unique="false"/>
     <property name="previousLastLog" column="previousLLog" type="java.util.Date" not-null="false" unique="false"/>
     <property name="site" column="site" type="string" not-null="false" unique="false"/>
 
 
   </class>
 </hibernate-mapping>
 Code between sessionFactory.openSession() and session.close():
 
 String query = "select count(*) from BC_SECURITY_USERS";
 List res = sess.find ( query );
 
 Full stack trace of any exception that occurs:
 
 [06/10/04 17:06:03][main      ][DEBUG] net.sf.hibernate.util.JDBCExceptionReporter - SQL Exception
 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 com.p6spy.engine.spy.P6PreparedStatement.executeQuery(P6PreparedStatement.java:177)
 	at com.irongrid.monitor.server.MonitorPreparedStatement.superExecuteQuery(MonitorPreparedStatement.java:1022)
 	at com.irongrid.monitor.server.TimerExecute.executeQuery(TimerExecute.java:351)
 	at com.irongrid.monitor.server.MonitorPreparedStatement.executeQuery(MonitorPreparedStatement.java:833)
 	at com.p6spy.engine.logging.P6LogPreparedStatement.executeQuery(P6LogPreparedStatement.java:172)
 	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:205)
 	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:205)
 	at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:87)
 	at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:800)
 	at net.sf.hibernate.hql.QueryTranslator.iterate(QueryTranslator.java:860)
 	at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1608)
 	at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1581)
 	at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1573)
 
 Name and version of the database you are using:
 
 The generated SQL (show_sql=true):
 
 [DEBUG] net.sf.hibernate.hql.QueryTranslator - HQL: select count(*) from BC_SECURITY_USERS
 [DEBUG] net.sf.hibernate.hql.QueryTranslator - SQL: select count(*) as x0_0_ from
 
 I get this "invalid table error". I check my database, and the table exists. I have loaded the class ( look at this log, before the exception occurs ) :
 ][INFO] net.sf.hibernate.cfg.Binder - Mapping class: security.User -> BC_SECURITY_USERS
 [06/10/04 17:28:41][main      ][DEBUG] net.sf.hibernate.cfg.Binder - Mapped property: persistId -> persistId, type: string
 [06/10/04 17:28:41][main      ][DEBUG] net.sf.hibernate.cfg.Binder - Mapped property: uid -> userid, type: string
 [06/10/04 17:28:41][main      ][DEBUG] net.sf.hibernate.cfg.Binder - Mapped property: name -> name, type: string
 [06/10/04 17:28:41][main      ][DEBUG] net.sf.hibernate.cfg.Binder - Mapped property: email -> email, type: string
 [06/10/04 17:28:41][main      ][DEBUG] net.sf.hibernate.cfg.Binder - Mapped property: password -> password, type: string
 [06/10/04 17:28:41][main      ][DEBUG] net.sf.hibernate.cfg.Binder - Mapped property: passwordIsTemporary -> passwordIsTemporary, type: boolean
 [06/10/04 17:28:41][main      ][DEBUG] net.sf.hibernate.cfg.Binder - Mapped property: retries -> retries, type: integer
 [06/10/04 17:28:41][main      ][DEBUG] net.sf.hibernate.cfg.Binder - Mapped property: passwordDate -> passwordDate, type: timestamp
 [06/10/04 17:28:41][main      ][DEBUG] net.sf.hibernate.cfg.Binder - Mapped property: accountIsDisabled -> accountIsDisabled, type: boolean
 [06/10/04 17:28:41][main      ][DEBUG] net.sf.hibernate.cfg.Binder - Mapped property: lastLog -> lastLog, type: timestamp
 [06/10/04 17:28:41][main      ][DEBUG] net.sf.hibernate.cfg.Binder - Mapped property: previousLastLog -> previousLLog, type: timestamp
 [06/10/04 17:28:41][main      ][DEBUG] net.sf.hibernate.cfg.Binder - Mapped property: site -> site, type: string
 [06/10/04 17:28:41][main      ][DEBUG] persistence.PersistenceManager - addClassToConfig - added class to Hibernate: class security.User
 [06/10/04 17:28:41][main      ][DEBUG] persistence.PersistenceManager - <END>   : persistence.PersistenceManager.addClassToConfig
 [06/10/04 17:28:41][main      ][DEBUG] persistence.PersistenceManager - <START> persistence.PersistenceManager.addClassToConfig
 [06/10/04 17:28:41][main      ][INFO] net.sf.hibernate.cfg.Configuration - Mapping resource: security/UserRole.hbm.xml
 
 
 Any Ideas ?
 
 Regards
 /Andreas 
					
  
						
					 |