Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-26857

[CLUSTERING] Error when using SYBASE JDBC Store

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • 8.0 Update 1
    • Clustering
    • None
    • False
    • None
    • False

      We have 4 nodes cluster (version 8.0.1.GA-CR1) configured to use an "invalidation-cache" backed by a JDBC Store:

      embed-server --server-config=standalone-ha.xml
      /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp)
      /subsystem=infinispan/cache-container=web/invalidation-cache=offload:add()
      data-source add --name=testDS --jndi-name=java:jboss/datasources/testDS --driver-name=sybase-connector.jar --connection-url=jdbc:sybase:Tds:sybase-160.hosts.prod.upshift.rdu2.redhat.com:5000/dballo01 --enabled=true --jta=true --use-java-context=true --transaction-isolation=TRANSACTION_READ_COMMITTED --min-pool-size=10 --max-pool-size=100 --pool-prefill=true --user-name=? --password=?
      /subsystem=infinispan/cache-container=web/invalidation-cache=offload/store=jdbc:add(data-source=testDS,fetch-state=false,passivation=false,purge=false,shared=true,dialect=SYBASE){allow-resource-service-restart=true}
      /subsystem=infinispan/cache-container=web/invalidation-cache=offload/store=jdbc/table=string:write-attribute(name=id-column.name,value=id)
      /subsystem=infinispan/cache-container=web/invalidation-cache=offload/store=jdbc/table=string:write-attribute(name=data-column.name,value=datum)
      /subsystem=infinispan/cache-container=web/invalidation-cache=offload/store=jdbc/table=string:write-attribute(name=timestamp-column.name,value=version)
      /subsystem=infinispan/cache-container=web/invalidation-cache=offload/store=jdbc/table=string:write-attribute(name=id-column.type,value=VARCHAR(255))
      /subsystem=infinispan/cache-container=web/invalidation-cache=offload/store=jdbc/table=string:write-attribute(name=timestamp-column.type,value=BIGINT)
      /subsystem=infinispan/cache-container=web/invalidation-cache=offload/store=jdbc/table=string:write-attribute(name=data-column.type,value=VARBINARY(16384))
      /subsystem=infinispan/cache-container=web/invalidation-cache=offload/store=jdbc:map-put(name=properties,key=infinispan.jdbc.upsert.disabled,value=true){allow-resource-service-restart=true}
      /subsystem=infinispan/cache-container=web:write-attribute(name=default-cache, value=offload)
      /subsystem=transactions:write-attribute(name=node-identifier,value=wildfly1)
      /subsystem=logging/logger=org.infinispan.persistence:add(level=TRACE)
      

      When we deploy our distribute application cbnc.ear, we get the following error:

      2024-03-29 14:01:17,879 DEBUG [org.infinispan.persistence.manager.PreloadManager] (ServerService Thread Pool -- 86) Preloaded 0 keys in 0 milliseconds
      2024-03-29 14:01:17,886 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 86) WFLYCLINF0002: Started default-server cache from web container
      2024-03-29 14:01:17,952 DEBUG [org.infinispan.persistence.jdbc.impl.table.TableManagerFactory] (blocking-thread--p8-t1) Database version reported as '16.0'.
      2024-03-29 14:01:18,028 DEBUG [org.infinispan.persistence.jdbc.impl.table.TableManagerFactory] (blocking-thread--p8-t3) Database version reported as '16.0'.
      2024-03-29 14:01:18,053 DEBUG [org.infinispan.persistence.jdbc.impl.table.TableManagerFactory] (blocking-thread--p8-t2) Database version reported as '16.0'.
      2024-03-29 14:01:18,144 ERROR [org.infinispan.PERSISTENCE] (blocking-thread--p8-t1) ISPN008011: Error while creating table; used DDL statement: 'INSERT INTO "ispn_entry_cbnc_ear_c_war_META" (data) VALUES (?)': com.sybase.jdbc4.jdbc.SybSQLException: Implicit conversion from datatype 'IMAGE' to 'VARBINARY' is not allowed.  Use the CONVERT function to run this query.
      
      	at deployment.sybase-connector.jar//com.sybase.jdbc4.tds.Tds.processEed(Tds.java:4237)
      	at deployment.sybase-connector.jar//com.sybase.jdbc4.tds.Tds.nextResult(Tds.java:3346)
      	at deployment.sybase-connector.jar//com.sybase.jdbc4.jdbc.ResultGetter.nextResult(ResultGetter.java:78)
      	at deployment.sybase-connector.jar//com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:303)
      	at deployment.sybase-connector.jar//com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:285)
      	at deployment.sybase-connector.jar//com.sybase.jdbc4.jdbc.SybStatement.updateLoop(SybStatement.java:2788)
      	at deployment.sybase-connector.jar//com.sybase.jdbc4.jdbc.SybStatement.executeUpdate(SybStatement.java:2772)
      	at deployment.sybase-connector.jar//com.sybase.jdbc4.jdbc.SybPreparedStatement.executeUpdate(SybPreparedStatement.java:335)
      	at org.jboss.ironjacamar.jdbcadapters@3.0.2.Final-redhat-00002//org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:537)
      	at org.infinispan.persistence.jdbc@14.0.17.Final-redhat-00002//org.infinispan.persistence.jdbc.impl.table.AbstractTableManager.updateMetaTable(AbstractTableManager.java:221)
      	at org.infinispan.persistence.jdbc@14.0.17.Final-redhat-00002//org.infinispan.persistence.jdbc.impl.table.AbstractTableManager.createMetaTable(AbstractTableManager.java:203)
      	at org.infinispan.persistence.jdbc@14.0.17.Final-redhat-00002//org.infinispan.persistence.jdbc.impl.table.AbstractTableManager.start(AbstractTableManager.java:138)
      	at org.infinispan.persistence.jdbc@14.0.17.Final-redhat-00002//org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore.createTableOperations(JdbcStringBasedStore.java:123)
      	at org.infinispan.persistence.jdbc@14.0.17.Final-redhat-00002//org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore.createTableOperations(JdbcStringBasedStore.java:83)
      	at org.infinispan.persistence.jdbc@14.0.17.Final-redhat-00002//org.infinispan.persistence.jdbc.common.impl.BaseJdbcStore.lambda$start$0(BaseJdbcStore.java:72)
      	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
      	at org.jboss.threads@2.4.0.Final-redhat-00001//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      	at org.jboss.threads@2.4.0.Final-redhat-00001//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
      	at org.jboss.threads@2.4.0.Final-redhat-00001//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
      	at org.jboss.threads@2.4.0.Final-redhat-00001//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
      	at org.wildfly.clustering.context@8.0.0.GA-redhat-00011//org.wildfly.clustering.context.ContextReferenceExecutor.execute(ContextReferenceExecutor.java:49)
      	at org.wildfly.clustering.context@8.0.0.GA-redhat-00011//org.wildfly.clustering.context.ContextualExecutor$1.run(ContextualExecutor.java:78)
      	at java.base/java.lang.Thread.run(Thread.java:840)
      

      When we select the datatype for the column in the DB with the following query:

      SELECT sc.* 
      FROM syscolumns sc
      INNER JOIN sysobjects so ON sc.id = so.id
      WHERE so.name = 'ispn_entry_cbnc_ear_a_war_META'
      

      We get "type=37" which corresponds to "varbinary"

      When se select the Database type with the following query:

      select @@version
      Adaptive Server Enterprise/16.0 SP02 PL05 HF1/EBF 26759 SMP/P/x86_64/Enterprise Linux/ase160sp02pl05x/2736/64-bit/FBO/Mon Jan 16 23:55:31 2017
      

      we find out that the DB is actually "Sybase ASE 16 (SP02)" which we are supposed to support (see https://access.redhat.com/articles/2026253)

      Complete configuration and logs in wildfly.zip

              Unassigned Unassigned
              tborgato@redhat.com Tommaso Borgato
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: