I'm using classes12.jar for connection pooling in our application. There is a screen which, on clicking, redirects to an error page.
When I checked the server logs I got the exception shown below. The error is coming from our db connection manager (PAYTFDbBase.java).
This class contains getConnection() returns a connection object and calls getConnDetails() where the parameters are read. These two methods are listed below.
It used to occur like once in a blue moon and when it comes infra team restarts the server and the issue is gone.
But but recently it has been occurring much more frequently.
I've checked classes12.jar is inside WEB-INF\lib folder.
All other upload screens work going through the same connection manager is working correctly
java.lang.NoClassDefFoundError:
oracle/jdbc/pool/OracleConnectionCacheImpl at
com.arch.PAYTFDbBase.getConnDetails(PAYTFDbBase.java:787)
at
com.arch.PAYTFDbBase.getConnection(PAYTFDbBase.java:180)
at
com.reports.client.PAYLIQUIDUploadJavaBean.getRecords(PAYLIQUIDUploadJavaBean.java:72)
at
jsp_servlet._core.__payliquiduploadfiles._jspService(__payliquiduploadfiles.java:334)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at
weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
at
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3732)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
at
weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
at
weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256) at
weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
here is connection manager class method which are used for getting connection object.
protected Connection getConnection()
{
if(con == null || con.isClosed())
{
con = getConnDetails();
con.setAutoCommit(false);
}
return con;
SQLException se;
se;
printIt((new StringBuilder("SQLException in getConnection() :")).append(se).toString());
return con;
}
protected Connection getConnDetails()
{
try
{
InitialContext ic = new InitialContext();
DataSource ds = (DataSource)ic.lookup("jdbc/OracleCoreDS");
con = ds.getConnection();
}
catch(Exception exception) { }
if(con != null)
break MISSING_BLOCK_LABEL_264;
boolean data1;
if(encriptFlag.equalsIgnoreCase("Y"))
data1 = getEncrypData();
else
data1 = getPropData();
try
{
cpds = new OracleConnectionPoolDataSource();
cpds.setDriverType("thin");
cpds.setNetworkProtocol("tcp");
cpds.setServerName(mcName);
cpds.setDatabaseName(sid);
cpds.setPortNumber(Integer.parseInt(port));
cpds.setUser(UserName);
cpds.setPassword(pwd);
ocacheimpl = new OracleConnectionCacheImpl(cpds);
ocacheimpl.setMaxLimit(8);
ocacheimpl.setMinLimit(1);
ocacheimpl.setCacheScheme(1);
}
catch(SQLException sqlEx)
{
printIt((new StringBuilder("PAYTFDbBase SQLException getConnDetails():")).append(sqlEx).toString());
}
catch(Exception ex)
{
printIt((new StringBuilder(":2:PAYTFDbBase Exception getConnDetails():")).append(ex).toString());
}
return ocacheimpl.getConnection();
Exception sqlex;
sqlex;
printIt((new StringBuilder("PAYTFDbBase Exception in connection():")).append(sqlex).toString());
return con;
}