Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-206

Error mapping a Varchar to an Integer column for a cmp entity in postgresql

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.2.RC6
    • None
    • System
    • None
    • Postgresql 8.2

      com/sun/ts/tests/ejb/ee/bb/entity/lrapitest/Client.java#test1

      2007-06-04 15:07:58,171 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.AEJB] Executing SQL: SELECT COUNT FROM lrapitest_table2 WHERE ID=?
      2007-06-04 15:07:58,187 TRACE org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.AEJB#id param: i=1, type=VARCHAR, value=1
      2007-06-04 15:07:58,343 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.AEJB] Executing SQL: INSERT INTO lrapitest_table2 (ID, VALUE, NAME) VALUES (?, ?, ?)
      2007-06-04 15:07:58,343 TRACE org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.AEJB#id param: i=1, type=VARCHAR, value=1
      2007-06-04 15:07:58,343 TRACE org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.AEJB#value param: i=2, type=INTEGER, value=1
      2007-06-04 15:07:58,343 TRACE org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.AEJB#name param: i=3, type=VARCHAR, value=a1
      2007-06-04 15:07:58,484 ERROR [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.AEJB] Could not create entity
      org.postgresql.util.PSQLException: ERROR: column "id" is of type integer but expression is of type character varying
      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1548)
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1316)
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:191)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:351)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:305)
      at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:251)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.executeInsert(JDBCAbstractCreateCommand.java:365)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.performInsert(JDBCAbstractCreateCommand.java:321)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execute(JDBCAbstractCreateCommand.java:151)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:587)
      at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:237)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:225)
      at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:779)
      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.invocation.Invocation.performCall(Invocation.java:359)
      at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1126)
      at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:203)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:189)
      at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:136)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:76)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:45)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:56)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:125)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:161)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:145)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:132)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:107)
      at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:521)
      at org.jboss.ejb.Container.invoke(Container.java:981)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        1. ejb_bbE_lrapitest_ejb.jar.jbosscmp-jdbc.xml
          2 kB
          Rajesh Rajasekaran

              olubyans@redhat.com Alexey Loubyansky
              rrajasek@redhat.com Rajesh Rajasekaran
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: