tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ariela Carrera <jabaliacuat...@yahoo.com.ar>
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(ClassLoader.java:620)

    java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    java.net.URLClassLoader.access$000(URLClassLoader.java:56)
    java.net.URLClassLoader$1.run(URLClassLoader.java:195)

    java.security.AccessController.doPrivileged(Native Method)
    java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)

    java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1273)
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)

    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)

    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    java.lang.Thread.run(Thread.java:619)

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 (Login.java), 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 catalina.sh 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... 

JAVA_HOME/jdk/jre/lib/ext/db2jcc.jar
CATALINA_HOME/lib/db2jcc.jar
CATALINA_HOME/webapps/cqaex/db2jcc.jar
CATALINA_HOME/webapps/peerca/WEB-INF/lib/db2jcc.jar
DB2_HOME/V9.5/java/db2jcc.jar

¿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:
------------------
com.ibm.db2.jcc.b.nm: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=DB2INST1.AM_BASE_TASKS,
DRIVER=3.50.152
        at com.ibm.db2.jcc.b.wc.a(wc.java:579)
        at com.ibm.db2.jcc.b.wc.a(wc.java:57)
        at com.ibm.db2.jcc.b.wc.a(wc.java:126)
        at com.ibm.db2.jcc.b.tk.c(tk.java:1901)
        at com.ibm.db2.jcc.b.tk.d(tk.java:1889)
        at com.ibm.db2.jcc.b.tk.a(tk.java:1416)
        at com.ibm.db2.jcc.t4.db.g(db.java:138)
        at com.ibm.db2.jcc.t4.db.a(db.java:38)
        at com.ibm.db2.jcc.t4.t.a(t.java:32)
        at com.ibm.db2.jcc.t4.sb.h(sb.java:141)
        at com.ibm.db2.jcc.b.tk.N(tk.java:1387)
        at com.ibm.db2.jcc.b.tk.a(tk.java:2215)
        at com.ibm.db2.jcc.b.tk.e(tk.java:866)
        at com.ibm.db2.jcc.b.tk.execute(tk.java:850)
        at peerca.Conexion.setResultado(Conexion.java:354)
        at peerca.Conexion.getTablas(Conexion.java:802)
        at org.apache.jsp.peericadd_jsp._jspService(peericadd_jsp.java:160)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)
-----------
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,

Ariela



      Premios MTV 2008¡En exclusiva! Fotos, nominados, videos, y mucho más! Mira aquí http://mtvla.yahoo.com/
Mime
View raw message