[JBoss JIRA] (ISPN-3414) Infinispan ignores DatabaseType configuration
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-3414?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration updated ISPN-3414:
------------------------------------------
Bugzilla Update: Perform
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=997365
> Infinispan ignores DatabaseType configuration
> ----------------------------------------------
>
> Key: ISPN-3414
> URL: https://issues.jboss.org/browse/ISPN-3414
> Project: Infinispan
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 6.0.0.Alpha2
> Reporter: Vitalii Chepeliuk
> Assignee: Mircea Markus
> Priority: Critical
> Attachments: standalone.xml
>
>
> When I configure DefaultCacheManager with following configuration
> {code:title=Configurator.java|borderStyle=solid}
> ConfigurationBuilder bld = new ConfigurationBuilder();
> bld.clustering().cacheMode(CacheMode.LOCAL)
> .loaders().passivation(passivation).preload(preload).shared(false)
> .addLoader(JdbcMixedCacheStoreConfigurationBuilder.class).fetchPersistentState(false).purgeOnStartup(false)
> .databaseType(DatabaseType.MYSQL)
> .stringTable()
> .dropOnExit(false)
> .createOnStart(true)
> .tableNamePrefix("ISPN6Alpha2_STRING")
> .idColumnName("ID").idColumnType("VARCHAR(255)")
> .dataColumnName("DATA").dataColumnType("VARBINARY(1000)")
> .timestampColumnName("TIMESTAMP").timestampColumnType("BIGINT")
> .binaryTable()
> .dropOnExit(false)
> .createOnStart(true)
> .tableNamePrefix("ISPN6Alpha2_BINARY")
> .idColumnName("ID").idColumnType("VARCHAR(255)")
> .dataColumnName("DATA").dataColumnType("VARBINARY(1000)")
> .timestampColumnName("TIMESTAMP").timestampColumnType("BIGINT")
> .dataSource()
> .jndiUrl("java:jboss/datasources/ExampleDS");
> {code}
> And here is TableManipulation class with getDatabaseType() method
> {code:title=TableManipulation.java|borderStyle=solid}
> private DatabaseType getDatabaseType() {
> databaseType = config.databaseType();
> System.out.println(">>>>>>> databaseType "+ databaseType);
> if (databaseType == null) {
> // need to guess from the database type!
> Connection connection = null;
> ...
> {code}
> *Got the following output when test is running*
> !!!!! is printed from my client code
> >>>>> is printed from infinispan(TableManipulation.java)
> -----
> [java] 10:59:07,347 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype MYSQL
> [java] 10:59:07,500 INFO [org.infinispan.factories.GlobalComponentRegistry] (pool-1-thread-1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Alpha2-redhat-1
> [java] 10:59:09,851 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:11,953 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:12,644 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:12,645 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:13,393 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] 10:59:24,780 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:24,954 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:25,260 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:29,679 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:29,680 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:29,843 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:29,844 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:30,002 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] 10:59:38,626 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:38,776 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:41,806 INFO [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (pool-1-thread-1) BeanManager not found.
> [java] 10:59:41,813 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype MYSQL
> [java] 10:59:41,848 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:41,848 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:42,018 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:42,020 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:42,176 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] 10:59:52,364 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:52,515 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:52,667 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:57,155 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> -----
> *And other issue with postgresqlplus92 DB, infinispan cannt recognize it like DatabaseType.POSTGRES*
> -----
> [java] ^[[0m^[[0m10:53:45,198 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype POSTGRES
> [java] ^[[0m^[[0m10:53:45,348 INFO [org.infinispan.factories.GlobalComponentRegistry] (pool-1-thread-1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Alpha2-redhat-1
> [java] ^[[0m^[[0m10:53:46,845 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:53:48,939 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:53:50,429 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:53:51,456 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:53:52,994 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] ^[[0m^[[0m10:53:59,232 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:53:59,414 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:01,807 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:04,020 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:06,084 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:07,275 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:08,303 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:09,509 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] ^[[0m^[[0m10:54:13,520 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:13,693 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:16,104 INFO [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (pool-1-thread-1) BeanManager not found.
> [java] ^[[0m^[[0m10:54:16,111 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype POSTGRES
> [java] ^[[0m^[[0m10:54:16,148 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:18,180 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:19,352 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:20,358 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:21,531 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] ^[[0m^[[0m10:54:26,078 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:26,256 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:27,419 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[31m10:54:57,421 ERROR [org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory] (pool-1-thread-1) ISPN008018: Sql failure retrieving connection from datasource: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/ExampleDS
> [java] at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:147)
> [java] at org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory.getConnection(ManagedConnectionFactory.java:82) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
> [java] at org.infinispan.loaders.jdbc.TableManipulation.getDatabaseType(TableManipulation.java:396) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
> [java] at org.infinispan.loaders.jdbc.TableManipulation.getSelectRowSql(TableManipulation.java:193) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
> [java] at org.infinispan.loaders.jdbc.binary.JdbcBinaryCacheStore.loadBucket(JdbcBinaryCacheStore.java:247) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
> -----
--
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
11 years, 2 months
[JBoss JIRA] (ISPN-3414) Infinispan ignores DatabaseType configuration
by Vitalii Chepeliuk (JIRA)
[ https://issues.jboss.org/browse/ISPN-3414?page=com.atlassian.jira.plugin.... ]
Vitalii Chepeliuk updated ISPN-3414:
------------------------------------
Attachment: standalone.xml
Add configuration for EAP6.1.0 server
> Infinispan ignores DatabaseType configuration
> ----------------------------------------------
>
> Key: ISPN-3414
> URL: https://issues.jboss.org/browse/ISPN-3414
> Project: Infinispan
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 6.0.0.Alpha2
> Reporter: Vitalii Chepeliuk
> Assignee: Mircea Markus
> Priority: Critical
> Attachments: standalone.xml
>
>
> When I configure DefaultCacheManager with following configuration
> {code:title=Configurator.java|borderStyle=solid}
> ConfigurationBuilder bld = new ConfigurationBuilder();
> bld.clustering().cacheMode(CacheMode.LOCAL)
> .loaders().passivation(passivation).preload(preload).shared(false)
> .addLoader(JdbcMixedCacheStoreConfigurationBuilder.class).fetchPersistentState(false).purgeOnStartup(false)
> .databaseType(DatabaseType.MYSQL)
> .stringTable()
> .dropOnExit(false)
> .createOnStart(true)
> .tableNamePrefix("ISPN6Alpha2_STRING")
> .idColumnName("ID").idColumnType("VARCHAR(255)")
> .dataColumnName("DATA").dataColumnType("VARBINARY(1000)")
> .timestampColumnName("TIMESTAMP").timestampColumnType("BIGINT")
> .binaryTable()
> .dropOnExit(false)
> .createOnStart(true)
> .tableNamePrefix("ISPN6Alpha2_BINARY")
> .idColumnName("ID").idColumnType("VARCHAR(255)")
> .dataColumnName("DATA").dataColumnType("VARBINARY(1000)")
> .timestampColumnName("TIMESTAMP").timestampColumnType("BIGINT")
> .dataSource()
> .jndiUrl("java:jboss/datasources/ExampleDS");
> {code}
> And here is TableManipulation class with getDatabaseType() method
> {code:title=TableManipulation.java|borderStyle=solid}
> private DatabaseType getDatabaseType() {
> databaseType = config.databaseType();
> System.out.println(">>>>>>> databaseType "+ databaseType);
> if (databaseType == null) {
> // need to guess from the database type!
> Connection connection = null;
> ...
> {code}
> *Got the following output when test is running*
> !!!!! is printed from my client code
> >>>>> is printed from infinispan(TableManipulation.java)
> -----
> [java] 10:59:07,347 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype MYSQL
> [java] 10:59:07,500 INFO [org.infinispan.factories.GlobalComponentRegistry] (pool-1-thread-1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Alpha2-redhat-1
> [java] 10:59:09,851 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:11,953 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:12,644 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:12,645 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:13,393 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] 10:59:24,780 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:24,954 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:25,260 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:29,679 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:29,680 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:29,843 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:29,844 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:30,002 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] 10:59:38,626 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:38,776 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:41,806 INFO [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (pool-1-thread-1) BeanManager not found.
> [java] 10:59:41,813 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype MYSQL
> [java] 10:59:41,848 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:41,848 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:42,018 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:42,020 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:42,176 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] 10:59:52,364 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:52,515 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:52,667 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:57,155 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> -----
> *And other issue with postgresqlplus92 DB, infinispan cannt recognize it like DatabaseType.POSTGRES*
> -----
> [java] ^[[0m^[[0m10:53:45,198 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype POSTGRES
> [java] ^[[0m^[[0m10:53:45,348 INFO [org.infinispan.factories.GlobalComponentRegistry] (pool-1-thread-1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Alpha2-redhat-1
> [java] ^[[0m^[[0m10:53:46,845 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:53:48,939 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:53:50,429 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:53:51,456 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:53:52,994 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] ^[[0m^[[0m10:53:59,232 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:53:59,414 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:01,807 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:04,020 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:06,084 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:07,275 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:08,303 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:09,509 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] ^[[0m^[[0m10:54:13,520 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:13,693 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:16,104 INFO [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (pool-1-thread-1) BeanManager not found.
> [java] ^[[0m^[[0m10:54:16,111 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype POSTGRES
> [java] ^[[0m^[[0m10:54:16,148 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:18,180 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:19,352 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:20,358 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:21,531 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] ^[[0m^[[0m10:54:26,078 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:26,256 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:27,419 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[31m10:54:57,421 ERROR [org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory] (pool-1-thread-1) ISPN008018: Sql failure retrieving connection from datasource: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/ExampleDS
> [java] at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:147)
> [java] at org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory.getConnection(ManagedConnectionFactory.java:82) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
> [java] at org.infinispan.loaders.jdbc.TableManipulation.getDatabaseType(TableManipulation.java:396) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
> [java] at org.infinispan.loaders.jdbc.TableManipulation.getSelectRowSql(TableManipulation.java:193) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
> [java] at org.infinispan.loaders.jdbc.binary.JdbcBinaryCacheStore.loadBucket(JdbcBinaryCacheStore.java:247) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
> -----
--
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
11 years, 2 months
[JBoss JIRA] (ISPN-3414) Infinispan ignores DatabaseType configuration
by Vitalii Chepeliuk (JIRA)
[ https://issues.jboss.org/browse/ISPN-3414?page=com.atlassian.jira.plugin.... ]
Vitalii Chepeliuk updated ISPN-3414:
------------------------------------
Description:
When I configure DefaultCacheManager with following configuration
{code:title=Configurator.java|borderStyle=solid}
ConfigurationBuilder bld = new ConfigurationBuilder();
bld.clustering().cacheMode(CacheMode.LOCAL)
.loaders().passivation(passivation).preload(preload).shared(false)
.addLoader(JdbcMixedCacheStoreConfigurationBuilder.class).fetchPersistentState(false).purgeOnStartup(false)
.databaseType(DatabaseType.MYSQL)
.stringTable()
.dropOnExit(false)
.createOnStart(true)
.tableNamePrefix("ISPN6Alpha2_STRING")
.idColumnName("ID").idColumnType("VARCHAR(255)")
.dataColumnName("DATA").dataColumnType("VARBINARY(1000)")
.timestampColumnName("TIMESTAMP").timestampColumnType("BIGINT")
.binaryTable()
.dropOnExit(false)
.createOnStart(true)
.tableNamePrefix("ISPN6Alpha2_BINARY")
.idColumnName("ID").idColumnType("VARCHAR(255)")
.dataColumnName("DATA").dataColumnType("VARBINARY(1000)")
.timestampColumnName("TIMESTAMP").timestampColumnType("BIGINT")
.dataSource()
.jndiUrl("java:jboss/datasources/ExampleDS");
{code}
And here is TableManipulation class with getDatabaseType() method
{code:title=TableManipulation.java|borderStyle=solid}
private DatabaseType getDatabaseType() {
databaseType = config.databaseType();
System.out.println(">>>>>>> databaseType "+ databaseType);
if (databaseType == null) {
// need to guess from the database type!
Connection connection = null;
...
{code}
*Got the following output when test is running*
!!!!! is printed from my client code
>>>>> is printed from infinispan(TableManipulation.java)
-----
[java] 10:59:07,347 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype MYSQL
[java] 10:59:07,500 INFO [org.infinispan.factories.GlobalComponentRegistry] (pool-1-thread-1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Alpha2-redhat-1
[java] 10:59:09,851 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:11,953 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:12,644 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:12,645 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:13,393 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] 10:59:24,780 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:24,954 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:25,260 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,679 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,680 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,843 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,844 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:30,002 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] 10:59:38,626 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:38,776 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:41,806 INFO [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (pool-1-thread-1) BeanManager not found.
[java] 10:59:41,813 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype MYSQL
[java] 10:59:41,848 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:41,848 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:42,018 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:42,020 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:42,176 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] 10:59:52,364 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:52,515 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:52,667 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:57,155 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
-----
*And other issue with postgresqlplus92 DB, infinispan cannt recognize it like DatabaseType.POSTGRES*
-----
[java] ^[[0m^[[0m10:53:45,198 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype POSTGRES
[java] ^[[0m^[[0m10:53:45,348 INFO [org.infinispan.factories.GlobalComponentRegistry] (pool-1-thread-1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Alpha2-redhat-1
[java] ^[[0m^[[0m10:53:46,845 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:48,939 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:50,429 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:51,456 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:52,994 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] ^[[0m^[[0m10:53:59,232 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:59,414 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:01,807 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:04,020 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:06,084 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:07,275 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:08,303 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:09,509 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] ^[[0m^[[0m10:54:13,520 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:13,693 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:16,104 INFO [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (pool-1-thread-1) BeanManager not found.
[java] ^[[0m^[[0m10:54:16,111 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype POSTGRES
[java] ^[[0m^[[0m10:54:16,148 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:18,180 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:19,352 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:20,358 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:21,531 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] ^[[0m^[[0m10:54:26,078 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:26,256 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:27,419 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[31m10:54:57,421 ERROR [org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory] (pool-1-thread-1) ISPN008018: Sql failure retrieving connection from datasource: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/ExampleDS
[java] at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:147)
[java] at org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory.getConnection(ManagedConnectionFactory.java:82) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
[java] at org.infinispan.loaders.jdbc.TableManipulation.getDatabaseType(TableManipulation.java:396) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
[java] at org.infinispan.loaders.jdbc.TableManipulation.getSelectRowSql(TableManipulation.java:193) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
[java] at org.infinispan.loaders.jdbc.binary.JdbcBinaryCacheStore.loadBucket(JdbcBinaryCacheStore.java:247) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
-----
was:
When I configure DefaultCacheManager with following configuration
{code:title=Configurator.java|borderStyle=solid}
ConfigurationBuilder bld = new ConfigurationBuilder();
bld.clustering().cacheMode(CacheMode.LOCAL)
.loaders().passivation(passivation).preload(preload).shared(false)
.addLoader(JdbcMixedCacheStoreConfigurationBuilder.class).fetchPersistentState(false).purgeOnStartup(false)
.databaseType(DatabaseType.MYSQL)
.stringTable()
.dropOnExit(false)
.createOnStart(true)
.tableNamePrefix(STRING_TABLE_NAME_PREFIX)
.idColumnName(ID_COLUMN_NAME).idColumnType(props.getProperty("id.column.type"))
.dataColumnName(DATA_COLUMN_NAME).dataColumnType(props.getProperty("data.column.type"))
.timestampColumnName(TIMESTAMP_COLUMN_NAME).timestampColumnType(props.getProperty("timestamp.column.type"))
.binaryTable()
.dropOnExit(false)
.createOnStart(true)
.tableNamePrefix(BUCKET_TABLE_NAME_PREFIX)
.idColumnName(ID_COLUMN_NAME).idColumnType(props.getProperty("id.column.type"))
.dataColumnName(DATA_COLUMN_NAME).dataColumnType(props.getProperty("data.column.type"))
.timestampColumnName(TIMESTAMP_COLUMN_NAME).timestampColumnType(props.getProperty("timestamp.column.type"))
.dataSource()
.jndiUrl(props.getProperty("datasource.jndi.location"));
{code}
And here is TableManipulation class with getDatabaseType() method
{code:title=TableManipulation.java|borderStyle=solid}
private DatabaseType getDatabaseType() {
databaseType = config.databaseType();
System.out.println(">>>>>>> databaseType "+ databaseType);
if (databaseType == null) {
// need to guess from the database type!
Connection connection = null;
...
{code}
*Got the following output when test is running*
!!!!! is printed from my client code
>>>>> is printed from infinispan(TableManipulation.java)
-----
[java] 10:59:07,347 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype MYSQL
[java] 10:59:07,500 INFO [org.infinispan.factories.GlobalComponentRegistry] (pool-1-thread-1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Alpha2-redhat-1
[java] 10:59:09,851 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:11,953 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:12,644 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:12,645 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:13,393 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] 10:59:24,780 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:24,954 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:25,260 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,679 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,680 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,843 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,844 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:30,002 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] 10:59:38,626 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:38,776 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:41,806 INFO [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (pool-1-thread-1) BeanManager not found.
[java] 10:59:41,813 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype MYSQL
[java] 10:59:41,848 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:41,848 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:42,018 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:42,020 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:42,176 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] 10:59:52,364 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:52,515 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:52,667 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:57,155 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
-----
*And other issue with postgresqlplus92 DB, infinispan cannt recognize it like DatabaseType.POSTGRES*
-----
[java] ^[[0m^[[0m10:53:45,198 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype POSTGRES
[java] ^[[0m^[[0m10:53:45,348 INFO [org.infinispan.factories.GlobalComponentRegistry] (pool-1-thread-1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Alpha2-redhat-1
[java] ^[[0m^[[0m10:53:46,845 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:48,939 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:50,429 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:51,456 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:52,994 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] ^[[0m^[[0m10:53:59,232 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:59,414 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:01,807 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:04,020 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:06,084 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:07,275 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:08,303 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:09,509 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] ^[[0m^[[0m10:54:13,520 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:13,693 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:16,104 INFO [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (pool-1-thread-1) BeanManager not found.
[java] ^[[0m^[[0m10:54:16,111 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype POSTGRES
[java] ^[[0m^[[0m10:54:16,148 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:18,180 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:19,352 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:20,358 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:21,531 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] ^[[0m^[[0m10:54:26,078 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:26,256 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:27,419 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[31m10:54:57,421 ERROR [org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory] (pool-1-thread-1) ISPN008018: Sql failure retrieving connection from datasource: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/ExampleDS
[java] at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:147)
[java] at org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory.getConnection(ManagedConnectionFactory.java:82) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
[java] at org.infinispan.loaders.jdbc.TableManipulation.getDatabaseType(TableManipulation.java:396) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
[java] at org.infinispan.loaders.jdbc.TableManipulation.getSelectRowSql(TableManipulation.java:193) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
[java] at org.infinispan.loaders.jdbc.binary.JdbcBinaryCacheStore.loadBucket(JdbcBinaryCacheStore.java:247) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
-----
> Infinispan ignores DatabaseType configuration
> ----------------------------------------------
>
> Key: ISPN-3414
> URL: https://issues.jboss.org/browse/ISPN-3414
> Project: Infinispan
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 6.0.0.Alpha2
> Reporter: Vitalii Chepeliuk
> Assignee: Mircea Markus
> Priority: Critical
>
> When I configure DefaultCacheManager with following configuration
> {code:title=Configurator.java|borderStyle=solid}
> ConfigurationBuilder bld = new ConfigurationBuilder();
> bld.clustering().cacheMode(CacheMode.LOCAL)
> .loaders().passivation(passivation).preload(preload).shared(false)
> .addLoader(JdbcMixedCacheStoreConfigurationBuilder.class).fetchPersistentState(false).purgeOnStartup(false)
> .databaseType(DatabaseType.MYSQL)
> .stringTable()
> .dropOnExit(false)
> .createOnStart(true)
> .tableNamePrefix("ISPN6Alpha2_STRING")
> .idColumnName("ID").idColumnType("VARCHAR(255)")
> .dataColumnName("DATA").dataColumnType("VARBINARY(1000)")
> .timestampColumnName("TIMESTAMP").timestampColumnType("BIGINT")
> .binaryTable()
> .dropOnExit(false)
> .createOnStart(true)
> .tableNamePrefix("ISPN6Alpha2_BINARY")
> .idColumnName("ID").idColumnType("VARCHAR(255)")
> .dataColumnName("DATA").dataColumnType("VARBINARY(1000)")
> .timestampColumnName("TIMESTAMP").timestampColumnType("BIGINT")
> .dataSource()
> .jndiUrl("java:jboss/datasources/ExampleDS");
> {code}
> And here is TableManipulation class with getDatabaseType() method
> {code:title=TableManipulation.java|borderStyle=solid}
> private DatabaseType getDatabaseType() {
> databaseType = config.databaseType();
> System.out.println(">>>>>>> databaseType "+ databaseType);
> if (databaseType == null) {
> // need to guess from the database type!
> Connection connection = null;
> ...
> {code}
> *Got the following output when test is running*
> !!!!! is printed from my client code
> >>>>> is printed from infinispan(TableManipulation.java)
> -----
> [java] 10:59:07,347 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype MYSQL
> [java] 10:59:07,500 INFO [org.infinispan.factories.GlobalComponentRegistry] (pool-1-thread-1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Alpha2-redhat-1
> [java] 10:59:09,851 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:11,953 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:12,644 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:12,645 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:13,393 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] 10:59:24,780 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:24,954 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:25,260 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:29,679 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:29,680 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:29,843 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:29,844 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:30,002 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] 10:59:38,626 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:38,776 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:41,806 INFO [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (pool-1-thread-1) BeanManager not found.
> [java] 10:59:41,813 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype MYSQL
> [java] 10:59:41,848 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:41,848 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:42,018 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:42,020 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:42,176 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] 10:59:52,364 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:52,515 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:52,667 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:57,155 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> -----
> *And other issue with postgresqlplus92 DB, infinispan cannt recognize it like DatabaseType.POSTGRES*
> -----
> [java] ^[[0m^[[0m10:53:45,198 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype POSTGRES
> [java] ^[[0m^[[0m10:53:45,348 INFO [org.infinispan.factories.GlobalComponentRegistry] (pool-1-thread-1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Alpha2-redhat-1
> [java] ^[[0m^[[0m10:53:46,845 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:53:48,939 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:53:50,429 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:53:51,456 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:53:52,994 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] ^[[0m^[[0m10:53:59,232 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:53:59,414 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:01,807 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:04,020 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:06,084 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:07,275 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:08,303 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:09,509 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] ^[[0m^[[0m10:54:13,520 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:13,693 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:16,104 INFO [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (pool-1-thread-1) BeanManager not found.
> [java] ^[[0m^[[0m10:54:16,111 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype POSTGRES
> [java] ^[[0m^[[0m10:54:16,148 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:18,180 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:19,352 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:20,358 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:21,531 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] ^[[0m^[[0m10:54:26,078 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:26,256 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:27,419 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[31m10:54:57,421 ERROR [org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory] (pool-1-thread-1) ISPN008018: Sql failure retrieving connection from datasource: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/ExampleDS
> [java] at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:147)
> [java] at org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory.getConnection(ManagedConnectionFactory.java:82) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
> [java] at org.infinispan.loaders.jdbc.TableManipulation.getDatabaseType(TableManipulation.java:396) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
> [java] at org.infinispan.loaders.jdbc.TableManipulation.getSelectRowSql(TableManipulation.java:193) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
> [java] at org.infinispan.loaders.jdbc.binary.JdbcBinaryCacheStore.loadBucket(JdbcBinaryCacheStore.java:247) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
> -----
--
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
11 years, 2 months
[JBoss JIRA] (ISPN-3405) Entries are passivated with wrong ID in DB
by Vitalii Chepeliuk (JIRA)
[ https://issues.jboss.org/browse/ISPN-3405?page=com.atlassian.jira.plugin.... ]
Vitalii Chepeliuk updated ISPN-3405:
------------------------------------
Description:
Entry passivation into DB, concretly this class LockSupportCacheStore and method store. Look at lines with "<<<" string for more info
{code:title=LockSupportCacheStore.java|borderStyle=solid}
@Override
public final void store(InternalCacheEntry ed) throws CacheLoaderException {
if (trace) {
log.tracef("store(%s)", ed);
}
if (ed == null) {
return;
}
if (ed.canExpire() && ed.isExpired(timeService.wallClockTime())) {
if (containsKey(ed.getKey())) {
if (trace) {
log.tracef("Entry %s is expired! Removing!", ed);
}
remove(ed.getKey());
} else {
if (trace) {
log.tracef("Entry %s is expired! Not doing anything.", ed);
}
}
return;
}
L keyHashCode = getLockFromKey(ed.getKey()); <<< here key is generated like ed.getKey().hashCode() & 0xfffffc00;
lockForWriting(keyHashCode);
try {
storeLockSafe(ed, keyHashCode); <<< here it should be stored into Bucket and then stored in DB
} finally {
unlock(keyHashCode);
}
if (trace) {
log.tracef("exit store(%s)", ed);
}
}
{code}
When I use RemoteCacheManager and RemoteCache I am putting entries into cache
{code:title=Test.java|borderStyle=solid}
cache.put("key1", "v1");
cache.put("key2", "v2");
cache.put("key3", "v3");
{code}
Then 2 entries are passivated and stored in DB
||ID||DATA||TIMESTAMP||
|183713792|0301fe032a01034c422b21033e286d7942657374506572736f6e616c4b657957686963684861734e657665724265656e426574746572420521033e02763203620003630000000000000002|-1|
|23486464|0301fe032a01034c420721033e046b657931420521033e02763103620003630000000000000001|-1|
IDs are generated from method above and
{code:title=Test.java|borderStyle=solid}
byte[] keyBytes = marshaller.objectToByteBuffer("key1"); <<< key is marshalled
long keyID = ByteArrayEquivalence.INSTANCE.hashCode(keyBytes) & 0xfffffc00 //computation taken from BucketBasedCacheStore <<< this does not work for me
{code}
And next step I'd like to retrieve data from DB
SELECT ID, DATA FROM JDBC_BINARY_DEFAULT WHERE ID=keyID
But in method
{code:title=BucketBasedCacheStore.java|borderStyle=solid}
@Override
public Integer getLockFromKey(Object key) {
return key.hashCode() & 0xfffffc00; <<< here should be used Arrays.hashCode((byte[])key) & 0xfffffc00), if key is represented as byte array, or used ByteArrayEquivalence instead of simple byte array(byte[]) as argument
}
{code}
was:
Entry passivation into DB, concretly this class LockSupportCacheStore and method store. Look at lines with "<<<" string for more info
{code:title=LockSupportCacheStore.java|borderStyle=solid}
@Override
public final void store(InternalCacheEntry ed) throws CacheLoaderException {
if (trace) {
log.tracef("store(%s)", ed);
}
if (ed == null) {
return;
}
if (ed.canExpire() && ed.isExpired(timeService.wallClockTime())) {
if (containsKey(ed.getKey())) {
if (trace) {
log.tracef("Entry %s is expired! Removing!", ed);
}
remove(ed.getKey());
} else {
if (trace) {
log.tracef("Entry %s is expired! Not doing anything.", ed);
}
}
return;
}
L keyHashCode = getLockFromKey(ed.getKey()); <<< here key is generated like ed.getKey().hashCode() & 0xfffffc00;
lockForWriting(keyHashCode);
try {
storeLockSafe(ed, keyHashCode); <<< here it should be stored into Bucket and then stored in DB
} finally {
unlock(keyHashCode);
}
if (trace) {
log.tracef("exit store(%s)", ed);
}
}
{code}
When I use RemoteCacheManager and RemoteCache I am putting entries into cache
{code:title=Test.java|borderStyle=solid}
cache.put("key1", "v1");
cache.put("key2", "v2");
cache.put("key3", "v3");
{code}
Then 2 entries are passivated and stored in DB
||ID||DATA||TIMESTAMP||
|183713792|0301fe032a01034c422b21033e286d7942657374506572736f6e616c4b657957686963684861734e657665724265656e426574746572420521033e02763203620003630000000000000002|-1|
|23486464|0301fe032a01034c420721033e046b657931420521033e02763103620003630000000000000001|-1|
IDs are generated from method above and
{code:title=Bar.java|borderStyle=solid}
byte[] keyBytes = marshaller.objectToByteBuffer("key1"); <<< key is marshalled
long keyID = ByteArrayEquivalence.INSTANCE.hashCode(keyBytes) & 0xfffffc00 //computation taken from BucketBasedCacheStore <<< this does not work for me
{code}
And next step I'd like to retrieve data from DB
SELECT ID, DATA FROM JDBC_BINARY_DEFAULT WHERE ID=keyID
But in method
{code:title=BucketBasedCacheStore.java|borderStyle=solid}
@Override
public Integer getLockFromKey(Object key) {
return key.hashCode() & 0xfffffc00; <<< here should be used Arrays.hashCode((byte[])key) & 0xfffffc00), if key is represented as byte array, or used ByteArrayEquivalence instead of simple byte array(byte[]) as argument
}
{code}
> Entries are passivated with wrong ID in DB
> ------------------------------------------
>
> Key: ISPN-3405
> URL: https://issues.jboss.org/browse/ISPN-3405
> Project: Infinispan
> Issue Type: Bug
> Components: Eviction
> Affects Versions: 5.3.0.Final, 6.0.0.Alpha1
> Reporter: Vitalii Chepeliuk
> Assignee: Galder Zamarreño
> Fix For: 6.0.0.Alpha3, 6.0.0.Final
>
>
> Entry passivation into DB, concretly this class LockSupportCacheStore and method store. Look at lines with "<<<" string for more info
> {code:title=LockSupportCacheStore.java|borderStyle=solid}
> @Override
> public final void store(InternalCacheEntry ed) throws CacheLoaderException {
> if (trace) {
> log.tracef("store(%s)", ed);
> }
> if (ed == null) {
> return;
> }
> if (ed.canExpire() && ed.isExpired(timeService.wallClockTime())) {
> if (containsKey(ed.getKey())) {
> if (trace) {
> log.tracef("Entry %s is expired! Removing!", ed);
> }
> remove(ed.getKey());
> } else {
> if (trace) {
> log.tracef("Entry %s is expired! Not doing anything.", ed);
> }
> }
> return;
> }
> L keyHashCode = getLockFromKey(ed.getKey()); <<< here key is generated like ed.getKey().hashCode() & 0xfffffc00;
> lockForWriting(keyHashCode);
> try {
> storeLockSafe(ed, keyHashCode); <<< here it should be stored into Bucket and then stored in DB
> } finally {
> unlock(keyHashCode);
> }
> if (trace) {
> log.tracef("exit store(%s)", ed);
> }
> }
> {code}
> When I use RemoteCacheManager and RemoteCache I am putting entries into cache
> {code:title=Test.java|borderStyle=solid}
> cache.put("key1", "v1");
> cache.put("key2", "v2");
> cache.put("key3", "v3");
> {code}
> Then 2 entries are passivated and stored in DB
> ||ID||DATA||TIMESTAMP||
> |183713792|0301fe032a01034c422b21033e286d7942657374506572736f6e616c4b657957686963684861734e657665724265656e426574746572420521033e02763203620003630000000000000002|-1|
> |23486464|0301fe032a01034c420721033e046b657931420521033e02763103620003630000000000000001|-1|
> IDs are generated from method above and
> {code:title=Test.java|borderStyle=solid}
> byte[] keyBytes = marshaller.objectToByteBuffer("key1"); <<< key is marshalled
> long keyID = ByteArrayEquivalence.INSTANCE.hashCode(keyBytes) & 0xfffffc00 //computation taken from BucketBasedCacheStore <<< this does not work for me
> {code}
> And next step I'd like to retrieve data from DB
> SELECT ID, DATA FROM JDBC_BINARY_DEFAULT WHERE ID=keyID
> But in method
> {code:title=BucketBasedCacheStore.java|borderStyle=solid}
> @Override
> public Integer getLockFromKey(Object key) {
> return key.hashCode() & 0xfffffc00; <<< here should be used Arrays.hashCode((byte[])key) & 0xfffffc00), if key is represented as byte array, or used ByteArrayEquivalence instead of simple byte array(byte[]) as argument
> }
> {code}
--
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
11 years, 2 months
[JBoss JIRA] (ISPN-3407) Entry passivation doesn't work according to eviction strategy
by Vitalii Chepeliuk (JIRA)
[ https://issues.jboss.org/browse/ISPN-3407?page=com.atlassian.jira.plugin.... ]
Vitalii Chepeliuk updated ISPN-3407:
------------------------------------
Description:
{code:title=Test.java|borderStyle=solid}
GlobalConfiguration globalConf = new GlobalConfigurationBuilder().nonClusteredDefault().build();
ConfigurationBuilder builder = new ConfigurationBuilder();
builder.clustering().cacheMode(CacheMode.LOCAL)
.loaders().passivation(true).preload(false).shared(false)
.addLoader(JdbcStringBasedCacheStoreConfigurationBuilder.class).fetchPersistentState(false).purgeOnStartup(false)
.table()
.databaseType(DatabaseType.MYSQL)
.dropOnExit(false)
.createOnStart(true)
.tableNamePrefix("ISPN6Alpha2_STRING")
.idColumnName("ID").idColumnType("VARCHAR(255)")
.dataColumnName("DATA").dataColumnType("VARBINARY(1000)")
.timestampColumnName("TIMESTAMP").timestampColumnType("BIGINT")
.connectionPool()
.connectionUrl()
.username("username")
.password("password")
.driverClass("com.mysql.jdbc.Driver")
.eviction().strategy(EvictionStrategy.LRU).maxEntries(2);
Configuration localConf = builder.build();
DefaultCacheManager defCacheManager = new DefaultCacheManager(globalConf, localConf, true);
Cache<String, String> cache = defCacheManager.getCache();
cache.put("k1", "v1");
cache.put("k2", "v2");
//not yet in store (eviction.max-entries=2, LRU)
cache.put("k3", "v3");
assertEquals("v3", cache.get("k3"));
//now k1 evicted and stored in store
assertEquals(2, cache.size()); <<< only 2 entries should remain in cache, k1 should be passivated and removed. But doesn't work!
{code}
was:
{code:title=Bar.java|borderStyle=solid}
GlobalConfiguration globalConf = new GlobalConfigurationBuilder().nonClusteredDefault().build();
ConfigurationBuilder builder = new ConfigurationBuilder();
builder.clustering().cacheMode(CacheMode.LOCAL)
.loaders().passivation(true).preload(false).shared(false)
.addLoader(JdbcStringBasedCacheStoreConfigurationBuilder.class).fetchPersistentState(false).purgeOnStartup(false)
.table()
.databaseType(DatabaseType.MYSQL)
.dropOnExit(false)
.createOnStart(true)
.tableNamePrefix("ISPN6Alpha2_STRING")
.idColumnName("ID").idColumnType("VARCHAR(255)")
.dataColumnName("DATA").dataColumnType("VARBINARY(1000)")
.timestampColumnName("TIMESTAMP").timestampColumnType("BIGINT")
.connectionPool()
.connectionUrl()
.username("username")
.password("password")
.driverClass("com.mysql.jdbc.Driver")
.eviction().strategy(EvictionStrategy.LRU).maxEntries(2);
Configuration localConf = builder.build();
DefaultCacheManager defCacheManager = new DefaultCacheManager(globalConf, localConf, true);
Cache<String, String> cache = defCacheManager.getCache();
cache.put("k1", "v1");
cache.put("k2", "v2");
//not yet in store (eviction.max-entries=2, LRU)
cache.put("k3", "v3");
assertEquals("v3", cache.get("k3"));
//now k1 evicted and stored in store
assertEquals(2, cache.size()); <<< only 2 entries should remain in cache, k1 should be passivated and removed. But doesn't work!
{code}
> Entry passivation doesn't work according to eviction strategy
> -------------------------------------------------------------
>
> Key: ISPN-3407
> URL: https://issues.jboss.org/browse/ISPN-3407
> Project: Infinispan
> Issue Type: Bug
> Components: Eviction
> Affects Versions: 6.0.0.Alpha2
> Reporter: Vitalii Chepeliuk
> Assignee: Mircea Markus
>
> {code:title=Test.java|borderStyle=solid}
> GlobalConfiguration globalConf = new GlobalConfigurationBuilder().nonClusteredDefault().build();
> ConfigurationBuilder builder = new ConfigurationBuilder();
> builder.clustering().cacheMode(CacheMode.LOCAL)
> .loaders().passivation(true).preload(false).shared(false)
> .addLoader(JdbcStringBasedCacheStoreConfigurationBuilder.class).fetchPersistentState(false).purgeOnStartup(false)
> .table()
> .databaseType(DatabaseType.MYSQL)
> .dropOnExit(false)
> .createOnStart(true)
> .tableNamePrefix("ISPN6Alpha2_STRING")
> .idColumnName("ID").idColumnType("VARCHAR(255)")
> .dataColumnName("DATA").dataColumnType("VARBINARY(1000)")
> .timestampColumnName("TIMESTAMP").timestampColumnType("BIGINT")
> .connectionPool()
> .connectionUrl()
> .username("username")
> .password("password")
> .driverClass("com.mysql.jdbc.Driver")
> .eviction().strategy(EvictionStrategy.LRU).maxEntries(2);
> Configuration localConf = builder.build();
> DefaultCacheManager defCacheManager = new DefaultCacheManager(globalConf, localConf, true);
> Cache<String, String> cache = defCacheManager.getCache();
> cache.put("k1", "v1");
> cache.put("k2", "v2");
> //not yet in store (eviction.max-entries=2, LRU)
> cache.put("k3", "v3");
> assertEquals("v3", cache.get("k3"));
> //now k1 evicted and stored in store
> assertEquals(2, cache.size()); <<< only 2 entries should remain in cache, k1 should be passivated and removed. But doesn't work!
> {code}
--
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
11 years, 2 months
[JBoss JIRA] (ISPN-3405) Entries are passivated with wrong ID in DB
by Vitalii Chepeliuk (JIRA)
[ https://issues.jboss.org/browse/ISPN-3405?page=com.atlassian.jira.plugin.... ]
Vitalii Chepeliuk updated ISPN-3405:
------------------------------------
Description:
Entry passivation into DB, concretly this class LockSupportCacheStore and method store. Look at lines with "<<<" string for more info
{code:title=LockSupportCacheStore.java|borderStyle=solid}
@Override
public final void store(InternalCacheEntry ed) throws CacheLoaderException {
if (trace) {
log.tracef("store(%s)", ed);
}
if (ed == null) {
return;
}
if (ed.canExpire() && ed.isExpired(timeService.wallClockTime())) {
if (containsKey(ed.getKey())) {
if (trace) {
log.tracef("Entry %s is expired! Removing!", ed);
}
remove(ed.getKey());
} else {
if (trace) {
log.tracef("Entry %s is expired! Not doing anything.", ed);
}
}
return;
}
L keyHashCode = getLockFromKey(ed.getKey()); <<< here key is generated like ed.getKey().hashCode() & 0xfffffc00;
lockForWriting(keyHashCode);
try {
storeLockSafe(ed, keyHashCode); <<< here it should be stored into Bucket and then stored in DB
} finally {
unlock(keyHashCode);
}
if (trace) {
log.tracef("exit store(%s)", ed);
}
}
{code}
When I use RemoteCacheManager and RemoteCache I am putting entries into cache
{code:title=Test.java|borderStyle=solid}
cache.put("key1", "v1");
cache.put("key2", "v2");
cache.put("key3", "v3");
{code}
Then 2 entries are passivated and stored in DB
||ID||DATA||TIMESTAMP||
|183713792|0301fe032a01034c422b21033e286d7942657374506572736f6e616c4b657957686963684861734e657665724265656e426574746572420521033e02763203620003630000000000000002|-1|
|23486464|0301fe032a01034c420721033e046b657931420521033e02763103620003630000000000000001|-1|
IDs are generated from method above and
{code:title=Bar.java|borderStyle=solid}
byte[] keyBytes = marshaller.objectToByteBuffer("key1"); <<< key is marshalled
long keyID = ByteArrayEquivalence.INSTANCE.hashCode(keyBytes) & 0xfffffc00 //computation taken from BucketBasedCacheStore <<< this does not work for me
{code}
And next step I'd like to retrieve data from DB
SELECT ID, DATA FROM JDBC_BINARY_DEFAULT WHERE ID=keyID
But in method
{code:title=BucketBasedCacheStore.java|borderStyle=solid}
@Override
public Integer getLockFromKey(Object key) {
return key.hashCode() & 0xfffffc00; <<< here should be used Arrays.hashCode((byte[])key) & 0xfffffc00), if key is represented as byte array, or used ByteArrayEquivalence instead of simple byte array(byte[]) as argument
}
{code}
was:
Entry passivation into DB, concretly this class LockSupportCacheStore and method store. Look at lines with "<<<" string for more info
{code:title=LockSupportCacheStore.java|borderStyle=solid}
@Override
public final void store(InternalCacheEntry ed) throws CacheLoaderException {
if (trace) {
log.tracef("store(%s)", ed);
}
if (ed == null) {
return;
}
if (ed.canExpire() && ed.isExpired(timeService.wallClockTime())) {
if (containsKey(ed.getKey())) {
if (trace) {
log.tracef("Entry %s is expired! Removing!", ed);
}
remove(ed.getKey());
} else {
if (trace) {
log.tracef("Entry %s is expired! Not doing anything.", ed);
}
}
return;
}
L keyHashCode = getLockFromKey(ed.getKey()); <<< here key is generated like ed.getKey().hashCode() & 0xfffffc00;
lockForWriting(keyHashCode);
try {
storeLockSafe(ed, keyHashCode); <<< here it should be stored into Bucket and then stored in DB
} finally {
unlock(keyHashCode);
}
if (trace) {
log.tracef("exit store(%s)", ed);
}
}
{code}
When I use RemoteCacheManager and RemoteCache I am putting entries into cache
{code:title=Test.java|borderStyle=solid}
cache.put("key1", "v1");
cache.put("key2", "v2");
cache.put("key3", "v3");
{code}
Then 2 entries are passivated and stored in DB
||ID||DATA||TIMESTAMP||
|183713792|0301fe032a01034c422b21033e286d7942657374506572736f6e616c4b657957686963684861734e657665724265656e426574746572420521033e02763203620003630000000000000002|-1|
|23486464|0301fe032a01034c420721033e046b657931420521033e02763103620003630000000000000001|-1|
IDs are generated from method above and
{code:title=Bar.java|borderStyle=solid}
byte[] keyBytes = marshaller.objectToByteBuffer("key1"); <<< key is marshalled
long keyID = ByteArrayEquivalence.INSTANCE.hashCode(keyBytes) & 0xfffffc00 //computation taken from BucketBasedCacheStore <<< this does not work for me
ode}
And next step I'd like to retrieve data from DB
SELECT ID, DATA FROM JDBC_BINARY_DEFAULT WHERE ID=keyID
But in method
{code:title=BucketBasedCacheStore.java|borderStyle=solid}
@Override
public Integer getLockFromKey(Object key) {
return key.hashCode() & 0xfffffc00; <<< here should be used Arrays.hashCode((byte[])key) & 0xfffffc00), if key is represented as byte array, or used ByteArrayEquivalence instead of simple byte array(byte[]) as argument
}
{code}
> Entries are passivated with wrong ID in DB
> ------------------------------------------
>
> Key: ISPN-3405
> URL: https://issues.jboss.org/browse/ISPN-3405
> Project: Infinispan
> Issue Type: Bug
> Components: Eviction
> Affects Versions: 5.3.0.Final, 6.0.0.Alpha1
> Reporter: Vitalii Chepeliuk
> Assignee: Galder Zamarreño
> Fix For: 6.0.0.Alpha3, 6.0.0.Final
>
>
> Entry passivation into DB, concretly this class LockSupportCacheStore and method store. Look at lines with "<<<" string for more info
> {code:title=LockSupportCacheStore.java|borderStyle=solid}
> @Override
> public final void store(InternalCacheEntry ed) throws CacheLoaderException {
> if (trace) {
> log.tracef("store(%s)", ed);
> }
> if (ed == null) {
> return;
> }
> if (ed.canExpire() && ed.isExpired(timeService.wallClockTime())) {
> if (containsKey(ed.getKey())) {
> if (trace) {
> log.tracef("Entry %s is expired! Removing!", ed);
> }
> remove(ed.getKey());
> } else {
> if (trace) {
> log.tracef("Entry %s is expired! Not doing anything.", ed);
> }
> }
> return;
> }
> L keyHashCode = getLockFromKey(ed.getKey()); <<< here key is generated like ed.getKey().hashCode() & 0xfffffc00;
> lockForWriting(keyHashCode);
> try {
> storeLockSafe(ed, keyHashCode); <<< here it should be stored into Bucket and then stored in DB
> } finally {
> unlock(keyHashCode);
> }
> if (trace) {
> log.tracef("exit store(%s)", ed);
> }
> }
> {code}
> When I use RemoteCacheManager and RemoteCache I am putting entries into cache
> {code:title=Test.java|borderStyle=solid}
> cache.put("key1", "v1");
> cache.put("key2", "v2");
> cache.put("key3", "v3");
> {code}
> Then 2 entries are passivated and stored in DB
> ||ID||DATA||TIMESTAMP||
> |183713792|0301fe032a01034c422b21033e286d7942657374506572736f6e616c4b657957686963684861734e657665724265656e426574746572420521033e02763203620003630000000000000002|-1|
> |23486464|0301fe032a01034c420721033e046b657931420521033e02763103620003630000000000000001|-1|
> IDs are generated from method above and
> {code:title=Bar.java|borderStyle=solid}
> byte[] keyBytes = marshaller.objectToByteBuffer("key1"); <<< key is marshalled
> long keyID = ByteArrayEquivalence.INSTANCE.hashCode(keyBytes) & 0xfffffc00 //computation taken from BucketBasedCacheStore <<< this does not work for me
> {code}
> And next step I'd like to retrieve data from DB
> SELECT ID, DATA FROM JDBC_BINARY_DEFAULT WHERE ID=keyID
> But in method
> {code:title=BucketBasedCacheStore.java|borderStyle=solid}
> @Override
> public Integer getLockFromKey(Object key) {
> return key.hashCode() & 0xfffffc00; <<< here should be used Arrays.hashCode((byte[])key) & 0xfffffc00), if key is represented as byte array, or used ByteArrayEquivalence instead of simple byte array(byte[]) as argument
> }
> {code}
--
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
11 years, 2 months
[JBoss JIRA] (ISPN-3405) Entries are passivated with wrong ID in DB
by Vitalii Chepeliuk (JIRA)
[ https://issues.jboss.org/browse/ISPN-3405?page=com.atlassian.jira.plugin.... ]
Vitalii Chepeliuk updated ISPN-3405:
------------------------------------
Description:
Entry passivation into DB, concretly this class LockSupportCacheStore and method store. Look at lines with "<<<" string for more info
{code:title=LockSupportCacheStore.java|borderStyle=solid}
@Override
public final void store(InternalCacheEntry ed) throws CacheLoaderException {
if (trace) {
log.tracef("store(%s)", ed);
}
if (ed == null) {
return;
}
if (ed.canExpire() && ed.isExpired(timeService.wallClockTime())) {
if (containsKey(ed.getKey())) {
if (trace) {
log.tracef("Entry %s is expired! Removing!", ed);
}
remove(ed.getKey());
} else {
if (trace) {
log.tracef("Entry %s is expired! Not doing anything.", ed);
}
}
return;
}
L keyHashCode = getLockFromKey(ed.getKey()); <<< here key is generated like ed.getKey().hashCode() & 0xfffffc00;
lockForWriting(keyHashCode);
try {
storeLockSafe(ed, keyHashCode); <<< here it should be stored into Bucket and then stored in DB
} finally {
unlock(keyHashCode);
}
if (trace) {
log.tracef("exit store(%s)", ed);
}
}
{code}
When I use RemoteCacheManager and RemoteCache I am putting entries into cache
{code:title=Test.java|borderStyle=solid}
cache.put("key1", "v1");
cache.put("key2", "v2");
cache.put("key3", "v3");
{code}
Then 2 entries are passivated and stored in DB
||ID||DATA||TIMESTAMP||
|183713792|0301fe032a01034c422b21033e286d7942657374506572736f6e616c4b657957686963684861734e657665724265656e426574746572420521033e02763203620003630000000000000002|-1|
|23486464|0301fe032a01034c420721033e046b657931420521033e02763103620003630000000000000001|-1|
IDs are generated from method above and
{code:title=Bar.java|borderStyle=solid}
byte[] keyBytes = marshaller.objectToByteBuffer("key1"); <<< key is marshalled
long keyID = ByteArrayEquivalence.INSTANCE.hashCode(keyBytes) & 0xfffffc00 //computation taken from BucketBasedCacheStore <<< this does not work for me
ode}
And next step I'd like to retrieve data from DB
SELECT ID, DATA FROM JDBC_BINARY_DEFAULT WHERE ID=keyID
But in method
{code:title=BucketBasedCacheStore.java|borderStyle=solid}
@Override
public Integer getLockFromKey(Object key) {
return key.hashCode() & 0xfffffc00; <<< here should be used Arrays.hashCode((byte[])key) & 0xfffffc00), if key is represented as byte array, or used ByteArrayEquivalence instead of simple byte array(byte[]) as argument
}
{code}
was:
Entry passivation into DB, concretly this class LockSupportCacheStore and method store. Look at lines with "<<<" string for more info
{code:title=Bar.java|borderStyle=solid}
@Override
public final void store(InternalCacheEntry ed) throws CacheLoaderException {
if (trace) {
log.tracef("store(%s)", ed);
}
if (ed == null) {
return;
}
if (ed.canExpire() && ed.isExpired(timeService.wallClockTime())) {
if (containsKey(ed.getKey())) {
if (trace) {
log.tracef("Entry %s is expired! Removing!", ed);
}
remove(ed.getKey());
} else {
if (trace) {
log.tracef("Entry %s is expired! Not doing anything.", ed);
}
}
return;
}
L keyHashCode = getLockFromKey(ed.getKey()); <<< here key is generated like ed.getKey().hashCode() & 0xfffffc00;
lockForWriting(keyHashCode);
try {
storeLockSafe(ed, keyHashCode); <<< here it should be stored into Bucket and then stored in DB
} finally {
unlock(keyHashCode);
}
if (trace) {
log.tracef("exit store(%s)", ed);
}
}
{code}
When I use RemoteCacheManager and RemoteCache I am putting entries into cache
{code:title=Bar.java|borderStyle=solid}
cache.put("key1", "v1");
cache.put("key2", "v2");
cache.put("key3", "v3");
{code}
Then 2 entries are passivated and stored in DB
||ID||DATA||TIMESTAMP||
|183713792|0301fe032a01034c422b21033e286d7942657374506572736f6e616c4b657957686963684861734e657665724265656e426574746572420521033e02763203620003630000000000000002|-1|
|23486464|0301fe032a01034c420721033e046b657931420521033e02763103620003630000000000000001|-1|
IDs are generated from method above and
{code:title=Bar.java|borderStyle=solid}
byte[] keyBytes = marshaller.objectToByteBuffer("key1"); <<< key is marshalled
long keyID = ByteArrayEquivalence.INSTANCE.hashCode(keyBytes) & 0xfffffc00 //computation taken from BucketBasedCacheStore <<< this does not work for me
ode}
And next step I'd like to retrieve data from DB
SELECT ID, DATA FROM JDBC_BINARY_DEFAULT WHERE ID=keyID
But in method
{code:title=Bar.java|borderStyle=solid}
@Override
public Integer getLockFromKey(Object key) {
return key.hashCode() & 0xfffffc00; <<< here should be used Arrays.hashCode((byte[])key) & 0xfffffc00), if key is represented as byte array, or used ByteArrayEquivalence instead of simple byte array(byte[]) as argument
}
{code}
> Entries are passivated with wrong ID in DB
> ------------------------------------------
>
> Key: ISPN-3405
> URL: https://issues.jboss.org/browse/ISPN-3405
> Project: Infinispan
> Issue Type: Bug
> Components: Eviction
> Affects Versions: 5.3.0.Final, 6.0.0.Alpha1
> Reporter: Vitalii Chepeliuk
> Assignee: Galder Zamarreño
> Fix For: 6.0.0.Alpha3, 6.0.0.Final
>
>
> Entry passivation into DB, concretly this class LockSupportCacheStore and method store. Look at lines with "<<<" string for more info
> {code:title=LockSupportCacheStore.java|borderStyle=solid}
> @Override
> public final void store(InternalCacheEntry ed) throws CacheLoaderException {
> if (trace) {
> log.tracef("store(%s)", ed);
> }
> if (ed == null) {
> return;
> }
> if (ed.canExpire() && ed.isExpired(timeService.wallClockTime())) {
> if (containsKey(ed.getKey())) {
> if (trace) {
> log.tracef("Entry %s is expired! Removing!", ed);
> }
> remove(ed.getKey());
> } else {
> if (trace) {
> log.tracef("Entry %s is expired! Not doing anything.", ed);
> }
> }
> return;
> }
> L keyHashCode = getLockFromKey(ed.getKey()); <<< here key is generated like ed.getKey().hashCode() & 0xfffffc00;
> lockForWriting(keyHashCode);
> try {
> storeLockSafe(ed, keyHashCode); <<< here it should be stored into Bucket and then stored in DB
> } finally {
> unlock(keyHashCode);
> }
> if (trace) {
> log.tracef("exit store(%s)", ed);
> }
> }
> {code}
> When I use RemoteCacheManager and RemoteCache I am putting entries into cache
> {code:title=Test.java|borderStyle=solid}
> cache.put("key1", "v1");
> cache.put("key2", "v2");
> cache.put("key3", "v3");
> {code}
> Then 2 entries are passivated and stored in DB
> ||ID||DATA||TIMESTAMP||
> |183713792|0301fe032a01034c422b21033e286d7942657374506572736f6e616c4b657957686963684861734e657665724265656e426574746572420521033e02763203620003630000000000000002|-1|
> |23486464|0301fe032a01034c420721033e046b657931420521033e02763103620003630000000000000001|-1|
> IDs are generated from method above and
> {code:title=Bar.java|borderStyle=solid}
> byte[] keyBytes = marshaller.objectToByteBuffer("key1"); <<< key is marshalled
> long keyID = ByteArrayEquivalence.INSTANCE.hashCode(keyBytes) & 0xfffffc00 //computation taken from BucketBasedCacheStore <<< this does not work for me
> ode}
> And next step I'd like to retrieve data from DB
> SELECT ID, DATA FROM JDBC_BINARY_DEFAULT WHERE ID=keyID
> But in method
> {code:title=BucketBasedCacheStore.java|borderStyle=solid}
> @Override
> public Integer getLockFromKey(Object key) {
> return key.hashCode() & 0xfffffc00; <<< here should be used Arrays.hashCode((byte[])key) & 0xfffffc00), if key is represented as byte array, or used ByteArrayEquivalence instead of simple byte array(byte[]) as argument
> }
> {code}
--
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
11 years, 2 months
[JBoss JIRA] (ISPN-3414) Infinispan ignores DatabaseType configuration
by Vitalii Chepeliuk (JIRA)
[ https://issues.jboss.org/browse/ISPN-3414?page=com.atlassian.jira.plugin.... ]
Vitalii Chepeliuk updated ISPN-3414:
------------------------------------
Description:
When I configure DefaultCacheManager with following configuration
{code:title=Configurator.java|borderStyle=solid}
ConfigurationBuilder bld = new ConfigurationBuilder();
bld.clustering().cacheMode(CacheMode.LOCAL)
.loaders().passivation(passivation).preload(preload).shared(false)
.addLoader(JdbcMixedCacheStoreConfigurationBuilder.class).fetchPersistentState(false).purgeOnStartup(false)
.databaseType(DatabaseType.MYSQL)
.stringTable()
.dropOnExit(false)
.createOnStart(true)
.tableNamePrefix(STRING_TABLE_NAME_PREFIX)
.idColumnName(ID_COLUMN_NAME).idColumnType(props.getProperty("id.column.type"))
.dataColumnName(DATA_COLUMN_NAME).dataColumnType(props.getProperty("data.column.type"))
.timestampColumnName(TIMESTAMP_COLUMN_NAME).timestampColumnType(props.getProperty("timestamp.column.type"))
.binaryTable()
.dropOnExit(false)
.createOnStart(true)
.tableNamePrefix(BUCKET_TABLE_NAME_PREFIX)
.idColumnName(ID_COLUMN_NAME).idColumnType(props.getProperty("id.column.type"))
.dataColumnName(DATA_COLUMN_NAME).dataColumnType(props.getProperty("data.column.type"))
.timestampColumnName(TIMESTAMP_COLUMN_NAME).timestampColumnType(props.getProperty("timestamp.column.type"))
.dataSource()
.jndiUrl(props.getProperty("datasource.jndi.location"));
{code}
And here is TableManipulation class with getDatabaseType() method
{code:title=TableManipulation.java|borderStyle=solid}
private DatabaseType getDatabaseType() {
databaseType = config.databaseType();
System.out.println(">>>>>>> databaseType "+ databaseType);
if (databaseType == null) {
// need to guess from the database type!
Connection connection = null;
...
{code}
*Got the following output when test is running*
!!!!! is printed from my client code
>>>>> is printed from infinispan(TableManipulation.java)
-----
[java] 10:59:07,347 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype MYSQL
[java] 10:59:07,500 INFO [org.infinispan.factories.GlobalComponentRegistry] (pool-1-thread-1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Alpha2-redhat-1
[java] 10:59:09,851 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:11,953 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:12,644 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:12,645 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:13,393 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] 10:59:24,780 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:24,954 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:25,260 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,679 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,680 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,843 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,844 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:30,002 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] 10:59:38,626 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:38,776 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:41,806 INFO [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (pool-1-thread-1) BeanManager not found.
[java] 10:59:41,813 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype MYSQL
[java] 10:59:41,848 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:41,848 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:42,018 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:42,020 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:42,176 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] 10:59:52,364 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:52,515 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:52,667 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:57,155 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
-----
*And other issue with postgresqlplus92 DB, infinispan cannt recognize it like DatabaseType.POSTGRES*
-----
[java] ^[[0m^[[0m10:53:45,198 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype POSTGRES
[java] ^[[0m^[[0m10:53:45,348 INFO [org.infinispan.factories.GlobalComponentRegistry] (pool-1-thread-1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Alpha2-redhat-1
[java] ^[[0m^[[0m10:53:46,845 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:48,939 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:50,429 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:51,456 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:52,994 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] ^[[0m^[[0m10:53:59,232 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:59,414 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:01,807 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:04,020 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:06,084 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:07,275 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:08,303 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:09,509 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] ^[[0m^[[0m10:54:13,520 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:13,693 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:16,104 INFO [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (pool-1-thread-1) BeanManager not found.
[java] ^[[0m^[[0m10:54:16,111 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype POSTGRES
[java] ^[[0m^[[0m10:54:16,148 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:18,180 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:19,352 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:20,358 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:21,531 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] ^[[0m^[[0m10:54:26,078 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:26,256 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:27,419 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[31m10:54:57,421 ERROR [org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory] (pool-1-thread-1) ISPN008018: Sql failure retrieving connection from datasource: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/ExampleDS
[java] at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:147)
[java] at org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory.getConnection(ManagedConnectionFactory.java:82) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
[java] at org.infinispan.loaders.jdbc.TableManipulation.getDatabaseType(TableManipulation.java:396) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
[java] at org.infinispan.loaders.jdbc.TableManipulation.getSelectRowSql(TableManipulation.java:193) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
[java] at org.infinispan.loaders.jdbc.binary.JdbcBinaryCacheStore.loadBucket(JdbcBinaryCacheStore.java:247) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
-----
was:
When I configure DefaultCacheManager with following configuration
{code:title=Configurator.java|borderStyle=solid}
ConfigurationBuilder bld = new ConfigurationBuilder();
bld.clustering().cacheMode(CacheMode.LOCAL)
.loaders().passivation(passivation).preload(preload).shared(false)
.addLoader(JdbcMixedCacheStoreConfigurationBuilder.class).fetchPersistentState(false).purgeOnStartup(false)
.databaseType(DatabaseType.MYSQL)
.stringTable()
.dropOnExit(false)
.createOnStart(true)
.tableNamePrefix(STRING_TABLE_NAME_PREFIX)
.idColumnName(ID_COLUMN_NAME).idColumnType(props.getProperty("id.column.type"))
.dataColumnName(DATA_COLUMN_NAME).dataColumnType(props.getProperty("data.column.type"))
.timestampColumnName(TIMESTAMP_COLUMN_NAME).timestampColumnType(props.getProperty("timestamp.column.type"))
.binaryTable()
.dropOnExit(false)
.createOnStart(true)
.tableNamePrefix(BUCKET_TABLE_NAME_PREFIX)
.idColumnName(ID_COLUMN_NAME).idColumnType(props.getProperty("id.column.type"))
.dataColumnName(DATA_COLUMN_NAME).dataColumnType(props.getProperty("data.column.type"))
.timestampColumnName(TIMESTAMP_COLUMN_NAME).timestampColumnType(props.getProperty("timestamp.column.type"))
.dataSource()
.jndiUrl(props.getProperty("datasource.jndi.location"));
{code}
And here is TableManipulation class with getDatabaseType() method
{code:title=TableManipulation.java|borderStyle=solid}
private DatabaseType getDatabaseType() {
databaseType = config.databaseType();
System.out.println(">>>>>>> databaseType "+ databaseType);
if (databaseType == null) {
// need to guess from the database type!
Connection connection = null;
...
{code}
*Got the following output when test is running*
!!!!! is printed from my client code
>>>>> is printed from infinispan(TableManipulation.java)
-----
[java] 10:59:07,347 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype MYSQL
[java] 10:59:07,500 INFO [org.infinispan.factories.GlobalComponentRegistry] (pool-1-thread-1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Alpha2-redhat-1
[java] 10:59:09,851 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:11,953 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:12,644 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:12,645 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:13,393 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] 10:59:24,780 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:24,954 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:25,260 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,679 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,680 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,843 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,844 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:30,002 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] 10:59:38,626 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:38,776 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:41,806 INFO [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (pool-1-thread-1) BeanManager not found.
[java] 10:59:41,813 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype MYSQL
[java] 10:59:41,848 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:41,848 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:42,018 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:42,020 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:42,176 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] 10:59:52,364 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:52,515 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:52,667 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:57,155 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
-----
*And other issue with postgresqlplus92 DB, infinispan cannt recognize it like
DatabaseType.POSTGRES*
-----
[java] ^[[0m^[[0m10:53:45,198 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype POSTGRES
[java] ^[[0m^[[0m10:53:45,348 INFO [org.infinispan.factories.GlobalComponentRegistry] (pool-1-thread-1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Alpha2-redhat-1
[java] ^[[0m^[[0m10:53:46,845 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:48,939 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:50,429 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:51,456 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:52,994 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] ^[[0m^[[0m10:53:59,232 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:59,414 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:01,807 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:04,020 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:06,084 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:07,275 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:08,303 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:09,509 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] ^[[0m^[[0m10:54:13,520 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:13,693 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:16,104 INFO [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (pool-1-thread-1) BeanManager not found.
[java] ^[[0m^[[0m10:54:16,111 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype POSTGRES
[java] ^[[0m^[[0m10:54:16,148 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:18,180 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:19,352 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:20,358 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:21,531 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] ^[[0m^[[0m10:54:26,078 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:26,256 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:27,419 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[31m10:54:57,421 ERROR [org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory] (pool-1-thread-1) ISPN008018: Sql failure retrieving connection from datasource: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/ExampleDS
[java] at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:147)
[java] at org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory.getConnection(ManagedConnectionFactory.java:82) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
[java] at org.infinispan.loaders.jdbc.TableManipulation.getDatabaseType(TableManipulation.java:396) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
[java] at org.infinispan.loaders.jdbc.TableManipulation.getSelectRowSql(TableManipulation.java:193) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
[java] at org.infinispan.loaders.jdbc.binary.JdbcBinaryCacheStore.loadBucket(JdbcBinaryCacheStore.java:247) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
-----
> Infinispan ignores DatabaseType configuration
> ----------------------------------------------
>
> Key: ISPN-3414
> URL: https://issues.jboss.org/browse/ISPN-3414
> Project: Infinispan
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 6.0.0.Alpha2
> Reporter: Vitalii Chepeliuk
> Assignee: Mircea Markus
> Priority: Critical
>
> When I configure DefaultCacheManager with following configuration
> {code:title=Configurator.java|borderStyle=solid}
> ConfigurationBuilder bld = new ConfigurationBuilder();
> bld.clustering().cacheMode(CacheMode.LOCAL)
> .loaders().passivation(passivation).preload(preload).shared(false)
> .addLoader(JdbcMixedCacheStoreConfigurationBuilder.class).fetchPersistentState(false).purgeOnStartup(false)
> .databaseType(DatabaseType.MYSQL)
> .stringTable()
> .dropOnExit(false)
> .createOnStart(true)
> .tableNamePrefix(STRING_TABLE_NAME_PREFIX)
> .idColumnName(ID_COLUMN_NAME).idColumnType(props.getProperty("id.column.type"))
> .dataColumnName(DATA_COLUMN_NAME).dataColumnType(props.getProperty("data.column.type"))
> .timestampColumnName(TIMESTAMP_COLUMN_NAME).timestampColumnType(props.getProperty("timestamp.column.type"))
> .binaryTable()
> .dropOnExit(false)
> .createOnStart(true)
> .tableNamePrefix(BUCKET_TABLE_NAME_PREFIX)
> .idColumnName(ID_COLUMN_NAME).idColumnType(props.getProperty("id.column.type"))
> .dataColumnName(DATA_COLUMN_NAME).dataColumnType(props.getProperty("data.column.type"))
> .timestampColumnName(TIMESTAMP_COLUMN_NAME).timestampColumnType(props.getProperty("timestamp.column.type"))
> .dataSource()
> .jndiUrl(props.getProperty("datasource.jndi.location"));
> {code}
> And here is TableManipulation class with getDatabaseType() method
> {code:title=TableManipulation.java|borderStyle=solid}
> private DatabaseType getDatabaseType() {
> databaseType = config.databaseType();
> System.out.println(">>>>>>> databaseType "+ databaseType);
> if (databaseType == null) {
> // need to guess from the database type!
> Connection connection = null;
> ...
> {code}
> *Got the following output when test is running*
> !!!!! is printed from my client code
> >>>>> is printed from infinispan(TableManipulation.java)
> -----
> [java] 10:59:07,347 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype MYSQL
> [java] 10:59:07,500 INFO [org.infinispan.factories.GlobalComponentRegistry] (pool-1-thread-1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Alpha2-redhat-1
> [java] 10:59:09,851 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:11,953 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:12,644 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:12,645 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:13,393 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] 10:59:24,780 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:24,954 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:25,260 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:29,679 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:29,680 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:29,843 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:29,844 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:30,002 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] 10:59:38,626 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:38,776 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:41,806 INFO [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (pool-1-thread-1) BeanManager not found.
> [java] 10:59:41,813 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype MYSQL
> [java] 10:59:41,848 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:41,848 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:42,018 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:42,020 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:42,176 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] 10:59:52,364 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:52,515 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:52,667 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:57,155 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> -----
> *And other issue with postgresqlplus92 DB, infinispan cannt recognize it like DatabaseType.POSTGRES*
> -----
> [java] ^[[0m^[[0m10:53:45,198 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype POSTGRES
> [java] ^[[0m^[[0m10:53:45,348 INFO [org.infinispan.factories.GlobalComponentRegistry] (pool-1-thread-1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Alpha2-redhat-1
> [java] ^[[0m^[[0m10:53:46,845 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:53:48,939 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:53:50,429 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:53:51,456 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:53:52,994 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] ^[[0m^[[0m10:53:59,232 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:53:59,414 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:01,807 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:04,020 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:06,084 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:07,275 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:08,303 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:09,509 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] ^[[0m^[[0m10:54:13,520 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:13,693 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:16,104 INFO [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (pool-1-thread-1) BeanManager not found.
> [java] ^[[0m^[[0m10:54:16,111 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype POSTGRES
> [java] ^[[0m^[[0m10:54:16,148 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:18,180 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:19,352 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:20,358 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:21,531 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] ^[[0m^[[0m10:54:26,078 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:26,256 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:27,419 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[31m10:54:57,421 ERROR [org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory] (pool-1-thread-1) ISPN008018: Sql failure retrieving connection from datasource: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/ExampleDS
> [java] at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:147)
> [java] at org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory.getConnection(ManagedConnectionFactory.java:82) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
> [java] at org.infinispan.loaders.jdbc.TableManipulation.getDatabaseType(TableManipulation.java:396) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
> [java] at org.infinispan.loaders.jdbc.TableManipulation.getSelectRowSql(TableManipulation.java:193) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
> [java] at org.infinispan.loaders.jdbc.binary.JdbcBinaryCacheStore.loadBucket(JdbcBinaryCacheStore.java:247) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
> -----
--
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
11 years, 2 months
[JBoss JIRA] (ISPN-3414) Infinispan ignores DatabaseType configuration
by Vitalii Chepeliuk (JIRA)
[ https://issues.jboss.org/browse/ISPN-3414?page=com.atlassian.jira.plugin.... ]
Vitalii Chepeliuk updated ISPN-3414:
------------------------------------
Description:
When I configure DefaultCacheManager with following configuration
{code:title=Configurator.java|borderStyle=solid}
ConfigurationBuilder bld = new ConfigurationBuilder();
bld.clustering().cacheMode(CacheMode.LOCAL)
.loaders().passivation(passivation).preload(preload).shared(false)
.addLoader(JdbcMixedCacheStoreConfigurationBuilder.class).fetchPersistentState(false).purgeOnStartup(false)
.databaseType(DatabaseType.MYSQL)
.stringTable()
.dropOnExit(false)
.createOnStart(true)
.tableNamePrefix(STRING_TABLE_NAME_PREFIX)
.idColumnName(ID_COLUMN_NAME).idColumnType(props.getProperty("id.column.type"))
.dataColumnName(DATA_COLUMN_NAME).dataColumnType(props.getProperty("data.column.type"))
.timestampColumnName(TIMESTAMP_COLUMN_NAME).timestampColumnType(props.getProperty("timestamp.column.type"))
.binaryTable()
.dropOnExit(false)
.createOnStart(true)
.tableNamePrefix(BUCKET_TABLE_NAME_PREFIX)
.idColumnName(ID_COLUMN_NAME).idColumnType(props.getProperty("id.column.type"))
.dataColumnName(DATA_COLUMN_NAME).dataColumnType(props.getProperty("data.column.type"))
.timestampColumnName(TIMESTAMP_COLUMN_NAME).timestampColumnType(props.getProperty("timestamp.column.type"))
.dataSource()
.jndiUrl(props.getProperty("datasource.jndi.location"));
{code}
And here is TableManipulation class with getDatabaseType() method
{code:title=TableManipulation.java|borderStyle=solid}
private DatabaseType getDatabaseType() {
databaseType = config.databaseType();
System.out.println(">>>>>>> databaseType "+ databaseType);
if (databaseType == null) {
// need to guess from the database type!
Connection connection = null;
...
{code}
*Got the following output when test is running*
!!!!! is printed from my client code
>>>>> is printed from infinispan(TableManipulation.java)
-----
[java] 10:59:07,347 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype MYSQL
[java] 10:59:07,500 INFO [org.infinispan.factories.GlobalComponentRegistry] (pool-1-thread-1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Alpha2-redhat-1
[java] 10:59:09,851 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:11,953 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:12,644 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:12,645 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:13,393 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] 10:59:24,780 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:24,954 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:25,260 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,679 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,680 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,843 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,844 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:30,002 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] 10:59:38,626 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:38,776 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:41,806 INFO [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (pool-1-thread-1) BeanManager not found.
[java] 10:59:41,813 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype MYSQL
[java] 10:59:41,848 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:41,848 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:42,018 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:42,020 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:42,176 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] 10:59:52,364 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:52,515 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:52,667 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:57,155 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
-----
*And other issue with postgresqlplus92 DB, infinispan cannt recognize it like
DatabaseType.POSTGRES*
-----
[java] ^[[0m^[[0m10:53:45,198 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype POSTGRES
[java] ^[[0m^[[0m10:53:45,348 INFO [org.infinispan.factories.GlobalComponentRegistry] (pool-1-thread-1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Alpha2-redhat-1
[java] ^[[0m^[[0m10:53:46,845 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:48,939 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:50,429 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:51,456 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:52,994 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] ^[[0m^[[0m10:53:59,232 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:59,414 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:01,807 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:04,020 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:06,084 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:07,275 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:08,303 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:09,509 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] ^[[0m^[[0m10:54:13,520 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:13,693 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:16,104 INFO [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (pool-1-thread-1) BeanManager not found.
[java] ^[[0m^[[0m10:54:16,111 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype POSTGRES
[java] ^[[0m^[[0m10:54:16,148 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:18,180 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:19,352 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:20,358 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:21,531 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] ^[[0m^[[0m10:54:26,078 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:26,256 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:27,419 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[31m10:54:57,421 ERROR [org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory] (pool-1-thread-1) ISPN008018: Sql failure retrieving connection from datasource: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/ExampleDS
[java] at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:147)
[java] at org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory.getConnection(ManagedConnectionFactory.java:82) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
[java] at org.infinispan.loaders.jdbc.TableManipulation.getDatabaseType(TableManipulation.java:396) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
[java] at org.infinispan.loaders.jdbc.TableManipulation.getSelectRowSql(TableManipulation.java:193) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
[java] at org.infinispan.loaders.jdbc.binary.JdbcBinaryCacheStore.loadBucket(JdbcBinaryCacheStore.java:247) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
-----
was:
When I configure DefaultCacheManager with following configuration
{code:title=Configurator.java|borderStyle=solid}
ConfigurationBuilder bld = new ConfigurationBuilder();
bld.clustering().cacheMode(CacheMode.LOCAL)
.loaders().passivation(passivation).preload(preload).shared(false)
.addLoader(JdbcMixedCacheStoreConfigurationBuilder.class).fetchPersistentState(false).purgeOnStartup(false)
.databaseType(DatabaseType.MYSQL)
.stringTable()
.dropOnExit(false)
.createOnStart(true)
.tableNamePrefix(STRING_TABLE_NAME_PREFIX)
.idColumnName(ID_COLUMN_NAME).idColumnType(props.getProperty("id.column.type"))
.dataColumnName(DATA_COLUMN_NAME).dataColumnType(props.getProperty("data.column.type"))
.timestampColumnName(TIMESTAMP_COLUMN_NAME).timestampColumnType(props.getProperty("timestamp.column.type"))
.binaryTable()
.dropOnExit(false)
.createOnStart(true)
.tableNamePrefix(BUCKET_TABLE_NAME_PREFIX)
.idColumnName(ID_COLUMN_NAME).idColumnType(props.getProperty("id.column.type"))
.dataColumnName(DATA_COLUMN_NAME).dataColumnType(props.getProperty("data.column.type"))
.timestampColumnName(TIMESTAMP_COLUMN_NAME).timestampColumnType(props.getProperty("timestamp.column.type"))
.dataSource()
.jndiUrl(props.getProperty("datasource.jndi.location"));
{code:title=TableManipulation.java|borderStyle=solid}
and verify TableManipulation.getDatabaseType
{code}
private DatabaseType getDatabaseType() {
databaseType = config.databaseType();
System.out.println(">>>>>>> databaseType "+ databaseType);
if (databaseType == null) {
// need to guess from the database type!
Connection connection = null;
...
{code}
*Got the following output when test is running*
!!!!! is printed from my client code
>>>>> is printed from infinispan(TableManipulation.java)
-----
[java] 10:59:07,347 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype MYSQL
[java] 10:59:07,500 INFO [org.infinispan.factories.GlobalComponentRegistry] (pool-1-thread-1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Alpha2-redhat-1
[java] 10:59:09,851 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:11,953 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:12,644 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:12,645 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:13,393 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] 10:59:24,780 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:24,954 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:25,260 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,679 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,680 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,843 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,844 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:30,002 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] 10:59:38,626 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:38,776 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:41,806 INFO [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (pool-1-thread-1) BeanManager not found.
[java] 10:59:41,813 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype MYSQL
[java] 10:59:41,848 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:41,848 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:42,018 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:42,020 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:42,176 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] 10:59:52,364 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:52,515 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:52,667 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:57,155 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
-----
*And other issue with postgresqlplus92 DB, infinispan cannt recognize it like
DatabaseType.POSTGRES*
-----
[java] ^[[0m^[[0m10:53:45,198 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype POSTGRES
[java] ^[[0m^[[0m10:53:45,348 INFO [org.infinispan.factories.GlobalComponentRegistry] (pool-1-thread-1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Alpha2-redhat-1
[java] ^[[0m^[[0m10:53:46,845 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:48,939 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:50,429 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:51,456 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:52,994 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] ^[[0m^[[0m10:53:59,232 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:59,414 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:01,807 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:04,020 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:06,084 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:07,275 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:08,303 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:09,509 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] ^[[0m^[[0m10:54:13,520 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:13,693 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:16,104 INFO [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (pool-1-thread-1) BeanManager not found.
[java] ^[[0m^[[0m10:54:16,111 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype POSTGRES
[java] ^[[0m^[[0m10:54:16,148 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:18,180 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:19,352 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:20,358 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:21,531 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] ^[[0m^[[0m10:54:26,078 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:26,256 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:27,419 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[31m10:54:57,421 ERROR [org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory] (pool-1-thread-1) ISPN008018: Sql failure retrieving connection from datasource: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/ExampleDS
[java] at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:147)
[java] at org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory.getConnection(ManagedConnectionFactory.java:82) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
[java] at org.infinispan.loaders.jdbc.TableManipulation.getDatabaseType(TableManipulation.java:396) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
[java] at org.infinispan.loaders.jdbc.TableManipulation.getSelectRowSql(TableManipulation.java:193) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
[java] at org.infinispan.loaders.jdbc.binary.JdbcBinaryCacheStore.loadBucket(JdbcBinaryCacheStore.java:247) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
-----
> Infinispan ignores DatabaseType configuration
> ----------------------------------------------
>
> Key: ISPN-3414
> URL: https://issues.jboss.org/browse/ISPN-3414
> Project: Infinispan
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 6.0.0.Alpha2
> Reporter: Vitalii Chepeliuk
> Assignee: Mircea Markus
> Priority: Critical
>
> When I configure DefaultCacheManager with following configuration
> {code:title=Configurator.java|borderStyle=solid}
> ConfigurationBuilder bld = new ConfigurationBuilder();
> bld.clustering().cacheMode(CacheMode.LOCAL)
> .loaders().passivation(passivation).preload(preload).shared(false)
> .addLoader(JdbcMixedCacheStoreConfigurationBuilder.class).fetchPersistentState(false).purgeOnStartup(false)
> .databaseType(DatabaseType.MYSQL)
> .stringTable()
> .dropOnExit(false)
> .createOnStart(true)
> .tableNamePrefix(STRING_TABLE_NAME_PREFIX)
> .idColumnName(ID_COLUMN_NAME).idColumnType(props.getProperty("id.column.type"))
> .dataColumnName(DATA_COLUMN_NAME).dataColumnType(props.getProperty("data.column.type"))
> .timestampColumnName(TIMESTAMP_COLUMN_NAME).timestampColumnType(props.getProperty("timestamp.column.type"))
> .binaryTable()
> .dropOnExit(false)
> .createOnStart(true)
> .tableNamePrefix(BUCKET_TABLE_NAME_PREFIX)
> .idColumnName(ID_COLUMN_NAME).idColumnType(props.getProperty("id.column.type"))
> .dataColumnName(DATA_COLUMN_NAME).dataColumnType(props.getProperty("data.column.type"))
> .timestampColumnName(TIMESTAMP_COLUMN_NAME).timestampColumnType(props.getProperty("timestamp.column.type"))
> .dataSource()
> .jndiUrl(props.getProperty("datasource.jndi.location"));
> {code}
> And here is TableManipulation class with getDatabaseType() method
> {code:title=TableManipulation.java|borderStyle=solid}
> private DatabaseType getDatabaseType() {
> databaseType = config.databaseType();
> System.out.println(">>>>>>> databaseType "+ databaseType);
> if (databaseType == null) {
> // need to guess from the database type!
> Connection connection = null;
> ...
> {code}
> *Got the following output when test is running*
> !!!!! is printed from my client code
> >>>>> is printed from infinispan(TableManipulation.java)
> -----
> [java] 10:59:07,347 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype MYSQL
> [java] 10:59:07,500 INFO [org.infinispan.factories.GlobalComponentRegistry] (pool-1-thread-1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Alpha2-redhat-1
> [java] 10:59:09,851 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:11,953 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:12,644 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:12,645 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:13,393 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] 10:59:24,780 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:24,954 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:25,260 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:29,679 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:29,680 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:29,843 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:29,844 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:30,002 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] 10:59:38,626 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:38,776 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:41,806 INFO [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (pool-1-thread-1) BeanManager not found.
> [java] 10:59:41,813 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype MYSQL
> [java] 10:59:41,848 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:41,848 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:42,018 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:42,020 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:42,176 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] 10:59:52,364 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:52,515 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:52,667 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] 10:59:57,155 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> -----
> *And other issue with postgresqlplus92 DB, infinispan cannt recognize it like
> DatabaseType.POSTGRES*
> -----
> [java] ^[[0m^[[0m10:53:45,198 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype POSTGRES
> [java] ^[[0m^[[0m10:53:45,348 INFO [org.infinispan.factories.GlobalComponentRegistry] (pool-1-thread-1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Alpha2-redhat-1
> [java] ^[[0m^[[0m10:53:46,845 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:53:48,939 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:53:50,429 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:53:51,456 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:53:52,994 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] ^[[0m^[[0m10:53:59,232 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:53:59,414 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:01,807 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:04,020 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:06,084 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:07,275 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:08,303 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:09,509 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] ^[[0m^[[0m10:54:13,520 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:13,693 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:16,104 INFO [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (pool-1-thread-1) BeanManager not found.
> [java] ^[[0m^[[0m10:54:16,111 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype POSTGRES
> [java] ^[[0m^[[0m10:54:16,148 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:18,180 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:19,352 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:20,358 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:21,531 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
> [java] ^[[0m^[[0m10:54:26,078 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:26,256 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[0m10:54:27,419 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
> [java] ^[[0m^[[31m10:54:57,421 ERROR [org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory] (pool-1-thread-1) ISPN008018: Sql failure retrieving connection from datasource: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/ExampleDS
> [java] at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:147)
> [java] at org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory.getConnection(ManagedConnectionFactory.java:82) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
> [java] at org.infinispan.loaders.jdbc.TableManipulation.getDatabaseType(TableManipulation.java:396) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
> [java] at org.infinispan.loaders.jdbc.TableManipulation.getSelectRowSql(TableManipulation.java:193) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
> [java] at org.infinispan.loaders.jdbc.binary.JdbcBinaryCacheStore.loadBucket(JdbcBinaryCacheStore.java:247) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
> -----
--
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
11 years, 2 months
[JBoss JIRA] (ISPN-3414) Infinispan ignores DatabaseType configuration
by Vitalii Chepeliuk (JIRA)
Vitalii Chepeliuk created ISPN-3414:
---------------------------------------
Summary: Infinispan ignores DatabaseType configuration
Key: ISPN-3414
URL: https://issues.jboss.org/browse/ISPN-3414
Project: Infinispan
Issue Type: Bug
Components: Configuration
Affects Versions: 6.0.0.Alpha2
Reporter: Vitalii Chepeliuk
Assignee: Mircea Markus
Priority: Critical
When I configure DefaultCacheManager with following configuration
{code:title=Configurator.java|borderStyle=solid}
ConfigurationBuilder bld = new ConfigurationBuilder();
bld.clustering().cacheMode(CacheMode.LOCAL)
.loaders().passivation(passivation).preload(preload).shared(false)
.addLoader(JdbcMixedCacheStoreConfigurationBuilder.class).fetchPersistentState(false).purgeOnStartup(false)
.databaseType(DatabaseType.MYSQL)
.stringTable()
.dropOnExit(false)
.createOnStart(true)
.tableNamePrefix(STRING_TABLE_NAME_PREFIX)
.idColumnName(ID_COLUMN_NAME).idColumnType(props.getProperty("id.column.type"))
.dataColumnName(DATA_COLUMN_NAME).dataColumnType(props.getProperty("data.column.type"))
.timestampColumnName(TIMESTAMP_COLUMN_NAME).timestampColumnType(props.getProperty("timestamp.column.type"))
.binaryTable()
.dropOnExit(false)
.createOnStart(true)
.tableNamePrefix(BUCKET_TABLE_NAME_PREFIX)
.idColumnName(ID_COLUMN_NAME).idColumnType(props.getProperty("id.column.type"))
.dataColumnName(DATA_COLUMN_NAME).dataColumnType(props.getProperty("data.column.type"))
.timestampColumnName(TIMESTAMP_COLUMN_NAME).timestampColumnType(props.getProperty("timestamp.column.type"))
.dataSource()
.jndiUrl(props.getProperty("datasource.jndi.location"));
{code:title=TableManipulation.java|borderStyle=solid}
and verify TableManipulation.getDatabaseType
{code}
private DatabaseType getDatabaseType() {
databaseType = config.databaseType();
System.out.println(">>>>>>> databaseType "+ databaseType);
if (databaseType == null) {
// need to guess from the database type!
Connection connection = null;
...
{code}
*Got the following output when test is running*
!!!!! is printed from my client code
>>>>> is printed from infinispan(TableManipulation.java)
-----
[java] 10:59:07,347 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype MYSQL
[java] 10:59:07,500 INFO [org.infinispan.factories.GlobalComponentRegistry] (pool-1-thread-1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Alpha2-redhat-1
[java] 10:59:09,851 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:11,953 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:12,644 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:12,645 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:13,393 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] 10:59:24,780 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:24,954 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:25,260 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,679 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,680 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,843 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:29,844 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:30,002 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] 10:59:38,626 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:38,776 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:41,806 INFO [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (pool-1-thread-1) BeanManager not found.
[java] 10:59:41,813 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype MYSQL
[java] 10:59:41,848 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:41,848 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:42,018 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:42,020 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:42,176 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] 10:59:52,364 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:52,515 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:52,667 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] 10:59:57,155 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
-----
*And other issue with postgresqlplus92 DB, infinispan cannt recognize it like
DatabaseType.POSTGRES*
-----
[java] ^[[0m^[[0m10:53:45,198 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype POSTGRES
[java] ^[[0m^[[0m10:53:45,348 INFO [org.infinispan.factories.GlobalComponentRegistry] (pool-1-thread-1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Alpha2-redhat-1
[java] ^[[0m^[[0m10:53:46,845 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:48,939 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:50,429 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:51,456 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:52,994 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] ^[[0m^[[0m10:53:59,232 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:53:59,414 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:01,807 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:04,020 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:06,084 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:07,275 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:08,303 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:09,509 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] ^[[0m^[[0m10:54:13,520 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:13,693 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:16,104 INFO [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (pool-1-thread-1) BeanManager not found.
[java] ^[[0m^[[0m10:54:16,111 INFO [stdout] (pool-1-thread-1) !!!!!!! databasetype POSTGRES
[java] ^[[0m^[[0m10:54:16,148 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:18,180 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:19,352 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:20,358 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:21,531 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-1-thread-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
[java] ^[[0m^[[0m10:54:26,078 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:26,256 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[0m10:54:27,419 INFO [stdout] (pool-1-thread-1) >>>>>>> databaseType null
[java] ^[[0m^[[31m10:54:57,421 ERROR [org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory] (pool-1-thread-1) ISPN008018: Sql failure retrieving connection from datasource: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/ExampleDS
[java] at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:147)
[java] at org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory.getConnection(ManagedConnectionFactory.java:82) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
[java] at org.infinispan.loaders.jdbc.TableManipulation.getDatabaseType(TableManipulation.java:396) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
[java] at org.infinispan.loaders.jdbc.TableManipulation.getSelectRowSql(TableManipulation.java:193) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
[java] at org.infinispan.loaders.jdbc.binary.JdbcBinaryCacheStore.loadBucket(JdbcBinaryCacheStore.java:247) [infinispan-cachestore-jdbc.jar:6.0.0.Alpha2-redhat-1]
-----
--
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
11 years, 2 months