2 Replies Latest reply on Sep 18, 2008 10:31 AM by manik

    SQLException while loading node from JDBC CacheLoader

    cacheuser

      I am using JDBCCacheLoader using JBC 3.0 beta1. I am using c3p0 connection pooling library. I am seeing this error if I live the server running overnight and not hitting the cache and then in the morning when I hit the server the error shows up while the application tries to get a node that is present in the cache database. Also the error vanishes after we hit the server few more times, does any body know if this is a of the connection pooling problem ?

      <?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">
      
      
       <locking isolationLevel="REPEATABLE_READ" lockParentForChildInsertRemove="true" lockAcquisitionTimeout="15000" nodeLockingScheme="mvcc"/>
      
       <eviction wakeUpInterval="60000">
       <!-- Cache wide default -->
       <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000">
       <attribute name="maxNodes">5000</attribute>
       <attribute name="timeToLive">1000000</attribute>
       </default>
      
       <region name="/rs/cache" algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000">
       <attribute name="maxNodes">5</attribute>
       <attribute name="timeToLive">1000</attribute>
       </region>
      
       </eviction>
       <loaders passivation="false" shared="true">
       <preload>
       <node fqn="/rs/cache"/>
       </preload>
       <!-- if passivation is true, only the first cache loader is used; the rest are ignored -->
       <loader class="org.jboss.cache.loader.JDBCCacheLoader" async="true" fetchPersistentState="true"
       ignoreModifications="false" purgeOnStartup="false">
       <properties>
       cache.jdbc.table.name=rs_jboss_cache
       cache.jdbc.table.create=false
       cache.jdbc.table.drop=false
       cache.jdbc.table.select=true
       cache.jdbc.table.primarykey=cache_id
       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.parent.type=varchar(255)
       cache.jdbc.driver=com.mysql.jdbc.Driver
       cache.jdbc.url=jdbc:mysql://CACHEDB:3306/jbosscache
       cache.jdbc.user=test
       cache.jdbc.password=test
       cache.jdbc.sql-concat=concat(1,2)
      
       c3p0.minPoolSize=5
       c3p0.maxPoolSize=20
       c3p0.checkoutTimeout=5000
       cache.jdbc.connection.factory=org.jboss.cache.loader.C3p0ConnectionFactory
      
       </properties>
       </loader>
       </loaders>
      
       </jbosscache>
      


      4JLogger.error(Log4JLogger.java:119) - Failed to load node for fqn /rs/cache/key/mydata_false
      java.sql.SQLException: Communication link failure: java.io.EOFException, underlying cause: null

      ** BEGIN NESTED EXCEPTION **

      java.io.EOFException

      STACKTRACE:

      java.io.EOFException
      at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1394)
      at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1538)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1929)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1167)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1278)
      at com.mysql.jdbc.Connection.execSQL(Connection.java:2247)
      at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1586)
      at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
      at org.jboss.cache.loader.AdjListJDBCCacheLoader.loadNode(AdjListJDBCCacheLoader.java:364)
      at org.jboss.cache.loader.AdjListJDBCCacheLoader.get(AdjListJDBCCacheLoader.java:97)
      at org.jboss.cache.loader.AbstractDelegatingCacheLoader.get(AbstractDelegatingCacheLoader.java:74)
      at org.jboss.cache.loader.AsyncCacheLoader.get(AsyncCacheLoader.java:141)
      at org.jboss.cache.interceptors.CacheLoaderInterceptor.loadData(CacheLoaderInterceptor.java:444)
      at org.jboss.cache.interceptors.CacheLoaderInterceptor.loadNode(CacheLoaderInterceptor.java:410)
      at org.jboss.cache.interceptors.CacheLoaderInterceptor.loadIfNeeded(CacheLoaderInterceptor.java:276)
      at org.jboss.cache.interceptors.CacheLoaderInterceptor.visitGetKeyValueCommand(CacheLoaderInterceptor.java:138)
      at org.jboss.cache.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:76)
      at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97)
      at org.jboss.cache.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:112)
      at org.jboss.cache.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:89)
      at org.jboss.cache.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:76)
      at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97)
      at org.jboss.cache.interceptors.TxInterceptor.attachGtxAndPassUpChain(TxInterceptor.java:269)
      at org.jboss.cache.interceptors.TxInterceptor.handleDefault(TxInterceptor.java:256)
      at org.jboss.cache.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:89)
      at org.jboss.cache.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:76)
      at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97)
      at org.jboss.cache.interceptors.CacheMgmtInterceptor.visitGetKeyValueCommand(CacheMgmtInterceptor.java:77)
      at org.jboss.cache.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:76)
      at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97)
      at org.jboss.cache.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:165)

      at org.jboss.cache.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:89)
      at org.jboss.cache.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:76)
      at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97)
      at org.jboss.cache.interceptors.TxInterceptor.attachGtxAndPassUpChain(TxInterceptor.java:269)
      at org.jboss.cache.interceptors.TxInterceptor.handleDefault(TxInterceptor.java:256)
      at org.jboss.cache.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:89)
      at org.jboss.cache.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:76)
      at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97)
      at org.jboss.cache.interceptors.CacheMgmtInterceptor.visitGetKeyValueCommand(CacheMgmtInterceptor.java:77)
      at org.jboss.cache.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:76)
      at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97)
      at org.jboss.cache.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:165)
      at org.jboss.cache.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:115)
      at org.jboss.cache.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:89)
      at org.jboss.cache.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:76)
      at org.jboss.cache.interceptors.InterceptorChain.invoke(InterceptorChain.java:244)
      at org.jboss.cache.invocation.CacheInvocationDelegate.get(CacheInvocationDelegate.java:427)
      at org.jboss.cache.invocation.CacheInvocationDelegate.get(CacheInvocationDelegate.java:432)
      at com.reports.cache.MyCacheServiceImpl.get(MyCacheServiceImpl.java:97)
      at