• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Apache/Tomcat - Connection Pool Objects Issue

 
Venkat Srini
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are facing this problem during implementation. Please find below the description:-

Environment : - JDK 1.3.1_04 and Tomcat 4.1.27/Apache.

We were earlier using classes111.jar. We noticed that there was a bug regarding number of attempts (i.e.) Even after only one unsuccessful attempt, the account gets locked out. Hence we have used classes12.jar (suited for all operating systems using JDK 1.3).

We have made following changes in /local/apps/jakarta-tomcat-4.1.27/bin.

startup.sh -

PATH=/local/apps/jakarta-tomcat-4.1.27/webapps/classes12.jar:$PATH export PATH

setclasspath.sh -

CLASSPATH="$JAVA_HOME"/lib/tools.jar

Even after this change, the account gets locked out after only one unsuccessful attempt. So we concluded that the classes12.jar is not getting effectively accessed. Hence we attempted introducing the classes12.jar in the classpath. The changes were:-

startup.sh - (File was not modified)

PATH=/local/apps/jakarta-tomcat-4.1.27/webapps/classes12.jar:$PATH export PATH

setclasspath.sh - (classes12.jar appended to CLASSPATH)

CLASSPATH="$JAVA_HOME"/lib/tools.jar:/local/apps/ej/jdbc/classes12.jar

Now, the web page throws an exception on submitting authentication. It's not able to get ORACLE connection pool objects.

javax.servlet.ServletException: Servlet execution threw an exception
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.(Compiled Code)
at java.lang.Exception.(Compiled Code)
at javax.servlet.ServletException.(ServletException.java:132)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
...


root cause

java.lang.NoClassDefFoundError: javax/naming/Referenceable
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass0(Compiled Code)
at java.lang.ClassLoader.defineClass(Compiled Code)
at java.security.SecureClassLoader.defineClass(Compiled Code)
at java.net.URLClassLoader.defineClass(Compiled Code)
at java.net.URLClassLoader.access$1(Compiled Code)
at java.net.URLClassLoader$1.run(Compiled Code)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessController.doPrivileged(Compiled Code)
at java.net.URLClassLoader.findClass(Compiled Code)
at java.lang.ClassLoader.loadClass(Compiled Code)
at sun.misc.Launcher$AppClassLoader.loadClass(Compiled Code)
at java.lang.ClassLoader.loadClass(Compiled Code)
at org.apache.catalina.loader.WebappClassLoader.loadClass(Compiled Code)
at org.apache.catalina.loader.WebappClassLoader.loadClass(Compiled Code)
at java.lang.ClassLoader.loadClassInternal(Compiled Code)
at DbConnection.getConnection(DbConnection.java:80)
at PageController.service(PageController.java:54)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.

The catalina.out Log file of the Apache/Tomcat comes up with the following log:

Connection is successfully established //Message in the program
[INFO] JkCoyoteHandler - -RESET //Failure to get connection objects
INSIDE SERVICE : //Message in the program
INSIDE SERVICE :

Before this implementation, this used to give the following messages (i.e.) when it was successful.

Connection is successfully established //Message in the program
Active size when conn freed 0 //Successfully assigning connection objects
Cached size when conn freed 10 //Successfully assigning connection objects
INSIDE SERVICE : //Message in the program

The problem is that the connection pool objects don't get assigned. The only change we made was to the classpath.sh to introduce classes12.jar to the CLASSPATH variable.

Can someone help us out? This issue is outstanding for a while in production.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic