Hi,
I get the following error after a few selects and deletes:
java.sql.SQLException: Invalid column: ID_Schein
at com.hxtt.global.SQLState.SQLException(Unknown Source)
at com.hxtt.sql.ct.a(Unknown Source)
at com.hxtt.sql.ct.a(Unknown Source)
at com.hxtt.sql.ct.a(Unknown Source)
at com.hxtt.sql.bc.a(Unknown Source)
at com.hxtt.sql.bc.a(Unknown Source)
at com.hxtt.sql.ab.a(Unknown Source)
at com.hxtt.sql.ab.a(Unknown Source)
at com.hxtt.sql.ab.executeQuery(Unknown Source)
at org.jboss.resource.adapter.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:145)
(btw: odbc works fine and "compact and repair database" didn't fixed the problem)
Regards
Markus Lutz
|
It failed to find ID_Schein column in your sql for a table.
|
sql: select ID_Schein from tblSchein where REF_Person=2
the sql statement is not the problem - previous selects were successful.
The sql statement is part of an automatic testsuite (junit) and with odbc the
tests are successful.
|
You can use select * from tblSchein where REF_Person=2
then to use
ResultSetMetaData resultSetMetaData = rs.getMetaData();
int iNumCols = resultSetMetaData.getColumnCount();
for (int j = 1; j <= iNumCols; j++)
{
System.out.println("("+resultSetMetaData.getColumnLabel(j)
+"): "+resultSetMetaData.getColumnTypeName(j));
}
to see what's the output of HXTT Access for your ID_Schein column.
|
I have this exactly problem, already I tested with hibernate and wrote query manually:
Query 1) "select estagiario0_.C������digo as C������digo, estagiario0_.CodEstagiario as CodEstag2_, estagiario0_.NContrato as NContrato, estagiario0_.CodContratante as CodContr4_, estagiario0_.VingenciaIncial as Vingenci5_, estagiario0_.VingenciaFinal as Vingenci6_, estagiario0_.RenovacaoMaxima as Renovaca7_ from Estagiario_Contratos estagiario0_ where (estagiario0_.CodEstagiario=? )and(? between estagiario0_.VingenciaIncial and estagiario0_.VingenciaFinal );"
Query 2) "insert into Estagiario_Contratos (CodEstagiario, NContrato, CodContratante, VingenciaIncial, VingenciaFinal, RenovacaoMaxima, C������digo) values (?, ?, ?, ?, ?, ?, ?);"
Query 3) "update Estagiario set Situacao=?, NAgencia=?, NomeAgencia=?, NConta=?, NBanco=? where codEstagiario=?;"
The queries are executed in this order sequentially, but I get error on Query 3. The exception is the following:
SEVERE: could not update:
java.sql.SQLException: Can't find column: Situacao in table Estagiario_Contratos
at com.hxtt.global.SQLState.SQLException(Unknown Source)
at com.hxtt.sql.ct.a(Unknown Source)
at com.hxtt.sql.bc.a(Unknown Source)
at com.hxtt.sql.bc.a(Unknown Source)
at com.hxtt.sql.ab.a(Unknown Source)
at com.hxtt.sql.cu.char(Unknown Source)
at com.hxtt.sql.cu.executeUpdate(Unknown Source)
at com.evermind.sql.FilterPreparedStatement.executeUpdate(FilterPreparedStatement.java:240)
at com.evermind.sql.FilterPreparedStatement.executeUpdate(FilterPreparedStatement.java:240)
at com.evermind.sql.FilterPreparedStatement.executeUpdate(FilterPreparedStatement.java:240)
at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22)
at net.sf.hibernate.persister.EntityPersister.update(EntityPersister.java:684)
at net.sf.hibernate.persister.EntityPersister.update(EntityPersister.java:642)
at net.sf.hibernate.impl.ScheduledUpdate.execute(ScheduledUpdate.java:52)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2418)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2372)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2240)
at br.com.netra.j2fw.dao.BaseDAO.alterar(BaseDAO.java:148)
at br.gov.ba.bahiatursa.wf.template.AbstractDAO.alterar(AbstractDAO.java:140)
at br.gov.ba.bahiatursa.wf.business.IntegracaoBOBean.criarEstagiarioContrato(IntegracaoBOBean.java:654)
at IntegracaoBO_StatelessSessionBeanWrapper22.criarEstagiarioContrato(IntegracaoBO_StatelessSessionBeanWrapper22.java:5825)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:124)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:534)
Making some tests I perceived that driver it is using table "Estagiario_Contratos" in Query 3. However Query 3 references the "Estagiario" table!!! My driver version is "Access JDBC 3.0 Package 872,840 2006-03-07 04:52".
How to solve this problem?
|
Fixed now. Thanks for your valuable response. Please download the latest package.
|
The latest Hibernate support package is at here.
|