tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ariela Carrera <>
Subject Re: Re: Tomcat 6 unstable
Date Mon, 24 Nov 2008 17:40:40 GMT
Hello Tomcat world users. This is the reply for all people who replies me. Thank you all. My
apologies if the english i write sounds "rude", but i am not very good with english or Tomcat
neither :D
I speak spanish, so don't be mad with me, specially Antonio Petrelli.
Answering to Hassan Schroeder: Thanks for your answer Hassan.
Specifying when and how Tomcat doesn't work for me:

1) The servlet loading problem happens when I startup Tomcat, manually, as I always do, showing
the exception:

java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
    java.lang.ClassLoader.defineClass1(Native Method)
    java.lang.ClassLoader.defineClass($000($ Method)




And when I shutdown Tomcat and then startup it again, only sometimes my servlet is loaded.
In other times, Tomcat load my servlet perfectly, just doing the same.

2) When the first problem does not happen, the http session works unproperly, and some attributes
of the session are made null, in this case, Tomcat throws the NullPointerException, but if
I reload the jsp everything is ok.

Files with the source code of the servlet (, a jsp and the connection class (works
in a package called peerca) are attached.
Answering now to Matthew Chamber, and giving thanks for the reply:
1) About the web.xml: I include the web.xml file in the attachments. 
2) About an earlier Tomcat: I just downloaded the 6.0.18 version and it's running
ok (but I have not put my webapp there yet). 
3) About the db2 jdbc driver, well, it is allocated in many paths... 


¿Can this cause troubles? Where exactly I need to put this file, taking into account I need
driver be avalaible for other java aplications, not only for tomcat webapps?

4) About using war file: I am not using any war file, I just use the folder with the name
of the app put it into webapps.
5) About running Tomcat as root user: can this cause troubles too? Do I need to running it
as the common user? What kind of properties (chmod) does the CATALINA_HOME need to work in
many users without running as a root?

Answering David Smith: thanks for the reply. I am using the binary version 6.0.14 available
on Tomcat website, but Matthew recommended me to use an earlier one, the 6.0.18. This one
I will use from now go on. I am not using any Eclipse, I just write manually my codes and
the follow the folder structure of a webapp into webapps folder. Servlet api is where you
said, as always does: into CATALINA_HOME/lib.

About the nulls: yes, I already check for null values before use it, but is like the session
delete it from nowhere, without reasons. 


Now I just try with the 6.0.18 and I will put my webapp there. The only error is with DB2
connections, although the session has the connection, this is not null but when i tried to
list the tables some error happens:
------------------ DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=DB2INST1.AM_BASE_TASKS,
        at peerca.Conexion.setResultado(
        at peerca.Conexion.getTablas(
        at org.apache.jsp.peericadd_jsp._jspService(
        at org.apache.jasper.runtime.HttpJspBase.service(
        at javax.servlet.http.HttpServlet.service(
        at org.apache.jasper.servlet.JspServletWrapper.service(
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(
        at org.apache.jasper.servlet.JspServlet.service(
        at javax.servlet.http.HttpServlet.service(
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(
        at org.apache.catalina.core.StandardWrapperValve.invoke(
        at org.apache.catalina.core.StandardContextValve.invoke(
        at org.apache.catalina.core.StandardHostValve.invoke(
        at org.apache.catalina.valves.ErrorReportValve.invoke(
        at org.apache.catalina.core.StandardEngineValve.invoke(
        at org.apache.catalina.connector.CoyoteAdapter.service(
        at org.apache.coyote.http11.Http11Processor.process(
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
and this error did not happen in the older version... any ideas? Where the db2jcc.jar needs
to be, to be available for all my applications in java (not only in Tomcat).

The idea I have is to create a pool of connections. I read the concept but now I need to implement
it. Is Tomcat deal with the pool or I need to ask help in DB2 forums ?
If anybody know how to create a pooling, please reply.

Thanks for all your help. Best regards,


      Premios MTV 2008¡En exclusiva! Fotos, nominados, videos, y mucho más! Mira aquí
View raw message