2 Replies Latest reply on Jan 9, 2007 5:03 AM by saibaba Maddula

    org.hibernate.exception.GenericJDBCException: could not load

    saibaba Maddula Newbie

      hi
      I am struggling with this exception.

      Anyone plz tell me how can i solve this.

      Thanks in advance

        • 1. Re: org.hibernate.exception.GenericJDBCException: could not
          saibaba Maddula Newbie

          hi
          I am trying to create an entitybean on a table
          I could deploy properly but when I am running it, it is throwing the exception.

          run.client is the target in my build file.

          run.client:
          [java] javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not load an entity: [com.globeop.MarginDeal.MarginDealEntityBean#component[clientId,dealId,dealTypeShortName,sourceShortName]{dealTypeShortName=IAM, sourceShortName=KONDOR, dealId=6049, clientId=4}]
          [java] at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
          [java] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
          [java] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
          [java] at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:263)
          [java] at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
          [java] at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
          [java] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828)
          [java] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681)
          [java] at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358)
          [java] at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:398)
          [java] at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239)
          [java] Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not load an entity: [com.globeop.MarginDeal.MarginDealEntityBean#component[clientId,dealId,dealTypeShortName,sourceShortName]{dealTypeShortName=IAM, sourceShortName=KONDOR, dealId=6049, clientId=4}]
          [java] at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:647)
          [java] at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:194)
          [java] at org.jboss.ejb3.entity.TransactionScopedEntityManager.find(TransactionScopedEntityManager.java:164)
          [java] at com.globeop.MarginDeal.MarginDealSessionBean.findMarginDeal(MarginDealSessionBean.java:18)
          [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          [java] at java.lang.reflect.Method.invoke(Method.java:585)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
          [java] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
          [java] at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:46)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
          [java] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
          [java] at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:263)
          [java] at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
          [java] at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
          [java] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828)
          [java] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681)
          [java] at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358)
          [java] at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:398)
          [java] at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239)
          [java] at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:190)
          [java] at org.jboss.remoting.Client.invoke(Client.java:525)
          [java] at org.jboss.remoting.Client.invoke(Client.java:488)
          [java] at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:77)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
          [java] at $Proxy0.findMarginDeal(Unknown Source)
          [java] at com.globeop.MarginDeal.Client.main(Client.java:38)
          [java] Caused by: org.hibernate.exception.GenericJDBCException: could not load an entity: [com.globeop.MarginDeal.MarginDealEntityBean#component[clientId,dealId,dealTypeShortName,sourceShortName]{dealTypeShortName=IAM, sourceShortName=KONDOR, dealId=6049, clientId=4}]
          [java] at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
          [java] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
          [java] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
          [java] at org.hibernate.loader.Loader.loadEntity(Loader.java:1798)
          [java] at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48)
          [java] at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42)
          [java] at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2977)
          [java] at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:393)
          [java] at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:374)
          [java] at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:137)
          [java] at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:193)
          [java] at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:101)
          [java] at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
          [java] at org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
          [java] at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
          [java] at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:174)
          [java] at org.jboss.ejb3.entity.TransactionScopedEntityManager.find(TransactionScopedEntityManager.java:164)
          [java] at com.globeop.MarginDeal.MarginDealSessionBean.findMarginDeal(MarginDealSessionBean.java:18)
          [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          [java] at java.lang.reflect.Method.invoke(Method.java:585)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
          [java] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
          [java] at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:46)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
          [java] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
          [java] at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
          [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          [java] at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:263)
          [java] at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
          [java] at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
          [java] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828)
          [java] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681)
          [java] at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358)
          [java] at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:398)
          [java] at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239)
          [java] Caused by: com.sybase.jdbc2.jdbc.SybSQLException: Invalid column name 'sourceShortName'.
          [java] at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2535)
          [java] at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1916)
          [java] at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
          [java] at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:201)
          [java] at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:182)
          [java] at com.sybase.jdbc2.jdbc.SybStatement.queryLoop(SybStatement.java:1455)
          [java] at com.sybase.jdbc2.jdbc.SybStatement.executeQuery(SybStatement.java:1440)
          [java] at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeQuery(SybPreparedStatement.java:70)
          [java] at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:236)
          [java] at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
          [java] at org.hibernate.loader.Loader.getResultSet(Loader.java:1668)
          [java] at org.hibernate.loader.Loader.doQuery(Loader.java:662)
          [java] at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
          [java] at org.hibernate.loader.Loader.loadEntity(Loader.java:1784)
          [java] ... 48 more
          BUILD SUCCESSFUL
          Total time: 41 seconds

          • 2. Re: org.hibernate.exception.GenericJDBCException: could not
            saibaba Maddula Newbie

            This is the msg on the jboss console:

            14:42:42,103 WARN [JDBCExceptionReporter] 010TP: The connection's initial character set, null, could not be converted by the server. The server's proposed character set, 8859_1,
            14:42:42,118 WARN [JDBCExceptionReporter] SQL Error: 207, SQLState: ZZZZZ
            14:42:42,118 ERROR [JDBCExceptionReporter] Invalid column name 'sourceShortName'.

            14:42:42,118 WARN [JDBCExceptionReporter] SQL Error: 207, SQLState: ZZZZZ
            14:42:42,118 ERROR [JDBCExceptionReporter] Invalid column name 'dealTypeShortName'.

            14:42:42,118 WARN [JDBCExceptionReporter] SQL Error: 207, SQLState: ZZZZZ
            14:42:42,118 ERROR [JDBCExceptionReporter] Invalid column name 'dealId'.

            14:42:42,118 WARN [JDBCExceptionReporter] SQL Error: 207, SQLState: ZZZZZ
            14:42:42,118 ERROR [JDBCExceptionReporter] Invalid column name 'clientId'.

            14:42:42,118 WARN [JDBCExceptionReporter] SQL Error: 207, SQLState: ZZZZZ
            14:42:42,118 ERROR [JDBCExceptionReporter] Invalid column name 'sourceShortName'.

            14:42:42,118 WARN [JDBCExceptionReporter] SQL Error: 207, SQLState: ZZZZZ
            14:42:42,118 ERROR [JDBCExceptionReporter] Invalid column name 'dealTypeShortName'.

            14:42:42,118 WARN [JDBCExceptionReporter] SQL Error: 207, SQLState: ZZZZZ
            14:42:42,118 ERROR [JDBCExceptionReporter] Invalid column name 'dealId'.

            14:42:42,118 WARN [JDBCExceptionReporter] SQL Error: 207, SQLState: ZZZZZ
            14:42:42,118 ERROR [JDBCExceptionReporter] Invalid column name 'clientId'.

            14:42:42,118 INFO [DefaultLoadEventListener] Error performing load command
            org.hibernate.exception.GenericJDBCException: could not load an entity: [com.globeop.MarginDeal.MarginDealEntityBean#component[clientId,dealId,dealTypeShortName,sourceShortName]{d
            at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
            at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
            at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
            at org.hibernate.loader.Loader.loadEntity(Loader.java:1798)
            at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48)
            at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42)
            at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2977)
            at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:393)
            at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:374)
            at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:137)
            at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:193)
            at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:101)
            at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
            at org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
            at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
            at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:174)
            at org.jboss.ejb3.entity.TransactionScopedEntityManager.find(TransactionScopedEntityManager.java:164)
            at com.globeop.MarginDeal.MarginDealSessionBean.findMarginDeal(MarginDealSessionBean.java:18)
            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:585)
            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
            at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
            at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:46)
            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
            at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
            at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:263)
            at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
            at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
            at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828)
            at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681)
            at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358)
            at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:398)
            at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239)
            Caused by: com.sybase.jdbc2.jdbc.SybSQLException: Invalid column name 'sourceShortName'.

            at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2535)
            at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1916)
            at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
            at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:201)
            at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:182)
            at com.sybase.jdbc2.jdbc.SybStatement.queryLoop(SybStatement.java:1455)
            at com.sybase.jdbc2.jdbc.SybStatement.executeQuery(SybStatement.java:1440)
            at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeQuery(SybPreparedStatement.java:70)
            at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:236)
            at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
            at org.hibernate.loader.Loader.getResultSet(Loader.java:1668)
            at org.hibernate.loader.Loader.doQuery(Loader.java:662)
            at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
            at org.hibernate.loader.Loader.loadEntity(Loader.java:1784)
            ... 48 more


            and the following is the schema for which I am developing an entity

            DealId int NOT NULL,
            ClientId numeric(18,0) NOT NULL,
            DealTypeShortName char(3) NOT NULL,
            SourceShortName char(10) NOT NULL,
            FundId numeric(18,0) NOT NULL,
            ExposureEntityShortName char(12) NULL,
            CounterpartyId numeric(18,0) NULL,
            TradeDate datetime NULL,
            SettlementDate datetime NULL,
            PortfolioName char(20) NULL,
            FolderName char(20) NULL,
            CurrencyCode char(3) NULL,
            ExpirationDate datetime NULL,
            Amount numeric(18,7) NULL,
            InterestRate numeric(11,7) NULL,
            SecurityId char(20) NULL,
            BasisShortName char(1) NULL,
            DealSideShortName char(8) NULL,
            ActualFundId numeric(18,0) DEFAULT 0 NOT NULL,


            and here is the detailed code of my entity bean and my client class:

            package com.globeop.MarginDeal;

            import java.io.Serializable;
            import java.util.Date;

            import javax.persistence.Column;
            import javax.persistence.Entity;
            import javax.persistence.Id;
            import javax.persistence.IdClass;
            import javax.persistence.Table;

            @Entity
            @Table(name = "margin_deal")
            @IdClass(MarginDealEntityPrimaryKey.class)
            public class MarginDealEntityBean implements Serializable {
            /**
            *
            */
            private static final long serialVersionUID = 1L;

            private long ClientId;

            private String DealTypeShortName;

            private long DealId;

            private String SourceShortName;

            private long FundId;

            private long ActualFundId;

            private String ExposureEntityShortName;

            private long CounterpartyId;

            private Date TradeDate;

            private Date SettlementDate;

            private String PortfolioName;

            private String FolderName;

            private String CurrencyCode;

            private Date ExpirationDate;

            private float Amount;

            private float InterestRate;

            private String SecurityId;

            private String BasisShortName;

            private String DealSideShortName;

            public MarginDealEntityBean(){

            }
            /**
            * @return Returns the amount.
            */
            @Column(name="Amount",nullable=true,columnDefinition="numeric",scale=18,precision=7)
            public float getAmount() {
            return Amount;
            }

            /**
            * @param amount
            * The amount to set.
            */
            public void setAmount(float amount) {
            Amount = amount;
            }

            /**
            * @return Returns the basisShortName.
            */
            @Column(name="BasisShortName",nullable=true,columnDefinition="char",length=1)
            public String getBasisShortName() {
            return BasisShortName;
            }

            /**
            * @param basisShortName
            * The basisShortName to set.
            */
            public void setBasisShortName(String basisShortName) {
            BasisShortName = basisShortName;
            }

            @Id
            /**
            * @return Returns the clientId.
            */
            @Column(name="ClientId",nullable=false,columnDefinition="numeric",scale=18,precision=0)
            public long getClientId() {
            return ClientId;
            }

            /**
            * @param clientId
            * The clientId to set.
            */
            public void setClientId(long clientId) {
            ClientId = clientId;
            }


            /**
            * @return Returns the counterpartyId.
            */
            @Column(name="CounterpartyId",nullable=true,columnDefinition="numeric",scale=18,precision=0)
            public long getCounterpartyId() {
            return CounterpartyId;
            }

            /**
            * @param counterpartyId
            * The counterpartyId to set.
            */
            public void setCounterpartyId(long counterpartyId) {
            CounterpartyId = counterpartyId;
            }

            /**
            * @return Returns the currencyCode.
            */
            @Column(name="CurrencyCode",columnDefinition="char",length=3,nullable=true)
            public String getCurrencyCode() {
            return CurrencyCode;
            }

            /**
            * @param currencyCode
            * The currencyCode to set.
            */
            public void setCurrencyCode(String currencyCode) {
            CurrencyCode = currencyCode;
            }

            @Id
            /**
            * @return Returns the dealId.
            */
            @Column(name="DealId",nullable=false,columnDefinition="int")
            public long getDealId() {
            return DealId;
            }

            /**
            * @param dealId
            * The dealId to set.
            */
            public void setDealId(long dealId) {
            DealId = dealId;
            }

            /**
            * @return Returns the dealSideShortName.
            */
            @Column(name="DealSideShortName",nullable=true,columnDefinition="char",length=8)
            public String getDealSideShortName() {
            return DealSideShortName;
            }

            /**
            * @param dealSideShortName
            * The dealSideShortName to set.
            */
            public void setDealSideShortName(String dealSideShortName) {
            DealSideShortName = dealSideShortName;
            }


            @Id
            /**
            * @return Returns the dealTypeShortName.
            */
            @Column(name="DealTypeShortName",nullable=false,columnDefinition="char",length=3)
            public String getDealTypeShortName() {
            return DealTypeShortName;
            }

            /**
            * @param dealTypeShortName
            * The dealTypeShortName to set.
            */
            public void setDealTypeShortName(String dealTypeShortName) {
            DealTypeShortName = dealTypeShortName;
            }

            /**
            * @return Returns the expirationDate.
            */

            //@Basic(fetch=FetchType.EAGER,optional=false)
            //@Temporal(TemporalType.DATE)
            /*
            @Column(name="ExpirationDate" ,nullable=true,columnDefinition="datetime")
            public Date getExpirationDate() {
            return ExpirationDate;
            }

            /**
            * @param expirationDate
            * The expirationDate to set.
            */
            /* public void setExpirationDate(Date expirationDate) {
            ExpirationDate = expirationDate;
            }
            */
            /**
            * @return Returns the exposureEntityShortName.
            */
            @Column(name="ExposureEntityShortName",nullable=true,columnDefinition="char",length=12)
            public String getExposureEntityShortName() {
            return ExposureEntityShortName;
            }

            /**
            * @param exposureEntityShortName
            * The exposureEntityShortName to set.
            */
            public void setExposureEntityShortName(String exposureEntityShortName) {
            ExposureEntityShortName = exposureEntityShortName;
            }

            /**
            * @return Returns the folderName.
            */
            @Column(name="FolderName",nullable=true,columnDefinition="char",length=20)
            public String getFolderName() {
            return FolderName;
            }

            /**
            * @param folderName
            * The folderName to set.
            */
            public void setFolderName(String folderName) {
            FolderName = folderName;
            }


            /**
            * @return Returns the fundId.
            */
            @Column(name = "FundId",nullable=false,columnDefinition="numeric",scale=18,precision=0)
            public long getFundId() {
            return FundId;
            }

            /**
            * @param fundId
            * The fundId to set.
            */
            public void setFundId(long fundId) {
            FundId = fundId;
            }

            /**
            * @return Returns the interestRate.
            */
            @Column(name="InterestRate",nullable=true,columnDefinition="numeric",scale=11,precision=7)
            public float getInterestRate() {
            return InterestRate;
            }

            /**
            * @param interestRate
            * The interestRate to set.
            */
            public void setInterestRate(float interestRate) {
            InterestRate = interestRate;
            }

            /**
            * @return Returns the portfolioName.
            */
            @Column(name="PortfolioName",nullable=true,columnDefinition="char",length=20)
            public String getPortfolioName() {
            return PortfolioName;
            }

            /**
            * @param portfolioName
            * The portfolioName to set.
            */
            public void setPortfolioName(String portfolioName) {
            PortfolioName = portfolioName;
            }

            /**
            * @return Returns the securityId.
            */
            @Column(name="SecurityId",nullable=true,columnDefinition="char",length=20)
            public String getSecurityId() {
            return SecurityId;
            }

            /**
            * @param securityId
            * The securityId to set.
            */
            public void setSecurityId(String securityId) {
            SecurityId = securityId;
            }

            /**
            * @return Returns the settlementDate.
            */
            //@Basic(fetch=FetchType.EAGER,optional=false)
            //@Temporal(TemporalType.DATE)
            /*
            @Column(name="SettlementDate" ,nullable=true,columnDefinition="datetime")
            public Date getSettlementDate() {
            return SettlementDate;
            }

            /**
            * @param settlementDate
            * The settlementDate to set.
            */
            /*public void setSettlementDate(Date settlementDate) {
            SettlementDate = settlementDate;
            }
            */

            @Id
            /**
            * @return Returns the sourceShortName.
            */
            @Column(name="SourceShortName",nullable=false,columnDefinition="char",length=10)
            public String getSourceShortName() {
            return SourceShortName;
            }

            /**
            * @param sourceShortName
            * The sourceShortName to set.
            */
            public void setSourceShortName(String sourceShortName) {
            SourceShortName = sourceShortName;
            }

            /**
            * @return Returns the tradeDate.
            */
            //@Basic(fetch=FetchType.EAGER,optional=false)
            //@Temporal(TemporalType.DATE)
            /*@Column(name="TradeDate" ,nullable=true,columnDefinition="datetime")
            public Date getTradeDate() {
            return TradeDate;
            }

            /**
            * @param tradeDate
            * The tradeDate to set.
            */ /*
            public void setTradeDate(Date tradeDate) {
            TradeDate = tradeDate;
            }

            /**
            * @return Returns the actualFundId.
            */
            /*
            @Column(name="ActualFundId",nullable=false,columnDefinition="numeric",scale=18,precision=0)
            public long getActualFundId() {
            return ActualFundId;
            }
            */
            /**
            * @param actualFundId The actualFundId to set.
            */
            public void setActualFundId(long actualFundId) {
            ActualFundId = actualFundId;
            }

            }


            here is the code for my Client:


            package com.globeop.MarginDeal;

            import javax.naming.Context;
            import javax.naming.NamingException;
            import javax.rmi.PortableRemoteObject;

            public class Client {

            public static void main(String []args){
            try{
            Context jndicontext=getInitialContext();
            Object obj=jndicontext.lookup("MarginDealSessionBean");
            MarginDealRemote dao= (MarginDealRemote) PortableRemoteObject.narrow(obj,MarginDealRemote.class);

            MarginDealEntityBean mdEB=new MarginDealEntityBean();

            MarginDealEntityPrimaryKey mdepk=new MarginDealEntityPrimaryKey(4,"IAM",6049,"KONDOR");

            mdEB = dao.findMarginDeal(mdepk);
            System.out.println(mdEB.getDealId());
            System.out.println(mdEB.getClientId());
            System.out.println(mdEB.getDealTypeShortName());
            System.out.println(mdEB.getSourceShortName());
            System.out.println(mdEB.getFundId());
            System.out.println(mdEB.getExposureEntityShortName());
            }
            catch(Exception e){
            e.printStackTrace();
            }
            }

            public static Context getInitialContext() throws NamingException{
            return new javax.naming.InitialContext();
            }
            }

            the primary key class is:


            package com.globeop.MarginDeal;
            import java.io.Serializable;

            public class MarginDealEntityPrimaryKey implements Serializable {

            private static final long serialVersionUID = 1L;
            private long ClientId;
            private String DealTypeShortName;
            private long DealId;
            private String SourceShortName;
            /**
            * @param clientId The clientId to set.
            */

            public void setClientId(long clientId) {
            ClientId = clientId;
            }

            public void setDealId(long dealId) {
            DealId = dealId;
            }

            public void setDealTypeShortName(String dealTypeShortName) {
            DealTypeShortName = dealTypeShortName;
            }

            public void setSourceShortName(String sourceShortName) {
            SourceShortName = sourceShortName;
            }

            public long getClientId() {
            return ClientId;
            }

            public long getDealId() {
            return DealId;
            }


            public String getDealTypeShortName() {
            return DealTypeShortName;
            }

            public String getSourceShortName() {
            return SourceShortName;
            }

            public MarginDealEntityPrimaryKey() {
            }

            public MarginDealEntityPrimaryKey(long ClientId, String DealTypeShortName,long DealId, String SourceShortName) {
            this.ClientId=ClientId;
            this.DealTypeShortName=DealTypeShortName;
            this.DealId=DealId;
            this.SourceShortName=SourceShortName;
            }

            public boolean equals(Object obj){
            if (obj instanceof MarginDealEntityPrimaryKey){
            return ((((MarginDealEntityPrimaryKey)obj).getClientId()==this.ClientId)&&
            (((MarginDealEntityPrimaryKey)obj).getDealTypeShortName()).equals(this.ClientId)&&(((MarginDealEntityPrimaryKey)obj).getDealId()==this.DealId)&&(((MarginDealEntityPrimaryKey)obj).getSourceShortName()).equals(this.SourceShortName));
            }
            return false;
            }

            public int hashCode(){
            return DealTypeShortName.concat(SourceShortName).hashCode();
            }


            }