Hi,
it seems like the bug described in
http://forum.hibernate.org/viewtopic.php?t=926835
still hasn't been fixed completely.
Referring to HB-609 we've tried the latest CVS snapshot (20040129) and got:
Code:
2004-01-29 14:18:22,610 [RMI TCP Connection(4)-172.21.1.183] DEBUG - Getting version: [com.company.product.app.vo.ImmobilieVO#2c958134fa61a0e200fa61a253da0028]
2004-01-29 14:18:22,610 [RMI TCP Connection(4)-172.21.1.183] DEBUG - about to open: 0 open PreparedStatements, 0 open ResultSets
Code:
2004-01-29 14:18:22,610 [RMI TCP Connection(4)-172.21.1.183] DEBUG - select TIME_MODIFIED from VGGSTAND where IMMOBILIE_ID =?
<- ???
Code:
2004-01-29 14:18:22,610 [RMI TCP Connection(4)-172.21.1.183] DEBUG - preparing statement
2004-01-29 14:18:22,610 [RMI TCP Connection(4)-172.21.1.183] DEBUG - binding '2c958134fa61a0e200fa61a253da0028' to parameter: 1
2004-01-29 14:18:22,610 [RMI TCP Connection(4)-172.21.1.183] DEBUG - binding '2c958134fa61a0e200fa61a253da0028' to parameter: 1
2004-01-29 14:18:22,626 [RMI TCP Connection(4)-172.21.1.183] DEBUG - SQL Exception
java.sql.SQLException: Column not found, message from server: "Unknown column 'IMMOBILIE_ID' in 'where clause'"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1651)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:889)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:956)
at com.mysql.jdbc.Connection.execSQL(Connection.java:1874)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1538)
at org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement.executeQuery(LocalPreparedStatement.java:289)
at net.sf.hibernate.persister.AbstractEntityPersister.getCurrentVersion(AbstractEntityPersister.java:1146)
at net.sf.hibernate.impl.SessionImpl.replicate(SessionImpl.java:3829)
at com.company.base.app.dao.RdbmsDAOSession.overwrite(RdbmsDAOSession.java:569)
at com.company.base.app.dao.RdbmsDAO.overwrite(RdbmsDAO.java:561)
at com.company.base.app.dao.DbManager.overwrite(DbManager.java:368)
at com.company.base.app.offline.client.OfflineClientBean.retrieveBasicUserData(OfflineClientBean.java:327)
at com.company.base.app.offline.client.OfflineClientBean.retrieveImportData(OfflineClientBean.java:370)
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 org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
at org.jboss.ejb.Container.invoke(Container.java:712)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:382)
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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:536)
2004-01-29 14:18:22,657 [RMI TCP Connection(4)-172.21.1.183] WARN - SQL Error: 1054, SQLState: S0022
2004-01-29 14:18:22,657 [RMI TCP Connection(4)-172.21.1.183] ERROR - Column not found, message from server: "Unknown column 'IMMOBILIE_ID' in 'where clause'"
2004-01-29 14:18:22,657 [RMI TCP Connection(4)-172.21.1.183] DEBUG - done closing: 0 open PreparedStatements, 0 open ResultSets
2004-01-29 14:18:22,657 [RMI TCP Connection(4)-172.21.1.183] DEBUG - closing statement
The Mappings for the involved classes are:
Code:
<hibernate-mapping>
<class
name="com.company.product.app.vo.VermoegensgegenstandVO"
table="VGGSTAND"
dynamic-update="false"
dynamic-insert="false"
>
<id
name="id"
column="VOID"
type="string"
length="32"
unsaved-value="null"
>
<generator class="uuid.hex">
</generator>
</id>
<timestamp
name="aenderungszeitpunkt"
column="TIME_MODIFIED"
/>
<property
name="art"
type="integer"
update="true"
insert="true"
column="ART"
/>
...
<joined-subclass
name="com.company.product.app.vo.ImmobilieVO"
table="IMMOBILIE"
dynamic-update="false"
dynamic-insert="false"
>
<key
column="IMMOBILIE_ID"
/>
<many-to-one
name="anschrift"
class="com.company.product.app.vo.AnschriftVO"
cascade="save-update"
outer-join="auto"
update="true"
insert="true"
column="ANSCHRIFT_ID"
/>
<property
name="auswahlGrundstueck"
type="integer"
update="true"
insert="true"
column="AUSWGRUNDSTK"
/>
...
Kind regards
Philipp