Re: Connectors and apache with mpm worker

2008-11-24 Thread Martin Spinassi
On Sat, 2008-11-22 at 19:10 +0100, Rainer Jung wrote:
 Martin Spinassi schrieb:
  On Fri, 2008-11-21 at 12:12 -0700, Filip Hanik - Dev Lists wrote:
  remove this
 
  worker.maintain=30
  worker.worker1.connection_pool_size=1
 
 
  for now, and just accept the defaults
 
  Filip
 
  
  
  Wow!! That just made the trick!
  
  
  Please, can you explain me how those changes affects?
 
 Each Apache process has a private connection pool associated with each
 AJP13 worker. The size of the pool is determined automatically during
 startup. By default it is set to the number of threads in the process.
 
 You decided to overwrite the pool size to 1 :(
 
 The connection_pool_size attribute is only needed for other web servers
 like IIS or Sun/Netscape, because we can't determine a useful pool size
 automatically for them,
 
 Please read the explanation of connection_pool_size on
 
 http://tomcat.apache.org/connectors-doc/reference/workers.html
 
 Where did you get the value 1 from?
 
 Regards,
 
 Rainer
 


Thanks for the explain Rainer.


May be I just misunderstood the last paragraph at the description of
connection_pool_size:


Do not use connection_pool_size with values higher then 1 on Apache 2.x
prefork or Apache 1.3.x!




Thanks again for your responses.




Martín


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



tomcat 5.5.20 security issue

2008-11-24 Thread aymen83

Hi,

I’m trying to run a web service on tomcat 5.5.20 but I have this error. I’m
not expert in tomcat so if someone can help me?

 

java.lang.NoClassDefFoundError:
com/sun/org/apache/xml/internal/security/Init

at
com.sun.xml.wss.impl.SecurableSoapMessage.clinit(SecurableSoapMessage.java:75)

at
com.sun.xml.wss.ProcessingContext.setSOAPMessage(ProcessingContext.java:198)

at
com.sun.xml.wss.impl.misc.XWSSProcessor2_0Impl.createProcessingContext(XWSSProcessor2_0Impl.java:132)

at
org.springframework.ws.soap.security.xwss.XwsSecurityInterceptor.validateMessage(XwsSecurityInterceptor.java:159)

at
org.springframework.ws.soap.security.AbstractWsSecurityInterceptor.handleRequest(AbstractWsSecurityInterceptor.java:104)

at
org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:208)

at
org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:163)

at
org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:88)

at
org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57)

at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)

at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)

at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:523)

at
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:463)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)

at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)

at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)

at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)

at
org.apache.catalina.valves.RequestDumperValve.invoke(RequestDumperValve.java:150)

at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)

at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)

at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)

at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

at java.lang.Thread.run(Thread.java:595)
thanks in advance
-- 
View this message in context: 
http://www.nabble.com/tomcat-5.5.20-security-issue-tp20661073p20661073.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat 5.5.20 security issue

2008-11-24 Thread Serge Fonville
Just a few questions off the top off my head:Where do you get the error
How did you configure tomcat
When do you get the error
What applications do you already have
What is your OS
What is the end goal you want
What variables have you set
Why tomcat 5.5.20 (instead of 6)

It seems a library can not be found.
Are all the required libraries installed in the tomcat lib directory or in
your WEB_INF/lib?

Regards,

Serge Fonville

On Mon, Nov 24, 2008 at 2:45 PM, aymen83 [EMAIL PROTECTED] wrote:


 Hi,

 I'm trying to run a web service on tomcat 5.5.20 but I have this error. I'm
 not expert in tomcat so if someone can help me?



 java.lang.NoClassDefFoundError:
 com/sun/org/apache/xml/internal/security/Init

at

 com.sun.xml.wss.impl.SecurableSoapMessage.clinit(SecurableSoapMessage.java:75)

at

 com.sun.xml.wss.ProcessingContext.setSOAPMessage(ProcessingContext.java:198)

at

 com.sun.xml.wss.impl.misc.XWSSProcessor2_0Impl.createProcessingContext(XWSSProcessor2_0Impl.java:132)

at

 org.springframework.ws.soap.security.xwss.XwsSecurityInterceptor.validateMessage(XwsSecurityInterceptor.java:159)

at

 org.springframework.ws.soap.security.AbstractWsSecurityInterceptor.handleRequest(AbstractWsSecurityInterceptor.java:104)

at

 org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:208)

at

 org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:163)

at

 org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:88)

at

 org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57)

at

 org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)

at

 org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)

at

 org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:523)

at

 org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:463)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

at

 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)

at

 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

at

 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

at

 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)

at

 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)

at

 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

at

 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)

at

 org.apache.catalina.valves.RequestDumperValve.invoke(RequestDumperValve.java:150)

at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)

at

 org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)

at

 org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

at

 org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)

at

 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

at java.lang.Thread.run(Thread.java:595)
 thanks in advance
 --
 View this message in context:
 http://www.nabble.com/tomcat-5.5.20-security-issue-tp20661073p20661073.html
 Sent from the Tomcat - User mailing list archive at Nabble.com.


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




RE: tomcat 5.5.20 security issue

2008-11-24 Thread BEN HMIDA aymen
It's for now the web server used by my compagny we entend to migrate to 6.x. My 
purpose is to test a web service using SOAP-ui. So when I test the web service 
on my machine it worked but when tested remotely there's an error when I send a 
request with SOAP-UI 

-Message d'origine-
De : Serge Fonville [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 24 novembre 2008 14:52
À : Tomcat Users List
Objet : Re: tomcat 5.5.20 security issue

Just a few questions off the top off my head:Where do you get the error
How did you configure tomcat
When do you get the error
What applications do you already have
What is your OS
What is the end goal you want
What variables have you set
Why tomcat 5.5.20 (instead of 6)

It seems a library can not be found.
Are all the required libraries installed in the tomcat lib directory or in
your WEB_INF/lib?

Regards,

Serge Fonville

On Mon, Nov 24, 2008 at 2:45 PM, aymen83 [EMAIL PROTECTED] wrote:


 Hi,

 I'm trying to run a web service on tomcat 5.5.20 but I have this error. I'm
 not expert in tomcat so if someone can help me?



 java.lang.NoClassDefFoundError:
 com/sun/org/apache/xml/internal/security/Init

at

 com.sun.xml.wss.impl.SecurableSoapMessage.clinit(SecurableSoapMessage.java:75)

at

 com.sun.xml.wss.ProcessingContext.setSOAPMessage(ProcessingContext.java:198)

at

 com.sun.xml.wss.impl.misc.XWSSProcessor2_0Impl.createProcessingContext(XWSSProcessor2_0Impl.java:132)

at

 org.springframework.ws.soap.security.xwss.XwsSecurityInterceptor.validateMessage(XwsSecurityInterceptor.java:159)

at

 org.springframework.ws.soap.security.AbstractWsSecurityInterceptor.handleRequest(AbstractWsSecurityInterceptor.java:104)

at

 org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:208)

at

 org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:163)

at

 org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:88)

at

 org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57)

at

 org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)

at

 org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)

at

 org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:523)

at

 org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:463)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

at

 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)

at

 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

at

 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

at

 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)

at

 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)

at

 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

at

 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)

at

 org.apache.catalina.valves.RequestDumperValve.invoke(RequestDumperValve.java:150)

at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)

at

 org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)

at

 org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

at

 org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)

at

 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

at java.lang.Thread.run(Thread.java:595)
 thanks in advance
 --
 View this message in context:
 http://www.nabble.com/tomcat-5.5.20-security-issue-tp20661073p20661073.html
 Sent from the Tomcat - User mailing list archive at Nabble.com.


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat 5.5.20 security issue

2008-11-24 Thread Peter Crowther
 From: Serge Fonville [mailto:[EMAIL PROTECTED]
 Just a few questions off the top off my head:

... and to add another one:

 What is your OS

What is your Java virtual machine?  In particular, are you using a non-Sun JVM 
such as GCJ?

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat 5.5.20 security issue

2008-11-24 Thread BEN HMIDA aymen
I'm using sun jvm 1.5 and the os is windows XP 

-Message d'origine-
De : Peter Crowther [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 24 novembre 2008 14:59
À : 'Tomcat Users List'
Objet : RE: tomcat 5.5.20 security issue

 From: Serge Fonville [mailto:[EMAIL PROTECTED]
 Just a few questions off the top off my head:

... and to add another one:

 What is your OS

What is your Java virtual machine?  In particular, are you using a non-Sun JVM 
such as GCJ?

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6 unstable

2008-11-24 Thread David Smith
I highly doubt Tomcat is unstable.  If anything, your webapp is
unstable.  Is your tomcat install from the Ubuntu distribution or from
Apache Tomcat's website?

 I tried to create the folder CATALINAHOME/common/lib (version 6 brings no 
 folder) and there copying the jar needed.

Folder structure changed from tomcat 5.x to 6.x.  Tomcat 6 only has
$CATALINA_HOME/lib and it should already have all that's needed to run
except maybe your db2 jdbc driver.

 I tried editing the setclaspath.sh, since in the first few lines, what it 
 does is literally erasing the entire class that has ... Well, there was a 
 CLASSPATH =  and it changed by a CLASSPATH = $ CLASSPATH, this way it is 
 not deleting the old value of the variable.

Don't ever change the classpath.  You are asking for worlds of pain and
suffering with strange, near impossible to trace errors.  Put this back
the way you found it.

 java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet

Can you describe the circumstances around this more?  Was it from within
Eclipse?  Did you move servlet-api.jar from $CATALINA_HOME/lib where it
belongs?

 java.lang.NullPointerException
 
 org.apache.jsp.query_002dadd_002d2_jsp._jspService(query_002dadd_002d2_jsp.java:107)

In your JSP, you are trying to access properties/methods of a null
object.  Test for null first.

--David




Ariela Carrera wrote:
 Hi dear users of Tomcat.

 I am writing to you because my webapp is not working fine. I am developing a 
 web application with Java, a Servlet and JSP some in Tomcat 6.0.14, using 
 Ubuntu Gutsy. I have developed a class that connects to DB2, which I tested 
 plenty of times, with a kind of test, for console. The kind of connection is 
 working properly.

 THE PROBLEM:
 Although it always starts well, charging that brings all the examples of jsp 
 and servlet correctly, TOMCAT feature when you want,
 1) Loading or not my servlet,
 2) Losing or no connections to DB2, and 
 3) Making nulls or not, values in the http-Sesions. 

 Without having made any changes in the source code, Tomcat sometimes do works 
 and sometimes do not.

 SOLUTIONS I TRIED:
 - I tried to start adding the-Xmx but I do not see differences. Tomcat also 
 remains unstable.
 - I tried to create the folder CATALINAHOME/common/lib (version 6 brings no 
 folder) and there copying the jar needed. I continue as before.
 - I tried editing the setclaspath.sh, since in the first few lines, what it 
 does is literally erasing the entire class that has ... Well, there was a 
 CLASSPATH =  and it changed by a CLASSPATH = $ CLASSPATH, this way it is 
 not deleting the old value of the variable.
 - I tried booting java as a server with the-server.

 What else can I try? I accept any suggestion

 DETAILS

 What am I using?
 JAVA VERSION: $ java-version
 Java (TM) SE Runtime Environment (build 1.6.0_02-B05)
 Java HotSpot (TM) Client VM (build 1.6.0_02-B05, mixed mode)

 Javac VERSION: $ javac-version
 javac 1.6.0_02

 By starting TOMCAT: $ sudo /opt/apache-tomcat-6.0.14/bin/./startup.sh
 Using CATALINA_BASE: /opt/apache-tomcat-6.0.14
 Using CATALINA_HOME: /opt/apache-tomcat-6.0.14
 Using CATALINA_TMPDIR: /opt/apache-tomcat-6.0.14/temp
 Using JRE_HOME: /opt/java/jdk/jre

 OUTPUT FOR PROBLEM 1)
 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)

 OUTPUT FOR PROBLEMS 2) and 3)
 org.apache.jasper.JasperException: java.lang.NullPointerException
 
 org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:541)
 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:435)

 

Re: Tomcat 6 unstable

2008-11-24 Thread Antonio
2008/11/24 Ariela Carrera [EMAIL PROTECTED]:
 If you had any idea why Tomcat is so unstable, please answer me.

Yes I have an idea: Tomcat is unstable because your environment is a
complete mess.
Before saying that Tomcat is rubbish in such a rude way, check if your
stuff works.

Best regards
Antonio

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Apache 2.2.3 with mod_jk 1.20 loosing connection with a cluster of two Tomcat 6.0.10

2008-11-24 Thread Éric Gauthier
Hello,

My application server running Apache HTTP Server 2.2.3 as a front end with 
mod_jk 1.20 to transfer request in AJP to a cluster of two Tomcat 6.0.10 
instances is getting Connecting to tomcat failed. errors within the mod_jk 
logs on a random basis. The whole cluster runs on a Windows Server 2003 Release 
2, which is itself a virtual machine running under VMWare ESX 3.2.

The cluster runs applications for an intranet and some specific users accesses 
it via the extranet. The whole thing is not public on the internet.

The whole cluster can run properly for a week and then going down as much as 
three times in the same day. I assume this is not traffic related since the 
issue occured at times of day where no one is at the office (very early in the 
morning).

When this happens to the first instance of Tomcat, the second one goes down 
seconds after. Restarting Apache HTTP server nor Tomcat services fixes the 
issue. I need a complete reboot of the server.

I cannot see anything relevant in the Tomcat logs.

However, in JConsole, when it occurs I can see the total threads of both tomcat 
instances rising up to 1000 (it normally floats aroung 200 / 250 total  
threads) even if the number of active threads stays the same (150). As if 
threads were created/deleted/created... and so on very quickly.

There is a strange behaviour: When it occurs, obviously I cannot access the 
applications via Apache HTTP server since it says Service Temporarily 
Unavailable but if I try to access directly both Tomcat on their HTTP 
connector, pages shows but with incomplete parts, sometimes pictures are 
missing, sometimes HTML is incomplete.

I assume this is a Tomcat issue since the threads are going berserk, but I am 
unsure at this point.

No need to say that my goal is to prevent all of this from happening...

Here is what's dumped in mod_jk.log:

[Tue Nov 04 09:40:09 2008] TC1 applications.labvolt.ca 2.135721
[Tue Nov 04 09:40:09 2008] [1304:2444] [info]  mod_jk.c (2142): Service error=0 
for worker=TC1
[Tue Nov 04 09:40:27 2008] [1304:2444] [info]  jk_connect.c (451): connect to 
127.0.0.1:8013 failed with errno=61
[Tue Nov 04 09:40:27 2008] [1304:2444] [info]  jk_ajp_common.c (873): Failed 
opening socket to (127.0.0.1:8013) with (errno=61)
[Tue Nov 04 09:40:27 2008] [1304:2444] [info]  jk_ajp_common.c (1259): (TC1) 
error connecting to the backend server (errno=61)
[Tue Nov 04 09:40:27 2008] [1304:2444] [info]  jk_ajp_common.c (1916): (TC1) 
sending request to tomcat failed,  recoverable operation attempt=1
[Tue Nov 04 09:40:28 2008] [1304:2444] [info]  jk_connect.c (451): connect to 
127.0.0.1:8013 failed with errno=61
[Tue Nov 04 09:40:28 2008] [1304:2444] [info]  jk_ajp_common.c (873): Failed 
opening socket to (127.0.0.1:8013) with (errno=61)
[Tue Nov 04 09:40:28 2008] [1304:2444] [info]  jk_ajp_common.c (1259): (TC1) 
error connecting to the backend server (errno=61)
[Tue Nov 04 09:40:28 2008] [1304:2444] [info]  jk_ajp_common.c (1916): (TC1) 
sending request to tomcat failed,  recoverable operation attempt=2
[Tue Nov 04 09:40:28 2008] [1304:2444] [error] jk_ajp_common.c (1928): (TC1) 
Connecting to tomcat failed. Tomcat is probably not started or is listening on 
the wrong port
[Tue Nov 04 09:41:26 2008] TC1 applications.labvolt.ca 0.061460
[Tue Nov 04 09:41:33 2008] [1304:2444] [info]  jk_connect.c (451): connect to 
127.0.0.1:8014 failed with errno=61
[Tue Nov 04 09:41:33 2008] [1304:2444] [info]  jk_ajp_common.c (873): Failed 
opening socket to (127.0.0.1:8014) with (errno=61)
[Tue Nov 04 09:41:33 2008] [1304:2444] [info]  jk_ajp_common.c (1259): (TC2) 
error connecting to the backend server (errno=61)
[Tue Nov 04 09:41:33 2008] [1304:2444] [info]  jk_ajp_common.c (1916): (TC2) 
sending request to tomcat failed,  recoverable operation attempt=1
[Tue Nov 04 09:41:34 2008] [1304:2444] [info]  jk_connect.c (451): connect to 
127.0.0.1:8014 failed with errno=61
[Tue Nov 04 09:41:34 2008] [1304:2444] [info]  jk_ajp_common.c (873): Failed 
opening socket to (127.0.0.1:8014) with (errno=61)
[Tue Nov 04 09:41:34 2008] [1304:2444] [info]  jk_ajp_common.c (1259): (TC2) 
error connecting to the backend server (errno=61)
[Tue Nov 04 09:41:34 2008] [1304:2444] [info]  jk_ajp_common.c (1916): (TC2) 
sending request to tomcat failed,  recoverable operation attempt=2
[Tue Nov 04 09:41:34 2008] [1304:2444] [error] jk_ajp_common.c (1928): (TC2) 
Connecting to tomcat failed. Tomcat is probably not started or is listening on 
the wrong port

Here is my workers used in Apache HTTP server:

worker.TC1.port=8013
worker.TC1.host=localhost
worker.TC1.type=ajp13
worker.TC1.lbfactor=1
worker.TC2.port=8014
worker.TC2.host=localhost
worker.TC2.type=ajp13
worker.TC2.lbfactor=0

Here is one of my AJP connectors  (both are same) in Tomcat:

Connector port=8013 protocol=AJP/1.3 redirectPort=8443 
minSpareThreads=100 maxSpareThreads=300/

I am new to mailing lists so feel free to ask me whatever I may have omitted.

Best regards, and 

All threads are busy

2008-11-24 Thread Martin Spinassi
Hi to all again!


I keep working on some performance on tomcat and apache, but there is
something that I can't figure out.


Using jmeter to do the tests, connecting to port 80 (tomcat), I get the
next error at catalina.out:


Nov 24, 2008 1:51:54 PM org.apache.tomcat.util.threads.ThreadPool
logFull
SEVERE: All threads (200) are currently busy, waiting. Increase
maxThreads (200) or check the servlet status


And start getting some 503 errors.


Using the same configuration at jmeter, but going throw port 8080, that
error never appears at catalina.out, and no 503 pages are displayed
ever.


I've already tryed to increase maxThreads, but with no success.

There is a thread in this list, but it doesn't 

Here is some of may server.xml:


Executor name=tomcatThreadPool namePrefix=catalina-exec- 
maxThreads=400 minSpareThreads=4 maxSpareThreads=100/


Connector executor=tomcatThreadPool
   port=8080 protocol=HTTP/1.1 
   connectionTimeout=2 
   redirectPort=8443 /


Connector executor= tomcatThreadPool port=8009 protocol=AJP/1.3
redirectPort=8443 /


And here my workers.properties:


#Worker1 properties
worker.worker1.port=8009
worker.worker1.host=127.0.0.1
worker.worker1.type=ajp13
worker.worker1.fail_on_status=503
worker.worker1.retries=2



I'm using CentOS 5.2, apache 2.2.10, connectors 1.2.27 and tomcat
6.0.18.


How can I increase the maxThread option? What am I missing here?



Thanks to all.




Martín




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Apache 2.2.3 with mod_jk 1.20 loosing connection with a cluster of two Tomcat 6.0.10

2008-11-24 Thread Éric Gauthier
Hello Peter,

Thank you for your suggestions.

I forgot to say that even if there is two Tomcat instances running behind an 
AJP connector, no load balancing has been enabled. Each Tomcat contains its own 
set of applications.

-Original Message-
From: Peter Crowther [mailto:[EMAIL PROTECTED] 
Sent: 24 novembre 2008 09:52
To: 'Tomcat Users List'
Subject: RE: Apache 2.2.3 with mod_jk 1.20 loosing connection with a cluster of 
two Tomcat 6.0.10

 From: Éric Gauthier [mailto:[EMAIL PROTECTED]
[...]
 I assume this is a Tomcat issue since the threads are going
 berserk, but I am unsure at this point.
[... good description elided...]

Thanks for a comprehensive description of the problem.

It *may* be an application or environment issue, especially as both app servers 
fail at nearly the same time.  Common mode failures such as this could indicate:

- Shortage of memory on the server causing OutOfMemoryException, after which 
anything could happen!

I didn't see any OutOfMemoryException in Tomcat logs.

- If your application uses other resources (such as a database), is the 
database doing anything unusual at around these times?  Suddenly long response 
times, down for maintenance, or similar?

Yes they use the same database resource. I will check if anything occurs at 
this time with the database.

- If the app is an Internet application, is one of the web crawlers suddenly 
hitting it with a massive load and saturating it?

I tried to perform a suddent massive load with JMeter and the only thing it 
caused (I may have abused on the concurrent requests) is an 
OutOfMemoryException and then both Tomcats stopped responding. But this is not 
what I am actually experiencing...

- Is the virtual machine being starved of resources at these times due to 
something else happening on the host?

The VM is dedicated to webapp hosting. No other VM has the possibility to 
steal resources to this VM. But to make sure, I will check the resources 
usage logs for this VM the guys in charge of that.

All just vague ideas at this point, and I suspect you have already considered 
and rejected them!


- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat 5.5.20 security issue

2008-11-24 Thread Caldarale, Charles R
 From: aymen83 [mailto:[EMAIL PROTECTED]
 Subject: tomcat 5.5.20 security issue


 java.lang.NoClassDefFoundError:
 com/sun/org/apache/xml/internal/security/Init

Move up to a 1.6 JVM.  It appears the version of Spring you're using is 
expecting to have the 1.6 libraries available.  There's probably some jar you 
could add that contains the missing classes if you insist on staying with 1.5, 
but I don't know what it is.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: All threads are busy

2008-11-24 Thread Caldarale, Charles R
 From: Martin Spinassi [mailto:[EMAIL PROTECTED]
 Subject: All threads are busy

 Nov 24, 2008 1:51:54 PM org.apache.tomcat.util.threads.ThreadPool
 logFull
 SEVERE: All threads (200) are currently busy, waiting. Increase
 maxThreads (200) or check the servlet status

And what does a thread dump show all the threads to be doing?  It's highly 
likely your application is blocking on something critical (e.g., database 
connections).

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat 5.5.20 security issue

2008-11-24 Thread BEN HMIDA aymen
Thanks for the response. In my pom.xml i'm using the tag 
jdk!1.6/jdk to make the compiler use jdk 1.6 or any other version present 
in the machine. But I have to keep the version to 1.5 because the running 
platforme is using it.
I tried to download the xmlsec.jar and placed it in my WEB-INF/lib but no 
success

-Message d'origine-
De : Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 24 novembre 2008 16:16
À : Tomcat Users List
Objet : RE: tomcat 5.5.20 security issue

 From: aymen83 [mailto:[EMAIL PROTECTED]
 Subject: tomcat 5.5.20 security issue


 java.lang.NoClassDefFoundError:
 com/sun/org/apache/xml/internal/security/Init

Move up to a 1.6 JVM.  It appears the version of Spring you're using is 
expecting to have the 1.6 libraries available.  There's probably some jar you 
could add that contains the missing classes if you insist on staying with 1.5, 
but I don't know what it is.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: All threads are busy

2008-11-24 Thread Martin Spinassi
On Mon, 2008-11-24 at 09:19 -0600, Caldarale, Charles R wrote:
  From: Martin Spinassi [mailto:[EMAIL PROTECTED]
  Subject: All threads are busy
 
  Nov 24, 2008 1:51:54 PM org.apache.tomcat.util.threads.ThreadPool
  logFull
  SEVERE: All threads (200) are currently busy, waiting. Increase
  maxThreads (200) or check the servlet status
 
 And what does a thread dump show all the threads to be doing?  It's highly 
 likely your application is blocking on something critical (e.g., database 
 connections).
 
  - Chuck

Sorry, I didn't try it yet, I must learn how to do it before :)


Anyway, (coorect me if I'm wrong), but if it were application's fault, I
should get the same errors using ports 80 or 8080, and I get completely
different results.


Cheers


Martín



 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: All threads are busy

2008-11-24 Thread Caldarale, Charles R
 From: Martin Spinassi [mailto:[EMAIL PROTECTED]
 Subject: RE: All threads are busy

 I should get the same errors using ports 80 or 8080, and I get
 completely different results.

 Connector executor= tomcatThreadPool port=8009 protocol=AJP/1.3
 redirectPort=8443 /

Just for grins, take out the space after executor= and see if it makes a 
difference.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: All threads are busy

2008-11-24 Thread Martin Spinassi
On Mon, 2008-11-24 at 09:33 -0600, Caldarale, Charles R wrote:
  From: Martin Spinassi [mailto:[EMAIL PROTECTED]
  Subject: RE: All threads are busy
 
  I should get the same errors using ports 80 or 8080, and I get
  completely different results.
 
  Connector executor= tomcatThreadPool port=8009 protocol=AJP/1.3
  redirectPort=8443 /
 
 Just for grins, take out the space after executor= and see if it makes a 
 difference.
 
  - Chuck
 

Thanks for the advice Chuck, anyway, it didn't work.

I've found that I can see the curren maxThreads at manager, and it says
200...:

jk-8009
Max threads: 200 Current thread count: 4 Current thread busy: 1
Max processing time: 0 ms Processing time: 0.0 s Request count: 0 Error
count: 0 Bytes received: 0.00 MB Bytes sent: 0.00 MB


Grrrcan't find where to change it.


Thanks again for your help.



Martín



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: failure notice

2008-11-24 Thread Ahmed Abbas
Dear,

I didn't create a connection pool of one connection. The configuration of the 
datasource in the first case was as follows:
Context path=/FamilyHandlerOpt
  Resource name=jdbc/VAS_FAF auth=Container 
type=oracle.jdbc.pool.OracleDataSource 
driverClassName=oracle.jdbc.OracleDriver 
factory=oracle.jdbc.pool.OracleDataSourceFactory 
url=jdbc:oracle:thin:@172.21.201.60:1521:FMLYPRD1 username=family2 
password=family2 maxActive=100 maxIdle=10 maxWait=-1 / 
  /Context

In the second case, I opened the connections using the same configuration of 
the datasource above, kept the connections alive and pooled the threads on 
these connections.
The response time of the second case was improved dramatically and the system 
scalability was achieved.

Best regards,
Ahmed Abbas

-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 14, 2008 6:40 PM
To: Tomcat Users List
Subject: Re: failure notice

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

To whom it may concern,

aelgamal , wrote:
 The above scenario resulted in very poor scalability during the stress
 testing. When the average response time for 1 thread was x msec, the average
 response time for 2 threads was 2x and 3 threads was 3x and so on.

How did you configure your data source?

 When I created a pool of connections (15 connections) in the Servlet and
 kept the connections of this pool alive the scalability improved. The
 average response time for a 150 concurrent threads was slightly higher than
 the average response time for 1 thread.

How did you configure your data source, here?

 Please advice why the poor performance when I used tomcat data source.

Tomcat can be configured to use a data source with a connection pool
size of 1. It's silly, but possible. If this is what you did, then you
simply weren't pooling connections and you should expect that pooling
would certainly improve performance.

If you're interested in playing with connection pools, help out Filip by
using his new Tomcat connection pool he's testing. I'm sure he'd love
the feedback.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkdqfwACgkQ9CaO5/Lv0PBXdACgjq/4JJZKJ+DgNn64szioNSZl
mvgAoMN8Qb9oPjizMzzeXyGJQn6IPQmO
=7ATP
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: failure notice

2008-11-24 Thread Martin Gainty

I dont know if anyone can provide an intelligent answer unless we know 
which DBCP (the pool acts as a factory to create n number of connections) you 
are using / how it is configured and 
which Driver classes you are using..I assume classes.zip ?

One more item is to never publish connect strings 

Maybe if Filip can suggest an alternative?

Viel Gluck
Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 




 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Subject: RE: failure notice
 Date: Mon, 24 Nov 2008 18:01:13 +0200
 
 Dear,
 
 I didn't create a connection pool of one connection. The configuration of the 
 datasource in the first case was as follows:
 Context path=/FamilyHandlerOpt
   Resource name=jdbc/VAS_FAF auth=Container 
 type=oracle.jdbc.pool.OracleDataSource 
 driverClassName=oracle.jdbc.OracleDriver 
 factory=oracle.jdbc.pool.OracleDataSourceFactory 
 url=jdbc:oracle:thin:@172.21.201.60:1521:FMLYPRD1 username=family2 
 password=family2 maxActive=100 maxIdle=10 maxWait=-1 / 
   /Context
 
 In the second case, I opened the connections using the same configuration of 
 the datasource above, kept the connections alive and pooled the threads on 
 these connections.
 The response time of the second case was improved dramatically and the system 
 scalability was achieved.
 
 Best regards,
 Ahmed Abbas
 
 -Original Message-
 From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
 Sent: Friday, November 14, 2008 6:40 PM
 To: Tomcat Users List
 Subject: Re: failure notice
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 To whom it may concern,
 
 aelgamal , wrote:
  The above scenario resulted in very poor scalability during the stress
  testing. When the average response time for 1 thread was x msec, the average
  response time for 2 threads was 2x and 3 threads was 3x and so on.
 
 How did you configure your data source?
 
  When I created a pool of connections (15 connections) in the Servlet and
  kept the connections of this pool alive the scalability improved. The
  average response time for a 150 concurrent threads was slightly higher than
  the average response time for 1 thread.
 
 How did you configure your data source, here?
 
  Please advice why the poor performance when I used tomcat data source.
 
 Tomcat can be configured to use a data source with a connection pool
 size of 1. It's silly, but possible. If this is what you did, then you
 simply weren't pooling connections and you should expect that pooling
 would certainly improve performance.
 
 If you're interested in playing with connection pools, help out Filip by
 using his new Tomcat connection pool he's testing. I'm sure he'd love
 the feedback.
 
 - -chris
 
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
 iEYEARECAAYFAkkdqfwACgkQ9CaO5/Lv0PBXdACgjq/4JJZKJ+DgNn64szioNSZl
 mvgAoMN8Qb9oPjizMzzeXyGJQn6IPQmO
 =7ATP
 -END PGP SIGNATURE-
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

_
Access your email online and on the go with Windows Live Hotmail.
http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_access_112008

Re: failure notice

2008-11-24 Thread Youssef Mohammed
It is highly advisable to use the native OCI drivers .. that simply provide
a native connection pooling ... and can work perfectly with RAC setting ..
and because it native, you have superior performance.

http://www.rakeshv.org/docs/oracle/jdbc3.0/oracle/jdbc/pool/OracleOCIConnectionPool.html


Regards, Youssef


On Mon, Nov 24, 2008 at 6:01 PM, Ahmed Abbas [EMAIL PROTECTED] wrote:

 Dear,

 I didn't create a connection pool of one connection. The configuration of
 the datasource in the first case was as follows:
 Context path=/FamilyHandlerOpt
  Resource name=jdbc/VAS_FAF auth=Container
 type=oracle.jdbc.pool.OracleDataSource
 driverClassName=oracle.jdbc.OracleDriver
 factory=oracle.jdbc.pool.OracleDataSourceFactory
 url=jdbc:oracle:thin:@172.21.201.60:1521:FMLYPRD1 username=family2
 password=family2 maxActive=100 maxIdle=10 maxWait=-1 /
  /Context

 In the second case, I opened the connections using the same configuration
 of the datasource above, kept the connections alive and pooled the threads
 on these connections.
 The response time of the second case was improved dramatically and the
 system scalability was achieved.

 Best regards,
 Ahmed Abbas

 -Original Message-
 From: Christopher Schultz [mailto:[EMAIL PROTECTED]
 Sent: Friday, November 14, 2008 6:40 PM
 To: Tomcat Users List
 Subject: Re: failure notice

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 To whom it may concern,

 aelgamal , wrote:
  The above scenario resulted in very poor scalability during the stress
  testing. When the average response time for 1 thread was x msec, the
 average
  response time for 2 threads was 2x and 3 threads was 3x and so on.

 How did you configure your data source?

  When I created a pool of connections (15 connections) in the Servlet and
  kept the connections of this pool alive the scalability improved. The
  average response time for a 150 concurrent threads was slightly higher
 than
  the average response time for 1 thread.

 How did you configure your data source, here?

  Please advice why the poor performance when I used tomcat data source.

 Tomcat can be configured to use a data source with a connection pool
 size of 1. It's silly, but possible. If this is what you did, then you
 simply weren't pooling connections and you should expect that pooling
 would certainly improve performance.

 If you're interested in playing with connection pools, help out Filip by
 using his new Tomcat connection pool he's testing. I'm sure he'd love
 the feedback.

 - -chris

 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

 iEYEARECAAYFAkkdqfwACgkQ9CaO5/Lv0PBXdACgjq/4JJZKJ+DgNn64szioNSZl
 mvgAoMN8Qb9oPjizMzzeXyGJQn6IPQmO
 =7ATP
 -END PGP SIGNATURE-

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Setup Logging for Tomcat 6

2008-11-24 Thread dOE
I have downloaded Apache-log4j-1.2.15.zip from
http://tomcat.apache.org/tomcat-6.0-doc/logging.html, and began to following
some of the steps, and then I am left clueless on what to do following the
creation of the log4j.properties file, and copying log4j-1.2.15.jar in
/tomca/lib.  Then it asks to Place
output/extras/tomcat-juli-adapters.jarin $CATALINA_HOME/lib.  I don't
know where output/extras is?

Any further guidance in this would be much MUCH appreciated.


RE: failure notice

2008-11-24 Thread Caldarale, Charles R
 From: Youssef Mohammed [mailto:[EMAIL PROTECTED]
 Subject: Re: failure notice

 It is highly advisable to use the native OCI drivers

I think you'll find tons of disagreement with that.  Sticking with the pure 
Java drivers is much less trouble and preserves platform independence.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: failure notice

2008-11-24 Thread Youssef Mohammed
Not sure what you mean by platform Independence here but OCI driver is just
a type two?  JDBC driver that provide superior performance.  You will have
to install an oracle client into your system but this shouldn't be a big
deal is it ?

We have developed some financial app two years ago and we settled on using
that native driver after couple of performance tests ... as far as I can
remember, it was also necessary if you have oracle stored procedure and
packages that might need recompilations while the web app is running  ... if
you use the pure java connection pooling, the pooled connections are no
longer valid and you will have to restart the server or figure out away to
get rid of all connections in the pool.

Regards, Youssef


On Mon, Nov 24, 2008 at 6:30 PM, Caldarale, Charles R 
[EMAIL PROTECTED] wrote:

  From: Youssef Mohammed [mailto:[EMAIL PROTECTED]
  Subject: Re: failure notice
 
  It is highly advisable to use the native OCI drivers

 I think you'll find tons of disagreement with that.  Sticking with the pure
 Java drivers is much less trouble and preserves platform independence.



  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you received
 this in error, please contact the sender and delete the e-mail and its
 attachments from all computers.

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Re: Tomcat 6 unstable

2008-11-24 Thread Ariela Carrera
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 

Tomcat 5.5.2 Configurations for JSESSION ID Cookie Append

2008-11-24 Thread Jonathan Kushner
Tomcat Users:

 

I'm working with a current session identity issue between separate browser 
instances, and have decided that the most plausible solution is to reconfigure 
tomcat to auto-append the JSESSION ID at the end of each URL. The only problem 
is, our system administrator cannot seem to dig up this information over the 
internet. I have not dug deep into the issue, but I trust his judgment, and 
thought I would send a note to the subscription line to see if anyone is 
familiar with the server.xml configuration change that needs to occur to enable 
this feature.

 

I appreciate the assistance and apologize for any inconvenience.

 

Regards,

 

Jonathan

 

 



RE: failure notice

2008-11-24 Thread Caldarale, Charles R
 From: Youssef Mohammed [mailto:[EMAIL PROTECTED]
 Subject: Re: failure notice

 Not sure what you mean by platform Independence here

It means that you can't simply drop a .war file and DB config into any 
arbitrary environment - you have to either provide extensive installation 
instructions for every type of platform (Windows x86, Windows AMD64, Windows 
IA64, Linux x86, Linux AMD64, HP-UX PA-RISC, Solaris x86, Solaris AMD64, 
Solaris Sparc, etc.), or do a lot of packaging work.  Not pretty or fun.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: User Request Ordering

2008-11-24 Thread Caldarale, Charles R
 From: Clifton B. Sothoron Jr. [mailto:[EMAIL PROTECTED]
 Subject: User Request Ordering

 How do I configure Tomcat to process user requests in order?

You don't.  Instead, you design your webapp so that it serializes the requests 
when necessary.  For the coarsest possible lock, synchronize on the session in 
a filter that runs in front of all of your servlets.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



User Request Ordering

2008-11-24 Thread Clifton B. Sothoron Jr.
I have a Tomcat 6.0 Web application with a number of buttons on the
screen. Some of them execute quickly, some more slowly.  However, they
need to execute in order. When a user clicks on a slow button and then
clicks on a fast button Tomcat needs to wait for the results of the slow
button before moving on to the fast executing button. However, this is
not happening. The results of the fast button are disrupting the results
of the slow button.  How do I configure Tomcat to process user requests
in order?

Best,

 

Clifton Sothoron

LogiXML, Development Department
7900 Westpark Drive, Suite T107 |  McLean, VA 22102
(703) 752-9700  Ext. 162 | fax: (703) 773-6903
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  |
http://www.logixml.com blocked::blocked::http://www.logixml.com/ 

 



RE: Tomcat 5.5.2 Configurations for JSESSION ID Cookie Append

2008-11-24 Thread Caldarale, Charles R
 From: Jonathan Kushner [mailto:[EMAIL PROTECTED]
 Subject: Tomcat 5.5.2 Configurations for JSESSION ID Cookie Append

If you're really running on 5.5.2, you need to move up - ASAP.  Lots and lots 
of fixes, including security-related ones, have gone in since that version was 
released over four years ago.

 I'm working with a current session identity issue between
 separate browser instances, and have decided that the most
 plausible solution is to reconfigure tomcat to auto-append
 the JSESSION ID at the end of each URL.

You will at least need to disable cookies:
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html%20Attributes

Beyond that, I'm not aware of any automatic way of appending JSESSIONID; your 
webapp has to participate.  Look at this message for one such technique:
http://marc.info/?l=tomcat-userm=117583468505179w=2

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Setup Logging for Tomcat 6

2008-11-24 Thread Caldarale, Charles R
 -Original Message-
 From: dOE [mailto:[EMAIL PROTECTED]
 Subject: Setup Logging for Tomcat 6

 I don't know where output/extras is?

Did you do step 3?
Build the commons-logging additional component using the extras.xml Ant build 
script which is part of teh [sic] Tomcat source bundle.

It's created in the source tree after you run the specified ant script.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: User Request Ordering

2008-11-24 Thread André Warnier

Clifton B. Sothoron Jr. wrote:

I have a Tomcat 6.0 Web application with a number of buttons on the
screen. Some of them execute quickly, some more slowly.  However, they
need to execute in order. When a user clicks on a slow button and then
clicks on a fast button Tomcat needs to wait for the results of the slow
button before moving on to the fast executing button. However, this is
not happening. The results of the fast button are disrupting the results
of the slow button.  How do I configure Tomcat to process user requests
in order?


You can not, and this has nothing to do with Tomcat per se.

I would say that this is a case of a badly-designed user interface.
It should not be possible for the user to click several buttons, if the 
result is so that it might cause trouble in the application. You need to 
control that at the user interface level, which means in the html page 
itself (or applet, if that is what you use).  The inappropriate buttons 
should be disabled (and visibly so for the user), and only enabled when 
it is legal for the user to click them, in other words when the 
response from the previous logical action has been received.


At the most, what any HTTP server (Tomcat being one of many) could do, 
is to keep some track of a user session, that would allow an 
application, at the server side, to notice that some pre-requisite for 
the current request has not been met (like, this other action that 
should have been done before, has not been done yet), and return an 
error to the user.  But that would be quite difficult for the user to 
understand, in addition to loading your application with invalid 
requests.  It would be more logical to prevent this at the source, no ?
(In fact, for security and reliability you need to do both, and not 
absolutely rely on a user-side page that can be manipulated).



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Setup Logging for Tomcat 6

2008-11-24 Thread dOE
Does that require me to download the source files for Tomcat, and then
locate this Ant script?  The instructions are very vague and assume the
individual is already well versed in managing Tomcat ...needless to say I am
not.

On Mon, Nov 24, 2008 at 2:17 PM, Caldarale, Charles R 
[EMAIL PROTECTED] wrote:

  -Original Message-
  From: dOE [mailto:[EMAIL PROTECTED]
  Subject: Setup Logging for Tomcat 6
 
  I don't know where output/extras is?

 Did you do step 3?
 Build the commons-logging additional component using the extras.xml Ant
 build script which is part of teh [sic] Tomcat source bundle.

 It's created in the source tree after you run the specified ant script.

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you received
 this in error, please contact the sender and delete the e-mail and its
 attachments from all computers.

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Setup Logging for Tomcat 6

2008-11-24 Thread removeps-groups
To setup log4j, here's what I did.

Copy the log4j jar file to WEB-INF/lib.  Put it in ${catalina.home}/lib if you 
want all webapps to be able to see this file.

Create a log4j.properties.  Initially this file was in 
WEB-INF/classes/log4j.properties.  Now I have the file in 
WEB-INF/lib/myjarfile.jar!log4j.properties (that is, at the root level of the 
jar file).

That's it, if I remember correctly.

When the properties file specifies a relative filename, it appears to be 
relative to ${catalina.home}, so specify for example logs/myfile.log.

--- On Mon, 11/24/08, dOE [EMAIL PROTECTED] wrote:

 From: dOE [EMAIL PROTECTED]
 Subject: Setup Logging for Tomcat 6
 To: Tomcat User-List users@tomcat.apache.org
 Date: Monday, November 24, 2008, 8:25 AM
 I have downloaded Apache-log4j-1.2.15.zip from
 http://tomcat.apache.org/tomcat-6.0-doc/logging.html, and
 began to following
 some of the steps, and then I am left clueless on what to
 do following the
 creation of the log4j.properties file, and copying
 log4j-1.2.15.jar in
 /tomca/lib.  Then it asks to Place
 output/extras/tomcat-juli-adapters.jarin
 $CATALINA_HOME/lib.  I don't
 know where output/extras is?
 
 Any further guidance in this would be much MUCH
 appreciated.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Setup Logging for Tomcat 6

2008-11-24 Thread Caldarale, Charles R
 From: dOE [mailto:[EMAIL PROTECTED]
 Subject: Re: Setup Logging for Tomcat 6

 Does that require me to download the source files for Tomcat, and then
 locate this Ant script?

Yes, that's why it says part of teh [sic] Tomcat source bundle.

 The instructions are very vague and assume the
 individual is already well versed in managing
 Tomcat ...needless to say I am not.

Then why are you trying to change Tomcat's internal logging to use log4j?  You 
can use log4j in your webapps with converting Tomcat itself to use it.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Setup Logging for Tomcat 6

2008-11-24 Thread Caldarale, Charles R
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Subject: Re: Setup Logging for Tomcat 6

 Copy the log4j jar file to WEB-INF/lib.  Put it in
 ${catalina.home}/lib if you want all webapps to be able to
 see this file.

You really don't want to put the log4j.jar into Tomcat's lib directory unless 
you actually want all the webapps to *share* (not just see) the same logging 
complex.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5.5.2 Configurations for JSESSION ID Cookie Append

2008-11-24 Thread Jonathan Kushner
I will forward your response about upgrading tomcat to the appropriate team, 
however we are only using tomcat internally so I do not believe it's a major 
concern. In regards to the current issue, I'm at lost on the appropriate 
measures to take. Here's my original email which was sent to the system 
administrator. Maybe you can take a gander at it and help me understand a 
better approach to take without modifying the codebase:

--- START ---
I'm currently working on a Seamus Issue which disallows the user from operating 
on separate session namespaces within the same browser instance. For example, 
when a user instantiates a new tab and loads a separate story, the second story 
will overwrite the first since we have no measure to separate these separate 
tabular sessions. This effect (untested on my end) should cascade from the 
original parent to the last child instance, being that each load will just 
overwrite the current data container. There are a couple different methods to 
handle this; however the easiest approach would be to modify the tomcat 
configuration to append the JSESSION Cookie Id to the URL String. By doing 
this, we could then create a separate namespace for each distinct tab-load, and 
essentially delegate out the data to each specific session namespace. The 
downside to this is that because it's a full system change, it will most likely 
require a full regression test. 

We are seeking alternate approaches within the code-base, however if this 
approach seems manageable, it seems to be the most feasible method. What are 
your feelings on this?
--- END ---

Thanks for the help.

- Jonathan

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 24, 2008 2:14 PM
To: Tomcat Users List
Subject: RE: Tomcat 5.5.2 Configurations for JSESSION ID Cookie Append

 From: Jonathan Kushner [mailto:[EMAIL PROTECTED]
 Subject: Tomcat 5.5.2 Configurations for JSESSION ID Cookie Append

If you're really running on 5.5.2, you need to move up - ASAP.  Lots and lots 
of fixes, including security-related ones, have gone in since that version was 
released over four years ago.

 I'm working with a current session identity issue between
 separate browser instances, and have decided that the most
 plausible solution is to reconfigure tomcat to auto-append
 the JSESSION ID at the end of each URL.

You will at least need to disable cookies:
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html%20Attributes

Beyond that, I'm not aware of any automatic way of appending JSESSIONID; your 
webapp has to participate.  Look at this message for one such technique:
http://marc.info/?l=tomcat-userm=117583468505179w=2

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5.5.2 Configurations for JSESSION ID Cookie Append

2008-11-24 Thread Jonathan Kushner
Sorry - forgot to mention. We are using cookies in various places to track 
different actions, so disabling cookies cannot be taken into account. Thanks 
for the technique though.

-Original Message-
From: Jonathan Kushner [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 24, 2008 2:40 PM
To: Tomcat Users List
Subject: RE: Tomcat 5.5.2 Configurations for JSESSION ID Cookie Append

I will forward your response about upgrading tomcat to the appropriate team, 
however we are only using tomcat internally so I do not believe it's a major 
concern. In regards to the current issue, I'm at lost on the appropriate 
measures to take. Here's my original email which was sent to the system 
administrator. Maybe you can take a gander at it and help me understand a 
better approach to take without modifying the codebase:

--- START ---
I'm currently working on a Seamus Issue which disallows the user from operating 
on separate session namespaces within the same browser instance. For example, 
when a user instantiates a new tab and loads a separate story, the second story 
will overwrite the first since we have no measure to separate these separate 
tabular sessions. This effect (untested on my end) should cascade from the 
original parent to the last child instance, being that each load will just 
overwrite the current data container. There are a couple different methods to 
handle this; however the easiest approach would be to modify the tomcat 
configuration to append the JSESSION Cookie Id to the URL String. By doing 
this, we could then create a separate namespace for each distinct tab-load, and 
essentially delegate out the data to each specific session namespace. The 
downside to this is that because it's a full system change, it will most likely 
require a full regression test. 

We are seeking alternate approaches within the code-base, however if this 
approach seems manageable, it seems to be the most feasible method. What are 
your feelings on this?
--- END ---

Thanks for the help.

- Jonathan

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 24, 2008 2:14 PM
To: Tomcat Users List
Subject: RE: Tomcat 5.5.2 Configurations for JSESSION ID Cookie Append

 From: Jonathan Kushner [mailto:[EMAIL PROTECTED]
 Subject: Tomcat 5.5.2 Configurations for JSESSION ID Cookie Append

If you're really running on 5.5.2, you need to move up - ASAP.  Lots and lots 
of fixes, including security-related ones, have gone in since that version was 
released over four years ago.

 I'm working with a current session identity issue between
 separate browser instances, and have decided that the most
 plausible solution is to reconfigure tomcat to auto-append
 the JSESSION ID at the end of each URL.

You will at least need to disable cookies:
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html%20Attributes

Beyond that, I'm not aware of any automatic way of appending JSESSIONID; your 
webapp has to participate.  Look at this message for one such technique:
http://marc.info/?l=tomcat-userm=117583468505179w=2

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Monitoring Tomcat with Jconsole

2008-11-24 Thread André Warnier

Hi.
I lied in the subject.
This is not strictly a question about Tomcat monitoring, although the 
ultimate aim is to monitor a specific Tomcat application.
But I'm trying to start small first, and I'm encountering a problem with 
Jconsole, for which this is my first-ever try.


I have a java stand-alone application (daemon) running on host myhost 
under Linux on a Sun JVM 1.5.  It's a kind of network server, listening 
on port 11100.

I started this application with the following parameters :
./java -Dcom.sun.management.jmxremote.port=11200 
-Dcom.sun.management.jmxremote.ssl=false 
-Dcom.sun.management.jmxremote.password.file=/mydir/ 
management.jmxremote.password

 -Dpgm=STARXMLServer -jar /home/star/xml/STARXMLServer.jar

The file management.jmxremote.password contains this line at the end:

monitorRole mypass

On the other hand, I run Jconsole on a Windows XP station, using a Sun 
Java 1.6 JVM as follows :

java version 1.6.0_06
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing).

When I use the New connection dialog to specify that I want a remote 
connection with

Host:port : myhost:11200
userid : monitorRole
password : mypass

then the dialog disappear for a few seconds, then comes back, with an 
error message at the very bottom saying :

Connection failed: Connection refused: connect

(Note : this Jconsole can monitor its own JVM when using the local 
process choice)


So, what am I doing wrong ?

One think I noticed, is that on the server myhost, despite the daemon 
application being loaded without any apparent error messages, and being 
responsive to requests on its own port 11100, a

netstat -an
does not show any port 11200 in a LISTEN state.

I do not know at this stage if this is significant.

My understanding is that it is the JVM on the myhost system that 
should listen for connections on that port 11200, not the application 
itself, right ?


Nor can I think of any system-level reason why the system would be 
rejecting incoming connections on port 11200.  This is a local network, 
and there is no firewall or anything between the Windows workstation and 
the myhost host.


Thanks in advance for any tips


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5.5.2 Configurations for JSESSION ID Cookie Append

2008-11-24 Thread Jonathan Kushner
Ok, I was wrong. I am reading up on it now and it apparently only disables the 
session cookie, which might be what I'm seeking. Thanks for the help.

- Jonathan

-Original Message-
From: Jonathan Kushner [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 24, 2008 2:44 PM
To: Tomcat Users List
Subject: RE: Tomcat 5.5.2 Configurations for JSESSION ID Cookie Append

Sorry - forgot to mention. We are using cookies in various places to track 
different actions, so disabling cookies cannot be taken into account. Thanks 
for the technique though.

-Original Message-
From: Jonathan Kushner [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 24, 2008 2:40 PM
To: Tomcat Users List
Subject: RE: Tomcat 5.5.2 Configurations for JSESSION ID Cookie Append

I will forward your response about upgrading tomcat to the appropriate team, 
however we are only using tomcat internally so I do not believe it's a major 
concern. In regards to the current issue, I'm at lost on the appropriate 
measures to take. Here's my original email which was sent to the system 
administrator. Maybe you can take a gander at it and help me understand a 
better approach to take without modifying the codebase:

--- START ---
I'm currently working on a Seamus Issue which disallows the user from operating 
on separate session namespaces within the same browser instance. For example, 
when a user instantiates a new tab and loads a separate story, the second story 
will overwrite the first since we have no measure to separate these separate 
tabular sessions. This effect (untested on my end) should cascade from the 
original parent to the last child instance, being that each load will just 
overwrite the current data container. There are a couple different methods to 
handle this; however the easiest approach would be to modify the tomcat 
configuration to append the JSESSION Cookie Id to the URL String. By doing 
this, we could then create a separate namespace for each distinct tab-load, and 
essentially delegate out the data to each specific session namespace. The 
downside to this is that because it's a full system change, it will most likely 
require a full regression test. 

We are seeking alternate approaches within the code-base, however if this 
approach seems manageable, it seems to be the most feasible method. What are 
your feelings on this?
--- END ---

Thanks for the help.

- Jonathan

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 24, 2008 2:14 PM
To: Tomcat Users List
Subject: RE: Tomcat 5.5.2 Configurations for JSESSION ID Cookie Append

 From: Jonathan Kushner [mailto:[EMAIL PROTECTED]
 Subject: Tomcat 5.5.2 Configurations for JSESSION ID Cookie Append

If you're really running on 5.5.2, you need to move up - ASAP.  Lots and lots 
of fixes, including security-related ones, have gone in since that version was 
released over four years ago.

 I'm working with a current session identity issue between
 separate browser instances, and have decided that the most
 plausible solution is to reconfigure tomcat to auto-append
 the JSESSION ID at the end of each URL.

You will at least need to disable cookies:
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html%20Attributes

Beyond that, I'm not aware of any automatic way of appending JSESSIONID; your 
webapp has to participate.  Look at this message for one such technique:
http://marc.info/?l=tomcat-userm=117583468505179w=2

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5.5.2 Configurations for JSESSION ID Cookie Append

2008-11-24 Thread Caldarale, Charles R
 From: Jonathan Kushner [mailto:[EMAIL PROTECTED]
 Subject: RE: Tomcat 5.5.2 Configurations for JSESSION ID Cookie Append

 I'm currently working on a Seamus Issue which disallows the
 user from operating on separate session namespaces within the
 same browser instance. For example, when a user instantiates
 a new tab and loads a separate story, the second story will
 overwrite the first since we have no measure to separate
 these separate tabular sessions.

Sounds like you really need to be tracking the information via something other 
than a Session.  Playing with JSESSIONID is a stop-gap at best, and likely not 
a full solution.  Perhaps you can use some token embedded in each tab or web 
page as a key to a HashTable that tracks the information you need.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Setup Logging for Tomcat 6

2008-11-24 Thread dOE
All I want is for my Tomcat 6 to spit out some logs, and be default it's
not.  Does not have to be log4j.xml if it does not have to be, but I was
under the assumption that logging changed for where we had to implement the
setup I posted in my original link.

On Mon, Nov 24, 2008 at 2:33 PM, Caldarale, Charles R 
[EMAIL PROTECTED] wrote:

  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Subject: Re: Setup Logging for Tomcat 6
 
  Copy the log4j jar file to WEB-INF/lib.  Put it in
  ${catalina.home}/lib if you want all webapps to be able to
  see this file.

 You really don't want to put the log4j.jar into Tomcat's lib directory
 unless you actually want all the webapps to *share* (not just see) the
 same logging complex.

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you received
 this in error, please contact the sender and delete the e-mail and its
 attachments from all computers.

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




RE: Setup Logging for Tomcat 6

2008-11-24 Thread Caldarale, Charles R
 From: dOE [mailto:[EMAIL PROTECTED]
 Subject: Re: Setup Logging for Tomcat 6

 All I want is for my Tomcat 6 to spit out some logs, and be
 default it's not.

The phrase spit out some logs is pretty meaningless; what are you really 
trying to accomplish?  By default, Tomcat's logs are in its logs directory, 
which usually contains several different log streams (e.g., catalina, 
host-manager, localhost, manager).  You do not have to convert Tomcat to use 
log4j; it logs its own actions properly right out of the box.

If you want your webapp to log things, that has to be done in the code of the 
webapp.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Monitoring Tomcat with Jconsole

2008-11-24 Thread Caldarale, Charles R
 From: André Warnier [mailto:[EMAIL PROTECTED]
 Subject: Monitoring Tomcat with Jconsole

./java -Dcom.sun.management.jmxremote.port=11200
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.password.file=/mydir/
management.jmxremote.password
  -Dpgm=STARXMLServer -jar /home/star/xml/STARXMLServer.jar

Remove the quotes; each -D setting must be a separate parameter, but you've 
lumped them all into one.

 One think I noticed, is that on the server myhost, despite
 the daemon application being loaded without any apparent
 error messages, and being responsive to requests on its
 own port 11100, a netstat -an does not show any port 11200
 in a LISTEN state.

 I do not know at this stage if this is significant.

It is.  Without that port being in the listening state, you'll never get a JMX 
connection.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Setup Logging for Tomcat 6

2008-11-24 Thread dOE
At the moment my Tomcat is not generating any log out put, and this is a
simple default installation.  I am interested in localhost mostly, and
Catalina logs...

On Mon, Nov 24, 2008 at 3:10 PM, Caldarale, Charles R 
[EMAIL PROTECTED] wrote:

  From: dOE [mailto:[EMAIL PROTECTED]
  Subject: Re: Setup Logging for Tomcat 6
 
  All I want is for my Tomcat 6 to spit out some logs, and be
  default it's not.

 The phrase spit out some logs is pretty meaningless; what are you really
 trying to accomplish?  By default, Tomcat's logs are in its logs directory,
 which usually contains several different log streams (e.g., catalina,
 host-manager, localhost, manager).  You do not have to convert Tomcat to use
 log4j; it logs its own actions properly right out of the box.

 If you want your webapp to log things, that has to be done in the code of
 the webapp.

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you received
 this in error, please contact the sender and delete the e-mail and its
 attachments from all computers.

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




RE: Setup Logging for Tomcat 6

2008-11-24 Thread Caldarale, Charles R
 From: dOE [mailto:[EMAIL PROTECTED]
 Subject: Re: Setup Logging for Tomcat 6

 At the moment my Tomcat is not generating any log out put,

What platform are you running on?

What JVM version are you using?

How did you install Tomcat?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Monitoring Tomcat with Jconsole

2008-11-24 Thread André Warnier

Caldarale, Charles R wrote:

From: André Warnier [mailto:[EMAIL PROTECTED]
Subject: Monitoring Tomcat with Jconsole


./java -Dcom.sun.management.jmxremote.port=11200
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.password.file=/mydir/
management.jmxremote.password
  -Dpgm=STARXMLServer -jar /home/star/xml/STARXMLServer.jar

Remove the quotes; each -D setting must be a separate parameter, but you've 
lumped them all into one.


One think I noticed, is that on the server myhost, despite
the daemon application being loaded without any apparent
error messages, and being responsive to requests on its
own port 11100, a netstat -an does not show any port 11200
in a LISTEN state.

I do not know at this stage if this is significant.


It is.  Without that port being in the listening state, you'll never get a JMX 
connection.


I did remove the quotes, so now it is started as :
./java  -Dcom.sun.management.jmxremote.port=11200 
-Dcom.sun.management.jmxremote.ssl=false 
-Dcom.sun.management.jmxremote.password.file=/home/star/xml/config/management.jmxremote.password 
-Dpgm=STARXMLServer -jar /home/star/xml/STARXMLServer.jar


But the end result is the same : I can still not connect, and still get 
the same error message in jconsole :


Connection failed: Connection refused: connect

and it still does not show any port 11200 in LISTEN state on the server.
No error messages shown on-screen either when starting that server app 
in a command-line console.
The application on the other hand works fine, accepts connections on its 
own port 11100, and prints status messages on-screen.


The message connection refused leads me to believe that the problem is 
on the server side, which is confirmed by the port 11200 not even being 
listening.  But if the JVM on that side sees these -D command-line 
parameters, should it not be printing error messages somewhere if it 
cannot process them ?
Can I provoke some meaningful message by misspelling one of these -D 
switches, just to check ?



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Setup Logging for Tomcat 6

2008-11-24 Thread dOE
Its running on win32,

JVM is 1.6

installed via js-wrapper.

On Mon, Nov 24, 2008 at 3:27 PM, Caldarale, Charles R 
[EMAIL PROTECTED] wrote:

  From: dOE [mailto:[EMAIL PROTECTED]
  Subject: Re: Setup Logging for Tomcat 6
 
  At the moment my Tomcat is not generating any log out put,

 What platform are you running on?

 What JVM version are you using?

 How did you install Tomcat?

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you received
 this in error, please contact the sender and delete the e-mail and its
 attachments from all computers.

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Setup Logging for Tomcat 6

2008-11-24 Thread André Warnier

dOE wrote:

Its running on win32,

JVM is 1.6

installed via js-wrapper.


I don't know that js-wrapper, but if this is under Windows, might not 
the logs be all redirected in the Windows system logs ?
My computer icon, right-click, Manage, then the first folder under 
System.
(Can't tell you exactly, this PC is German, and there it's called 
Ereignisanzeige)


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Monitoring Tomcat with Jconsole

2008-11-24 Thread Caldarale, Charles R
 From: André Warnier [mailto:[EMAIL PROTECTED]
 Subject: Re: Monitoring Tomcat with Jconsole

 Can I provoke some meaningful message by misspelling one of these -D
 switches, just to check ?

Not by misspelling, but if you change the port number to alphabetics, it will 
complain.

Are you sure you're using a 1.5 HotSpot JVM?  What does java -version say?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Setup Logging for Tomcat 6

2008-11-24 Thread Caldarale, Charles R
 From: dOE [mailto:[EMAIL PROTECTED]
 Subject: Re: Setup Logging for Tomcat 6

 Its running on win32,

O.k.

 JVM is 1.6

O.k.

 installed via js-wrapper.

??? Not bloody likely.  Download Tomcat from 
http://tomcat.apache.org/download-60.cgi (the .zip version, not the .exe), do a 
fresh install of it, and try running the catalina.bat script and see what it 
says.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Setup Logging for Tomcat 6

2008-11-24 Thread dOE
The JS-Wrapper should have no effect on the built-in tomcat logging.  It
(js-wrapper) can only log its self.

On Mon, Nov 24, 2008 at 3:35 PM, André Warnier [EMAIL PROTECTED] wrote:

 dOE wrote:

 Its running on win32,

 JVM is 1.6

 installed via js-wrapper.


 I don't know that js-wrapper, but if this is under Windows, might not the
 logs be all redirected in the Windows system logs ?
 My computer icon, right-click, Manage, then the first folder under
 System.
 (Can't tell you exactly, this PC is German, and there it's called
 Ereignisanzeige)


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Monitoring Tomcat with Jconsole

2008-11-24 Thread André Warnier

Caldarale, Charles R wrote:

From: André Warnier [mailto:[EMAIL PROTECTED]
Subject: Re: Monitoring Tomcat with Jconsole



Can I provoke some meaningful message by misspelling one of these -D
switches, just to check ?


Not by misspelling, but if you change the port number to alphabetics, it will 
complain.

Are you sure you're using a 1.5 HotSpot JVM?  What does java -version say?


I added ./java -version in the script that starts this application.
Just for the fun, I also changed the port number to ABCDE.

This is what it now says :
java version 1.5.0_14
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
Java HotSpot(TM) Client VM (build 1.5.0_14-b03, mixed mode, sharing)
./java  -Dcom.sun.management.jmxremote.port=ABCDE 
-Dcom.sun.management.jmxremote.ssl=false 
-Dcom.sun.management.jmxremote.password.file=/home/star/xml/config/management.jmxremote.password 
-Dpgm=STARXMLServer -jar /home/star/xml/STARXMLServer.jar

Press Control-C to stop STAR XML Server.
Server Version 4.4.2 Started on Port 11100

So yes, it is 1.5, and it doesn't seem to care a bit about the port number.
??

This script by the way (not one of mine) does a cd into the java/bin 
directory and then launches the program from there.  Can that have 
something to do with it ?

Maybe I should have started with Tomcat after all..
(I just didn't because there were other people working with that Tomcat 
when I started my study of jconsole)


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Monitoring Tomcat with Jconsole

2008-11-24 Thread Caldarale, Charles R
 From: André Warnier [mailto:[EMAIL PROTECTED]
 Subject: Re: Monitoring Tomcat with Jconsole

 This script by the way (not one of mine) does a cd into
 the java/bin directory and then launches the program from
 there.  Can that have something to do with it ?

The cd won't be a problem, but I'm wondering if the script is discarding or 
otherwise corrupting parameters it doesn't recognize.  Try bypassing the script 
and running the app directly using java/bin/java with the JMX parameters.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Monitoring Tomcat with Jconsole

2008-11-24 Thread André Warnier

Caldarale, Charles R wrote:

From: André Warnier [mailto:[EMAIL PROTECTED]
Subject: Re: Monitoring Tomcat with Jconsole

This script by the way (not one of mine) does a cd into
the java/bin directory and then launches the program from
there.  Can that have something to do with it ?


The cd won't be a problem, but I'm wondering if the script is discarding or 
otherwise corrupting parameters it doesn't recognize.  Try bypassing the script 
and running the app directly using java/bin/java with the JMX parameters.



Ha !  Why did I not think of that myself ?
That works fine, now we're cooking.
Great thanks, I was a bit puzzled there.
(I'll go and have a closer look at that script, too).
I think I was fooled by the command-line that the script itself prints 
to the screen. It's obviously not the one it is really running.



So now, I am enjoying the display, but I am not quite sure how to 
interpret what I'm seeing.
I don't know if the jconsole offers a cleaner way of doing this, but 
here below I copied and pasted what I could from the VM summary tab.

Snapshot 1 is after the app launched, but had not yet done anything.
Snapshot 2 is after processing 2 requests, which involve parsing an XML 
request, talking to a database, getting the result back, creating an XML 
response from that and sending it back to the client.

After this processing, the process in a top display shows the following :

22175 star  21   0  266m  23m  11m S  1.0  4.6   0:14.61 java
(where 266m is the virtual memory, and 11m the resident one).

Compared to the numbers I see in the jconsole VM summary below, these 
memory figures seem to show a gross disproportion, or am I interpreting 
this wrong ?





Snapshot 1

VM Summary
Montag, 24. November 2008 22.07 Uhr CET

Connection name: 
[EMAIL PROTECTED]:11200
Virtual Machine: 
Java HotSpot(TM) Client VM version 1.5.0_14-b03
Vendor: 
Sun Microsystems Inc.
Name: 
[EMAIL PROTECTED]
Uptime: 
2 minutes
Process CPU time: 
5,810 seconds
JIT compiler: 
HotSpot Client Compiler
Total compile time: 
1,168 seconds


Live threads: 
14
Peak: 
16
Daemon threads: 
12
Total threads started: 
19
Current classes loaded: 
1.140
Total classes loaded: 
1.140
Total classes unloaded: 
   0




Current heap size: 
  785 kbytes
Maximum heap size: 
65.088 kbytes
Committed memory: 
1.984 kbytes
Pending finalization: 
0 objects
Garbage collector: 
Name = 'MarkSweepCompact', Collections = 0, Total time spent = 0,000 seconds
Garbage collector: 
Name = 'Copy', Collections = 23, Total time spent = 0,192 seconds


Operating System: 
Linux 2.6.18-6-686
Architecture: 
i386
Number of processors: 
1
Committed virtual memory: 
270.980 kbytes
Total physical memory: 
 516.920 kbytes
Free physical memory: 
   6.852 kbytes
Total swap space: 
1.297.564 kbytes
Free swap space: 
1.234.376 kbytes





Snapshot 2


VM Summary
Montag, 24. November 2008 22.11 Uhr CET

Connection name: 
[EMAIL PROTECTED]:11200
Virtual Machine: 
Java HotSpot(TM) Client VM version 1.5.0_14-b03
Vendor: 
Sun Microsystems Inc.
Name: 
[EMAIL PROTECTED]
Uptime: 
6 minutes
Process CPU time: 
11,930 seconds
JIT compiler: 
HotSpot Client Compiler
Total compile time: 
2,312 seconds


Live threads: 
13
Peak: 
19
Daemon threads: 
11
Total threads started: 
35
Current classes loaded: 
1.373
Total classes loaded: 
1.416
Total classes unloaded: 
  43




Current heap size: 
1.828 kbytes
Maximum heap size: 
65.088 kbytes
Committed memory: 
2.452 kbytes
Pending finalization: 
0 objects
Garbage collector: 
Name = 'MarkSweepCompact', Collections = 0, Total time spent = 0,000 seconds
Garbage collector: 
Name = 'Copy', Collections = 60, Total time spent = 0,868 seconds


Operating System: 
Linux 2.6.18-6-686
Architecture: 
i386
Number of processors: 
1
Committed virtual memory: 
273.300 kbytes
Total physical memory: 
 516.920 kbytes
Free physical memory: 
  18.020 kbytes
Total swap space: 
1.297.564 kbytes
Free swap space: 
1.234.376 kbytes



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Shutting down Tomcat6 server - error

2008-11-24 Thread Csanyi Pal
Hi,

I have Debian GNU/Linux Etch system.

I have downloaded binary apache-tomcat-6.0.18.tar.gz and unpacked it
in the /usr/locale/ directory.

I have changed permissions of the /usr/local/apache-tomcat-6.0.18/
directory so I can access it as a normal user.

I have installed debian package sun-java6-jdk.

I edited .bash_profile:
#
# JAVA
#
export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.07/lib/visualvm/\
profiler2/lib/deployed/jdk16
export PATH=$PATH:/usr/lib/jvm/java-6-sun-1.6.0.07/lib/visualvm/\
profiler2/lib/deployed/jdk16

logging out and logging in back.


I can to start Tomcat6 with startup.sh in the
/usr/local/apache-tomcat-6.0.18/bin/ directory with the
./startup.sh command.

but I can't to shut down it with the 
./shutdown.sh
command, I get error:

Using CATALINA_BASE:   /usr/local/apache-tomcat-6.0.18
Using CATALINA_HOME:   /usr/local/apache-tomcat-6.0.18
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-6.0.18/temp
Using JRE_HOME:/usr/lib/jvm/java-6-sun-1.6.0.07/lib/\
visualvm/profiler2/lib/deployed/jdk16\
/usr/local/apache-tomcat-6.0.18/bin/catalina.sh: line 314: \
/usr/lib/jvm/java-6-sun-1.6.0.07/lib/visualvm/profiler2/lib/\
deployed/jdk16/bin/java: No such file or directory

What can I to do?
Any advices will be appreciated!

-- 
Regards, Paul Csanyi
http://www.freewebs.com/csanyi-pal/index.htm


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Monitoring Tomcat with Jconsole

2008-11-24 Thread Caldarale, Charles R
 From: André Warnier [mailto:[EMAIL PROTECTED]
 Subject: Re: Monitoring Tomcat with Jconsole

 I don't know if the jconsole offers a cleaner way of doing this

I'm not aware of any mechanism in JConsole to send the output anywhere, other 
than via the clipboard.

 After this processing, the process in a top display shows
 the following :
 22175 star  21   0  266m  23m  11m S  1.0  4.6   0:14.61 java
 (where 266m is the virtual memory, and 11m the resident one).

The top virtual number is just what's in the memory map for the process, so 
that includes files, code, non-Java stuff, etc., as well as the JVM heap.  The 
resident memory number is the pages that happen to be in RAM at the moment.

 Compared to the numbers I see in the jconsole VM summary below,
 these memory figures seem to show a gross disproportion, or am I
 interpreting this wrong ?

 Snapshot 1
 Current heap size:
785 kbytes

This is just the combined virtual size of the new and old generations; it does 
not include PermGen.

 Maximum heap size:
 65.088 kbytes

How big the new + old can get, if needed.

 Committed memory:
 1.984 kbytes

Includes the JIT's code pool, C heap, Java heap, PermGen, and various other 
bits and pieces the JVM knows about.

 Committed virtual memory:
 270.980 kbytes
 Total physical memory:
   516.920 kbytes
 Free physical memory:
 6.852 kbytes
 Total swap space:
 1.297.564 kbytes
 Free swap space:
 1.234.376 kbytes

All of the above are for the entire system, not just this one process.

 Snapshot 2
 Current heap size:
  1.828 kbytes

The heap has expanded a bit.

 Maximum heap size:
 65.088 kbytes

This can't change.

 Committed memory:
 2.452 kbytes

Increased due to heap expansion plus probable enlarging of the code pool, C 
heap, PermGen, etc.

Nothing unexpected here.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Shutting down Tomcat6 server - error

2008-11-24 Thread Caldarale, Charles R
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Csanyi Pal
 Subject: Shutting down Tomcat6 server - error

 I have downloaded binary apache-tomcat-6.0.18.tar.gz and unpacked it
 in the /usr/locale/ directory.

Thank you for using a real Tomcat.

 I edited .bash_profile:
 #
 # JAVA
 #
 export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.07/lib/visualvm/\
 profiler2/lib/deployed/jdk16
 export PATH=$PATH:/usr/lib/jvm/java-6-sun-1.6.0.07/lib/visualvm/\
 profiler2/lib/deployed/jdk16

That's not right.  JAVA_HOME should be set to just:
/usr/lib/jvm/java-6-sun-1.6.0.07

PATH should be extended with just:
/usr/lib/jvm/java-6-sun-1.6.0.07/bin

 I can to start Tomcat6 with startup.sh

That's pretty amazing, considering how badly the JAVA_HOME variable is mangled.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat 5.5.20 security issue

2008-11-24 Thread Michael Ludwig
BEN HMIDA aymen schrieb am 24.11.2008 um 16:24:35 (+0100):
 I tried to download the xmlsec.jar and placed it in my WEB-INF/lib but
 no success

Did you get one of these?

http://xml.apache.org/security/dist/java-library/

In order to register your security provider, you may have to do some
editing in here:

C:\Programme\Java\jre1.5.0_09\lib\security\java.security

Maybe these links are helpful:

Sean Mullan's Blog: Security Archives
http://weblogs.java.net/blog/mullan/archive/security/index.html

Java Cryptography Architecture (JCA)
http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#ProviderInstalling

Let us know if this helps, and if so, what you have to do to get it
working.

Michael Ludwig

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat 5.5.20 security issue

2008-11-24 Thread Michael Ludwig
aymen83 schrieb am 24.11.2008 um 05:45:11 (-0800):
 I???m trying to run a web service on tomcat 5.5.20 but I have this
 error. I???m not expert in tomcat so if someone can help me?
 
 java.lang.NoClassDefFoundError:
 com/sun/org/apache/xml/internal/security/Init
 
 at
 com.sun.xml.wss.impl.SecurableSoapMessage.clinit(SecurableSoapMessage.java:75)

You said you're using Java 1.5, which, as Chuck observed, doesn't have
the class com.sun.org.apache.xml.internal.security.Init. This is new
in 1.6.

You can try Apache's xmlsec.jar and then you possibly have to register
this as the new security provider to supplant the built-in one. Maybe
this is possible in the same way as substituting Apache's Xalan (XSLT)
for SUN's version of Xalan, which is under com.sun.org.apche.xalan.

In case your application explicitly wants the com.sun.org.apache
version, you'll probably have to upgrade.

Michael Ludwig

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Monitoring Tomcat with Jconsole

2008-11-24 Thread André Warnier

Caldarale, Charles R wrote:
[...]

Thanks for the many comments.




After this processing, the process in a top display shows
the following :
22175 star  21   0  266m  23m  11m S  1.0  4.6   0:14.61 java
(where 266m is the virtual memory, and 11m the resident one).


The top virtual number is just what's in the memory map for the process, so 
that includes files, code, non-Java stuff, etc., as well as the JVM heap.  The 
resident memory number is the pages that happen to be in RAM at the moment.


Compared to the numbers I see in the jconsole VM summary below,
these memory figures seem to show a gross disproportion, or am I
interpreting this wrong ?


What I meant above was the apparent disproportion between the 266M 
number and what (I think) I see really used by the application according 
to jconsole.
But from you comment above, I gather that I was wrongly fixated on that 
number (266M) and that it does not really represent any real memory used 
in any permanent way by the process. What really matters is the 
Resident part of it (23M), as compared to how much physical RAM the 
system really has, right ?




Snapshot 1
Current heap size:
   785 kbytes


This is just the combined virtual size of the new and old generations; it does 
not include PermGen.


Maximum heap size:
65.088 kbytes


How big the new + old can get, if needed.


And can be controlled by the -Xmxsize switch, yes ?




Committed memory:
1.984 kbytes


Includes the JIT's code pool, C heap, Java heap, PermGen, and various other 
bits and pieces the JVM knows about.


Committed virtual memory:
270.980 kbytes
Total physical memory:
  516.920 kbytes
Free physical memory:
6.852 kbytes
Total swap space:
1.297.564 kbytes
Free swap space:
1.234.376 kbytes


All of the above are for the entire system, not just this one process.


Understood.


Snapshot 2
Current heap size:
 1.828 kbytes


The heap has expanded a bit.


Maximum heap size:
65.088 kbytes


This can't change.


Committed memory:
2.452 kbytes


Increased due to heap expansion plus probable enlarging of the code pool, C 
heap, PermGen, etc.

Nothing unexpected here.



Ok.
Now a final question on this app :
By running the requests that lead to the snapshot 2 above, I believe I 
have pretty much stressed that app as much as I can (they were 
relatively heavy requests, involving a fair amount of XML parsing).


After watching jconsole for a while, I noted that the total heap space 
used always remained below 8 Mb, and the non-heap space remained below 9 
Mb at all times. So, I have incrementally brought down the value of some 
 switches, to this level :

-server -Xms16M -Xmx32M -Xmaxjitcodesize16M
without apparently having any effect on the application's ability to 
process requests.  My idea in doing this was to reduce the amount of 
system memory this application maybe reserves for no benefit, and thus 
leave more real RAM for others.


Considering the numbers above, in your opinion is there anything I 
could/should still try, while still leaving a margin for the application 
to support maybe a higher level of requests ?


I am not looking for definite answers here, just trying to get a feel 
for the stuff, what is important or not.
Like for instance if you told me to never touch this -Xmaxjitcodesize, 
that it doesn't bring anything and could crash the application and cause 
all my hair to fall off, or anything along those lines.


The point is, after that I'm going to go through the same kind of 
exercise with Tomcat, and I want a feel for what I should or should not 
play with.



Thanks

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Setup Logging for Tomcat 6

2008-11-24 Thread Michael Ludwig
André Warnier schrieb am 24.11.2008 um 21:35:50 (+0100):
 dOE wrote:
 Its running on win32,
 
 JVM is 1.6
 
 installed via js-wrapper.
 
 I don't know that js-wrapper, but if this is under Windows, might not
 the logs be all redirected in the Windows system logs ?

If this is possible, it's not the default. But is it possible? If so,
what do I have to do to set it up to use the Windows Event Viewer?

 My computer icon, right-click, Manage, then the first folder
 under System.
 (Can't tell you exactly, this PC is German, and there it's called 
 Ereignisanzeige)

Shortcut: Hit Windows-r, then type eventvwr.msc.

Michael Ludwig

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Setup Logging for Tomcat 6

2008-11-24 Thread Michael Ludwig
Caldarale, Charles R schrieb am 24.11.2008 um 13:33:39 (-0600):
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Subject: Re: Setup Logging for Tomcat 6
 
  Copy the log4j jar file to WEB-INF/lib.  Put it in
  ${catalina.home}/lib if you want all webapps to be able to
  see this file.
 
 You really don't want to put the log4j.jar into Tomcat's lib directory
 unless you actually want all the webapps to *share* (not just see)
 the same logging complex.

See the driver - I think I used that expression yesterday. Share a
logging complex - could you expand a bit on what this means, or provide
a pointer to an informative document?

Thanks.

Michael Ludwig

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Monitoring Tomcat with Jconsole

2008-11-24 Thread Caldarale, Charles R
 From: André Warnier [mailto:[EMAIL PROTECTED]
 Subject: Re: Monitoring Tomcat with Jconsole

 I gather that I was wrongly fixated on that number (266M)
 and that it does not really represent any real memory used
 in any permanent way by the process.

Correct; it's analagous to profit claimed by certain financial institutions...

 What really matters is the Resident part of it (23M), as
 compared to how much physical RAM the system really has

Yes, but be wary of how big the Java heap can get.  One normally runs server 
programs with -Xms == -Xmx, partly to avoid any chance of the heap growing and 
running into page thrashing.

  How big the new + old can get, if needed.
 And can be controlled by the -Xmxsize switch, yes ?

Correct.

 By running the requests that lead to the snapshot 2 above,
 I believe I have pretty much stressed that app as much as
 I can (they were relatively heavy requests, involving a
 fair amount of XML parsing).

Depends on whether or not the app is capable of processing multiple requests 
concurrently (like Tomcat and most servers can).

 My idea in doing this was to reduce the amount of system memory
 this application maybe reserves for no benefit, and thus leave
 more real RAM for others.

It's useful to size the heap appropriately, balancing GC frequency against RAM 
usage.  I wouldn't mess with the max code size attribute - let the JVM use what 
it needs; the rest won't get any pages allocated to it anyhow.

 Considering the numbers above, in your opinion is there
 anything I could/should still try, while still leaving
 a margin for the application to support maybe a higher
 level of requests ?

I'm not really in a position to say - I have no real feel for what this 
particular app needs when the going gets tough.  Best for you to continue to 
monitor it, preferably in a production environment if you can (as well as doing 
your own stress testing, of course).

 Like for instance if you told me to never touch this
 -Xmaxjitcodesize, that it doesn't bring anything and
 could crash the application

It probably provides no benefit, and could cause the app to run slowly if the 
JIT doesn't have enough room to store all the generated native code, causing 
recompilation of methods.  It's not likely to cause a crash, but I suspect the 
main purpose of that option is to stress test the JIT.

 and cause all my hair to fall off

If it hasn't done so by now, that's probably not a concern.  (I've still got 
mine.)

 The point is, after that I'm going to go through the same
 kind of exercise with Tomcat, and I want a feel for what
 I should or should not play with.

The main thing to adjust is the max heap size.  Fiddling with the other stuff 
will buy you a lot less than streamlining your webapp code.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Setup Logging for Tomcat 6

2008-11-24 Thread Caldarale, Charles R
 From: Michael Ludwig [mailto:[EMAIL PROTECTED]
 Subject: Re: Setup Logging for Tomcat 6

 See the driver - I think I used that expression yesterday. Share a
 logging complex - could you expand a bit on what this means,
 or provide a pointer to an informative document?

Look at Tomcat's class loading hierarchy.  Classes loaded from Tomcat's lib 
directory are shared at runtime by all webapps (and Tomcat, for that matter), 
whereas classes coming from a webapp's WEB-INF/lib or WEB-INF/classes are local 
to that webapp.  If the classes from Tomcat's lib directory have any static 
fields or singleton objects, only one copy of those fields and objects exist 
for all the webapps.

I haven't looked inside log4j to see just what information in maintains in 
static fields or singletons, but keeping the log4j.jar with each webapp insures 
you won't get any unwarranted interaction in your webapps' logging.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Re: Tomcat 6 unstable

2008-11-24 Thread Michael Ludwig
Ariela Carrera schrieb am 24.11.2008 um 09:40:40 (-0800):
 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)

That's like you find out your car has no wheels. You said you've
manipulated Tomcat's startup script. Don't do that. Make a clean install
and it should work.

 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.

This sounds like something in the session isn't properly initialized.
I'd say this is an error in your application.

 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). 

Careful! :-)

 3) About the db2 jdbc driver, well, it is allocated in many paths... 
 
 JAVA_HOME/jdk/jre/lib/ext/db2jcc.jar

Placing the driver here makes it available to everything run via this
JVM, including Tomcat and your web applications.

 CATALINA_HOME/lib/db2jcc.jar

Placing the driver here makes it available to both Tomcat and all web
applications. It allows you to use the connection pool with this driver.

 CATALINA_HOME/webapps/cqaex/db2jcc.jar

Placing the driver here makes it available for download in the cqaex web
application.

 CATALINA_HOME/webapps/peerca/WEB-INF/lib/db2jcc.jar

Placing the driver here makes it available only to the web application
peerca. It is (a) redundant when the driver is already placed in
CATALINA_HOME/lib, and (b) won't allow you, on its own, to use the
connection pool. It only allows you to load the driver via the
DriverManager.

 DB2_HOME/V9.5/java/db2jcc.jar

This is probably the place of the driver in the DB2 distribution. Won't
hurt.

 ¿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?

If you want to think of Tomcat as independent of the JVM you run
it with, place the driver in Tomcat6/lib or reference it from
Tomcat6/conf/catalina.properties.

 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?

It's not considered good practice to have a service run as root when
there is no need to do so. The root user is very powerful, so it's
potentially dangerous expose a process run as root to the world.

Tomcat should probably be run as www-data or whatever it is called on
your system.

All permissions issues can be handled by using chmod and chown. I don't
know your particular situation, but it's unlikely you have to resort to
running Tomcat as root.

 I am not using any Eclipse, I just write manually my codes

Very good! So you don't lose the ground under your feet.

 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

Sounds like an SQL error to me. Look it up in your IBM manual.

 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)

Reasonable package names. Got to get an IBM database, too.

 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).

Read this:

http://mail-archives.apache.org/mod_mbox/tomcat-users/200811.mbox/[EMAIL 
PROTECTED]

Short answer for Tomcat 6: Either put the driver in $Tomcat/lib, or add
it to the common.loader in conf/catalina.properties.

 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 ?

It'll probably work the same way as for other database servers. In order
for this to work, both Tomcat and your webapp need to be able to see the
driver.

I hope this helps.

Michael Ludwig

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Setup Logging for Tomcat 6

2008-11-24 Thread Michael Ludwig
Caldarale, Charles R schrieb am 24.11.2008 um 18:53:06 (-0600):
  From: Michael Ludwig [mailto:[EMAIL PROTECTED]
  Subject: Re: Setup Logging for Tomcat 6
 
  See the driver - I think I used that expression yesterday. Share a
  logging complex - could you expand a bit on what this means,
  or provide a pointer to an informative document?
 
 Look at Tomcat's class loading hierarchy.  Classes loaded from
 Tomcat's lib directory are shared at runtime by all webapps (and
 Tomcat, for that matter), whereas classes coming from a webapp's
 WEB-INF/lib or WEB-INF/classes are local to that webapp.  If the
 classes from Tomcat's lib directory have any static fields or
 singleton objects, only one copy of those fields and objects exist
 for all the webapps.

I see. I wasn't aware of this property of the common.loader.

Does the same hold true for the shared.loader?

 I haven't looked inside log4j to see just what information in
 maintains in static fields or singletons, but keeping the log4j.jar
 with each webapp insures you won't get any unwarranted interaction in
 your webapps' logging.

This make sense. Thanks!

Michael Ludwig

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: User Request Ordering

2008-11-24 Thread Michael Ludwig
Clifton B. Sothoron Jr. schrieb am 24.11.2008 um 13:55:00 (-0500):
 I have a Tomcat 6.0 Web application with a number of buttons on the
 screen. Some of them execute quickly, some more slowly.  However, they
 need to execute in order. When a user clicks on a slow button and then
 clicks on a fast button Tomcat needs to wait for the results of the
 slow button before moving on to the fast executing button.

No - Tomcat is patient: the user needs to wait. Don't show him button
two until he's allowed to click it.

You coult also use Javascript to disable the button, which, of course,
requires the user not disable Javascript in his browser.

 However, this is not happening. The results of the fast button are
 disrupting the results of the slow button.  How do I configure Tomcat
 to process user requests in order?

Tomcat is the server, and the server knows everything. So Tomcat can
check whether or not it is legitimate for button X to be clicked on
behalf of user Y. This should be done regardless of whether or not you
move to one of the solutions at the UI level.

Michael Ludwig

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



tomcat 6.0.18 clustering.. session getting replicated partially

2008-11-24 Thread rohit aman
Hi,

   I had setup a tomcat cluster with two nodes. followed the instructions
from tomcat 6 clustering how to document. I created a sample
application to test out my cluster.  This application has a cart where u can
add items.

now, the problem is, not all session variables are getting replicated. below
is the scenario..

1)start tomcat 1
2)access the cart add items to it ( lets say added 5 items )
3)start tomcat 2
4)add some more items ( 3 more...so totally 8) ( this is done using tomcat 1
again because my LB is configured for sticky sessions)
5)stop tomcat 1
6)access the cart (now the request goes to tomcat 2)...here *I can only see
the first 5 items where as it should be 8. *So, the next three did not get
replicated.

whichever session or session attribute gets created when both nodes are
running is not getting replicated for some reason.

I am monitoring both nodes with Jconsole. In Jconsole the number of session
for the application =  sessions in node 1 + sessions in node 2. So, this
says that sessions are being replicated. But, I am not sure why I am not
able to access all sessions/sessionAttributes.

Any help is very much appreciated.

Thanks
Rohit


RE: Setup Logging for Tomcat 6

2008-11-24 Thread Caldarale, Charles R
 From: Michael Ludwig [mailto:[EMAIL PROTECTED]
 Subject: Re: Setup Logging for Tomcat 6

 Does the same hold true for the shared.loader?

It holds true for *any* classloader in the hierarchy.  The shared.loader is 
disabled in the standard Tomcat 6 config, as you probably know.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Re: Tomcat 6 unstable

2008-11-24 Thread Caldarale, Charles R
 From: Ariela Carrera [mailto:[EMAIL PROTECTED]
 Subject: Re: Re: Tomcat 6 unstable

 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

This is not good.  You must not place a jar in multiple locations that are 
visible along any single branch of the classloader hierarchy.  Look at the 
diagram and discussion here:
http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html

  Bootstrap
  |
   System
  |
   Common
   / \
  Webapp1   Webapp2 ...

Since the jre/lib/ext directory is essentially part of the Bootstrap class 
loader, you now have three locations that the DB2 JDBC driver might be loaded 
from.  This pretty much guarantees class loading conflicts that will result in 
all sorts of problems, including NoClassDefFoundError, and many other more 
subtle issues.

To use Tomcat's DB connection pooling, the jar needs to be in either the 
jre/lib/ext or the CATALINA_HOME/lib location - not both.  It cannot be in 
WEB-INF/lib to use Tomcat's connection pooling, but it can be there if you use 
your own pooling (or no pooling at all), in which case it must be removed from 
the other two places.

The webapps/cqaex and DB2_HOME locations will be ignored by Tomcat, but as 
Michael L pointed out, the former location exposes the jar to remote clients, 
which is bad practice.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat 6.0.18 clustering.. session getting replicated partially

2008-11-24 Thread Filip Hanik - Dev Lists

post a sample app, and we can test it out

Filip

rohit aman wrote:

Hi,

   I had setup a tomcat cluster with two nodes. followed the instructions
from tomcat 6 clustering how to document. I created a sample
application to test out my cluster.  This application has a cart where u can
add items.

now, the problem is, not all session variables are getting replicated. below
is the scenario..

1)start tomcat 1
2)access the cart add items to it ( lets say added 5 items )
3)start tomcat 2
4)add some more items ( 3 more...so totally 8) ( this is done using tomcat 1
again because my LB is configured for sticky sessions)
5)stop tomcat 1
6)access the cart (now the request goes to tomcat 2)...here *I can only see
the first 5 items where as it should be 8. *So, the next three did not get
replicated.

whichever session or session attribute gets created when both nodes are
running is not getting replicated for some reason.

I am monitoring both nodes with Jconsole. In Jconsole the number of session
for the application =  sessions in node 1 + sessions in node 2. So, this
says that sessions are being replicated. But, I am not sure why I am not
able to access all sessions/sessionAttributes.

Any help is very much appreciated.

Thanks
Rohit

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Re: Tomcat 6 unstable

2008-11-24 Thread Jabali Acuatico
Thanks Chuck for the technical explanation. Yes, I finally put the jdbc driver 
in the right path: the  jre/lib/ext one, and I edit the catalina.properties. I 
was just answering to Michael Ludwig. 

Thank you both.

*~ Ariela ~*


  ¡Todo sobre Amor y Sexo!
La guía completa para tu vida en Mujer de Hoy.   
http://mx.mujer.yahoo.com/

Re: Re: Tomcat 6 unstable

2008-11-24 Thread Jabali Acuatico
Hello Tomcat World! Thanks Chuck and Michael. This is the answer for Michael:
That's like you find out your car has no wheels. You said you've
manipulated Tomcat's startup script. Don't do that. Make a clean
install and it should work.

Yes, I did, a complete clean installation of Tomcat 6.0.18. I downloaded and 
put it into the /opt directory. Then, I edit the catalina.properties, wich has 
the following sentence:
common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar

I read the link you posted me, but the comments in the catalinal.properties has 
no example with file:/// so I did not write like this. I added to this line 
the path to the db2 jdbc driver. The current sentence is this
 one:
common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar,/opt/java/jdk/jre/lib/ext/*.jar

¿Is this right or do I need to include file:///?


 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). 

Careful! :-)
I did that because one of you recommend me to do that.  Why do you say careful? 
Is this a bad practice? Should I use the startup.sh ??It's not considered good 
practice to have a service run as root when
there is no need to do so. The root user is very powerful, so it's
potentially dangerous expose a process run as root to the world.
Well, in this
 new phase of using Tomcat, I am not running it as root, just as common user 
and it's working fine, but the DB2 connection deal is still causing me troubles.

Thanks for all. Now I need to learn how to do a pooling of connections. Any 
comments?
I really apreciate your time for answer me.


Ariela


  ¡Todo sobre Amor y Sexo!
La guía completa para tu vida en Mujer de Hoy.   
http://mx.mujer.yahoo.com/

Re: Setup Logging for Tomcat 6

2008-11-24 Thread Michael Ludwig
Caldarale, Charles R schrieb am 24.11.2008 um 19:37:52 (-0600):
  From: Michael Ludwig [mailto:[EMAIL PROTECTED]
  Subject: Re: Setup Logging for Tomcat 6
 
  Does the same hold true for the shared.loader?
 
 It holds true for *any* classloader in the hierarchy.

Thanks for this clarification.

 The shared.loader is disabled in the standard Tomcat 6
 config, as you probably know.

I didn't. I'm a Tomcat newbie. But I discovered the other day
that you can place libraries in the shared.loader by editing
conf/catalina.properties.

I wondered why this wasn't stated more clearly in the
documentation for Tomcat 6. I only understood the issue
reading the documentation for Tomcat 5. The shared.loader
is still there in Tomcat 6, but not explained.

What's the rationale behind disabling it?

May we consider it deprecated?

Michael Ludwig

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Re: Tomcat 6 unstable

2008-11-24 Thread Michael Ludwig
Caldarale, Charles R schrieb am 24.11.2008 um 19:52:22 (-0600):
 You must not place a jar in multiple locations that are visible along
 any single branch of the classloader hierarchy. Look at the diagram
 and discussion here:
 http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html
 
   Bootstrap
   |
System
   |
Common
/ \
   Webapp1   Webapp2 ...
 
 Since the jre/lib/ext directory is essentially part of the
 Bootstrap class loader, you now have three locations that the DB2
 JDBC driver might be loaded from.  This pretty much guarantees
 class loading conflicts that will result in all sorts of problems,
 including NoClassDefFoundError, and many other more subtle issues.

This is starting to sound like DLL Hell.

 To use Tomcat's DB connection pooling, the jar needs to be in
 either the jre/lib/ext or the CATALINA_HOME/lib location - not
 both.  It cannot be in WEB-INF/lib to use Tomcat's connection
 pooling, but it can be there if you use your own pooling (or no
 pooling at all), in which case it must be removed from the other
 two places.

Could web app Foo, which brings its own DB2 driver - in spite
of the same driver already offered by the common.loader or
the bootstrap.loader, by this very fact jeopardize other web
applications running in the same container, which rely on the
DB2 driver offered by the common.loader?

Or would web app Foo only harm itself?

Does this mean web apps have to be monitored for the classes they
make available in order to make sure none of them has already been
made available via the common.loader?

Michael Ludwig

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Setup Logging for Tomcat 6

2008-11-24 Thread Caldarale, Charles R
 From: Michael Ludwig [mailto:[EMAIL PROTECTED]
 Subject: Re: Setup Logging for Tomcat 6

 I didn't. I'm a Tomcat newbie. But I discovered the other day
 that you can place libraries in the shared.loader by editing
 conf/catalina.properties.

Unless you really, really need to do that, don't.  It's there primarily for 
people who can't (or won't) move to the new classloader structure when 
upgrading from older versions.  Adding more classloaders to the hierarchy only 
slows things down.

 May we consider it deprecated?

Pretty much, yes.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Setup Logging for Tomcat 6

2008-11-24 Thread dOE
I have the *.zip version.

On Mon, Nov 24, 2008 at 3:48 PM, Caldarale, Charles R 
[EMAIL PROTECTED] wrote:

  From: dOE [mailto:[EMAIL PROTECTED]
  Subject: Re: Setup Logging for Tomcat 6
 
  Its running on win32,

 O.k.

  JVM is 1.6

 O.k.

  installed via js-wrapper.

 ??? Not bloody likely.  Download Tomcat from
 http://tomcat.apache.org/download-60.cgi (the .zip version, not the .exe),
 do a fresh install of it, and try running the catalina.bat script and see
 what it says.

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you received
 this in error, please contact the sender and delete the e-mail and its
 attachments from all computers.

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Setup Logging for Tomcat 6

2008-11-24 Thread dOE
the JS-wrapper can redirect its output to event viewer.

On Mon, Nov 24, 2008 at 7:13 PM, Michael Ludwig [EMAIL PROTECTED] wrote:

 André Warnier schrieb am 24.11.2008 um 21:35:50 (+0100):
  dOE wrote:
  Its running on win32,
  
  JVM is 1.6
  
  installed via js-wrapper.
 
  I don't know that js-wrapper, but if this is under Windows, might not
  the logs be all redirected in the Windows system logs ?

 If this is possible, it's not the default. But is it possible? If so,
 what do I have to do to set it up to use the Windows Event Viewer?

  My computer icon, right-click, Manage, then the first folder
  under System.
  (Can't tell you exactly, this PC is German, and there it's called
  Ereignisanzeige)

 Shortcut: Hit Windows-r, then type eventvwr.msc.

 Michael Ludwig

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




RE: Re: Tomcat 6 unstable

2008-11-24 Thread Caldarale, Charles R
 From: Jabali Acuatico [mailto:[EMAIL PROTECTED]
 Subject: Re: Re: Tomcat 6 unstable

 I added to this line the path to the db2 jdbc driver.
 The current sentence is this one:
 common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar,
 /opt/java/jdk/jre/lib/ext/*.jar

Don't do that - put it back the way it was.  The DB2 driver classes will be 
found properly by the JVM's extensions class loader (for all intents and 
purposes, you can consider it part of the bootstrap class loader).

 ¿Is this right or do I need to include file:///?

No, you don't need the file:/// prefix; but in any case you don't want to 
change the loader config at all.

 I did that because one of you recommend me to do that.  Why
 do you say careful? Is this a bad practice?

For normal running, use the startup.sh script; for easier debugging, use 
catalina.sh since it runs Tomcat in the same window as the shell you're using 
and you can see any error messages that might arise.

 Now I need to learn how to do a pooling of connections.

Read this:
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html

If you still have questions, ask.  Don't know how many people on the list are 
using Tomcat with DB2, but there must be somebody...

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Re: Tomcat 6 unstable

2008-11-24 Thread Caldarale, Charles R
 From: Michael Ludwig [mailto:[EMAIL PROTECTED]
 Subject: Re: Re: Tomcat 6 unstable

 This is starting to sound like DLL Hell.

A bit, but the advantage of a classloader hierarchy is that webapps are 
isolated from each other (a servlet spec requirement).  If you keep the jars 
your webapp needs with the webapp and not scattered all over, you won't have a 
problem.  Unfortunately, you can't do that if you want Tomcat to manage the DB 
connection pooling, since Tomcat itself must have access to the JDBC driver 
classes.  You can always manage the pool inside the webapp yourself using 
commons-dbcp or the like.

 Could web app Foo, which brings its own DB2 driver - in spite
 of the same driver already offered by the common.loader or
 the bootstrap.loader, by this very fact jeopardize other web
 applications running in the same container, which rely on the
 DB2 driver offered by the common.loader?

 Or would web app Foo only harm itself?

Good question, and it doesn't have a clear answer.  If an object originating in 
a webapp classloader is passed to code from a more global classloader, and then 
another webapp accesses that object, it will not be castable to any type the 
second webapp has access to.  (Class myPackage.MyClass loaded by classloader A 
is not the same type as myPackage.MyClass loaded by classloader B.)

 Does this mean web apps have to be monitored for the classes they
 make available in order to make sure none of them has already been
 made available via the common.loader?

If a webapp minds its own business, there shouldn't be a problem.  If it tries 
to use Tomcat's DB connection pooling (or logging, or some other shared 
mechanism), but insists on providing its own copy of the shared classes, then 
there are likely to be problems.  (This is a problem with servlet containers - 
not just Tomcat - because it breaks the standard Java classloading model of 
always delegating upwards.  As mentioned before, this breaking is pretty much 
required by the servlet spec.)

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DB2 problem: AM_BASE_TASKS ¿is a ghost table?

2008-11-24 Thread Jabali Acuatico
I know this is not a DB2 list, but certainly the problem is between Tomcat and 
DB2, because everything doing manually, with DB2 terminal, using a console, is 
working properly.  

I am using a  java connection class and a JDBC driver : db2jcc.jar for 
developing a webapp in Tomcat 6.0.18 on Ubuntu 7.10. 



I am connecting, querying and updating without problems using the same
user, the same driver and even the same jsp pages to connect many DB2
databases. All of them are running locally, with the exactly same
conditions and owner, in my laptop, and they are working properly. But
there is a single one, called cafe. I put some OUT.PRINTLN for
debugging and know what was going on.



The problem is when I tried to retrieve the tables from the schema, and
then selecting all of each table. I also print its names, as I do with
the rest of dbs, an exception happens, and the output of Tomcat showing
me a table that is not existing in the reality of the schema. I am
really surprised of this, as a newbie of DB2... Although, in the db2
console, everything seems to be normal, showing me the 8 tables there
are in fact exists. ¿Why Tomcat throws me an exception and shows me
this ghost table called AM_BASE_TASKS.



This is part of the output of my connection class (the last part):



...
Consulta : select * from PRICES
SETRESPUESTA:  ENTRO
SETRESPUESTA:  CONSULTA VALE : select * from PRICES
SETRESPUESTA:  Sentencia vale : [EMAIL PROTECTED]
SETRESPUESTA:   dentro del IF
SETRESPUESTA:   dentro del TRY
SETRESPUESTA: EL RESULTADO NO ES NULO!
SETRESPUESTA: Datos : [EMAIL PROTECTED]
SETRESPUESTA:  Columnas : 3
SETFILAS:  ... Entro
SETFILAS:  ... Filas inicial : 5
SETFILAS:  ... Filas final : 5
SETRESPUESTA: Filas : 5
SALIO DE SETRESPUESTA
SETFILAS:  ... Entro
SETFILAS:  ... Filas inicial : 5
SETFILAS:  ... Filas final : 5
Consulta : select * from AM_BASE_TASKS
SETRESPUESTA:  ENTRO
SETRESPUESTA:  CONSULTA VALE : select * from AM_BASE_TASKS
SETRESPUESTA:  Sentencia vale : [EMAIL PROTECTED]
SETRESPUESTA:   dentro del IF
SETRESPUESTA:   dentro del TRY
com.ibm.db2.jcc.b.SqlException: DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704, 
SQLERRMC: DB2INST1.AM_BASE_TASKS
at com.ibm.db2.jcc.b.zc.e(zc.java:1606)
at com.ibm.db2.jcc.b.zc.a(zc.java:1206)
at com.ibm.db2.jcc.a.db.h(db.java:149)
at com.ibm.db2.jcc.a.db.a(db.java:43)
at com.ibm.db2.jcc.a.r.a(r.java:30)
at com.ibm.db2.jcc.a.sb.g(sb.java:152)
at com.ibm.db2.jcc.b.zc.n(zc.java:1186)
at com.ibm.db2.jcc.b.zc.a(zc.java:1857)
at com.ibm.db2.jcc.b.zc.e(zc.java:775)
at com.ibm.db2.jcc.b.zc.execute(zc.java:759)
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)




The output for the normal situation is here:

~$ db2 connect to cafe
 
   Database Connection Information
 
 Database server= DB2/LINUX 9.5.0
 SQL authorization ID   = DB2INST1
 Local database alias   = CAFE




There are no problems to connect this database. And even if I list its tables, 
there are no problems...

$ db2 list tables
 
Table/View  Schema  Type  Creation time 
--- --- - --
CAMPUS   

Re: tomcat 6.0.18 clustering.. session getting replicated partially

2008-11-24 Thread Bhooshan Pandit
Why don't you use replicated sessions? I believe with sticky sessions the 
session data does not get copied over to other servers in the LB setup, with 
replicated session it does.

-Original Message-
From: rohit aman [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Tue, 25 Nov 2008 6:57 am
Subject: tomcat 6.0.18 clustering.. session getting replicated partially








Hi,

   I had setup a tomcat cluster with two nodes. followed the instructions
from tomcat 6 clustering how to document. I created a sample
application to test out my cluster.  This application has a cart where u can
add items.

now, the problem is, not all session variables are getting replicated. below
is the scenario..

1)start tomcat 1
2)access the cart add items to it ( lets say added 5 items )
3)start tomcat 2
4)add some more items ( 3 more...so totally 8) ( this is done using tomcat 1
again because my LB is configured for sticky sessions)
5)stop tomcat 1
6)access the cart (now the request goes to tomcat 2)...here *I can only see
the first 5 items where as it should be 8. *So, the next three did not get
replicated.

whichever session or session attribute gets created when both nodes are
running is not getting replicated for some reason.

I am monitoring both nodes with Jconsole. In Jconsole the number of session
for the application =  sessions in node 1 + sessions in node 2. So, this
says that sessions are being replicated. But, I am not sure why I am not
able to access all sessions/sessionAttributes.

Any help is very much appreciated.

Thanks
Rohit



 






You are invited to Get a Free AOL Email ID. - http://webmail.aol.in


RE: User Request Ordering

2008-11-24 Thread Ghufran
Hi

 

It is obvious that you must redesign your application.

However you can try this within your current design

Put a flag in the session and that flag should tell what operation has user
performed yet.

 

Ghufran

 

-Original Message-
From: Michael Ludwig [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 25, 2008 6:24 AM
To: Tomcat Users List
Subject: Re: User Request Ordering

 

Clifton B. Sothoron Jr. schrieb am 24.11.2008 um 13:55:00 (-0500):

 I have a Tomcat 6.0 Web application with a number of buttons on the

 screen. Some of them execute quickly, some more slowly.  However, they

 need to execute in order. When a user clicks on a slow button and then

 clicks on a fast button Tomcat needs to wait for the results of the

 slow button before moving on to the fast executing button.

 

No - Tomcat is patient: the user needs to wait. Don't show him button

two until he's allowed to click it.

 

You coult also use Javascript to disable the button, which, of course,

requires the user not disable Javascript in his browser.

 

 However, this is not happening. The results of the fast button are

 disrupting the results of the slow button.  How do I configure Tomcat

 to process user requests in order?

 

Tomcat is the server, and the server knows everything. So Tomcat can

check whether or not it is legitimate for button X to be clicked on

behalf of user Y. This should be done regardless of whether or not you

move to one of the solutions at the UI level.

 

Michael Ludwig

 

-

To start a new topic, e-mail: users@tomcat.apache.org

To unsubscribe, e-mail: [EMAIL PROTECTED]

For additional commands, e-mail: [EMAIL PROTECTED]