[jboss-user] [JBossCache] - JDBCCacheLoader problem in java application

gmeroz do-not-reply at jboss.com
Thu Nov 1 12:35:37 EDT 2007


in version 2.0.0GA

When i use JDBCCacheLoader inside JBossAS it wokrs fine, but when 
i try to run the same code from a regular java Main class it fails with the following exception. i seems that some connections are not closed.


  | ....
  | added 85 dummy node to Jboss cache.
  | added 86 dummy node to Jboss cache.
  | 18:15:52,164 ERROR [NonManagedConnectionFactory] Failed to get connection for url=jdbc:oracle:thin:@dbms01:1521:besapp, user=GGGG, password=gggg
  | java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
  | 	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
  | 	at oracle.jdbc.driver.DatabaseError.throwSqlException
  | ...
  | ...
  | 	at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:563)
  | 	at java.sql.DriverManager.getConnection(DriverManager.java:582)
  | 	at java.sql.DriverManager.getConnection(DriverManager.java:185)
  | 	at org.jboss.cache.loader.NonManagedConnectionFactory.checkoutConnection(NonManagedConnectionFactory.java:99)
  | 	at org.jboss.cache.loader.NonManagedConnectionFactory.getConnection(NonManagedConnectionFactory.java:80)
  | 	at org.jboss.cache.loader.AdjListJDBCCacheLoader.loadNode(AdjListJDBCCacheLoader.java:373)
  | 	at org.jboss.cache.loader.AdjListJDBCCacheLoader.get(AdjListJDBCCacheLoader.java:97)
  | 	at org.jboss.cache.interceptors.CacheLoaderInterceptor.loadData(CacheLoaderInterceptor.java:530)
  | 	at org.jboss.cache.interceptors.CacheLoaderInterceptor.loadNode(CacheLoaderInterceptor.java:408)
  | 	at org.jboss.cache.interceptors.CacheLoaderInterceptor.loadIfNeeded(CacheLoaderInterceptor.java:210)
  | 	at org.jboss.cache.interceptors.CacheLoaderInterceptor.invoke(CacheLoaderInterceptor.java:157)
  | 	at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
  | 	at org.jboss.cache.interceptors.UnlockInterceptor.invoke(UnlockInterceptor.java:37)
  | 	at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
  | 	at org.jboss.cache.interceptors.PessimisticLockInterceptor.invoke(PessimisticLockInterceptor.java:203)
  | 	at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
  | 	at org.jboss.cache.interceptors.NotificationInterceptor.invoke(NotificationInterceptor.java:32)
  | 	at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
  | 	at org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterceptor.java:298)
  | 	at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:131)
  | 	at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
  | 	at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:81)
  | 	at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
  | 	at org.jboss.cache.interceptors.InvocationContextInterceptor.invoke(InvocationContextInterceptor.java:62)
  | 	at org.jboss.cache.CacheImpl.invokeMethod(CacheImpl.java:3939)
  | 	at org.jboss.cache.CacheImpl.get(CacheImpl.java:1441)
  | 	at org.jboss.cache.CacheImpl.get(CacheImpl.java:1415)
  | 	at org.jboss.cache.pojo.impl.InternalHelper.get(InternalHelper.java:92)
  | 	at org.jboss.cache.pojo.impl.InternalHelper.getPojoInstance(InternalHelper.java:38)
  | 	at org.jboss.cache.pojo.impl.InternalHelper.getPojo(InternalHelper.java:198)
  | 	at org.jboss.cache.pojo.impl.PojoCacheDelegate.putObjectII(PojoCacheDelegate.java:131)
  | 	at org.jboss.cache.pojo.impl.PojoCacheImpl.putObject(PojoCacheImpl.java:136)
  | 	at org.jboss.cache.pojo.impl.PojoCacheImpl.org$jboss$cache$pojo$impl$PojoCacheImpl$attach$aop(PojoCacheImpl.java:101)
  | 	at org.jboss.cache.pojo.impl.PojoCacheImpl.attach(PojoCacheImpl.java)
  | 	at org.jboss.cache.pojo.impl.PojoCacheImpl.attach(PojoCacheImpl.java:93)
  | 	at JDBCCacheTest.main(JDBCCacheTest.java:10)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100983#4100983

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100983



More information about the jboss-user mailing list