[
https://issues.jboss.org/browse/ISPN-3486?page=com.atlassian.jira.plugin....
]
Paul Ferraro commented on ISPN-3486:
------------------------------------
Actually, looking at the Sybase docs, this SQL statement *should* work (although
there's a possibility that the lack of whitespace between the identifier and the
column definition is problematic), provided Sybase is configured to use quoting (by
default it is not).
Jdbc-store doesn't work with Sybase database
--------------------------------------------
Key: ISPN-3486
URL:
https://issues.jboss.org/browse/ISPN-3486
Project: Infinispan
Issue Type: Bug
Components: Loaders and Stores
Affects Versions: 5.3.0.Final
Environment: WildFly 8.0.0.Alpha4
Reporter: Tomas Remes
Assignee: Mircea Markus
It's not possible to deploy appplication using following jdbc cache configuration
with defined Sybase datasource:
{noformat}
<binary-keyed-jdbc-store datasource="java:jboss/datasources/testDS"
preload="true" passivation="false" purge="false">
<binary-keyed-table prefix="stringbased">
<id-column name="id"
type="VARCHAR(500)"/>
<data-column name="datum"
type="BINARY"/>
<timestamp-column name="version"
type="BIGINT"/>
</binary-keyed-table>
</binary-keyed-jdbc-store>
{noformat}
Problem is that it cannot create table executing following statement:
CREATE TABLE "b_repl"(id VARCHAR(255) NOT NULL, datum VARBINARY(10000), ver
BIGINT, PRIMARY KEY (id))
Correct statement in this configuration is the one without quotation marks. So the
deployment fails on WildFly with following exception:
{noformat}
10:07:08,920 ERROR [org.infinispan.loaders.jdbc.TableManipulation] (ServerService Thread
Pool -- 57) ISPN008011: Error while creating table; used DDL statement: 'CREATE TABLE
"stringbased_default_host_mystore"(id VARCHAR(500) NOT NULL, datum BINARY,
version BIGINT, PRIMARY KEY (id))': java.sql.SQLException: Incorrect syntax near
'('.
at com.sybase.jdbc4.jdbc.SybConnection.getAllExceptions(SybConnection.java:2780)
at com.sybase.jdbc4.jdbc.SybStatement.handleSQLE(SybStatement.java:2665)
at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:295)
at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:272)
at com.sybase.jdbc4.jdbc.SybStatement.updateLoop(SybStatement.java:2515)
at com.sybase.jdbc4.jdbc.SybStatement.executeUpdate(SybStatement.java:2499)
at com.sybase.jdbc4.jdbc.SybStatement.executeUpdate(SybStatement.java:577)
at
org.jboss.jca.adapters.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:375)
at
org.infinispan.loaders.jdbc.TableManipulation.executeUpdateSql(TableManipulation.java:167)
at
org.infinispan.loaders.jdbc.TableManipulation.createTable(TableManipulation.java:143)
at org.infinispan.loaders.jdbc.TableManipulation.start(TableManipulation.java:245)
at
org.infinispan.loaders.jdbc.binary.JdbcBinaryCacheStore.doConnectionFactoryInitialization(JdbcBinaryCacheStore.java:514)
at
org.infinispan.loaders.jdbc.binary.JdbcBinaryCacheStore.start(JdbcBinaryCacheStore.java:102)
at org.infinispan.loaders.CacheLoaderManagerImpl.start(CacheLoaderManagerImpl.java:155)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_21]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[rt.jar:1.7.0_21]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[rt.jar:1.7.0_21]
at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_21]
at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:205)
at
org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:889)
at
org.infinispan.factories.AbstractComponentRegistry.invokeStartMethods(AbstractComponentRegistry.java:658)
at
org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:647)
at
org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:550)
at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:221)
at org.infinispan.CacheImpl.start(CacheImpl.java:691)
at
org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:685)
at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:648)
at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:544)
at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:558)
at
org.jboss.as.clustering.infinispan.DefaultEmbeddedCacheManager.getCache(DefaultEmbeddedCacheManager.java:109)
at
org.jboss.as.clustering.infinispan.DefaultEmbeddedCacheManager.getCache(DefaultEmbeddedCacheManager.java:100)
at
org.jboss.as.clustering.infinispan.subsystem.CacheService.start(CacheService.java:78)
at org.jboss.as.clustering.msc.AsynchronousService$1.run(AsynchronousService.java:82)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_21]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_21]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
10:07:08,941 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 54)
MSC000001: Failed to start service jboss.infinispan.web.repl:
org.jboss.msc.service.StartException in service jboss.infinispan.web.repl:
org.infinispan.CacheException: Unable to invoke method public void
org.infinispan.loaders.CacheLoaderManagerImpl.start() on object of type
CacheLoaderManagerImpl
at org.jboss.as.clustering.msc.AsynchronousService$1.run(AsynchronousService.java:87)
[wildfly-clustering-common-8.0.0.Alpha4.jar:8.0.0.Alpha4]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_21]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_21]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
[jboss-threads-2.1.0.Final.jar:2.1.0.Final]
Caused by: org.infinispan.CacheException: Unable to invoke method public void
org.infinispan.loaders.CacheLoaderManagerImpl.start() on object of type
CacheLoaderManagerImpl
at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:207)
at
org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:889)
at
org.infinispan.factories.AbstractComponentRegistry.invokeStartMethods(AbstractComponentRegistry.java:658)
at
org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:647)
at
org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:550)
at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:221)
at org.infinispan.CacheImpl.start(CacheImpl.java:691)
at
org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:685)
at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:648)
at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:544)
at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:558)
at
org.jboss.as.clustering.infinispan.DefaultEmbeddedCacheManager.getCache(DefaultEmbeddedCacheManager.java:109)
at
org.jboss.as.clustering.infinispan.DefaultEmbeddedCacheManager.getCache(DefaultEmbeddedCacheManager.java:100)
at
org.jboss.as.clustering.infinispan.subsystem.CacheService.start(CacheService.java:78)
at org.jboss.as.clustering.msc.AsynchronousService$1.run(AsynchronousService.java:82)
[wildfly-clustering-common-8.0.0.Alpha4.jar:8.0.0.Alpha4]
... 4 more
Caused by: org.infinispan.CacheException: Unable to start cache loaders
at org.infinispan.loaders.CacheLoaderManagerImpl.start(CacheLoaderManagerImpl.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_21]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[rt.jar:1.7.0_21]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[rt.jar:1.7.0_21]
at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_21]
at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:205)
... 18 more
Caused by: org.infinispan.loaders.CacheLoaderException: java.sql.SQLException: Incorrect
syntax near '('.
at
org.infinispan.loaders.jdbc.TableManipulation.executeUpdateSql(TableManipulation.java:170)
at
org.infinispan.loaders.jdbc.TableManipulation.createTable(TableManipulation.java:143)
at org.infinispan.loaders.jdbc.TableManipulation.start(TableManipulation.java:245)
at
org.infinispan.loaders.jdbc.binary.JdbcBinaryCacheStore.doConnectionFactoryInitialization(JdbcBinaryCacheStore.java:514)
at
org.infinispan.loaders.jdbc.binary.JdbcBinaryCacheStore.start(JdbcBinaryCacheStore.java:102)
at org.infinispan.loaders.CacheLoaderManagerImpl.start(CacheLoaderManagerImpl.java:155)
... 23 more
Caused by: java.sql.SQLException: Incorrect syntax near '('.
at com.sybase.jdbc4.jdbc.SybConnection.getAllExceptions(SybConnection.java:2780)
at com.sybase.jdbc4.jdbc.SybStatement.handleSQLE(SybStatement.java:2665)
at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:295)
at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:272)
at com.sybase.jdbc4.jdbc.SybStatement.updateLoop(SybStatement.java:2515)
at com.sybase.jdbc4.jdbc.SybStatement.executeUpdate(SybStatement.java:2499)
at com.sybase.jdbc4.jdbc.SybStatement.executeUpdate(SybStatement.java:577)
at
org.jboss.jca.adapters.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:375)
at
org.infinispan.loaders.jdbc.TableManipulation.executeUpdateSql(TableManipulation.java:167)
... 28 more
{noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira