Lol, there is no space, it is just the Ctrl-c Ctrl-v, cause there was no space in my writing e-mail window so it did a return line.

Anyway, maybe it is a tip of which is the problem, but I tried to use my findBySituation, and it works BUT I don't get to alter the LocalCar (s)  returned.

My code in my SessionBean

public String registrarLocacao(Locacao loc) {
        try {
            CarroLocalHome lhCarro = Locator.getCarroLocalHome();
            Iterator temp = lhCarro.findBySituacao ("Disponível").iterator();
            CarroLocal tempcar = null;
            CarroLocal carroachado = null;
            while (temp.hasNext()) {
                tempcar = (CarroLocal)temp.next();
                System.out.println(tempcar.getChassi());
                if (tempcar.getChassi().equals(loc.getChassi()))
                    carroachado = tempcar;
            }
            System.out.println (carroachado.getChassi() + " " + carroachado.getPlaca());
            carroachado.setSituacao("Alugado");
           
            LocacaoLocalHome lhLocacao = Locator.getLocacaoLocalHome();
            lhLocacao.create(loc);
           
            return "A locação foi registrada com sucesso";
        }
        catch (CreateException e) {
            e.printStackTrace();
            return "Ocorreu um erro no registro da locação.";
        }
        catch (FinderException e) {
            e.printStackTrace();
            return "Ocorreu um erro na localização do bean carro.";
        }
    }

The error:

ejbCreate() do Session
setEntityContext called do carro.
ejbActivate() called do Entity carro.
ejbLoad() called do Entity carro.
3687352196865265
setEntityContext called do carro.
ejbActivate() called do Entity carro.
ejbLoad() called do Entity carro.
65436549663416546
setEntityContext called do carro.
ejbActivate() called do Entity carro.
ejbLoad() called do Entity carro.
65454894635418697
setEntityContext called do carro.
ejbActivate() called do Entity carro.
ejbLoad() called do Entity carro.
9BWCA05X85P082824
setEntityContext called do carro.
ejbActivate() called do Entity carro.
ejbLoad() called do Entity carro.
AABB151515
3687352196865265 MYG-1654
setEntityContext called.
ejbCreate() called
ejbPostCreate() called.
ejbStore() called do Entity carro.
ejbStore() called do Entity carro.
ejbStore() called do Entity carro.
ejbStore() called do Entity carro.
ejbStore() called do Entity carro.
00:34:32,073 WARN  [GeronimoConnectionEventListener] connectionErrorOccurred called with null
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544569. Dynamic SQL Error
SQL error code = -104
Token unknown - line 1, char 39
THEN
        at org.firebirdsql.jdbc.AbstractPreparedStatement.<init>(AbstractPreparedStatement.java:118)
        at org.firebirdsql.jdbc.FBPreparedStatement .<init>(FBPreparedStatement.java:40)
        at org.firebirdsql.jdbc.AbstractConnection.prepareStatement(AbstractConnection.java:849)
        at org.firebirdsql.jdbc.AbstractConnection.prepareStatement(AbstractConnection.java :812)
        at org.firebirdsql.jdbc.AbstractConnection.prepareStatement(AbstractConnection.java:805)
        at org.firebirdsql.jdbc.AbstractConnection.prepareStatement(AbstractConnection.java:286)
        at org.tranql.connector.jdbc.ConnectionHandle.prepareStatement (ConnectionHandle.java:231)
        at org.tranql.sql.jdbc.JDBCUpdateCommand.execute(JDBCUpdateCommand.java:63)
        at org.tranql.cache.SimpleFlushStrategy.flush(SimpleFlushStrategy.java:64)
        at org.tranql.cache.SimpleFlushStrategy.flush (SimpleFlushStrategy.java:49)
        at org.tranql.cache.cache.InTxCacheTracker.flush(InTxCacheTracker.java:41)
        at org.tranql.cache.InTxCache.flush(InTxCache.java:86)
        at org.apache.geronimo.transaction.context.AbstractTransactionContext.flushState (AbstractTransactionContext.java:115)
        at org.apache.geronimo.transaction.context.InheritableTransactionContext.complete(InheritableTransactionContext.java:175)
        at org.apache.geronimo.transaction.context.InheritableTransactionContext.commit (InheritableTransactionContext.java:146)
        at org.openejb.transaction.ContainerPolicy$TxRequired.invoke(ContainerPolicy.java:152)
        at org.openejb.transaction.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java :80)
        at org.openejb.SystemExceptionInterceptor.invoke(SystemExceptionInterceptor.java:82)
        at org.openejb.GenericEJBContainer.invoke(GenericEJBContainer.java:238)
        at org.openejb.server.ejbd.EjbRequestHandler.invoke (EjbRequestHandler.java:297)
        at org.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:325)
        at org.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java :196)
        at org.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:150)
        at org.openejb.server.ejbd.EjbServer.service(EjbServer.java:87)
        at org.openejb.server.ejbd.EjbServer$$FastClassByCGLIB$$d379d2ff.invoke (<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke (GBeanOperation.java:118)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:800)
        at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
        at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke (RawOperationInvoker.java:36)
        at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
        at org.activeio.xnet.ServerService$$EnhancerByCGLIB$$463425f3.service (<generated>)
        at org.activeio.xnet.ServicePool$2.run(ServicePool.java:67)
        at org.activeio.xnet.ServicePool$3.run(ServicePool.java:90)
        at org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run (ThreadPool.java:138)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:595)
at
org.firebirdsql.gds.GDSException: Dynamic SQL Error
SQL error code = -104
Token unknown - line 1, char 39
THEN
        at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.readStatusVector(AbstractJavaGDSImpl.java:2104)
        at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.receiveResponse (AbstractJavaGDSImpl.java:2054)
        at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.iscDsqlPrepare(AbstractJavaGDSImpl.java:1478)
        at org.firebirdsql.gds.impl.GDSHelper.prepareStatement(GDSHelper.java :194)
        at org.firebirdsql.jdbc.AbstractStatement.prepareFixedStatement(AbstractStatement.java:1107)
        at org.firebirdsql.jdbc.AbstractPreparedStatement.prepareFixedStatement(AbstractPreparedStatement.java :1145)
        at org.firebirdsql.jdbc.AbstractPreparedStatement.<init>(AbstractPreparedStatement.java:116)
        at org.firebirdsql.jdbc.FBPreparedStatement.<init>(FBPreparedStatement.java:40)
        at org.firebirdsql.jdbc.AbstractConnection.prepareStatement(AbstractConnection.java:849)
        at org.firebirdsql.jdbc.AbstractConnection.prepareStatement(AbstractConnection.java:812)
        at org.firebirdsql.jdbc.AbstractConnection.prepareStatement (AbstractConnection.java:805)
        at org.firebirdsql.jdbc.AbstractConnection.prepareStatement(AbstractConnection.java:286)
        at org.tranql.connector.jdbc.ConnectionHandle.prepareStatement(ConnectionHandle.java :231)
        at org.tranql.sql.jdbc.JDBCUpdateCommand.execute(JDBCUpdateCommand.java:63)
        at org.tranql.cache.SimpleFlushStrategy.flush(SimpleFlushStrategy.java:64)
        at org.tranql.cache.SimpleFlushStrategy.flush (SimpleFlushStrategy.java:49)
        at org.tranql.cache.cache.InTxCacheTracker.flush(InTxCacheTracker.java:41)
        at org.tranql.cache.InTxCache.flush(InTxCache.java:86)
        at org.apache.geronimo.transaction.context.AbstractTransactionContext.flushState (AbstractTransactionContext.java:115)
        at org.apache.geronimo.transaction.context.InheritableTransactionContext.complete(InheritableTransactionContext.java:175)
        at org.apache.geronimo.transaction.context.InheritableTransactionContext.commit (InheritableTransactionContext.java:146)
        at org.openejb.transaction.ContainerPolicy$TxRequired.invoke(ContainerPolicy.java:152)
        at org.openejb.transaction.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java :80)
        at org.openejb.SystemExceptionInterceptor.invoke(SystemExceptionInterceptor.java:82)
        at org.openejb.GenericEJBContainer.invoke(GenericEJBContainer.java:238)
        at org.openejb.server.ejbd.EjbRequestHandler.invoke (EjbRequestHandler.java:297)
        at org.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:325)
        at org.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java :196)
        at org.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:150)
        at org.openejb.server.ejbd.EjbServer.service(EjbServer.java:87)
        at org.openejb.server.ejbd.EjbServer$$FastClassByCGLIB$$d379d2ff.invoke (<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke (GBeanOperation.java:118)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:800)
        at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
        at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke (RawOperationInvoker.java:36)
        at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
        at org.activeio.xnet.ServerService$$EnhancerByCGLIB$$463425f3.service (<generated>)
        at org.activeio.xnet.ServicePool$2.run(ServicePool.java:67)
        at org.activeio.xnet.ServicePool$3.run(ServicePool.java:90)
        at org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run (ThreadPool.java:138)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:595)
00:34:32,082 ERROR [Transaction] Unexpected exception rolling back org.apache.geronimo.connector.outbound.LocalXAResource@17fb790; continuing with rollback
javax.transaction.xa.XAException
        at org.apache.geronimo.connector.outbound.LocalXAResource.rollback(LocalXAResource.java :88)
        at org.apache.geronimo.transaction.manager.TransactionImpl.rollbackResources(TransactionImpl.java:542)
        at org.apache.geronimo.transaction.manager.TransactionImpl.rollback(TransactionImpl.java:446)
        at org.apache.geronimo.transaction.manager.TransactionManagerImpl.rollback(TransactionManagerImpl.java:155)
        at org.apache.geronimo.transaction.manager.TransactionManagerImpl$$FastClassByCGLIB$$14ee5fe0.invoke (<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke (GBeanOperation.java:118)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:800)
        at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
        at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke (RawOperationInvoker.java:36)
        at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
        at org.apache.geronimo.transaction.ExtendedTransactionManager$$EnhancerByCGLIB$$cbb92382.rollback (<generated>)
        at org.apache.geronimo.transaction.context.InheritableTransactionContext.rollbackAndThrow(InheritableTransactionContext.java:296)
        at org.apache.geronimo.transaction.context.InheritableTransactionContext.complete (InheritableTransactionContext.java:199)
        at org.apache.geronimo.transaction.context.InheritableTransactionContext.commit(InheritableTransactionContext.java:146)
        at org.openejb.transaction.ContainerPolicy$TxRequired.invoke (ContainerPolicy.java:152)
        at org.openejb.transaction.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:80)
        at org.openejb.SystemExceptionInterceptor.invoke(SystemExceptionInterceptor.java :82)
        at org.openejb.GenericEJBContainer.invoke(GenericEJBContainer.java:238)
        at org.openejb.server.ejbd.EjbRequestHandler.invoke(EjbRequestHandler.java:297)
        at org.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD (EjbRequestHandler.java:325)
        at org.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:196)
        at org.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:150)
        at org.openejb.server.ejbd.EjbServer.service (EjbServer.java:87)
        at org.openejb.server.ejbd.EjbServer$$FastClassByCGLIB$$d379d2ff.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke (FastMethodInvoker.java:38)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:800)
        at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
        at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:36)
        at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept (ProxyMethodInterceptor.java:96)
        at org.activeio.xnet.ServerService$$EnhancerByCGLIB$$463425f3.service(<generated>)
        at org.activeio.xnet.ServicePool$2.run(ServicePool.java:67)
        at org.activeio.xnet.ServicePool$3.run (ServicePool.java:90)
        at org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run(ThreadPool.java:138)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:595)
Caused by: Unable to rollback
        at org.tranql.connector.jdbc.ManagedJDBCConnection.localTransactionRollback(ManagedJDBCConnection.java:113)
        at org.tranql.connector.AbstractManagedConnection$LocalTransactionImpl.rollback (AbstractManagedConnection.java:196)
        at org.apache.geronimo.connector.outbound.LocalXAResource.rollback(LocalXAResource.java:86)
        ... 38 more
Caused by: org.firebirdsql.jdbc.FBSQLException: You cannot rollback closed connection.
        at org.firebirdsql.jdbc.AbstractConnection.rollback(AbstractConnection.java:450)
        at org.tranql.connector.jdbc.ManagedJDBCConnection.localTransactionRollback(ManagedJDBCConnection.java:111)
        ... 40 more
00:34:32,093 ERROR [AbstractTransactionContext] Unable to roll back transaction
javax.transaction.SystemException
        at org.apache.geronimo.transaction.manager.TransactionImpl.rollbackResources(TransactionImpl.java :546)
        at org.apache.geronimo.transaction.manager.TransactionImpl.rollback(TransactionImpl.java:446)
        at org.apache.geronimo.transaction.manager.TransactionManagerImpl.rollback(TransactionManagerImpl.java :155)
        at org.apache.geronimo.transaction.manager.TransactionManagerImpl$$FastClassByCGLIB$$14ee5fe0.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke (GBeanInstance.java:800)
        at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
        at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:36)
        at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
        at org.apache.geronimo.transaction.ExtendedTransactionManager$$EnhancerByCGLIB$$cbb92382.rollback(<generated>)
        at org.apache.geronimo.transaction.context.InheritableTransactionContext.rollbackAndThrow(InheritableTransactionContext.java:296)
        at org.apache.geronimo.transaction.context.InheritableTransactionContext.complete (InheritableTransactionContext.java:199)
        at org.apache.geronimo.transaction.context.InheritableTransactionContext.commit(InheritableTransactionContext.java:146)
        at org.openejb.transaction.ContainerPolicy$TxRequired.invoke (ContainerPolicy.java:152)
        at org.openejb.transaction.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:80)
        at org.openejb.SystemExceptionInterceptor.invoke(SystemExceptionInterceptor.java :82)
        at org.openejb.GenericEJBContainer.invoke(GenericEJBContainer.java:238)
        at org.openejb.server.ejbd.EjbRequestHandler.invoke(EjbRequestHandler.java:297)
        at org.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD (EjbRequestHandler.java:325)
        at org.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:196)
        at org.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:150)
        at org.openejb.server.ejbd.EjbServer.service (EjbServer.java:87)
        at org.openejb.server.ejbd.EjbServer$$FastClassByCGLIB$$d379d2ff.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke (FastMethodInvoker.java:38)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:800)
        at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
        at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:36)
        at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept (ProxyMethodInterceptor.java:96)
        at org.activeio.xnet.ServerService$$EnhancerByCGLIB$$463425f3.service(<generated>)
        at org.activeio.xnet.ServicePool$2.run(ServicePool.java:67)
        at org.activeio.xnet.ServicePool$3.run (ServicePool.java:90)
        at org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run(ThreadPool.java:138)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:595)
00:34:32,095 ERROR [AbstractTransactionContext] Unable to roll back transaction
java.lang.IllegalStateException: Status is STATUS_NO_TRANSACTION
        at org.apache.geronimo.transaction.manager.TransactionImpl.rollback (TransactionImpl.java:438)
        at org.apache.geronimo.transaction.context.InheritableTransactionContext.rollbackAndThrow(InheritableTransactionContext.java:308)
        at org.apache.geronimo.transaction.context.InheritableTransactionContext.complete (InheritableTransactionContext.java:199)
        at org.apache.geronimo.transaction.context.InheritableTransactionContext.commit(InheritableTransactionContext.java:146)
        at org.openejb.transaction.ContainerPolicy$TxRequired.invoke (ContainerPolicy.java:152)
        at org.openejb.transaction.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:80)
        at org.openejb.SystemExceptionInterceptor.invoke(SystemExceptionInterceptor.java :82)
        at org.openejb.GenericEJBContainer.invoke(GenericEJBContainer.java:238)
        at org.openejb.server.ejbd.EjbRequestHandler.invoke(EjbRequestHandler.java:297)
        at org.openejb.server.ejbd.EjbRequestHandler.doEjbObject _BUSINESS_METHOD (EjbRequestHandler.java:325)
        at org.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:196)
        at org.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:150)
        at org.openejb.server.ejbd.EjbServer.service (EjbServer.java:87)
        at org.openejb.server.ejbd.EjbServer$$FastClassByCGLIB$$d379d2ff.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke (FastMethodInvoker.java:38)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:800)
        at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
        at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:36)
        at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept (ProxyMethodInterceptor.java:96)
        at org.activeio.xnet.ServerService$$EnhancerByCGLIB$$463425f3.service(<generated>)
        at org.activeio.xnet.ServicePool$2.run(ServicePool.java:67)
        at org.activeio.xnet.ServicePool$3.run (ServicePool.java:90)
        at org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run(ThreadPool.java:138)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:595)
ejbPassivate () called do Entity carro.
ejbPassivate () called.
ejbPassivate () called do Entity carro.
unsetEntityContext called do carro.
ejbPassivate () called do Entity carro.
unsetEntityContext called do carro.
ejbPassivate () called do Entity carro.
unsetEntityContext called do carro.
ejbPassivate () called do Entity carro.
unsetEntityContext called do carro.
00:34:32,097 WARN  [SystemExceptionInterceptor] MySession
javax.transaction.SystemException: Unable to commit container transaction
        at org.apache.geronimo.transaction.context.InheritableTransactionContext.rollbackAndThrow(InheritableTransactionContext.java:327)
        at org.apache.geronimo.transaction.context.InheritableTransactionContext.complete(InheritableTransactionContext.java:199)
        at org.apache.geronimo.transaction.context.InheritableTransactionContext.commit ( InheritableTransactionContext.java:146)
        at org.openejb.transaction.ContainerPolicy$TxRequired.invoke(ContainerPolicy.java:152)
        at org.openejb.transaction.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java :80)
        at org.openejb.SystemExceptionInterceptor.invoke(SystemExceptionInterceptor.java:82)
        at org.openejb.GenericEJBContainer.invoke(GenericEJBContainer.java:238)
        at org.openejb.server.ejbd.EjbRequestHandler.invoke (EjbRequestHandler.java:297)
        at org.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:325)
        at org.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java :196)
        at org.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:150)
        at org.openejb.server.ejbd.EjbServer.service(EjbServer.java:87)
        at org.openejb.server.ejbd.EjbServer$$FastClassByCGLIB$$d379d2ff.invoke (<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke (GBeanOperation.java:118)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:800)
        at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
        at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke (RawOperationInvoker.java:36)
        at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
        at org.activeio.xnet.ServerService$$EnhancerByCGLIB$$463425f3.service (<generated>)
        at org.activeio.xnet.ServicePool$2.run(ServicePool.java:67)
        at org.activeio.xnet.ServicePool$3.run(ServicePool.java:90)
        at org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run (ThreadPool.java:138)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.tranql.ql.QueryException: Error executing statement: UPDATE CARROS SET MARCA = CASE WHEN ? THEN ? ELSE MARCA END, MODELO = CASE WHEN ? THEN ? ELSE MODELO END, PLACA = CASE WHEN ? THEN ? ELSE PLACA END, QUILOMETRAGEM = CASE WHEN ? THEN ? ELSE QUILOMETRAGEM END, COR = CASE WHEN ? THEN ? ELSE COR END, SITUACAO = CASE WHEN ? THEN ? ELSE SITUACAO END, TIPO = CASE WHEN ? THEN ? ELSE TIPO END, DIARIA = CASE WHEN ? THEN ? ELSE DIARIA END WHERE CHASSI = ?
        at org.tranql.sql.jdbc.JDBCUpdateCommand.execute(JDBCUpdateCommand.java:69)
        at org.tranql.cache.SimpleFlushStrategy.flush(SimpleFlushStrategy.java:64)
        at org.tranql.cache.SimpleFlushStrategy.flush (SimpleFlushStrategy.java:49)
        at org.tranql.cache.cache.InTxCacheTracker.flush(InTxCacheTracker.java:41)
        at org.tranql.cache.InTxCache.flush(InTxCache.java:86)
        at org.apache.geronimo.transaction.context.AbstractTransactionContext.flushState (AbstractTransactionContext.java:115)
        at org.apache.geronimo.transaction.context.InheritableTransactionContext.complete(InheritableTransactionContext.java:175)
        ... 24 more
Caused by: org.firebirdsql.jdbc.FBSQLExcep tion : GDS Exception. 335544569. Dynamic SQL Error
SQL error code = -104
Token unknown - line 1, char 39
THEN
        at org.firebirdsql.jdbc.AbstractPreparedStatement.<init>(AbstractPreparedStatement.java:118)
        at org.firebirdsql.jdbc.FBPreparedStatement.<init>(FBPreparedStatement.java:40)
        at org.firebirdsql.jdbc.AbstractConnection.prepareStatement(AbstractConnection.java:849)
        at org.firebirdsql.jdbc.AbstractConnection.prepareStatement (AbstractConnection.java:812)
        at org.firebirdsql.jdbc.AbstractConnection.prepareStatement(AbstractConnection.java:805)
        at org.firebirdsql.jdbc.AbstractConnection.prepareStatement(AbstractConnection.java :286)
        at org.tranql.connector.jdbc.ConnectionHandle.prepareStatement(ConnectionHandle.java:231)
        at org.tranql.sql.jdbc.JDBCUpdateCommand.execute(JDBCUpdateCommand.java:63)
        ... 30 more
00:34:32,149 WARN  [[Negocio]] Servlet.service() for servlet Negocio threw exception
java.rmi.RemoteException: Cannot read the response from the server.  The class for an object being returned is not located in this system:; nested exception is:
        java.lang.ClassNotFoundException: org.firebirdsql.jdbc.FBSQLException
        at org.openejb.client.Client.request(Client.java:189)
        at org.openejb.client.EJBInvocationHandler.request(EJBInvocationHandler.java :207)
        at org.openejb.client.EJBObjectHandler.businessMethod(EJBObjectHandler.java:260)
        at org.openejb.client.EJBObjectHandler._invoke(EJBObjectHandler.java:196)
        at org.openejb.client.EJBInvocationHandler.invoke (EJBInvocationHandler.java:181)
        at org.openejb.client.CgLibInvocationHandler.invoke(CgLibInvocationHandler.java:77)
        at org.openejb.client.CgLibInvocationHandler.intercept(CgLibInvocationHandler.java :67)
        at org.openejb.client.CgLibProxy$$EnhancerByCGLIB$$a658611b.registrarLocacao(<generated>)
        at br.cefetrn.olivier.servlet.Negocio.doPost(Negocio.java:96)
        at javax.servlet.http.HttpServlet.service (HttpServlet.java:615)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        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.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:272)
        at org.apache.geronimo.tomcat.valve.TransactionContextValve.invoke (TransactionContextValve.java:53)
        at org.apache.geronimo.tomcat.valve.ComponentContextValve.invoke(ComponentContextValve.java:47)
        at org.apache.geronimo.tomcat.valve.InstanceContextValve.invoke(InstanceContextValve.java :60)
        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.valves.AccessLogValve.invoke(AccessLogValve.java:526)
        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:595)
Caused by: java.lang.ClassNotFoundException: org.firebirdsql.jdbc.FBSQLException
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass (MultiParentClassLoader.java:209)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:242)
        at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:574)
        at org.openejb.server.ejbd.EJBObjectInputStream.resolveClass(EJBObjectInputStream.java :82)
        at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1538)
        at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
        at java.io.ObjectInputStream.readOrdinaryObject (ObjectInputStream.java:1693)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
        at java.io.ObjectInputStream.readSerialData (ObjectInputStream.java:1836)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
        at java.io.ObjectInputStream.defaultReadFields (ObjectInputStream.java:1912)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
        at java.io.ObjectInputStream.readObject0 (ObjectInputStream.java:1299)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
        at java.io.ObjectInputStream.readOrdinaryObject (ObjectInputStream.java:1713)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
        at org.openejb.client.EJBResponse.readExternal (EJBResponse.java:144)
        at org.openejb.client.Client.request(Client.java:187)
        ... 29 more



On 4/5/06, Aaron Mulder <ammulder@alumni.princeton.edu> wrote:
Hmmm, nothing stands out to me here.  You might try removing any
whitespace from the prim-key-class values (it looks like there was an
extra space at the end) to see if that makes a difference.  Otherwise
perhaps one of the folks more up to speed on OpenEJB can look at the
stack trace and see what they think.

Thanks,
    Aaron

On 4/4/06, Olivier Voutat <olivier.voutat@gmail.com > wrote:
> <?xml version="1.0 " encoding="UTF-8"?>
> <openejb-jar
> xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0 "
> xmlns:nam=" http://geronimo.apache.org/xml/ns/naming-1.0"
> xmlns:pkgen="http://www.openejb.org/xml/ns/pkgen-2.0 "
> xmlns:sec=" http://geronimo.apache.org/xml/ns/security-1.1"
> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0
> " configId="Locadora/Locadora">
>     <cmp-connection-factory>
>         <resource-link>Fire</resource-link>
>     </cmp-connection-factory>
>
>     <enterprise-beans>
>     <entity>
>          <ejb-name>Cliente</ejb-name>
>         <jndi-name>Cliente</jndi-name>
>         <local-jndi-name>Cliente</local-jndi-name>
>         <table-name>CLIENTES</table-name>
>
>         <cmp-field-mapping>
>             <cmp-field-name>clienteId</cmp-field-name>
>             <table-column>CLIENTEID</table-column>
>         </cmp-field-mapping>
>          <cmp-field-mapping>
>             <cmp-field-name>nome</cmp-field-name>
>             <table-column>NOME</table-column>
>         </cmp-field-mapping>
>         <cmp-field-mapping>
>             <cmp-field-name>endereco</cmp-field-name>
>             <table-column>ENDERECO</table-column>
>         </cmp-field-mapping>
>         <cmp-field-mapping>
>             <cmp-field-name>telefone</cmp-field-name>
>             <table-column>TELEFONE</table-column>
>         </cmp-field-mapping>
>         <cmp-field-mapping>
>             <cmp-field-name>cpf</cmp-field-name>
>             <table-column>CPF</table-column>
>         </cmp-field-mapping>
>         <resource-ref>
>             <ref-name>Fire</ref-name>
>             <resource-link>Fire</resource-link>
>         </resource-ref>
>     </entity>
>
>     <entity>
>          <ejb-name>Carro</ejb-name>
>         <jndi-name>Carro</jndi-name>
>         <local-jndi-name>Carro</local-jndi-name>
>         <table-name>CARROS</table-name>
>
>         <cmp-field-mapping>
>             <cmp-field-name>chassi</cmp-field-name>
>             <table-column>CHASSI</table-column>
>         </cmp-field-mapping>
>         <cmp-field-mapping>
>             <cmp-field-name>marca</cmp-field-name>
>             <table-column>MARCA</table-column>
>         </cmp-field-mapping>
>         <cmp-field-mapping>
>             <cmp-field-name>modelo</cmp-field-name>
>             <table-column>MODELO</table-column>
>         </cmp-field-mapping>
>         <cmp-field-mapping>
>             <cmp-field-name>placa</cmp-field-name>
>             <table-column>PLACA</table-column>
>         </cmp-field-mapping>
>         <cmp-field-mapping>
>             <cmp-field-name>quilometragem</cmp-field-name>
>             <table-column>QUILOMETRAGEM</table-column>
>         </cmp-field-mapping>
>         <cmp-field-mapping>
>             <cmp-field-name>cor</cmp-field-name>
>             <table-column>COR</table-column>
>         </cmp-field-mapping>
>         <cmp-field-mapping>
>             <cmp-field-name>situacao</cmp-field-name>
>             <table-column>SITUACAO</table-column>
>         </cmp-field-mapping>
>         <cmp-field-mapping>
>             <cmp-field-name>tipo</cmp-field-name>
>             <table-column>TIPO</table-column>
>         </cmp-field-mapping>
>         <cmp-field-mapping>
>             <cmp-field-name>diaria</cmp-field-name>
>             <table-column>DIARIA</table-column>
>         </cmp-field-mapping>
>         <resource-ref>
>             <ref-name>Fire</ref-name>
>             <resource-link>Fire</resource-link>
>         </resource-ref>
>     </entity>
>
>     <entity>
>          <ejb-name>Locacao</ejb-name>
>         <jndi-name>Locacao</jndi-name>
>         <local-jndi-name>Locacao</local-jndi-name>
>         <table-name>LOCACOES</table-name>
>
>         <cmp-field-mapping>
>             <cmp-field-name>locacaoId</cmp-field-name>
>             <table-column>LOCACAOID</table-column>
>         </cmp-field-mapping>
>         <cmp-field-mapping>
>             <cmp-field-name>chassi</cmp-field-name>
>             <table-column>CHASSI</table-column>
>         </cmp-field-mapping>
>         <cmp-field-mapping>
>             <cmp-field-name>clienteId</cmp-field-name>
>             <table-column>CLIENTEID</table-column>
>         </cmp-field-mapping>
>         <cmp-field-mapping>
>             <cmp-field-name>dataInicio</cmp-field-name>
>             <table-column>DATAINICIO</table-column>
>         </cmp-field-mapping>
>         <cmp-field-mapping>
>             <cmp-field-name>dataFim</cmp-field-name>
>             <table-column>DATAFIM</table-column>
>         </cmp-field-mapping>
>         <cmp-field-mapping>
>             <cmp-field-name>valor</cmp-field-name>
>             <table-column>VALOR</table-column>
>         </cmp-field-mapping>
>         <cmp-field-mapping>
>
> <cmp-field-name>quilometragemRodada</cmp-field-name>
>
> <table-column>QUILOMETRAGEMRODADA</table-column>
>         </cmp-field-mapping>
>         <resource-ref>
>             <ref-name>Fire</ref-name>
>             <resource-link>Fire</resource-link>
>         </resource-ref>
>     </entity>
>     </enterprise-beans>
>
> </openejb-jar>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <ejb-jar id="ejb-jar_1" xmlns=" http://java.sun.com/xml/ns/j2ee"
> xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation=" http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
> version=" 2.1">
>
>     <display-name>LocadoraLoccar</display-name>
>
>     <enterprise-beans>
>     <session>
>           <ejb-name>MySession</ejb-name>
>         <home>br.cefetrn.olivier.session.MySessionHome
> </home>
>
> <remote>br.cefetrn.olivier.session.MySession</remote>
>
> <ejb-class>br.cefetrn.olivier.session.MySessionBean </ejb-class>
>         <session-type>Stateful</session-type>
>         <transaction-type>Container</transaction-type>
>         <ejb-local-ref>
>              <ejb-ref-name>ejb/Cliente</ejb-ref-name>
>              <ejb-ref-type>Entity</ejb-ref-type>
>
> <local-home>br.cefetrn.olivier.entity.ClienteLocalHome</local-home>
>
> <local>br.cefetrn.olivier.entity.ClienteLocal </local>
>              <ejb-link>Cliente</ejb-link>
>          </ejb-local-ref>
>         <ejb-local-ref>
>              <ejb-ref-name>ejb/Carro</ejb-ref-name>
>              <ejb-ref-type>Entity</ejb-ref-type>
>              <local-home>
> br.cefetrn.olivier.entity.CarroLocalHome</local-home>
>
> <local>br.cefetrn.olivier.entity.CarroLocal </local>
>              <ejb-link>Carro</ejb-link>
>          </ejb-local-ref>
>         <ejb-local-ref>
>              <ejb-ref-name>ejb/Locacao</ejb-ref-name>
>              <ejb-ref-type>Entity</ejb-ref-type>
>
> <local-home>br.cefetrn.olivier.entity.LocacaoLocalHome
> </local-home>
>
> <local>br.cefetrn.olivier.entity.LocacaoLocal </local>
>              <ejb-link>Locacao</ejb-link>
>          </ejb-local-ref>
>     </session>
>      <entity>
>         <ejb-name>Cliente</ejb-name>
>
> <local-home>br.cefetrn.olivier.entity.ClienteLocalHome</local-home>
>         <local>br.cefetrn.olivier.entity.ClienteLocal
> </local>
>
> <ejb-class> br.cefetrn.olivier.entity.ClienteBean</ejb-class>
>
>         <persistence-type>Container</persistence-type>
>         <prim-key-class>br.cefetrn.olivier.entity.ClientePK
> </prim-key-class>
>
>         <reentrant>false</reentrant>
>         <cmp-version>2.x</cmp-version>
>
> <abstract-schema-name>CLIENTES</abstract-schema-name>
>
> <cmp-field><field-name>clienteId</field-name></cmp-field>
>
> <cmp-field><field-name>nome</field-name></cmp-field>
>
> <cmp-field><field-name>endereco</field-name></cmp-field>
>
> <cmp-field><field-name>telefone</field-name></cmp-field>
>         <cmp-field><field-name>cpf</field-name></cmp-field>
>
>         <resource-ref>
>             <res-ref-name>Fire</res-ref-name>
>                <res-type> javax.sql.DataSource </res-type>
>                <res-auth>Container</res-auth>
>
> <res-sharing-scope>Shareable</res-sharing-scope>
>         </resource-ref>
>         <query>
>             <query-method>
>                 <method-name>findByNome</method-name>
>                 <method-params>
>                     <method-param> java.lang.String</method-param>
>                 </method-params>
>             </query-method>
>             <ejb-ql>
>                 SELECT DISTINCT OBJECT(c) FROM CLIENTES c WHERE c.nome = ?1
>             </ejb-ql>
>         </query>
>         <query>
>             <query-method>
>                 <method-name>findByCpf</method-name>
>                 <method-params>
>                     <method-param>java.lang.String</method-param>
>                 </method-params>
>             </query-method>
>             <ejb-ql>
>                 SELECT DISTINCT OBJECT(c) FROM CLIENTES c WHERE c.cpf = ?1
>             </ejb-ql>
>          </query>
>         <query>
>             <query-method>
>                 <method-name>findAllClientes</method-name>
>                 <method-params>
>                 </method-params>
>             </query-method>
>             <ejb-ql>
>                 SELECT DISTINCT OBJECT(c) FROM CLIENTES c WHERE c.nome IS
> NOT NULL
>             </ejb-ql>
>         </query>
>     </entity>
>     <entity>
>         <ejb-name>Carro</ejb-name>
>
> <local-home>br.cefetrn.olivier.entity.CarroLocalHome</local-home>
>         <local>br.cefetrn.olivier.entity.CarroLocal
> </local>
>
> <ejb-class>br.cefetrn.olivier.entity.CarroBean</ejb-class>
>
>         <persistence-type>Container</persistence-type>
>         <prim-key-class>br.cefetrn.olivier.entity.CarroPK
> </prim-key-class>
>
>         <reentrant>false</reentrant>
>         <cmp-version>2.x</cmp-version>
>         <abstract-schema-name>CARROS</abstract-schema-name>
>
>
> <cmp-field><field-name>chassi</field-name></cmp-field>
>
> <cmp-field><field-name>marca</field-name></cmp-field>
>
> <cmp-field><field-name>modelo</field-name></cmp-field>
>
> <cmp-field><field-name>placa</field-name></cmp-field>
>
> <cmp-field><field-name>quilometragem</field-name></cmp-field>
>         <cmp-field><field-name>cor</field-name></cmp-field>
>
> <cmp-field><field-name>situacao</field-name></cmp-field>
>
> <cmp-field><field-name>tipo</field-name></cmp-field>
>
> <cmp-field><field-name>diaria</field-name></cmp-field>
>
>         <resource-ref>
>             <res-ref-name>Fire</res-ref-name>
>                <res-type>javax.sql.DataSource</res-type>
>                <res-auth>Container</res-auth>
>
> <res-sharing-scope>Shareable</res-sharing-scope>
>         </resource-ref>
>         <query>
>             <query-method>
>                 <method-name>findByMarca</method-name>
>                 <method-params>
>                     <method-param>java.lang.String </method-param>
>                 </method-params>
>             </query-method>
>             <ejb-ql>
>                 SELECT DISTINCT OBJECT(c) FROM CARROS c WHERE c.marca = ?1
>             </ejb-ql>
>         </query>
>         <query>
>             <query-method>
>                 <method-name>findByModelo</method-name>
>                 <method-params>
>                     <method-param> java.lang.String</method-param>
>                 </method-params>
>             </query-method>
>             <ejb-ql>
>                 SELECT DISTINCT OBJECT(c) FROM CARROS c WHERE c.modelo = ?1
>             </ejb-ql>
>         </query>
>         <query>
>             <query-method>
>                 <method-name>findBySituacao</method-name>
>                 <method-params>
>                     <method-param> java.lang.String</method-param>
>                 </method-params>
>             </query-method>
>             <ejb-ql>
>                 SELECT DISTINCT OBJECT(c) FROM CARROS c WHERE c.situacao =
> ?1
>             </ejb-ql>
>         </query>
>     </entity>
>     <entity>
>         <ejb-name>Locacao</ejb-name>
>
> <local-home> br.cefetrn.olivier.entity.LocacaoLocalHome
> </local-home>
>
> <local>br.cefetrn.olivier.entity.LocacaoLocal</local>
>
> <ejb-class>br.cefetrn.olivier.entity.LocacaoBean </ejb-class>
>
>         <persistence-type>Container</persistence-type>
>
> <prim-key-class>br.cefetrn.olivier.entity.LocacaoPK</prim-key-class>
>
>         <reentrant>false</reentrant>
>         <cmp-version>2.x</cmp-version>
>
> <abstract-schema-name>LOCACOES</abstract-schema-name>
>
> <cmp-field><field-name>locacaoId</field-name></cmp-field>
>
>
> <cmp-field><field-name>chassi</field-name></cmp-field>
>
> <cmp-field><field-name>clienteId</field-name></cmp-field>
>
> <cmp-field><field-name>dataInicio</field-name></cmp-field>
>
> <cmp-field><field-name>dataFim</field-name></cmp-field>
>
> <cmp-field><field-name>valor</field-name></cmp-field>
>
> <cmp-field><field-name>quilometragemRodada</field-name></cmp-field>
>
>         <resource-ref>
>             <res-ref-name>Fire</res-ref-name>
>                <res-type> javax.sql.DataSource</res-type>
>                <res-auth>Container</res-auth>
>
> <res-sharing-scope>Shareable</res-sharing-scope>
>         </resource-ref>
>         <query>
>             <query-method>
>                 <method-name>findByChassi</method-name>
>                 <method-params>
>                     <method-param>java.lang.String</method-param>
>                 </method-params>
>             </query-method>
>             <ejb-ql>
>                 SELECT DISTINCT OBJECT(l) FROM LOCACOES l WHERE l.chassi =
> ?1
>             </ejb-ql>
>         </query>
>         <query>
>             <query-method>
>                 <method-name>findByClienteId</method-name>
>                 <method-params>
>                     <method-param> java.lang.Integer </method-param>
>                 </method-params>
>             </query-method>
>             <ejb-ql>
>                 SELECT DISTINCT OBJECT(l) FROM LOCACOES l WHERE l.clienteId
> = ?1
>             </ejb-ql>
>         </query>
>     </entity>
>     </enterprise-beans>
>      <!--
>        To add session beans that you have deployment descriptor info for,
> add
>        a file to your XDoclet merge directory called session-beans.xml that
> contains
>        the <session></session> markup for those beans.
>      -->
>
>       <!-- Entity Beans -->
>      <!--
>        To add entity beans that you have deployment descriptor info for, add
>        a file to your XDoclet merge directory called entity-beans.xml that
> contains
>        the <entity></entity> markup for those beans.
>      -->
>
>       <!-- Message Driven Beans -->
>       <!--
>        To add message driven beans that you have deployment descriptor info
> for, add
>        a file to your XDoclet merge directory called
> message-driven-beans.xml that contains
>        the <message-driven></message-driven> markup for
> those beans.
>      -->
>
>
>    <!-- Relationships -->
>
>    <!-- Assembly Descriptor -->
>      <!--
>        To specify your own assembly descriptor info here, add a file to your
>        XDoclet merge directory called assembly-descriptor.xml that contains
>        the <assembly-descriptor></assembly-descriptor>
> markup.
>      -->
>
>    <assembly-descriptor id="AssemblyDescriptor_1">
>      <!--
>         To specify additional security-role elements, add a file in the
> merge
>        directory called ejb-security-roles.xml that contains them.
>      -->
>
>    <!-- method permissions -->
>      <!--
>        To specify additional method-permission elements, add a file in the
> merge
>        directory called ejb-method-permissions.ent that contains them.
>      -->
>
>    <!-- transactions -->
>      <!--
>        To specify additional container-transaction elements, add a file in
> the merge
>        directory called ejb-container-transactions.ent that contains them.
>      -->
>
>    <!-- finder transactions -->
>
>    <!-- message destinations -->
>      <!--
>        To specify additional message-destination elements, add a file in the
> merge
>        directory called ejb-message-destinations.ent that contains them.
>      -->
>
>    <!-- exclude list -->
>      <!--
>        To specify an exclude-list element, add a file in the merge directory
>        called ejb-exclude-list.xml that contains it.
>      -->
>     </assembly-descriptor>
>
> </ejb-jar>
>
>
>
> On 4/5/06, Aaron Mulder < ammulder@alumni.princeton.edu > wrote:
> > Can you attach your original ejb-jar.xml and openejb-jar.xml to an
> > e-mail?  We need to figure out why it's getting mixed up between
> > String and the PK class for the primary key for your bean.
> >
> > Thanks,
> >     Aaron
> >
> > On 4/4/06, Olivier Voutat < olivier.voutat@gmail.com> wrote:
> > > Well, I added the set/get chassi in my CarPK class but no luck...
> > >
> > > I did another test too. The primary key returned by the method
> getPrimaryKey
> > > of the returned object when I do findBySituation (which was implemented
> by
> > > me) is an instance of String, not o CarPK like you can see here...don't
> get
> > > why
> > >
> > > Primary Key 3687352196865265
> > > String Instance true
> > > CarPK Instance false
> > > Primary Key 65436549663416546
> > > String Instance true
> > > CarPK Instance false
> > > Primary Key 65454894635418697
> > > String Instance true
> > > CarPK Instance false
> > > Primary Key 9BWCA05X85P082824
> > > String Instance true
> > > CarPK Instance false
> > > Primary Key AABB151515
> > > String Instance true
> > > CarPK Instance false
> > > New pk class AABB151515
> > > Until here everything works.
> > > setEntityContext called do carro.
> > > setEntityContext called do carro.
> > > 23:58:30,665 WARN  [SystemExceptionInterceptor] Carro
> > > javax.ejb.TransactionRolledbackLocalException
> > >         at
> > >
> org.openejb.transaction.ContainerPolicy$TxRequired.invoke
> > > (ContainerPolicy.java:123)
> > >         at
> > >
> org.openejb.transaction.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:80)
> > >         at
> > > org.openejb.SystemExceptionInterceptor.invoke
> (SystemExceptionInterceptor.java
> > > :82)
> > >         at
> > >
> org.openejb.GenericEJBContainer.invoke (GenericEJBContainer.java:238)
> > >         at
> > >
> org.openejb.proxy.EJBMethodInterceptor.intercept(EJBMethodInterceptor.java
> :129)
> > >         at
> > >
> org.openejb.proxy.EntityEJBLocalHome$$EnhancerByCGLIB$$1847bc60.findByPrimaryKey
> > > (<generated>)
> > >         at
> > >
> br.cefetrn.olivier.session.MySessionBean.registrarLocacao
> (MySessionBean.java:71)
> > >         at
> > >
> br.cefetrn.olivier.session.MySessionBean$$FastClassByCGLIB$$fba7f7a3.invoke(<generated>)
> > >         at
> > > org.openejb.dispatch.AbstractMethodOperation.invoke
> (AbstractMethodOperation.java:90)
> > >         at
> > >
> org.openejb.sfsb.BusinessMethod.execute(BusinessMethod.java:66)
> > >         at
> org.openejb.dispatch.DispatchInterceptor.invoke
> > > (DispatchInterceptor.java :72)
> > >         at
> > >
> org.apache.geronimo.naming.java.ComponentContextInterceptor.invoke (ComponentContextInterceptor.java:56)
> > >         at
> > >
> org.openejb.ConnectionTrackingInterceptor.invoke(ConnectionTrackingInterceptor.java
> > > :81)
> > >         at
> > >
> org.openejb.sfsb.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:115)
> > >         at
> > >
> org.openejb.transaction.ContainerPolicy$TxRequired.invoke (ContainerPolicy.java
> :140)
> > >         at
> > >
> org.openejb.transaction.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:80)
> > >         at
> > >
> org.openejb.SystemExceptionInterceptor.invoke(SystemExceptionInterceptor.java
> :82)
> > >         at org.openejb.GenericEJBContainer.invoke
> > > (GenericEJBContainer.java :238)
> > >         at
> > >
> org.openejb.server.ejbd.EjbRequestHandler.invoke(EjbRequestHandler.java:297)
> > >         at
> > >
> org.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD (EjbRequestHandler.java
> > > :325)
> > >         at
> > >
> org.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java
> :196)
> > >         at
> > >
> org.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:150)
> > >         at org.openejb.server.ejbd.EjbServer.service
> > > (EjbServer.java:87)
> > >         at
> > >
> org.openejb.server.ejbd.EjbServer$$FastClassByCGLIB$$d379d2ff.invoke
> (<generated>)
> > >         at
> > >
> net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java :53)
> > >         at
> > >
> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke
> > > (FastMethodInvoker.java :38)
> > >         at
> > >
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118)
> > >         at
> > >
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:800)
> > >         at
> > >
> org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
> > >         at
> > >
> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java :36)
> > >         at
> > >
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept
> > > (ProxyMethodInterceptor.java:96)
> > >         at
> > >
> org.activeio.xnet.ServerService$$EnhancerByCGLIB$$463425f3.service(<generated>)
> > >         at
> > >
> org.activeio.xnet.ServicePool$2.run(ServicePool.java:67)
> > >         at org.activeio.xnet.ServicePool$3.run
> > > (ServicePool.java:90)
> > >         at
> > >
> org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run
> (ThreadPool.java :138)
> > >         at
> > >
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> > > Source)
> > >         at java.lang.Thread.run(Thread.java:595)
> > > Caused by: java.lang.ClassCastException :
> > > br.cefetrn.olivier.entity.CarroPK
> > >         at
> > >
> org.tranql.sql.jdbc.binding.StringBinding.setValue(StringBinding.java :43)
> > >         at
> > >
> org.tranql.sql.jdbc.binding.TypeConverterBinding.setValue
> > > (TypeConverterBinding.java:93)
> > >         at
> > >
> org.tranql.sql.jdbc.binding.TypeConverterBinding.setValue(TypeConverterBinding.java:89)
> > >         at
> > > org.tranql.sql.jdbc.JDBCQueryCommand.execute
> (JDBCQueryCommand.java:64)
> > >          at
> > >
> org.tranql.cache.cache.FindByPKCacheQueryCommand.execute(FindByPKCacheQueryCommand.java:66)
> > >         at
> > > org.openejb.entity.cmp.CMPFinder.execute(CMPFinder.java
> :99)
> > >         at
> > > org.openejb.entity.cmp.SingleValuedFinder.execute
> > > (SingleValuedFinder.java:80)
> > >         at
> > >
> org.openejb.dispatch.DispatchInterceptor.invoke (DispatchInterceptor.java:72)
> > >         at
> > >
> org.apache.geronimo.naming.java.ComponentContextInterceptor.invoke(ComponentContextInterceptor.java
> > > :56)
> > >         at
> > >
> org.openejb.ConnectionTrackingInterceptor.invoke(ConnectionTrackingInterceptor.java
> :81)
> > >         at
> > >
> org.openejb.entity.EntityInstanceInterceptor.invoke (EntityInstanceInterceptor.java:136)
> > >         at
> > >
> org.openejb.entity.cmp.InTxCacheInterceptor.invoke(InTxCacheInterceptor.java
> :90)
> > >         at
> > >
> org.openejb.transaction.ContainerPolicy$TxRequired.invoke(ContainerPolicy.java:119)
> > >         ... 36 more
> > > 23:58:30,670 WARN  [SystemExceptionInterceptor]
> MySession
> > > javax.ejb.TransactionRolledbackLocalException
> > >         at
> > >
> org.openejb.transaction.ContainerPolicy$TxRequired.invoke(ContainerPolicy.java:123)
> > >         at
> > >
> org.openejb.transaction.TransactionContextInterceptor.invoke
> > > (TransactionContextInterceptor.java :80)
> > >         at
> > >
> org.openejb.SystemExceptionInterceptor.invoke (SystemExceptionInterceptor.java:82)
> > >         at
> > >
> org.openejb.GenericEJBContainer.invoke(GenericEJBContainer.java:238)
> > >          at
> > >
> org.openejb.proxy.EJBMethodInterceptor.intercept (EJBMethodInterceptor.java:129)
> > >         at
> > >
> org.openejb.proxy.EntityEJBLocalHome$$EnhancerByCGLIB$$1847bc60.findByPrimaryKey(<generated>)
> > >         at
> > >
> br.cefetrn.olivier.session.MySessionBean.registrarLocacao
> > > (MySessionBean.java:71)
> > >         at
> > >
> br.cefetrn.olivier.session.MySessionBean$$FastClassByCGLIB$$fba7f7a3.invoke (<generated>)
> > >         at
> > >
> org.openejb.dispatch.AbstractMethodOperation.invoke(AbstractMethodOperation.java
> > > :90)
> > >         at
> > >
> org.openejb.sfsb.BusinessMethod.execute(BusinessMethod.java:66)
> > >         at
> > >
> org.openejb.dispatch.DispatchInterceptor.invoke(DispatchInterceptor.java:72)
> > >         at
> > >
> org.apache.geronimo.naming.java.ComponentContextInterceptor.invoke
> > > (ComponentContextInterceptor.java :56)
> > >         at
> > >
> org.openejb.ConnectionTrackingInterceptor.invoke (ConnectionTrackingInterceptor.java:81)
> > >         at
> > >
> org.openejb.sfsb.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java
> > > :115)
> > >         at
> > >
> org.openejb.transaction.ContainerPolicy$TxRequired.invoke(ContainerPolicy.java:140)
> > >         at
> > >
> org.openejb.transaction.TransactionContextInterceptor.invoke (TransactionContextInterceptor.java
> :80)
> > >          at
> > >
> org.openejb.SystemExceptionInterceptor.invoke(SystemExceptionInterceptor.java:82)
> > >         at
> > >
> org.openejb.GenericEJBContainer.invoke(GenericEJBContainer.java:238)
> > >         at
> org.openejb.server.ejbd.EjbRequestHandler.invoke
> > > (EjbRequestHandler.java:297)
> > >         at
> > >
> org.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:325)
> > >         at
> > >
> org.openejb.server.ejbd.EjbRequestHandler.processRequest (EjbRequestHandler.java
> > > :196)
> > >         at
> > >
> org.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:150)
> > >         at
> > > org.openejb.server.ejbd.EjbServer.service
> (EjbServer.java:87)
> > >         at
> > >
> org.openejb.server.ejbd.EjbServer$$FastClassByCGLIB$$d379d2ff.invoke
> > > (<generated>)
> > >         at
> > > net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java
> :53)
> > >         at
> > >
> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
> > >         at
> > > org.apache.geronimo.gbean.runtime.GBeanOperation.invoke
> > > (GBeanOperation.java :118)
> > >         at
> > >
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke (GBeanInstance.java:800)
> > >         at
> > >
> org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
> > >         at
> > >
> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke
> > > (RawOperationInvoker.java:36)
> > >         at
> > >
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java
> :96)
> > >         at
> > >
> org.activeio.xnet.ServerService$$EnhancerByCGLIB$$463425f3.service
> > > (<generated>)
> > >         at
> > >
> org.activeio.xnet.ServicePool$2.run (ServicePool.java:67)
> > >         at
> > >
> org.activeio.xnet.ServicePool$3.run(ServicePool.java:90)
> > >         at
> > >
> org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run
> > > (ThreadPool.java:138)
> > >         at
> > >
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run
> (Unknown
> > > Source)
> > >         at java.lang.Thread.run(Thread.java:595)
> > > Caused by: java.lang.ClassCastException:
> > > br.cefetrn.olivier.entity.CarroPK
> > >         at
> > > org.tranql.sql.jdbc.binding.StringBinding.setValue
> (StringBinding.java:43)
> > >         at
> > >
> org.tranql.sql.jdbc.binding.TypeConverterBinding.setValue(TypeConverterBinding.java:93)
> > >         at
> > >
> org.tranql.sql.jdbc.binding.TypeConverterBinding.setValue
> > > (TypeConverterBinding.java:89)
> > >         at
> > >
> org.tranql.sql.jdbc.JDBCQueryCommand.execute(JDBCQueryCommand.java :64)
> > >         at
> > >
> org.tranql.cache.cache.FindByPKCacheQueryCommand.execute
> (FindByPKCacheQueryCommand.java:66)
> > >         at
> > >
> org.openejb.entity.cmp.CMPFinder.execute (CMPFinder.java:99)
> > >         at
> > >
> org.openejb.entity.cmp.SingleValuedFinder.execute(SingleValuedFinder.java
> :80)
> > >         at
> org.openejb.dispatch.DispatchInterceptor.invoke
> > > (DispatchInterceptor.java:72)
> > >         at
> > >
> org.apache.geronimo.naming.java.ComponentContextInterceptor.invoke(ComponentContextInterceptor.java
> :56)
> > >         at
> > >
> org.openejb.ConnectionTrackingInterceptor.invoke(ConnectionTrackingInterceptor.java
> > > :81)
> > >         at
> > >
> org.openejb.entity.EntityInstanceInterceptor.invoke (EntityInstanceInterceptor.java
> :136)
> > >         at
> > >
> org.openejb.entity.cmp.InTxCacheInterceptor.invoke(InTxCacheInterceptor.java:90)
> > >         at
> > >
> org.openejb.transaction.ContainerPolicy$TxRequired.invoke
> > > (ContainerPolicy.java :119)
> > >         ... 36 more
> > > 23:58:30,688 WARN  [[Negocio]] Servlet.service() for servlet Negocio
> threw
> > > exception
> > > java.rmi.RemoteException: The bean encountered a non-application
> exception.
> > > method; nested exception is:
> > >         javax.ejb.TransactionRolledbackLocalException
> > >         at
> > >
> org.openejb.server.ejbd.EjbRequestHandler.invoke(EjbRequestHandler.java:303)
> > >         at
> > >
> org.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD
> > > (EjbRequestHandler.java:325)
> > >         at
> > >
> org.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:196)
> > >         at
> > >
> org.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:150)
> > >         at org.openejb.server.ejbd.EjbServer.service
> > > (EjbServer.java:87)
> > >         at
> > >
> org.openejb.server.ejbd.EjbServer$$FastClassByCGLIB$$d379d2ff.invoke
> (<generated>)
> > >         at
> > >
> net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
> > >         at
> > >
> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke
> > > (FastMethodInvoker.java :38)
> > >         at
> > >
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke (GBeanOperation.java:118)
> > >         at
> > >
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:800)
> > >         at
> > >
> org.apache.geronimo.gbean.runtime.RawInvoker.invoke (RawInvoker.java:57)
> > >         at
> > >
> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:36)
> > >         at
> > >
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept
> > > (ProxyMethodInterceptor.java:96)
> > >         at
> > >
> org.activeio.xnet.ServerService$$EnhancerByCGLIB$$463425f3.service(<generated>)
> > >         at
> > >
> org.activeio.xnet.ServicePool$2.run(ServicePool.java:67)
> > >         at org.activeio.xnet.ServicePool$3.run
> > > (ServicePool.java:90)
> > >         at
> > >
> org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run
> (ThreadPool.java:138)
> > >         at
> > >
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run (Unknown
> > > Source)
> > >         at java.lang.Thread.run(Thread.java:595)
> > > Caused by:
> javax.ejb.TransactionRolledbackLocalException
> > >         at
> > >
> org.openejb.transaction.ContainerPolicy$TxRequired.invoke(ContainerPolicy.java:123)
> > >         at
> > >
> org.openejb.transaction.TransactionContextInterceptor.invoke
> > > ( TransactionContextInterceptor.java :80)
> > >         at
> > >
> org.openejb.SystemExceptionInterceptor.invoke(SystemExceptionInterceptor.java:82)
> > >         at
> > >
> org.openejb.GenericEJBContainer.invoke(GenericEJBContainer.java:238)
> > >          at
> > >
> org.openejb.proxy.EJBMethodInterceptor.intercept(EJBMethodInterceptor.java:129)
> > >         at
> > >
> org.openejb.proxy.EntityEJBLocalHome$$EnhancerByCGLIB$$1847bc60.findByPrimaryKey(<generated>)
> > >         at
> > >
> br.cefetrn.olivier.session.MySessionBean.registrarLocacao
> > > (MySessionBean.java:71)
> > >         at
> > >
> br.cefetrn.olivier.session.MySessionBean$$FastClassByCGLIB$$fba7f7a3.invoke(<generated>)
> > >         at
> > >
> org.openejb.dispatch.AbstractMethodOperation.invoke(AbstractMethodOperation.java
> > > :90)
> > >         at
> > >
> org.openejb.sfsb.BusinessMethod.execute (BusinessMethod.java:66)
> > >         at
> > >
> org.openejb.dispatch.DispatchInterceptor.invoke(DispatchInterceptor.java:72)
> > >         at
> > >
> org.apache.geronimo.naming.java.ComponentContextInterceptor.invoke
> > > (ComponentContextInterceptor.java :56)
> > >         at
> > >
> org.openejb.ConnectionTrackingInterceptor.invoke(ConnectionTrackingInterceptor.java:81)
> > >         at
> > >
> org.openejb.sfsb.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java
> > > :115)
> > >         at
> > >
> org.openejb.transaction.ContainerPolicy$TxRequired.invoke (ContainerPolicy.java:140)
> > >         at
> > >
> org.openejb.transaction.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java
> :80)
> > >          at
> > >
> org.openejb.SystemExceptionInterceptor.invoke(SystemExceptionInterceptor.java:82)
> > >         at
> > >
> org.openejb.GenericEJBContainer.invoke(GenericEJBContainer.java :238)
> > >         at
> org.openejb.server.ejbd.EjbRequestHandler.invoke
> > > (EjbRequestHandler.java:297)
> > >         ... 18 more
> > > Caused by: java.lang.ClassCastException :
> > > br.cefetrn.olivier.entity.CarroPK
> > >         at
> > >
> org.tranql.sql.jdbc.binding.StringBinding.setValue(StringBinding.java:43)
> > >          at
> > >
> org.tranql.sql.jdbc.binding.TypeConverterBinding.setValue(TypeConverterBinding.java:93)
> > >         at
> > >
> org.tranql.sql.jdbc.binding.TypeConverterBinding.setValue(TypeConverterBinding.java :89)
> > >         at org.tranql.sql.jdbc.JDBCQueryCommand.execute
> > > (JDBCQueryCommand.java:64)
> > >         at
> > >
> org.tranql.cache.cache.FindByPKCacheQueryCommand.execute
> (FindByPKCacheQueryCommand.java:66)
> > >         at
> > >
> org.openejb.entity.cmp.CMPFinder.execute(CMPFinder.java:99)
> > >         at
> > >
> org.openejb.entity.cmp.SingleValuedFinder.execute (SingleValuedFinder.java
> :80)
> > >         at
> > >
> org.openejb.dispatch.DispatchInterceptor.invoke(DispatchInterceptor.java:72)
> > >         at
> > >
> org.apache.geronimo.naming.java.ComponentContextInterceptor.invoke
> > > (ComponentContextInterceptor.java :56)
> > >         at
> > >
> org.openejb.ConnectionTrackingInterceptor.invoke (ConnectionTrackingInterceptor.java:81)
> > >         at
> > >
> org.openejb.entity.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java
> > > :136)
> > >         at
> > >
> org.openejb.entity.cmp.InTxCacheInterceptor.invoke(InTxCacheInterceptor.java:90)
> > >         at
> > >
> org.openejb.transaction.ContainerPolicy$TxRequired.invoke ( ContainerPolicy.java
> :119)
> > >         ... 36 more
> > >
> > >
> > > On 4/4/06, Aaron Mulder < ammulder@alumni.princeton.edu > wrote:
> > > >
> > >  What's the actual problem?  When you call findByPrimaryKey, is it
> > > returning nothing, or giving you a stack trace, or what?
> > >
> > > I think your primary key class is supposed to have getters and setters
> > > for all the properties, with names matching the primary key fields on
> > > the bean.  So it may be that you need a getChassi and setChassi on the
> > > PK class to get it working.
> > >
> > > Thanks,
> > >     Aaron
> > >
> > > P.S. Ever played Car Wars?  :)
> > >
> > > On 4/4/06, Olivier Voutat < olivier.voutat@gmail.com> wrote:
> > > > I'm in trouble (again lol) with the findByPrimaryKey method.
> > > >
> > > > CarLocalHome localHomeCar = Locator.getCarLocalHome ();
> > > > CarLocal tempcar = null;
> > > > try {
> > > >             Iterator temp =
> > > > localHomeCar.findBySituation("Avaliable").iterator();
> > > >             CarPK pk = new CarPK();
> > > >             while (temp.hasNext()) {
> > > >                 tempcar = (CarLocal)temp.next();
> > > >                 System.out.println("Primary Key " +
> > > > tempcar.getPrimaryKey ().toString());
> > > >                 pk =
> (CarroPK)tempcar.getPrimaryKey();
> > > > }
> > > > System.out.println(pk.chassi );
> > > > System.out.println("Everything works fine until here.");
> > > >
> > > >  CarLocal mycar = localHomeCar.findByPrimaryKey (new
> CarPK("CHASSSICODE");
> > > > //HERE I don't get to pick my ejbLocalObjet by the primary key.
> > > >
> > > > CarLocal mycar = localHomeCar.findByPrimaryKey (pk);
> > > > //Tried this way too but no success
> > > >
> > >
> -------------------------------------------------------------------------------------------------------------------------------
> > > > // This is my CarPK class
> > > > package br.cefetrn.olivier.entity;
> > > >
> > > > import java.io.Serializable;
> > > >
> > > > public class CarPK implements Serializable {
> > > >
> > > >     private static final long serialVersionUID = 1L;
> > > >     public String chassi;
> > > >
> > > >     public CarroPK() {}
> > > >
> > > >     public CarroPK(String chas) {
> > > >         this.chassi = chas;
> > > >     }
> > > >
> > > >     public String toString() {
> > > >         return chassi.toString();
> > > >     }
> > > >
> > > >     public int hashCode() {
> > > >         return chassi.hashCode();
> > > >     }
> > > >
> > > >     public boolean equals(Object car) {
> > > >         return ((CarroPK)car).chassi.equals(chassi);
> > > >     }
> > > > }
> > > >
> > >
> -------------------------------------------------------------------------------------------------------------------------------
> > > > // This is my ejb-jar.xml code
> > > >     <entity>
> > > >         <ejb-name>Car</ejb-name>
> > > >
> > > >
> > > <local-home>br.cefetrn.olivier.entity.CarLocalHome
> </local-home>
> > > >         <local>br.cefetrn.olivier.entity.CarLocal
> > > </local>
> > > >
> > > >
> <ejb-class>br.cefetrn.olivier.entity.CarBean </ejb-class>
> > > >
> <persistence-type>Container</persistence-type>
> > > >         <prim-key-class>br.cefetrn.olivier.entity.CarPK
> </prim-key-class>
> > > >     /////////////My PK class
> > > >         <reentrant>false</reentrant>
> > > >         <cmp-version> 2.x</cmp-version>
> > > >
> <abstract-schema-name>CARS</abstract-schema-name>
> > > >
> > > >
> <cmp-field><field-name>chassi</field-name></cmp-field>
> > > >
> > > >
> > >
> <cmp-field><field-name>manufacturer</field-name></cmp-field>
> > > >
> > > > <cmp-field><field-name>model</field-name></cmp-field>
> > > >
> > > >
> <cmp-field><field-name>plaque</field-name></cmp-field>
> > > >
> > > <cmp-field><field-name>km</field-name></cmp-field>
> > > >
> > > > <cmp-field><field-name>color</field-name></cmp-field>
> > > >
> > > >
> <cmp-field><field-name>situation</field-name></cmp-field>
> > > >
> > > > <cmp-field><field-name>type</field-name></cmp-field>
> > > >
> > > > <cmp-field><field-name>price</field-name></cmp-field>
> > > >         <resource-ref>
> > > >             <res-ref-name>Fire</res-ref-name>
> > > >                <res-type> javax.sql.DataSource</res-type>
> > > >                <res-auth>Container</res-auth>
> > > >
> > > > <res-sharing-scope>Shareable</res-sharing-scope>
> > > >         </resource-ref>
> > > >     </entity>
> > > >
> > > > Does anyone knows what I'm doing wrong in this findByPrimaryKey ?
> > > > Best Regards,
> > > > --
> > > > Olivier Voutat
> > > > Rua Praia de Muri�, 9188
> > >
> > > > Cep 59092-390 / Natal - RN
> > > > Tel: (84) 3219-0427 Cel: (84) 9977-3917
> > >
> > >
> > >
> > > --
> > > Olivier Jeanpierre Voutat
> > > Rua Praia de Muri�, 9188
> > >
> > > Cep 59092-390 / Natal - RN
> > > Tel: (84) 3219-0427 Cel: (84) 9977-3917
> >
>
>
>
> --
> Olivier Jeanpierre Voutat
> Rua Praia de Muriú, 9188
>
> Cep 59092-390 / Natal - RN
> Tel: (84) 3219-0427 Cel: (84) 9977-3917



--
Olivier Jeanpierre Voutat
Rua Praia de Muriú, 9188
Cep 59092-390 / Natal - RN
Tel: (84) 3219-0427 Cel: (84) 9977-3917