Re: tomcat incoming requests and thread usage

2007-09-14 Thread Manivannan Palanichamy
Its hard to say servlet threads return to pool, as soon as its done with the
response. many things would go in between, as Caldarale said. u can try with
few threads and really trace whats going with the service method. make sure,
the last line of service method is reached -- at least u can be sure that
the thread is done.

---
Manivannan Palanichamy
http://mani.gw.googlepages.com/index.html


On 9/14/07, Caldarale, Charles R [EMAIL PROTECTED] wrote:

  From: Waseem Azhar [mailto:[EMAIL PROTECTED]
  Subject: tomcat incoming requests and thread usage
 
  Could sombody tell me how tomcat release/reclaim it threads
  after serving request.

 Threads return to the pool when the servlet/filter chain does its
 return.  If threads are still busy, it's your webapps that are hanging
 on to them.  Take a thread dump and find out where they're stuck.

 - 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]




-- 
Manivannan.Palanichamy (@) Oracle.com
http://mani.gw.googlepages.com/index.html


Threads in tomcat application.

2007-08-31 Thread Manivannan Palanichamy
Hi

I need to design a web application that may use threads. Thats, the web
application might have to read some 200 files from network. In order to
speed up the process, I've decided to use threads/thread pooling. But,
however I know it is not a good practice to use threads in a web/server
application... Just want to know whether this will be a great impact in
future.. Otherwise, do you suggest any alternative design for the above
problem? Looking forward a quick reply :-)

-- 
Manivannan Palanichamy
http://mani.gw.googlepages.com/index.html


Re: Tomcat not starting properly.

2007-08-28 Thread Manivannan Palanichamy
which tomcat version are you using?
can you also specify the value of PATH and CLASSPATH variables?

-- 
Manivannan Palanichamy
http://mani.gw.googlepages.com/index.html

On 8/28/07, Potri Raaja [EMAIL PROTECTED] wrote:


 Hi,

 When I try to start my tomcat I am getting the following error, it is
 not getting started properly.

 HC-APACHE:~/jakarta-tomcat-5.0.28/bin # ./startup.sh
 Using CATALINA_BASE:   /root/jakarta-tomcat-5.0.28
 Using CATALINA_HOME:   /root/jakarta-tomcat-5.0.28
 Using CATALINA_TMPDIR: /root/jakarta-tomcat-5.0.28/temp
 Using JAVA_HOME:   /root/j2sdk1.4.2
 Exception in thread main java.lang.NoClassDefFoundError:
 HC-APACHE:~/jakarta-tomcat-5.0.28/bin #

 Can you please suggest me to overcome this error.Waiting for your
 favourable
 reply.

 Regards,
 Potri Raaja.M.
 --
 View this message in context:
 http://www.nabble.com/Tomcat-not-starting-properly.-tf4341696.html#a12367812
 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 (javac)compilation arguments

2007-08-27 Thread Manivannan Palanichamy
oh!
Then, let me put my question clear first..

My problem is: I am trying to install java  tomcat on a server (redhat
linux, 64 bit), which runs on shared memory. I need to limit down java start
up memory, by passing arguments like $javac -J -Xmx118m  $java -Xmx118m so
that the virtual machince starts, otherwise it is terminated.

So, I assume (yes, assumption only) I need to pass same arguments to tomcat,
so that it can start without any error (I also assume, tomcat uses javac and
java in an indirect way to compile  run). So, can you tell me a way how i
pass those arguments to tomcat's javac  java?

I am not able to start tomcat. it is throwing any exception/error but,
simply the prompt returns.


-- 
Manivannan Palanichamy
http://mani.gw.googlepages.com/index.html



On 8/26/07, Brian Munroe [EMAIL PROTECTED] wrote:

 On 8/25/07, Manivannan Palanichamy [EMAIL PROTECTED]
 wrote:

  I need to pass javac (compilation) arguments to tomcat. Just as
 JAVA_OPTS is
  there for jvm arguments, is there any env var/ other ways to pass
 arguments
  to javac of tomcat?

 Hum,  'javac of tomcat' - Do you mean the JSP Compiler, or do you
 really mean javac, which is used when say, compiling Servlets?

 I am not aware of an environment variable ala JAVA_OPTS.  However, if
 you are using Ant, you can add a compilearg as a nested element
 within the javac element.

 For example:

 javac srcdir=${src.home}
 destdir=${build.home}/WEB-INF/classes
 debug=${compile.debug}
 deprecation=${compile.deprecation}
 optimize=${compile.optimize}
 classpath refid=compile.classpath/

 compilerarg value=-Xlint /

 /javac

 If this isn't what you were looking for, please advise.

 -- brian

 -
 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: java.lang.NoClassDefFoundError

2007-08-25 Thread Manivannan Palanichamy
just do, jar -tvf MyJar.jar and see whether it lists the class.

-- 
Manivannan Palanichamy
http://mani.gw.googlepages.com/index.html

On 8/25/07, Dave Sailer [EMAIL PROTECTED] wrote:

 it does. And if it didn't jar uf is broken, I would think.

 On Fri, 2007-08-24 at 15:20 -0600, Filip Hanik - Dev Lists wrote:
  better check your Jar to make sure it has the MyServletException.class
  file still in it.
 
  Filip
 
  Dave Sailer wrote:
   I have a webapp that is working but I wanted to update a servlet jar
 so:
  
   jar uf MyJar.jar net/whohah/portal/servlet/MyServlet.class
   cp MyJar.jar $CATALINA_HOME/webapps/ROOT/WEB-INF/lib
  
   No I get the exception shown below. I have MyServlet stripped down so
   the only imports are:
   import java.io.*;
  
   import javax.servlet.*;
   import javax.servlet.http.*;
  
  
   I can't see how replacing one servlet that has few dependencies is
   causing an unrelated NoClassDefFoundError.
  
  
  
  
   javax.servlet.ServletException:
   net/whohah/portal/exceptions/MyServletException
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:273)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  
   root cause
  
   java.lang.NoClassDefFoundError:
   net/whohah/portal/exceptions/MyServletException
   java.lang.Class.getDeclaredConstructors0(Native Method)
   java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
   java.lang.Class.getConstructor0(Class.java:2671)
   java.lang.Class.newInstance0(Class.java:321)
   java.lang.Class.newInstance(Class.java:303)
   org.apache.jasper.servlet.JspServletWrapper.getServlet(
 JspServletWrapper.java:142)
   org.apache.jasper.servlet.JspServletWrapper.service(
 JspServletWrapper.java:311)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(
 JspServlet.java:315)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  
  
   -
   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]




-- 
Manivannan.Palanichamy (@) Oracle.com
http://mani.gw.googlepages.com/index.html


Tomcat (javac)compilation arguments

2007-08-25 Thread Manivannan Palanichamy
Hi,

I need to pass javac (compilation) arguments to tomcat. Just as JAVA_OPTS is
there for jvm arguments, is there any env var/ other ways to pass arguments
to javac of tomcat?

-- 
Manivannan Palanichamy
http://mani.gw.googlepages.com/index.html


Re: Tomcat freezes up

2007-08-18 Thread Manivannan Palanichamy
What solution been found out for this problem? I am really a sufferer of
this problem? I am thinking of entering a bug. But, the problem is, as
Sebastiaan said, reproducing the bug. Let me work on this, or guys you can
also help/guide/work on reproducing the bug.
-- 
Manivannan Palanichamy
http://mani.gw.googlepages.com/index.html

On 8/16/07, Sebastiaan van Erk [EMAIL PROTECTED] wrote:

 It seems very unlikely to me that the problem is in the Tomcat code. It
 is very widely deployed and any deadlocks would be found relatively
 quickly unless you use a very obscure setup.

 Did you do any standard deadlock debugging? E.g., thread dumps and
 deadlock analysis when the freeze occurs, debug in eclipse with the
 sysdeo plugin and examine the state of your application when the freeze
 occurs... etc.

 Note that reporting a bug is not very useful when there is no
 information on how to reproduce the bug, you'll just get a WORKSFORME or
 NEEDINFO status on the bug.

 Regards,
 Sebastiaan

 Manivannan Palanichamy wrote:
  I posted the same question week back. People advised me to handle the
  resource safely, like freeing up the database connections after use,
  releasing file handles etc. I am very sure that I am doing that
 perfectly,
  but still my tomcat freezes over long run. I've seen this case in many
  instances. Is it an issue with tomcat thread handling? Because, in user
  applications, these freezing problems happen most of the time, because
 of
  poor thread handling.
 
  Better we enter a bug/ discuss this issue in tomcat developers forum.
 




-- 
Manivannan.Palanichamy (@) Oracle.com
http://mani.gw.googlepages.com/index.html


how to strip tomcat?

2007-08-16 Thread Manivannan Palanichamy
My laptop is having very low memory. I need to run minimal version of
tomcat. (stripped version of tomcat, to avoid memory hogging). Can you guys
give some tips on this -- like removing unnecessary jars  enabling dynamic
class/jar loading?

(My requirement is just to run few jsp pages, to enter/retrieve some values
to/from database, nothing else other than that)

-- 
Manivannan Palanichamy
http://mani.gw.googlepages.com/index.html


Re: Tomcat freezes up

2007-08-16 Thread Manivannan Palanichamy
I posted the same question week back. People advised me to handle the
resource safely, like freeing up the database connections after use,
releasing file handles etc. I am very sure that I am doing that perfectly,
but still my tomcat freezes over long run. I've seen this case in many
instances. Is it an issue with tomcat thread handling? Because, in user
applications, these freezing problems happen most of the time, because of
poor thread handling.

Better we enter a bug/ discuss this issue in tomcat developers forum.

-- 
Manivannan Palanichamy
http://mani.gw.googlepages.com/index.html

On 8/16/07, Garg, Apoorv [EMAIL PROTECTED] wrote:



 Best Regards,
 Apoorv


  _
  From: Garg, Apoorv
  Sent: Thursday, August 16, 2007 9:14 AM
  To:   'users@tomcat.apache.org'
  Subject:  Tomcat freezes up
 
  Hi,
 
  I am using Tomcat 5.5.17. I have noticed that at times Tomcat freezes
  up and stops responding to requests. The only way to come out of this
  mode is to restart Tomcat. There is no definite pattern to this
  behaviour. I will appreciate all the help.
 
  Thanks!
 
  Apoorv Garg
  Dematic Corp. USA
  Software Products Engineering, RD-4
  507 Plymouth Ave NE
  Grand Rapids, MI 49505
  Phone: 616-9135044
  Fax: 616-9135024
  E-mail: [EMAIL PROTECTED]
  DEMATIC l Creating Logistics Results
 



Re: java.net.BindException: Address already in use

2007-08-12 Thread Manivannan Palanichamy
On 8/11/07, Susan Richards [EMAIL PROTECTED] wrote:

 First, I just want to say that I sure appreciate all the help I am getting
 on this list and I don't deserve to even associate with highly intelligent
 beings such as yourselves.

 We shutdown and restart our tomcat 5.5.23 server nightly.  Initially, a
 maintenance page for system backup gets copied and then it gets bounced with
 the shutdown.sh and startup.sh scripts.  Since we upgraded last Friday,
 it's not always starting up.  I see this message in the log:

 SEVERE: Error initializing endpoint
 java.net.BindException: Address already in use (errno:226):80

 I've checked server.xml and I only have one connector using this
 port.  Perhaps all the connections are not getting terminated when it shuts
 down?  How do I fix this problem?  How do I figure out what is the cause?


Sometimes, I too faced this prob. I did a work around. Just grep for the
tomcat process id. some thing like,
ps -ax | grep 'endorsed'  //an ugly grep to fetch tomcat process
as you have got the process id now, kill the tomcat as,
kill -9 [pid]

Now start the tomcat.
[also, make sure, you are not running a webserver already on port 80. if you
are running any oracle server, probably it might be starting a apache
webserver on 80, pl check]
-- 
Manivannan.Palanichamy (@) Oracle.com
http://mani.gw.googlepages.com/index.html


Re: Tomcat startup error

2007-08-08 Thread Manivannan Palanichamy
Proabably, you have wronly edited server.xml or tomcat-users.xml. Revert the
changes or get fresh files  then try again.

On 8/8/07, R Y [EMAIL PROTECTED] wrote:

 I install tomcat 5.5 package on Ubuntu, it run server on port 8180 by
 default.

 I start Tomcat 5.5 by running /etc/init.d/tomcat script, it responses:
 * Starting Tomcat servlet engine tomcat5.5  [
 OK
 ]

 but when check its running status, it is:

 * Tomcat servlet engine is not running.

 I have read all tomcat document , still can't find the reason why tomcat
 can't boot successfully, could anyone kindly give me a hint
 about that.

 thanks


 my server.xml

 http://pastebin.com/m411d5f59 [EMAIL PROTECTED]


 Here is my tomcat log:

 http://pastebin.com/m4177eae4




-- 
Manivannan.Palanichamy (@) Oracle.com
http://mani.gw.googlepages.com/index.html


Re: Datasource Error

2007-08-07 Thread Manivannan Palanichamy
Set the connection url in database configuration xml file.
Some thing like,

parameter
  nameurl/name
  valuejdbc:mysql://localhost:3306/javatest?autoReconnect=true/value
 /parameter

 Refer to this page:
http://tomcat.apache.org/tomcat-5.0-doc/jndi-datasource-examples-howto.html

-- 
Manivannan.Palanichamy (@) Oracle.com
http://mani.gw.googlepages.com/index.html



On 8/7/07, Will Holmes [EMAIL PROTECTED] wrote:

 I am using Tomcat 5.5.9 on Windows XP
 I have created a resouce in the Tomcat server.xml file.
 I have configured the resource ref in the web.xml file.

 When my application access the datasource I get the following error:
 org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver
 of
 class '' for connect URL 'null'

 Anyone have any ideas?

 Thanks in advance!!

 Will Holmes
 Programmer Analyst
 Fremont Insurance Company
 Ph: 231-924-0302 Ext. 145
 E-Mail: [EMAIL PROTECTED]




-- 
Manivannan.Palanichamy (@) Oracle.com
http://mani.gw.googlepages.com/index.html


Re: Read and write inside WEB-INF

2007-07-16 Thread Manivannan Palanichamy

I too do the same thing; I am reading properties from a property file, thats
under WEB-INF/classes directory.

code is:  InputStream in = getClass().getClassLoader().getResourceAsStream(
sample.properties);

Code is working fine.


--
Manivannan.Palanichamy (@) Oracle.com
http://mani.gw.googlepages.com/index.html





On 7/14/07, Jacob Rhoden [EMAIL PROTECTED] wrote:


Hi,

I have seen a few apps do this now and I would like to do it, to have a
configure page that read and writes a properties file somewhere inside
the WEB-INF directory. That said, I have been researching and cant find
out where, what is the correct way to find the location of your WEB-INF
directory (or your apps directory for that matter).

Best Regards,
Jacob

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





--
Manivannan.Palanichamy (@) Oracle.com
http://mani.gw.googlepages.com/index.html


Re: How to replace jar which was already loaded?

2007-07-10 Thread Manivannan Palanichamy

Try manager url,
http://localhost:8080/manager/reload?path=/app_name
(app_name is your web application name.
). it will reload the specific application alone.

You will be prompted for manager login, which you have already
configured in tomcat/conf/tomcat-users.xml


--
Manivannan.Palanichamy (@) Oracle.com
http://mani.gw.googlepages.com/index.html


On 7/10/07, santa T [EMAIL PROTECTED] wrote:


Hi
  I have a worker.jar in my webapp. User could upload a new worker.jar
replacing it. And I don't want to restart the tomcat.
  How can I implement this?

Thanks.





--
Manivannan.Palanichamy (@) Oracle.com
http://mani.gw.googlepages.com/index.html