Getting Failed to insert node
atifoxon Feb 10, 2009 10:00 AMI am using cache loader but getting following in log
two syntax errors
1. while executing creating table
2. whil executing insert node sql
insert node sql log
org.jboss.cache.loader.AdjListJDBCCacheLoader insertNode
SEVERE: Failed to insert node :A syntax error has occurred.
query i am getting is
INSERT INTO jbosscache (fqn, node , parent) SELECT ?, ?, ? FROM jbosscache_D WHERE NOT EXISTS (SELECT fqn FROM jbosscache WHERE fqn = ?)
help me in resolving the problem
2. further i think the sql generated by api is not correct (or expected)
e.g for table creation when using jdbc loader i get following query
CREATE TABLE jbosscache ( fqn VARCHAR(255) NOT NULL, node blob, parent VARCHAR(255), CONSTRAINT jbosscache_pk PRIMARY KEY (fqn) )
which generates a syntax error
complete config file is
<?xml version="1.0" encoding="UTF-8"?> <jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.0"> <!-- Configure the TransactionManager --> <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/> <!-- wakeUpInterval: time interval (millis) when the eviction thread kicks in. --> <eviction wakeUpInterval="5000"> <!-- Cache wide defaults default algorithmClass: if an algorithm class is not specified for a region, this one is used by default. default eventQueueSize if an event queue size is not specified for a region, this one is used by default. --> <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000"> <property name="maxNodes" value="5000" /> <property name="timeToLive" value="100" /> </default> <region name="/MCP/cards/"> <property name="maxNodes" value="3000" /> <property name="minTimeToLive" value="400" /> </region> </eviction> <!-- Cache Passivation for Tree Cache On passivation, The objects are written to the backend store on eviction if passivation is true, otherwise the objects are persisted. On activation, the objects are restored in the memory cache and removed from the cache loader if 'passivation' attribute is true, otherwise the objects are only loaded from the cache loader --> <loaders passivation="true" shared="true"> <!-- if passivation is true, only the first cache loader is used; the rest are ignored --> <loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false"> <properties> cache.jdbc.table.name=jbosscache cache.jdbc.table.create=true cache.jdbc.table.drop=true cache.jdbc.table.primarykey=jbosscache_pk cache.jdbc.fqn.column=fqn cache.jdbc.fqn.type=VARCHAR(255) cache.jdbc.node.column=node cache.jdbc.node.type=blob cache.jdbc.parent.column=parent cache.jdbc.driver=com.informix.jdbc.IfxDriver cache.jdbc.url=jdbc:informix-sqli://<host>:<port1533>/<database>:informixserver=<dbservername> cache.jdbc.user=userid cache.jdbc.password=password </properties> </loader> </loaders> </jbosscache>
Thanks
Atif