[jboss-jira] [JBoss JIRA] (WFLY-4785) Cannot start persistence cache: CacheException
Veli Cris (JIRA)
issues at jboss.org
Tue Jun 16 05:38:02 EDT 2015
Veli Cris created WFLY-4785:
-------------------------------
Summary: Cannot start persistence cache: CacheException
Key: WFLY-4785
URL: https://issues.jboss.org/browse/WFLY-4785
Project: WildFly
Issue Type: Bug
Affects Versions: 8.2.0.Final
Environment: WildFly 8.2.0 Final / Linux
Reporter: Veli Cris
Assignee: Jason Greene
Hi,
I have the following configuration for persistence cache (MySQL) and when I try to start the cache I get CacheException error. Basically what I want is to save the records from cache called 'mycache' in MySQL table called 'bean.bean_session'. Thank you.
ConfigurationBuilder builder = new ConfigurationBuilder();
Configuration config = builder.persistence()
.addStore(JdbcBinaryStoreConfigurationBuilder.class)
.fetchPersistentState(false)
.ignoreModifications(false)
.purgeOnStartup(false)
.table()
.dropOnExit(true)
.createOnStart(true)
.tableNamePrefix("bean_session")
.idColumnName("id").idColumnType("INT(11)")
.dataColumnName("string").dataColumnType("TEXT")
.timestampColumnName("timestamp").timestampColumnType("TIMESTAMP")
.connectionPool()
.connectionUrl("jdbc:mysql://localhost:3306/bean")
.username("root").password("1234567")
.driverClass("com.mysql.jdbc.Driver").build();
DefaultCacheManager manager = new DefaultCacheManager();
manager.defineConfiguration("mycache", config);
Cache cache = manager.getCache("mycache");
cache.put("1", "1");
cache.put("2", "2");
cache.put("3", "3");
cache.start();
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the jboss-jira
mailing list