Добро пожаловать в форум, Guest  >>   Войти | Регистрация | Поиск | Правила | В избранное | Подписаться
Все форумы / Oracle Новый топик    Ответить
 Проблема с Oracle Connection Cache в Tomcat6 после redeploy  [new]
Sotnik D.V.
Member

Откуда:
Сообщений: 1
В приложении используется Oracle Connection Cache и Hibernate 3

Вот context.xml
<Context reloadable="false" crossContext="true">

    <Resource name="jdbc/CROSSEOBusiness"
              auth="Container"
              type="oracle.jdbc.pool.OracleDataSource"
              driverClassName="oracle.jdbc.driver.OracleDriver"
              factory="oracle.jdbc.pool.OracleDataSourceFactory"
              implicitCachingEnabled = "true"
              connectionCachingEnabled="true"
              connectionCacheProperties="{MinLimit=10, InitialLimit=0, ConnectionWaitTimeout=10, MaxLimit=400, InactivityTimeout=120, ValidateConnection=true}"
              url="jdbc:oracle:thin:@dev.dev:1521:CROSSEO2"
              connectionCacheName="CROSSEOBusinessCC"
              user="business"
              password="business"
              />
</Context>

Все нормально до редеплоймента. После редеплоя - "Connection Cache with this Cache Name already exists". Помогает только перезапуск томката.
Есть подозрение, что оракловский кэш переживает андеплой приложения.

Как лечить?


Stacktrace:
	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause 
org.hibernate.exception.GenericJDBCException: Cannot open connection
	org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
	org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
	org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
	org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)
	org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449)
	org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
	org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142)
	org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85)
	org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1353)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	java.lang.reflect.Method.invoke(Method.java:597)
	org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:342)
	$Proxy10.beginTransaction(Unknown Source)
	com.itdevel.seo.userface.SimpleTest.getUsers(SimpleTest.java:25)
	org.apache.jsp.users_jsp._jspService(users_jsp.java:65)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause 
java.sql.SQLException: Кэш соединений с этим именем кэша уже существует
	oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
	oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
	oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
	oracle.jdbc.pool.OracleConnectionCacheManager.createCache(OracleConnectionCacheManager.java:208)
	oracle.jdbc.pool.OracleDataSource.cacheInitialize(OracleDataSource.java:425)
	oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:402)
	oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:189)
	oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:165)
	com.itdevel.seo.userface.tools.OracleImplicitConnectionCacheDriver.getConnection(OracleImplicitConnectionCacheDriver.java:75)
	org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
	org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
	org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142)
	org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85)
	org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1353)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	java.lang.reflect.Method.invoke(Method.java:597)
	org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:342)
	$Proxy10.beginTransaction(Unknown Source)
	com.itdevel.seo.userface.SimpleTest.getUsers(SimpleTest.java:25)
	org.apache.jsp.users_jsp._jspService(users_jsp.java:65)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

Заранее спасибо
6 апр 09, 21:38    [7029371]     Ответить | Цитировать Сообщить модератору
Все форумы / Oracle Ответить