Я попытался сохранить сессию http в базе данных mysql, используя контейнер кеша в Jboss7.x. Я получаю ошибку
Я также пытался с oracle DB, та же проблема. У меня проблема ниже.
ОШИБКА [org.infinispan.persistence.jdbc.table.management.OracleTableManager] (Пул потоков ServerService - 70) ISPN008011: Ошибка при создании таблицы; использованный оператор DDL: 'CREATE TABLE "sess_AppzillonAdmin_war" (ID VARCHAR2 (500) NOT NULL, DATUM BINARY NOT NULL, НОМЕР ВЕРСИИ НЕ NULL, ПЕРВИЧНЫЙ КЛЮЧ (ID))': java.sql.SQLSyntaxErrorExpeception: ORA-00902 1005 *
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193)
at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:998)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)
at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1822)
at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1787)
at oracle.jdbc.driver.OracleStatementWrapper.executeUpdate(OracleStatementWrapper.java:280)
at org.jboss.jca.adapters.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:430)
at org.infinispan.persistence.jdbc.table.management.AbstractTableManager.executeUpdateSql(AbstractTableManager.java:124)
at org.infinispan.persistence.jdbc.table.management.AbstractTableManager.createTable(AbstractTableManager.java:117)
at org.infinispan.persistence.jdbc.table.management.AbstractTableManager.start(AbstractTableManager.java:56)
at org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore.initializeConnectionFactory(JdbcStringBasedStore.java:426)
at org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore.start(JdbcStringBasedStore.java:103)
at org.infinispan.persistence.manager.PersistenceManagerImpl.start(PersistenceManagerImpl.java:154)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.infinispan.commons.util.SecurityActions.lambda$invokeAccessibly$0(SecurityActions.java:91)
at org.infinispan.commons.util.SecurityActions.doPrivileged(SecurityActions.java:83)
at org.infinispan.commons.util.SecurityActions.invokeAccessibly(SecurityActions.java:88)
at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:165)
at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:859)
at org.infinispan.factories.AbstractComponentRegistry.invokeStartMethods(AbstractComponentRegistry.java:628)
at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:617)
at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:542)
at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:238)
at org.infinispan.cache.impl.CacheImpl.start(CacheImpl.java:862)
at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:635)
at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:585)
at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:451)
at org.jboss.as.clustering.infinispan.DefaultCacheContainer.getCache(DefaultCacheContainer.java:108)
at org.jboss.as.clustering.infinispan.DefaultCacheContainer.getCache(DefaultCacheContainer.java:103)
at org.wildfly.clustering.infinispan.spi.service.CacheBuilder.lambda$build$0(CacheBuilder.java:83)
at org.wildfly.clustering.service.SuppliedValueService.lambda$new$0(SuppliedValueService.java:42)
at org.wildfly.clustering.service.FunctionalValueService.start(FunctionalValueService.java:68)
at org.wildfly.clustering.service.AsynchronousServiceBuilder.lambda$start$0(AsynchronousServiceBuilder.java:99)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Это изменение в standalone-ha.xml для сохранения данных http-сессии в БД
<cache-container name="web" default-cache="jdbc_store" module="org.wildfly.clustering.web.infinispan">
<transport lock-timeout="60000"/>
<local-cache name="jdbc_store" >
<transaction mode="BATCH"/>
<string-keyed-jdbc-store data-source="ServerDS" dialect="MySQL" shared="true" passivation="false" preload="false" purge="false" fetch-state="false" singleton="false" />
</local-cache>
</cache-container>
[org.infinispan.persistence.jdbc.table.management.MySQLTableManager] (ServerService Thread Pool -- 69) ISPN008011: Error while creating table; used DDL statement: 'CREATE TABLE `ispn_entry_AppzillonAdmin_war` (id VARCHAR NOT NULL, datum BINARY NOT NULL, version BIGINT NOT NULL, PRIMARY KEY (id))': com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOT NULL, datum BINARY NOT NULL, version BIGINT NOT NULL, PRIMARY KEY (id))' at line 1
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1053)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2788)
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1816)
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1730)
at org.jboss.jca.adapters.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:430)
at org.infinispan.persistence.jdbc.table.management.AbstractTableManager.executeUpdateSql(AbstractTableManager.java:124)
at org.infinispan.persistence.jdbc.table.management.AbstractTableManager.createTable(AbstractTableManager.java:117)
at org.infinispan.persistence.jdbc.table.management.AbstractTableManager.start(AbstractTableManager.java:56)
at org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore.initializeConnectionFactory(JdbcStringBasedStore.java:426)
at org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore.start(JdbcStringBasedStore.java:103)
at org.infinispan.persistence.manager.PersistenceManagerImpl.start(PersistenceManagerImpl.java:154)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.infinispan.commons.util.SecurityActions.lambda$invokeAccessibly$0(SecurityActions.java:91)
at org.infinispan.commons.util.SecurityActions.doPrivileged(SecurityActions.java:83)
at org.infinispan.commons.util.SecurityActions.invokeAccessibly(SecurityActions.java:88)
at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:165)
at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:859)
at org.infinispan.factories.AbstractComponentRegistry.invokeStartMethods(AbstractComponentRegistry.java:628)
at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:617)
at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:542)
at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:238)
at org.infinispan.cache.impl.CacheImpl.start(CacheImpl.java:862)
at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:635)
at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:585)
at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:451)
at org.jboss.as.clustering.infinispan.DefaultCacheContainer.getCache(DefaultCacheContainer.java:108)
at org.jboss.as.clustering.infinispan.DefaultCacheContainer.getCache(DefaultCacheContainer.java:103)
at org.wildfly.clustering.infinispan.spi.service.CacheBuilder.lambda$build$0(CacheBuilder.java:83)
at org.wildfly.clustering.service.SuppliedValueService.lambda$new$0(SuppliedValueService.java:42)
at org.wildfly.clustering.service.FunctionalValueService.start(FunctionalValueService.java:68)
at org.wildfly.clustering.service.AsynchronousServiceBuilder.lambda$start$0(AsynchronousServiceBuilder.java:99)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)