-
1. Re: JDBCCacheLoader puts data but will not get it back from
belaban Apr 12, 2005 2:25 AM (in response to ryanjoe)Do you have a unit test ? Actually, try running the JDBCCacheLoaderTest in the testsuite under WebLogic to see whether this works ? This case is certianly covered.
-
2. Re: JDBCCacheLoader puts data but will not get it back from
ryanjoe Apr 12, 2005 2:03 PM (in response to ryanjoe)My database is getting populated when I add new nodes. I have added a CacheListener and I notice that although my LRU eviction policy shows items being removed from memory - (1) The eviction callback does not fire consistently (2) Items requested that have been evicted that are in the database comback as follows:Key=jboss:internal:uninitialized
Value=null
Lastly I removed a node and got this on the console:
Removing entire node /1 from cache
Removed node
org.jboss.cache.eviction.EvictionException: LRUAlgorithm.removeFromQueue(): internal error. Can't find fqn in nodeMap. f
qn: /1
at org.jboss.cache.eviction.LRUAlgorithm.removeFromQueue(LRUAlgorithm.java:216)
at org.jboss.cache.eviction.LRUAlgorithm.processRemovedNodes(LRUAlgorithm.java:108)
at org.jboss.cache.eviction.LRUAlgorithm.processQueues(LRUAlgorithm.java:81)
at org.jboss.cache.eviction.LRUAlgorithm.process(LRUAlgorithm.java:51)
at org.jboss.cache.eviction.EvictionTimerTask.run(EvictionTimerTask.java:35)
at java.util.TimerThread.mainLoop(Timer.java:432)
at java.util.TimerThread.run(Timer.java:382)
Any ideas ?
thanks
Joe -
3. Re: JDBCCacheLoader puts data but will not get it back from
mariuszs May 12, 2009 3:37 AM (in response to ryanjoe)09:31:16,248 INFO [ManagementService] >>>>>> Cache: JBossCache 'Naga' 3.0.2.GA 09:31:16,287 ERROR [JDBCCacheLoader] Failed to insert node :DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610, SQLERRMC=null, DRIVER=3.52.95 09:31:16,289 ERROR [ManagementService] Putting to cache error: org.jboss.cache.CacheException: com.ibm.db2.jcc.a.nn: DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610, SQLERRMC=null, DRIVER=3.52.95
I have problem with storing/accessing data from db2. Im using jboss501 -
4. Re: JDBCCacheLoader puts data but will not get it back from
manik May 12, 2009 5:29 AM (in response to ryanjoe)Could you enable TRACE level logging on org.jboss.cache.loader so that we can see the SQL that is being generated?
-
5. Re: JDBCCacheLoader puts data but will not get it back from
mariuszs May 12, 2009 5:50 AM (in response to ryanjoe)Yes, i can. Thx for reply. I found than sql like this
INSERT INTO JBOSSCACHE (FQN,NODE,PARENT) SELECT "/", null, "/" FROM JBOSSCACHE_D WHERE NOT EXISTS (SELECT FQN FROM JBOSSCACHE WHERE FQN = "/");
is not workign in db2. -
6. Re: JDBCCacheLoader puts data but will not get it back from
mariuszs May 12, 2009 5:58 AM (in response to ryanjoe)11:57:29,710 TRACE [NonManagedConnectionFactory] using connection: com.ibm.db2.jcc.t4.b@2fb7b837 11:57:29,710 TRACE [JDBCCacheLoader] Executing SQL statement [INSERT INTO jbosscache (fqn, node, parent) SELECT ?, ?, ? FROM jbosscache_D WHERE NOT EXISTS (SELECT fqn FROM jbosscache WHERE fqn = ?)] 11:57:29,713 ERROR [JDBCCacheLoader] Failed to insert node :DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610, SQLERRMC=null, DRIVER=3.52.95 11:57:29,714 TRACE [NonManagedConnectionFactory] closed non tx connection: com.ibm.db2.jcc.t4.b@2fb7b837
-
7. Re: JDBCCacheLoader puts data but will not get it back from
mariuszs May 12, 2009 6:00 AM (in response to ryanjoe)This error code mean:
A STATEMENT STRING TO BE PREPARED CONTAINS AN INVALID USE
OF PARAMETER MARKERS
A parameter marker is not allowed. -
8. Re: JDBCCacheLoader puts data but will not get it back from
manik May 12, 2009 6:21 AM (in response to ryanjoe)Sorry, I don't actually have a DB2 environment to test on.
Do you know what characters DB2 refers to as 'parameter markers'? -
9. Re: JDBCCacheLoader puts data but will not get it back from
mariuszs May 12, 2009 7:06 AM (in response to ryanjoe)? - parameter marker
I think this is about last ? in subquery. Could we use simpler form of this sql, without jbosscache_d involved? -
10. Restrictions on parameter marker usage
mariuszs May 12, 2009 7:16 AM (in response to ryanjoe)Untyped parameter marker location Data type
Expression: Alone in a select list Error
Expression: Both operands of an arithmetic operator Error
Predicate: Left-hand side operand of an IN predicate Error
Predicate: Both operands of a relational operator Error
Function: Operand of an aggregation function Error
http://publib.boulder.ibm.com/infocenter/iwedhelp/v6r0/index.jsp?topic=/com.ibm.db2e.doc/dbeapr0815.html -
11. Re: JDBCCacheLoader puts data but will not get it back from
mariuszs May 12, 2009 7:25 AM (in response to ryanjoe)OK, I found that this is not working too (invalid marker usage)
INSERT INTO db2jboss.JBOSSCACHE (fqn,node,parent) SELECT ?,?,? FROM db2jboss.JBOSSCACHE_D WHERE NOT EXISTS (SELECT fqn FROM db2jboss.JBOSSCACHE WHERE fqn = '/Cache')