Re: How to serve .net and java websites on Windows 2008 with IIS7 and Tomcat

2011-02-02 Thread Rainer Frey
On Wednesday 02 February 2011 01:51:51 Jordan Michaels wrote:

Please don't top post.

 On 02/01/2011 04:38 PM, Conway Liu wrote:
  It seems like the Tomcat service only serves applications from one
  location ($CATALINA_HOME)

No. you can have
* webapps with a document path outside $CATALINA_HOME/$CATALINA_BASE
* (virtual) hosts with an appBase (base directory of all webapps of this host) 
outside $CATALINA_HOME/$CATALINA_BASE
* multiple tomcat instances with their webapps,configuration,logs ... in their 
own $CATALINA_BASE (and have their appBase/docPath outside this one 
$CATALINA_BASE)

  Instead, we need to run them as
  www.website1.com
  www.website2.com
  which is why we have created multiple IP addresses on the server.
  
  And the jsp websites will sit in seperate physical folders on the server,
  for example:
  C:\website1\
  C:\website2\

 A simple answer to your question is to create additional Host entries
 to your Tomcat server.xml file. 

That's the way to go.

 While I know that there are some on this
 list who disagree with this method, I personally find that configuring
 hosts and contexts in the server.xml file very simple as it makes adding
 new hosts to Tomcat similar to adding new hosts in Apache.

Hosts are usually configured in server.xml (unless you use some kind  of 
dynamic/programmatic configuration).

With contexts, it's not  some on this list who disagree, it is Tomcat 
developers discourage this method in the official documentation. It still 
works as of Tomcat 6 and 7 though.

  Host name=ourserver.com appBase=webapps
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false
   Context path= docBase=C:\website1\ /
   Aliaswww.ourserver.com/Alias
  /Host

You can achieve the same with:
tomcat/conf/server.xml:
  Host name=example.com appBase=example.com-webapps
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false
   Aliaswww.example.com/Alias
  /Host

tomcat/conf/Catalina/example.com/ROOT.xml:
Context docBase=C:\website1\ /

Notes:
* appBase must be different for every host. Better take care of that even if 
you mean to deploy outside the appBase. appBase can also refer to a  path 
outside the tomcat directory structure.
* if you need/want the Tomcat manager app, you need to deploy it in each host
* if you have no specific reasons for your directory structure (like existing 
backup or fileserver infrastructure), you can as well deploy into appBase, 
with your webbapp in a directory named appBase/ROOT or in a .war file named 
appBase/ROOT.war and discard above mentioned ROOT.xml. It will more closely 
match what other tomcat users/admins are used to and function the same way.

 And Tomcat will now know how to resolve each domain to it's own
 directory rather then inside the ROOT webapp.
 
 There are other ways to configure contexts, which I'm sure folks will
 post about subsequently, but I've found this works quite well and
 whether it's the proper way to do it or not, it will solve your problem.

The/one major drawback is: you need to restart Tomcat completely for any 
webapp context that's added/deleted/reconfigured.
I also don't see that much of an advantage compared to context.xml config 
files.

  I think there's something to do with $CATALINA_BASE that I need to
  configure, but I don't know how.

You need to do that only if you want to run a separate tomcat instance for 
each webapp. Each instance has its own Tomcat configuration, and its own JVM. 
Use it only if you need/want that.

  Regards and thanks
  Conway
 -Jordan

Rainer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Optimize CPU Hogging Tomcat 6

2011-02-02 Thread Brett Delle Grazie
Hi Jan,

On 2 February 2011 06:41, Olaf Tomczak olaf.tomc...@gmail.com wrote:
 Jan,

 The limit of open files on linux/unix systems for normal users may be
 quite low by default (for example 1024). From my experience, this may
 lead to Too many open files errors during high load even if your
 application is working fine. Try increasing this limit, also check
 your application as Chuck suggested.

Just in case you aren't sure of how to do this on RHEL5 edit:
/etc/security/limits.conf

You'll want to add a line similar to (assuming 'tomcat' is the user
running tomcat):
tomcat hard nofile 4096
tomcat soft nofile 4096

Adjust the number (4096) as necessary.


 --
 Olaf

 2011/2/2 jan gestre ipcopper...@gmail.com:
 On Wed, Feb 2, 2011 at 6:26 AM, Caldarale, Charles R
 chuck.caldar...@unisys.com wrote:
 From: jan gestre [mailto:ipcopper...@gmail.com]
 Subject: Re: Optimize CPU Hogging Tomcat 6

 Here's a snippet of the thread dump using jstack:

 Nothing there of any interest; all the ones you showed weren't running and 
 were therefore not contributing to the CPU usage.

 Also, here's my catalina log:

 Feb 1, 2011 10:19:04 PM org.apache.tomcat.util.net.JIoEndpoint$Acceptor run
 SEVERE: Socket accept failed
 java.net.SocketException: Too many open files

 That looks like something you should take care of...

 Is your webapp opening files (or sockets) and failing to close them?  
 Running out of fd numbers will normally be fatal, and is almost always due 
 to bugs in a webapp.

 What's your exact Tomcat version, JDK/JRE level, and platform?


 hi chuck,

 Tomcat's version is 6.0.29, Sun Java JDK 1.6.0_21 and RHEL5, webapp is 
 Alfresco.

 Regards,

 Jan




-- 
Best Regards,

Brett Delle Grazie

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Get the following error: NoClassDefFoundError: org/apache/log4j/Logger

2011-02-02 Thread henry human
Hi I get the following error when I try to call a smal java application(hello 
friends!) which i placed in a jar file. the application has the log4j.jar in 
its lib directory (and classpath) and calls the log4j.logger like this:
private static final Logger LOGGER = Logger.getLogger(Hello.class);
It works when i run the application in eclipse.
but not as a JAR application!(he application is not running on tomcat an is 
only a smal commandline application)

Error:
Exception in thread main java.lang.NoClassDefFoundError: 
org/apache/log4j/Logger

Thanks for your advice



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: cannot access welcome page on Windows Server 2003 R2 SP2

2011-02-02 Thread Philip Anil-QBW348
I do understand that ' A default web page does not camp on any particular 
port.'.
I was describing what I saw in the IIS inetmgr GUI. It shows
default web page...port 80
I selected it and chose Delete.

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Tuesday, February 01, 2011 4:45 PM
To: Tomcat Users List
Subject: Re: cannot access welcome page on Windows Server 2003 R2 SP2

Philip Anil-QBW348 wrote:
 I tried to uninstall IIS
 (http://forums.aspfree.com/microsoft-iis-12/how-to-uninstall-iis-38783.h
 tml), .Net 2 framework etc. but strangely enough, it remained.
 So I did Start|Run|inetmgr and lo and behold, found Default Web Page
 camped out on port 80. I deleted it, and the Tomcat welcome page comes
 up just fine! :)
 
It's nice that you solved your main problem, but what you write above does not 
make much 
technical sense.
A default web page does not camp on any particular port.
And deleting a web page does not stop a webserver from running.
Maybe it is MS's brain-dead way of presenting things that gets you confused.

The underlying fact is : two separate processes cannot open the same listening 
port on the 
same host.  When one process opens that listening port (80 in this case), any 
other 
process that tries to open the same one will fail.
If Tomcat is now running fine and listening on port 80, it means that whatever 
you did 
above, was really stop IIS from running and opening port 80 first.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Optimize CPU Hogging Tomcat 6

2011-02-02 Thread jan gestre
On Wed, Feb 2, 2011 at 5:19 PM, Brett Delle Grazie
brett.dellegra...@gmail.com wrote:
 Hi Jan,

 On 2 February 2011 06:41, Olaf Tomczak olaf.tomc...@gmail.com wrote:
 Jan,

 The limit of open files on linux/unix systems for normal users may be
 quite low by default (for example 1024). From my experience, this may
 lead to Too many open files errors during high load even if your
 application is working fine. Try increasing this limit, also check
 your application as Chuck suggested.

 Just in case you aren't sure of how to do this on RHEL5 edit:
 /etc/security/limits.conf

 You'll want to add a line similar to (assuming 'tomcat' is the user
 running tomcat):
 tomcat hard nofile 4096
 tomcat soft nofile 4096

 Adjust the number (4096) as necessary.


 --
 Olaf

 2011/2/2 jan gestre ipcopper...@gmail.com:
 On Wed, Feb 2, 2011 at 6:26 AM, Caldarale, Charles R
 chuck.caldar...@unisys.com wrote:
 From: jan gestre [mailto:ipcopper...@gmail.com]
 Subject: Re: Optimize CPU Hogging Tomcat 6

 Here's a snippet of the thread dump using jstack:

 Nothing there of any interest; all the ones you showed weren't running and 
 were therefore not contributing to the CPU usage.

 Also, here's my catalina log:

 Feb 1, 2011 10:19:04 PM org.apache.tomcat.util.net.JIoEndpoint$Acceptor 
 run
 SEVERE: Socket accept failed
 java.net.SocketException: Too many open files

 That looks like something you should take care of...

 Is your webapp opening files (or sockets) and failing to close them?  
 Running out of fd numbers will normally be fatal, and is almost always due 
 to bugs in a webapp.

 What's your exact Tomcat version, JDK/JRE level, and platform?


 hi chuck,

 Tomcat's version is 6.0.29, Sun Java JDK 1.6.0_21 and RHEL5, webapp is 
 Alfresco.

 Regards,

 Jan




 --

Hi Olaf and Brett,

I already made those changes similar to what is mentioned here --
http://spiralbound.net/blog/2008/03/17/rhel-system-configuration-changes-for-oracle-10g,
it appears that the changes improved the performance, the system no
longer chokes. However I still want to optimize other settings like
JVM configuration to further enhance systems performance,
unfortunately I have where to find the JVM config.

Cheers!

Jan

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: how to refresh connection pool before it gets completely busy

2011-02-02 Thread Ognjen Blagojevic

Hi Rhonny,


Can anyone help how we can achieve this , that connection pool refreshes before
all connections get busy?


You might want to check jdbc-pool, which sovles some of the problems 
with dbcp:


  http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html

Regards,
Ognjen

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: apache question

2011-02-02 Thread Ognjen Blagojevic

Hi Lava,

On 1.2.2011 19:35, Lava Saleem wrote:

yeah I have read what you quote before but my question is that
I need to set apache httpd  as a proxy and I'm not sure if it buildin within
the apache tomcat and what about the mod_jk do I need to download it ?


Apache Tomcat comes packaged with HTTP server called Coyote.

There is no need to install Apache HTTPD (in most cases).

Regards,
Ognjen

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Get the following error: NoClassDefFoundError: org/apache/log4j/Logger

2011-02-02 Thread Caldarale, Charles R
 From: henry human [mailto:henry_hu...@yahoo.de] 
 Subject: Get the following error: NoClassDefFoundError: 
 org/apache/log4j/Logger

 I get the following error when I try to call a smal java 
 application(hello friends!) which i placed in a jar file.
 the application has the log4j.jar in its lib directory 
 (and classpath) and calls the log4j.logger like this:
 private static final Logger LOGGER = Logger.getLogger(Hello.class);
 It works when i run the application in eclipse.
 but not as a JAR application!(he application is not running 
 on tomcat an is only a smal commandline application)

 Error:
 Exception in thread main java.lang.NoClassDefFoundError:
 org/apache/log4j/Logger

Two questions:

1) What's the name of this mailing list?

2) Was there anything in your description related to 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.



Re: Optimize CPU Hogging Tomcat 6

2011-02-02 Thread Brett Delle Grazie
Hi,

On 2 February 2011 13:21, jan gestre ipcopper...@gmail.com wrote:
snip
 Hi Olaf and Brett,

 I already made those changes similar to what is mentioned here --
 http://spiralbound.net/blog/2008/03/17/rhel-system-configuration-changes-for-oracle-10g,
 it appears that the changes improved the performance, the system no
 longer chokes. However I still want to optimize other settings like
 JVM configuration to further enhance systems performance,
 unfortunately I have where to find the JVM config.

It depends whether you're using the RedHat supplied (or EPEL) tomcat RPM
or a download from Apache.

(a) downloaded from Apache (I use this):
Read the RUNNING.TXT (for background info).
JVM configuration for Tomcat is usually in setenv.sh which is normally in:
$CATALINA_BASE/bin/setenv.sh
(CATALINA_BASE == CATALINA_HOME by default)

(b) RHEL5 supplied RPM
Environment variables are configured in the file:
/etc/sysconfig/tomcat

In either case, the environment variables you need to set are:
CATALINA_OPTS: used during START only
JAVA_OPTS: used during both START and STOP operations.

Normally JVM heap size, GC logging etc are set in CATALINA_OPTS
since they are only valid on START operations.

The only thing I normally place in JAVA_OPTS is:
-Djava.awt.headless=true and library path (if running on X86_64
systems)

Sample setenv.sh is included below (X86_64, RHEL5, Tomcat 6.0.30) YMMV:

In my configuration I have simple wrapper start/stop scripts that set
the following environment variables prior to calling
catalina.sh start / stop.  This permits multiple Tomcat instances on a
single server.  Very difficult to do with stock RHEL5 Tomcat RPM
CATALINA_HOME=/opt/tomcat6(points to where binaries are installed)
CATALINA_BASE=/home/tomcat/tc1  (points to instance)
CATALINA_PID=${CATALINA_BASE}/temp/tomcat.pid

-- ${CATALINA_BASE}/bin/setenv.sh --
CATALINA_OPTS=-d64 -Xmx2048m -XX:MaxPermSize=384m \
-Dcom.sun.management.snmp.port=xxx \
... other jmxremote / snmp parameters  as needed \
-verbose:gc -Xloggc:${CATALINA_BASE}/logs/gc.log \
-XX:+PrintGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps \
-XX:HeapDumpPath=${CATALINA_BASE}/temp \
-XX:+HeapDumpOnOutOfMemoryError \
-Dorg.apache.catalina.startup.EXIT_ON_INIT_FAILURE=true \
-DjvmRoute=jvm1
JAVA_HOME=/usr/lib/jvm/java
JAVA_OPTS=-Djava.awt.headless=true -Djava.library.path=/usr/lib64

Good luck!


 Cheers!

 Jan

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org





-- 
Best Regards,

Brett Delle Grazie

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: apache question

2011-02-02 Thread jan gestre
On Wed, Feb 2, 2011 at 9:40 PM, Ognjen Blagojevic
ognjen.d.blagoje...@gmail.com wrote:
 Hi Lava,

 On 1.2.2011 19:35, Lava Saleem wrote:

 yeah I have read what you quote before but my question is that
 I need to set apache httpd  as a proxy and I'm not sure if it buildin
 within
 the apache tomcat and what about the mod_jk do I need to download it ?

 Apache Tomcat comes packaged with HTTP server called Coyote.

 There is no need to install Apache HTTPD (in most cases).

 Regards,
 Ognjen

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org



Or if your intention in running Apache is to run your webapp on port
80, I suggest to use jsvc instead, my 2 cents worth.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Trouble with connection timeout settings

2011-02-02 Thread laredotornado

Hi,

We're using Tomcat 6.0.24.  We would like Tomcat to kill stuck threads after
a certain period of time, but Tomcat doesn't appear to be doing this. 
Specifically, when the database doesn't return results, the connections just
build up.  Here are our settings in workers.properties


worker.list=lbroute

worker.lbroute.type=lb
worker.lbroute.balance_workers=worker1,worker2

worker.worker1.type=ajp13
worker.worker1.host=xx.xx.xx.xx
worker.worker1.port=8000
worker.worker1.lbfactor=1
worker.worker1.redirect=worker2
worker.worker1.socket_keepalive=true
worker.worker1.connection_pool_timeout=60

worker.worker2.type=ajp13
worker.worker2.host=xx.xx.xx.xx
worker.worker2.port=8000
worker.worker2.lbfactor=1
worker.worker2.activation=disabled
worker.worker2.socket_keepalive=true
worker.worker2.connection_pool_timeout=60


Does anyone see anything here that can be optimized or anything we might
need to add to get Tomcat to kill stuck connections? - Dave
-- 
View this message in context: 
http://old.nabble.com/Trouble-with-connection-timeout-settings-tp30826944p30826944.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 7.0.6 won't shutdown via SCM on Windows 2003 R2

2011-02-02 Thread Konstantin Kolinko
2011/2/1 Konstantin Kolinko knst.koli...@gmail.com:
 See my comment in
 https://issues.apache.org/jira/browse/DAEMON-195

 -- I think reconfiguring the service will solve the issue.


Update:
To resolve this Tomcat shutdown behaviour was changed to avoid calling
System.exit().
This will be in 6.0.32, 7.0.7.

Tomcat issue reference:
https://issues.apache.org/bugzilla/show_bug.cgi?id=50673

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: CLOSE_WAIT

2011-02-02 Thread Peter Crowther
On 2 February 2011 10:24, Bw57899 bw57...@gmail.com wrote:

 Install an application in apache tomcat (6.0.29) in dev env on Solaris 10
 with no issue.

 But after move to production, there are always about 50 ~ 100 CLOSE_WAIT on
 port 1521. The application need connect an Oracle database which is on
 another server.

 So what can I do to check the problem?

 CLOSE_WAIT is normal behaviour - after a TCP socket is closed, it's
tombstoned for a period so that the TCP stack knows what to do with incoming
datagrams that might be late.

Why do you think this is a problem?  Except that you might be opening and
closing a lot of connections to Oracle?

- Peter


Re: how to refresh connection pool before it gets completely busy

2011-02-02 Thread Konstantin Kolinko
2011/2/1 Rhonny David rhonnyda...@yahoo.com:
 Resource factory=org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory

Tomcat does not implement those connection pools per se, but borrows
implementation from the Commons Pool and Commons DBCP components of
Apache Commons. It renames the packages at build time, to avoid
conflict if the same classes are directly used by deployed webapps.

You can look into build.properties.default file in the sources of
Tomcat version that you are using to see what versions of those
components were used at build time.

If you need custom behaviour, your best bet is to extend those classes
and use them instead of Tomcat-provided ones.


If you have questions it is best to ask on their mailing list,
http://commons.apache.org/dbcp/mail-lists.html

http://commons.apache.org/dbcp/configuration.html


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Trouble with connection timeout settings

2011-02-02 Thread laredotornado

You mean set timeouts at the database level?  What if the Tomcat thread is
hung for some other reason?  Is there any setting that will cause Tomcat to
kill a thread if that thread is stuck? - Dave



Mark Thomas wrote:
 
 On 02/02/2011 15:22, laredotornado wrote:
 
 Hi,
 
 We're using Tomcat 6.0.24.  We would like Tomcat to kill stuck threads
 after
 a certain period of time, but Tomcat doesn't appear to be doing this. 
 Specifically, when the database doesn't return results, the connections
 just
 build up.  Here are our settings in workers.properties
 
 They won't help with this problem. You need to set timeouts on your
 database connections. Better still, fix whatever is causing those
 database queries to take so long.
 
 Mark
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Trouble-with-connection-timeout-settings-tp30826944p30827517.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: CLOSE_WAIT

2011-02-02 Thread André Warnier

Peter Crowther wrote:

On 2 February 2011 10:24, Bw57899 bw57...@gmail.com wrote:


Install an application in apache tomcat (6.0.29) in dev env on Solaris 10
with no issue.

But after move to production, there are always about 50 ~ 100 CLOSE_WAIT on
port 1521. The application need connect an Oracle database which is on
another server.

So what can I do to check the problem?

CLOSE_WAIT is normal behaviour - after a TCP socket is closed, it's

tombstoned for a period so that the TCP stack knows what to do with incoming
datagrams that might be late.


Peter,
I do not think that this is true, and I believe that you are confusing this with the 
TIME_WAIT state.

See for example this :
http://support.microsoft.com/kb/137984

CLOSE_WAIT:
A socket application has been terminated, but Netstat reports the socket in a CLOSE_WAIT 
state. This could indicate that the client properly closed the connection (FIN has been 
sent), but the server still has its socket open. This could be the result of one instance 
(among all threads or processes) of the socket not being closed.



I had/have a case like that with a third-party Tomcat application.
It goes typically like this :

The webapp creates an object C which among other things makes a TCP connection to another 
server.

The webapp then uses this object's methods to send/receive data from the other 
server.
At the end of this exchange, the webapp sends a command to the external server, to tell it 
I'm done.  The external server then closes its end of the connection.

Now the webapp, by means of closing the connection, sets the object C = null.
For the webapp, this means that the connection object C is now effectively 
closed.
But in fact, the object C still exists somewhere on the heap, and it still holds on to its 
underlying (OS-level) socket, which has never been closed from the Tomcat server side.
The underlying TCP connection is in the CLOSE_WAIT state, because the socket has never 
been closed on the Tomcat server side, and it remains dangling.

It only disappears when the Tomcat JVM does a GC, and the Object C is really 
discarded.
That really closes the underlying TCP socket, and then the state progresses LAST_ACK and 
finally CLOSED and gone.


An easy way to verify if this is the case of the OP, is to force Tomcat to do a GC, and 
see if these CLOSE_WAIT connections then disappear.


If it is the case, then I would advise the OP to check his webapp, to see if it does not 
do the same kind of thing as described above.


One problem that I have seen happen with this, is that as the number of CLOSE_WAIT sockets 
increases (to a few hundred), the whole server becomes unable to handle further TCP 
connections of any kind, being in the practice paralysed.
I suppose that there must exist some inherent limit as to the maximum number of sockets 
which a system (or a process) can have active at any one time.






-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Trouble with connection timeout settings

2011-02-02 Thread Mark Thomas
On 02/02/2011 16:23, laredotornado wrote:
 
 You mean set timeouts at the database level?

Yes.

  What if the Tomcat thread is
 hung for some other reason?

Then you have an application bug to fix.

 Is there any setting that will cause Tomcat to
 kill a thread if that thread is stuck? - Dave

No. Tomcat has no way of doing this.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Cannot connect to tomcat 5.5.23 on RedHat Linux

2011-02-02 Thread Konstantin Kolinko
2011/2/2 Sanford Stein sanford.st...@cybertools.biz

 After updating to Red Hat's latest version of tomcat 5

What version (x.y.z) of Tomcat is that?

    at gnu.java.net.PlainSocketImpl.connect(libgcj.so.7rh)

GNU's Java isn't usable. Throw it away.
You may search the list archives for libgcj

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Cannot connect to tomcat 5.5.23 on RedHat Linux

2011-02-02 Thread Caldarale, Charles R
 From: Sanford Stein [mailto:sanford.st...@cybertools.biz] 
 Subject: Cannot connect to tomcat 5.5.23 on RedHat Linux

 After updating to Red Hat's latest version of tomcat 5

Unfortunate that you're not using a real Tomcat from tomcat.apache.org.

   at gnu.java.net.PlainSocketImpl.connect(libgcj.so.7rh)

There's a major problem: throw away gcj and install a real JVM.  You will be 
unable to get any reliable operation otherwise, even though some things appear 
to work.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: apache question

2011-02-02 Thread Lava Saleem
I'm using linux box that has already apache tomcat I can see there is httpd
in /etc  but I don't see apache beside apache tomcat in the /opt   I also
need to upload my html file in apache or like you said coyote
where and how to do that ?
On Wed, Feb 2, 2011 at 7:40 AM, Ognjen Blagojevic 
ognjen.d.blagoje...@gmail.com wrote:

 Hi Lava,


 On 1.2.2011 19:35, Lava Saleem wrote:

 yeah I have read what you quote before but my question is that
 I need to set apache httpd  as a proxy and I'm not sure if it buildin
 within
 the apache tomcat and what about the mod_jk do I need to download it ?


 Apache Tomcat comes packaged with HTTP server called Coyote.

 There is no need to install Apache HTTPD (in most cases).

 Regards,
 Ognjen


 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: apache question

2011-02-02 Thread Dave Evans
The answers to these questions may help us help you:

What linux distribution and version are you using?
If you point your browser at http://localhost/ what happens?
If you ls /etc/init.d/  what files do you see?

Tomcat can be configured to serve html files. Some people prefer a
dedicated http server (such as Apache HTTP Server) in front of Tomcat,
passing just the java server requests to Tomcat. If you don't know why
you need one (your boss said so, you have to coexist with other
application platforms, etc) then you probably don't. You can always go
back and add the http server later. Please tell us what you
specifically need to do.

Dave

On Wed, Feb 2, 2011 at 10:04 AM, Lava Saleem lnsal...@ualr.edu wrote:
 I'm using linux box that has already apache tomcat I can see there is httpd
 in /etc  but I don't see apache beside apache tomcat in the /opt   I also
 need to upload my html file in apache or like you said coyote
 where and how to do that ?
 On Wed, Feb 2, 2011 at 7:40 AM, Ognjen Blagojevic 
 ognjen.d.blagoje...@gmail.com wrote:

 Hi Lava,


 On 1.2.2011 19:35, Lava Saleem wrote:

 yeah I have read what you quote before but my question is that
 I need to set apache httpd  as a proxy and I'm not sure if it buildin
 within
 the apache tomcat and what about the mod_jk do I need to download it ?


 Apache Tomcat comes packaged with HTTP server called Coyote.

 There is no need to install Apache HTTPD (in most cases).

 Regards,
 Ognjen


 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: apache question

2011-02-02 Thread André Warnier

Lava Saleem wrote:

I'm using linux box that has already apache tomcat I can see there is httpd
in /etc  but I don't see apache beside apache tomcat in the /opt   I also
need to upload my html file in apache or like you said coyote
where and how to do that ?


Lava,

you have not told us which version of Tomcat (or Apache httpd) you are using, on which 
exact platform, with which version of Java, nor anything really about where these 
different packages come from or how or where they are installed.
You also seem to be relatively confused about what Apache Tomcat and Apache httpd really 
are, and how they can communicate with eachother, or even if they need to communicate with 
eachother and why.


There are probably 30 different types of Linux, and several hundred types of boxes on 
which to run it.  Each type of Linux installs Apache httpd and Apache Tomcat in different 
series of multiple directories on the disk.  So how could anyone tell you if it is normal 
or not that you find (or don't find) something in /etc or /opt ?


If you could give us some real information for a change, including what exactly you are 
trying to achieve and for which reason, then someone here might be able to help you, or 
else direct you where you might get some real help.




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: apache question

2011-02-02 Thread Lava Saleem
Hi everyone,
I'm sorry for not providing  the system informations earlier, the  linux I'm
using is centos 2.6.18 and the apache tomcat is 7.0.4 java is 1.6.0_22  I
know the difference between apache tomcat and apache httpd, I need
to configure apache httpd to server as a proxy,  I just want to know  is
apache httpd comes with apache tomcat when you download it, as I mentioned
before I see there is httpd in /etc but I don't see apache in the /opt  so
does that means I need to download apache ? and my second question is how to
upload a html ( embedded with java script )web page into apache ?
 Thanks
LS

On Wed, Feb 2, 2011 at 12:22 PM, André Warnier a...@ice-sa.com wrote:

 Lava Saleem wrote:

 I'm using linux box that has already apache tomcat I can see there is
 httpd
 in /etc  but I don't see apache beside apache tomcat in the /opt   I also
 need to upload my html file in apache or like you said coyote
 where and how to do that ?


 Lava,

 you have not told us which version of Tomcat (or Apache httpd) you are
 using, on which exact platform, with which version of Java, nor anything
 really about where these different packages come from or how or where they
 are installed.
 You also seem to be relatively confused about what Apache Tomcat and Apache
 httpd really are, and how they can communicate with eachother, or even if
 they need to communicate with eachother and why.

 There are probably 30 different types of Linux, and several hundred types
 of boxes on which to run it.  Each type of Linux installs Apache httpd and
 Apache Tomcat in different series of multiple directories on the disk.  So
 how could anyone tell you if it is normal or not that you find (or don't
 find) something in /etc or /opt ?

 If you could give us some real information for a change, including what
 exactly you are trying to achieve and for which reason, then someone here
 might be able to help you, or else direct you where you might get some real
 help.




 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: apache question

2011-02-02 Thread Dave Evans
In centos the file /etc/httpd/conf/httpd.conf should be the
configuration for the Apache HTTP Server. For information on that
configuration please write to the apache users list. One quick tip,
assuming you have no virtual hosts set up, the DocumentRoot directive
will tell you where to put your html files.

To pass java server requests to Tomcat you can install mod_jk. You
should be able to find an rpm to do this for you. Once it is
installed, you'll need to use JkMount directives in the httpd.conf
file to tell Apache Http Server which requests to pass to Tomcat, for
instance:
JkMount /*.jsp ajp13 # pass jsp file requests
JkMount /*.do ajp13 # pass struts app requests
JkMount /manager/* ajp13 # pass manager app requests

The ajp13 token above is the name of a worker configured in your
{tomcat root}/conf/workers.properties file.

This will help I hope:
http://tomcat.apache.org/connectors-doc/generic_howto/quick.html

Dave

On Wed, Feb 2, 2011 at 11:00 AM, Lava Saleem lnsal...@ualr.edu wrote:
 Hi everyone,
 I'm sorry for not providing  the system informations earlier, the  linux I'm
 using is centos 2.6.18 and the apache tomcat is 7.0.4 java is 1.6.0_22  I
 know the difference between apache tomcat and apache httpd, I need
 to configure apache httpd to server as a proxy,  I just want to know  is
 apache httpd comes with apache tomcat when you download it, as I mentioned
 before I see there is httpd in /etc but I don't see apache in the /opt  so
 does that means I need to download apache ? and my second question is how to
 upload a html ( embedded with java script )web page into apache ?
  Thanks
 LS

 On Wed, Feb 2, 2011 at 12:22 PM, André Warnier a...@ice-sa.com wrote:

 Lava Saleem wrote:

 I'm using linux box that has already apache tomcat I can see there is
 httpd
 in /etc  but I don't see apache beside apache tomcat in the /opt   I also
 need to upload my html file in apache or like you said coyote
 where and how to do that ?


 Lava,

 you have not told us which version of Tomcat (or Apache httpd) you are
 using, on which exact platform, with which version of Java, nor anything
 really about where these different packages come from or how or where they
 are installed.
 You also seem to be relatively confused about what Apache Tomcat and Apache
 httpd really are, and how they can communicate with eachother, or even if
 they need to communicate with eachother and why.

 There are probably 30 different types of Linux, and several hundred types
 of boxes on which to run it.  Each type of Linux installs Apache httpd and
 Apache Tomcat in different series of multiple directories on the disk.  So
 how could anyone tell you if it is normal or not that you find (or don't
 find) something in /etc or /opt ?

 If you could give us some real information for a change, including what
 exactly you are trying to achieve and for which reason, then someone here
 might be able to help you, or else direct you where you might get some real
 help.




 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: apache question

2011-02-02 Thread Lava Saleem
so that means I already have apache httpd but I need to install mod_jk
connector correct?


On Wed, Feb 2, 2011 at 1:19 PM, Dave Evans dsevan...@gmail.com wrote:

 In centos the file /etc/httpd/conf/httpd.conf should be the
 configuration for the Apache HTTP Server. For information on that
 configuration please write to the apache users list. One quick tip,
 assuming you have no virtual hosts set up, the DocumentRoot directive
 will tell you where to put your html files.

 To pass java server requests to Tomcat you can install mod_jk. You
 should be able to find an rpm to do this for you. Once it is
 installed, you'll need to use JkMount directives in the httpd.conf
 file to tell Apache Http Server which requests to pass to Tomcat, for
 instance:
 JkMount /*.jsp ajp13 # pass jsp file requests
 JkMount /*.do ajp13 # pass struts app requests
 JkMount /manager/* ajp13 # pass manager app requests

 The ajp13 token above is the name of a worker configured in your
 {tomcat root}/conf/workers.properties file.

 This will help I hope:
 http://tomcat.apache.org/connectors-doc/generic_howto/quick.html

 Dave

 On Wed, Feb 2, 2011 at 11:00 AM, Lava Saleem lnsal...@ualr.edu wrote:
  Hi everyone,
  I'm sorry for not providing  the system informations earlier, the  linux
 I'm
  using is centos 2.6.18 and the apache tomcat is 7.0.4 java is 1.6.0_22  I
  know the difference between apache tomcat and apache httpd, I need
  to configure apache httpd to server as a proxy,  I just want to know  is
  apache httpd comes with apache tomcat when you download it, as I
 mentioned
  before I see there is httpd in /etc but I don't see apache in the /opt
  so
  does that means I need to download apache ? and my second question is how
 to
  upload a html ( embedded with java script )web page into apache ?
   Thanks
  LS
 
  On Wed, Feb 2, 2011 at 12:22 PM, André Warnier a...@ice-sa.com wrote:
 
  Lava Saleem wrote:
 
  I'm using linux box that has already apache tomcat I can see there is
  httpd
  in /etc  but I don't see apache beside apache tomcat in the /opt   I
 also
  need to upload my html file in apache or like you said coyote
  where and how to do that ?
 
 
  Lava,
 
  you have not told us which version of Tomcat (or Apache httpd) you are
  using, on which exact platform, with which version of Java, nor anything
  really about where these different packages come from or how or where
 they
  are installed.
  You also seem to be relatively confused about what Apache Tomcat and
 Apache
  httpd really are, and how they can communicate with eachother, or even
 if
  they need to communicate with eachother and why.
 
  There are probably 30 different types of Linux, and several hundred
 types
  of boxes on which to run it.  Each type of Linux installs Apache httpd
 and
  Apache Tomcat in different series of multiple directories on the disk.
  So
  how could anyone tell you if it is normal or not that you find (or don't
  find) something in /etc or /opt ?
 
  If you could give us some real information for a change, including what
  exactly you are trying to achieve and for which reason, then someone
 here
  might be able to help you, or else direct you where you might get some
 real
  help.
 
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: apache question

2011-02-02 Thread Dave Evans
Probably yes.

On Wed, Feb 2, 2011 at 11:24 AM, Lava Saleem lnsal...@ualr.edu wrote:
 so that means I already have apache httpd but I need to install mod_jk
 connector correct?


 On Wed, Feb 2, 2011 at 1:19 PM, Dave Evans dsevan...@gmail.com wrote:

 In centos the file /etc/httpd/conf/httpd.conf should be the
 configuration for the Apache HTTP Server. For information on that
 configuration please write to the apache users list. One quick tip,
 assuming you have no virtual hosts set up, the DocumentRoot directive
 will tell you where to put your html files.

 To pass java server requests to Tomcat you can install mod_jk. You
 should be able to find an rpm to do this for you. Once it is
 installed, you'll need to use JkMount directives in the httpd.conf
 file to tell Apache Http Server which requests to pass to Tomcat, for
 instance:
 JkMount /*.jsp ajp13 # pass jsp file requests
 JkMount /*.do ajp13 # pass struts app requests
 JkMount /manager/* ajp13 # pass manager app requests

 The ajp13 token above is the name of a worker configured in your
 {tomcat root}/conf/workers.properties file.

 This will help I hope:
 http://tomcat.apache.org/connectors-doc/generic_howto/quick.html

 Dave

 On Wed, Feb 2, 2011 at 11:00 AM, Lava Saleem lnsal...@ualr.edu wrote:
  Hi everyone,
  I'm sorry for not providing  the system informations earlier, the  linux
 I'm
  using is centos 2.6.18 and the apache tomcat is 7.0.4 java is 1.6.0_22  I
  know the difference between apache tomcat and apache httpd, I need
  to configure apache httpd to server as a proxy,  I just want to know  is
  apache httpd comes with apache tomcat when you download it, as I
 mentioned
  before I see there is httpd in /etc but I don't see apache in the /opt
  so
  does that means I need to download apache ? and my second question is how
 to
  upload a html ( embedded with java script )web page into apache ?
   Thanks
  LS
 
  On Wed, Feb 2, 2011 at 12:22 PM, André Warnier a...@ice-sa.com wrote:
 
  Lava Saleem wrote:
 
  I'm using linux box that has already apache tomcat I can see there is
  httpd
  in /etc  but I don't see apache beside apache tomcat in the /opt   I
 also
  need to upload my html file in apache or like you said coyote
  where and how to do that ?
 
 
  Lava,
 
  you have not told us which version of Tomcat (or Apache httpd) you are
  using, on which exact platform, with which version of Java, nor anything
  really about where these different packages come from or how or where
 they
  are installed.
  You also seem to be relatively confused about what Apache Tomcat and
 Apache
  httpd really are, and how they can communicate with eachother, or even
 if
  they need to communicate with eachother and why.
 
  There are probably 30 different types of Linux, and several hundred
 types
  of boxes on which to run it.  Each type of Linux installs Apache httpd
 and
  Apache Tomcat in different series of multiple directories on the disk.
  So
  how could anyone tell you if it is normal or not that you find (or don't
  find) something in /etc or /opt ?
 
  If you could give us some real information for a change, including what
  exactly you are trying to achieve and for which reason, then someone
 here
  might be able to help you, or else direct you where you might get some
 real
  help.
 
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Unregistering context mbean twice

2011-02-02 Thread Ming_Chang
Hi, There,

I hope someone can help me with the problem I have with undeploying a webapp. 
We recently upgrade from 5.5 to 7 and whenever I  undeploy our web app, I will 
get an exception like this:
Feb 1, 2011 4:27:13 PM org.apache.catalina.util.LifecycleMBeanBase unregister
WARNING: Failed to unregister MBean with name 
[Catalina:j2eeType=WebModule,name=//localhost/report,J2EEApplication=none,J2EEServer=none]
 during component destruction
javax.management.InstanceNotFoundException: 
Catalina:j2eeType=WebModule,name=//localhost/report,J2EEApplication=none,J2EEServer=none


I debug into tomcat code. And what I found out is that the context Mbean is 
first unregistered by ServerLifeCycleListener when it handles  remove child 
event.
JmxMBeanServer.unregisterMBean(ObjectName) line: 506
MBeanUtils.destroyMBean(NamingResources) line: 1358
ServerLifecycleListener.destroyMBeans(NamingResources) line: 832
ServerLifecycleListener.destroyMBeans(Context) line: 655
ServerLifecycleListener.processContainerRemoveChild(Container, Container) line: 
1044
ServerLifecycleListener.containerEvent(ContainerEvent) line: 107
StandardHost(ContainerBase).fireContainerEvent(String, Object) line: 1261
StandardHost(ContainerBase).removeChild(Container) line: 960
HostConfig.checkResources(HostConfig$DeployedApplication) line: 1178
HostConfig.check(String) line: 1347

But the standardContext will unregister the same bean again when it's destroy 
method get called after that ServerLifeCycleListener   handles remove child. 
That is why the exception:

JmxMBeanServer.unregisterMBean(ObjectName) line: 506
StandardContext(LifecycleMBeanBase).unregister(ObjectName) line: 191
StandardContext(LifecycleMBeanBase).destroyInternal() line: 73
StandardContext(ContainerBase).destroyInternal() line: 1116
StandardContext.destroyInternal() line: 5351
StandardContext(LifecycleBase).destroy() line: 285
StandardHost(ContainerBase).removeChild(Container) line: 969
HostConfig.checkResources(HostConfig$DeployedApplication) line: 1178
HostConfig.check(String) line: 1347

These two happened in one call to  HostConfig.check.  I didn't see anyone else 
report the problem, so I think I might not configure the server correctly or  
my program  might be not coded right to undeploy an web app. But I did study 
the Managerservlet comes with tomcat which handle deployment and undeployment. 
I didn't see any significant difference. I also copy the code. I still get the 
same error.  I notice in tomcat 5.5 source code. The code for unregister 
context mbean in ServerLifeCycleListener  is commented out. That is why we 
don't have the problem in 5.5.  Hope someone can tell me what I did wrong.

Thanks,

Ming






Re: Unregistering context mbean twice

2011-02-02 Thread Konstantin Kolinko
2011/2/3  ming_ch...@mcafee.com:
 I hope someone can help me with the problem I have with undeploying a webapp. 
 We recently upgrade from 5.5 to 7

What exact version of Tomcat 7  (x.y.z)?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Unregistering context mbean twice

2011-02-02 Thread Ming_Chang
Sorry. I forgot give the exact version. It happens on both 7.0.4 and 7.0.6.

Ming

-Original Message-
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] 
Sent: Wednesday, February 02, 2011 1:13 PM
To: Tomcat Users List
Subject: Re: Unregistering context mbean twice

2011/2/3  ming_ch...@mcafee.com:
 I hope someone can help me with the problem I have with undeploying a webapp. 
 We recently upgrade from 5.5 to 7

What exact version of Tomcat 7  (x.y.z)?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Is it possible for a web application to populate the global JNDI namespace?

2011-02-02 Thread Mark Thomas
On 02/02/2011 20:47, Jason Pringle wrote:
 
 Can a web application populate the global JNDI namespace?

No.

 I am looking for a possible workaround to create shared connection pools 
 without modifying server.xml (ie placing entries in GlobalNamingResources 
 .../).

JMX is probably your best bet but I don't think the necessary API is
exposed. As always, patches welcome.

 If a web application could populate into the global namespace, then I could 
 devise a WAR which defined the desired connection pools and placed them in 
 the global namespace.  Other web applications could then retrieve them as if 
 they had been defined in server.xml.

Apart from the fact that web application start order is undefined...

Lots of things to go wrong here. If two apps define the same resource,
which wins?

I'm fine with the JMX bit but much less comfortable with apps using it
directly.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Missing something with custom tags.

2011-02-02 Thread Bill Davidson
version 1.6.0_20, Java(TM) SE Runtime Environment (build 
1.6.0_20-b02), Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed 
mode)

Tomcat: 6.0.26

I'm having trouble with a custom tag and I've tried to reduce the 
problem to its most basic form:


/WEB-INF/tags/example.tag:

%@tag %
%@attribute name=xName required=true rtexprvalue=true %
h1xName=${xName}/h1

/jsp/Example.jsp:

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN 
http://www.w3.org/TR/html4/strict.dtd;
%@page language=java contentType=text/html; charset=UTF-8 
pageEncoding=UTF-8 %

%@taglib prefix=ex tagdir=/WEB-INF/tags %
html
body
ex:example xName=Testing Example /
/body
/html

I usually get:

You have run into a org.apache.jasper.JasperException: 
/jsp/Example.jsp(6,4) Unable to find setter method for attribute: xName 
error.


But sometimes I get this:

You have run into a java.lang.ClassNotFoundException: 
org.apache.jsp.jsp.Example_jsp error.


Any idea what I'm doing wrong?  From what I can see, my code seems to mirror
examples I've found in books and on the web.  Intermittent results 
suggest a race
condition to me though that seems odd here.  I've not had good luck with 
google on

this error.

Full stack traces for the exceptions here:

Feb 2, 2011 1:55:02 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /jsp/Example.jsp(6,4) Unable to find 
setter method for attribute: xName
at 
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
at 
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
at 
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
at 
org.apache.jasper.compiler.Generator$GenerateVisitor.evaluateAttribute(Generator.java:2809)
at 
org.apache.jasper.compiler.Generator$GenerateVisitor.generateSetters(Generator.java:3032)
at 
org.apache.jasper.compiler.Generator$GenerateVisitor.generateCustomDoTag(Generator.java:2452)
at 
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1736)

at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1530)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)
at 
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2411)

at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2417)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:495)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)
at 
org.apache.jasper.compiler.Generator.generate(Generator.java:3440)
at 
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:231)

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:347)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
at 
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)

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:127)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at 
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at 
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at 
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:774)
at 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
at 
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:896)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)

at java.lang.Thread.run(Thread.java:619)

Feb 2, 2011 1:55:29 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.ClassNotFoundException: 

Re: Missing something with custom tags.

2011-02-02 Thread Konstantin Kolinko
2011/2/3 Bill Davidson bill...@gmail.com:

 Unable to find setter method for attribute: xName error.

I think you are bumping into JavaBeans capitalization rules. Rename
your attribute to be xname or xxName.

IIRC, setXName( ) means that the property name is XName, not xName.

More details should be in the JavaBeans spec,
http://www.oracle.com/technetwork/java/javase/documentation/spec-136004.html


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Missing something with custom tags.

2011-02-02 Thread Bill Davidson

On 2/2/2011 2:17 PM, Konstantin Kolinko wrote:
I think you are bumping into JavaBeans capitalization rules. Rename
your attribute to be xname or xxName.

That worked.  Weird.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Missing something with custom tags.

2011-02-02 Thread Bill Davidson

On 2/2/2011 2:17 PM, Konstantin Kolinko wrote:
I think you are bumping into JavaBeans capitalization rules. Rename
your attribute to be xname or xxName.

That worked!  Thanks!

I think that's a pretty weird thing.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Missing something with custom tags.

2011-02-02 Thread Martin Gainty

need to see the tld declaration for your tags
and the Java class declared for the tag

pls ping me offline

Martin 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




 Date: Wed, 2 Feb 2011 14:03:54 -0800
 From: bill...@gmail.com
 To: users@tomcat.apache.org
 Subject: Missing something with custom tags.
 
 version 1.6.0_20, Java(TM) SE Runtime Environment (build 
 1.6.0_20-b02), Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed 
 mode)
 Tomcat: 6.0.26
 
 I'm having trouble with a custom tag and I've tried to reduce the 
 problem to its most basic form:
 
 /WEB-INF/tags/example.tag:
 
 %@tag %
 %@attribute name=xName required=true rtexprvalue=true %
 h1xName=${xName}/h1
 
 /jsp/Example.jsp:
 
 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN 
 http://www.w3.org/TR/html4/strict.dtd;
 %@page language=java contentType=text/html; charset=UTF-8 
 pageEncoding=UTF-8 %
 %@taglib prefix=ex tagdir=/WEB-INF/tags %
 html
 body
 ex:example xName=Testing Example /
 /body
 /html
 
 I usually get:
 
 You have run into a org.apache.jasper.JasperException: 
 /jsp/Example.jsp(6,4) Unable to find setter method for attribute: xName 
 error.
 
 But sometimes I get this:
 
 You have run into a java.lang.ClassNotFoundException: 
 org.apache.jsp.jsp.Example_jsp error.
 
 Any idea what I'm doing wrong?  From what I can see, my code seems to mirror
 examples I've found in books and on the web.  Intermittent results 
 suggest a race
 condition to me though that seems odd here.  I've not had good luck with 
 google on
 this error.
 
 Full stack traces for the exceptions here:
 
 Feb 2, 2011 1:55:02 PM org.apache.catalina.core.StandardWrapperValve invoke
 SEVERE: Servlet.service() for servlet jsp threw exception
 org.apache.jasper.JasperException: /jsp/Example.jsp(6,4) Unable to find 
 setter method for attribute: xName
  at 
 org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
  at 
 org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
  at 
 org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
  at 
 org.apache.jasper.compiler.Generator$GenerateVisitor.evaluateAttribute(Generator.java:2809)
  at 
 org.apache.jasper.compiler.Generator$GenerateVisitor.generateSetters(Generator.java:3032)
  at 
 org.apache.jasper.compiler.Generator$GenerateVisitor.generateCustomDoTag(Generator.java:2452)
  at 
 org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1736)
  at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1530)
  at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)
  at 
 org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2411)
  at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2417)
  at org.apache.jasper.compiler.Node$Root.accept(Node.java:495)
  at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)
  at 
 org.apache.jasper.compiler.Generator.generate(Generator.java:3440)
  at 
 org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:231)
  at org.apache.jasper.compiler.Compiler.compile(Compiler.java:347)
  at org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
  at org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
  at 
 org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
  at 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
  at 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
  at 
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  at 
 

Re: Missing something with custom tags.

2011-02-02 Thread Mark Thomas
On 02/02/2011 22:25, Martin Gainty wrote:
 
 need to see the tld declaration for your tags

There is none. It is implicit. You need to read the JSP spec.

 and the Java class declared for the tag

It is a tag file - there is none. Again, you need to read the JSP spec.

 pls ping me offline

Please don't. This is a community that discusses issues *on the mailing
list* so everyone can benefit from reading the archives.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Unregistering context mbean twice

2011-02-02 Thread Konstantin Kolinko
2011/2/3  ming_ch...@mcafee.com:
 Sorry. I forgot give the exact version. It happens on both 7.0.4 and 7.0.6.


I cannot say about 7.0.6, but with the current sources I do not
observe any problems.

You may try to build a version by your own, or wait for 7.0.7 -- I
think it will be tagged  built soon.


  Hope someone can tell me what I did wrong.

First you have to tell us more about what you did.

Is your configuration (server.xml) different from defaults?
Is this issue reproducible?
Does it happen with the default Tomcat apps, or it is specific to your webapp?

Any other errors or warnings in the logs?


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Optimize CPU Hogging Tomcat 6

2011-02-02 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jan,

On 2/2/2011 8:21 AM, jan gestre wrote:
 I already made those changes similar to what is mentioned here --
 http://spiralbound.net/blog/2008/03/17/rhel-system-configuration-changes-for-oracle-10g,
 it appears that the changes improved the performance, the system no
 longer chokes. However I still want to optimize other settings like
 JVM configuration to further enhance systems performance,
 unfortunately I have where to find the JVM config.

You never told us how you know that your JVM process is the one using
all the CPU time.

If you run out of file descriptors and connections cannot be made, I
would expect that you'd get an app that was doing virtually nothing. If
all your threads are idle, where is the CPU being used?

That error message about having too many open files shouldn't be too
much of a big deal: the server should continue operating and should give
you an error each time your usage peaks such that you accept one-to-many
HTTP connections. You said you only have 30 users, though. What does
netstat show? Do you have lots of lingering connections? How many
request processing threads do you have configured in your Connector?

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

iEYEARECAAYFAk1J6OgACgkQ9CaO5/Lv0PCRegCfVh6bv/kbTKebKQqm8e7Jp+rE
+RYAnj1XNJPXjc7wQA6/b2Uc2FyEcnCc
=TvH/
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Get the following error: NoClassDefFoundError: org/apache/log4j/Logger

2011-02-02 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 2/2/2011 8:44 AM, Caldarale, Charles R wrote:
 From: henry human [mailto:henry_hu...@yahoo.de] 
 Subject: Get the following error: NoClassDefFoundError: 
 org/apache/log4j/Logger
 
 I get the following error when I try to call a smal java 
 application(hello friends!) which i placed in a jar file.
 the application has the log4j.jar in its lib directory 
 (and classpath) and calls the log4j.logger like this:
 private static final Logger LOGGER = Logger.getLogger(Hello.class);
 It works when i run the application in eclipse.
 but not as a JAR application!(he application is not running 
 on tomcat an is only a smal commandline application)
 
 Error:
 Exception in thread main java.lang.NoClassDefFoundError:
 org/apache/log4j/Logger
 
 Two questions:
 
 1) What's the name of this mailing list?
 
 2) Was there anything in your description related to Tomcat?

+1

Also

3) Don't hijack threads.

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

iEYEARECAAYFAk1J6RgACgkQ9CaO5/Lv0PDxHQCgoeyMQ5jB2n1ypPIdl4FYwEYL
W04AniAn85VTSiBymtyFRRjKH3ruBpma
=VK5D
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Trouble with connection timeout settings

2011-02-02 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

laredotornado,

On 2/2/2011 11:23 AM, laredotornado wrote:
 You mean set timeouts at the database level?

I would do it at the query level. The JDBC API has overloaded methods
for Statement.executeQuery and friends that all take timeouts.

It's possible that your database allows you to set a global (or session)
timeout for all queries, but that's beyond the scope of anything Tomcat
could provide for you.

 Is there any setting that will cause Tomcat to kill a thread if that 
 thread is stuck?

Tomcat can't tell the difference between a thread that is doing
something useful or something not useful: only you can tell the difference.

You are welcome to write some kind of sweeper thread that examines each
thread at an interval and makes some objective (or subjective, I guess)
decision about the state of the thread and call any number of methods on
it including interrupt(), etc.

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

iEYEARECAAYFAk1J6tkACgkQ9CaO5/Lv0PBzWQCgwsfm2besCJMPYs5x3gS3sKHN
hgYAoJrYh5Dz5o+X8Dam+BEDpg9rTQja
=iqvn
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: It makes problem when we use JSTL with 1.3 class to build on Oracle JDK6.

2011-02-02 Thread Donggyu A. Lee
So sorry to everyone.
I missed something about that. Oracle JDK6 compiler to support 1.3
class seems to be perfect.

Very very sorry.

Happy New Lunner Year.

I'm very stupid.

--

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Multiple struts action servlet mapping 404ing behind Apache with Tomcat 7.0.6

2011-02-02 Thread Forum Accounts
I'm looking for a way to allow us to rename our .do struts extensions to
something else, without having to do them all at once.  Tomcat 7.0.6,
jdk1.6, solaris 10, behind Apache 2.2.10, struts 1.1. Multiple struts action
servlet mappings (*.do and *.foo) seems to do what we want when going
through the tomcat port, but when going through apache, we get a 404 on
.foos  Any ideas appreciated.  Thanks in advance.


Re: Multiple struts action servlet mapping 404ing behind Apache with Tomcat 7.0.6

2011-02-02 Thread André Warnier

Forum Accounts wrote:

I'm looking for a way to allow us to rename our .do struts extensions to
something else, without having to do them all at once.  Tomcat 7.0.6,
jdk1.6, solaris 10, behind Apache 2.2.10, struts 1.1. Multiple struts action
servlet mappings (*.do and *.foo) seems to do what we want when going
through the tomcat port, but when going through apache, we get a 404 on
.foos  Any ideas appreciated.  Thanks in advance.


You say Tomcat behind Apache, but you do not say what you use to connect them.
mod_jk ?
From your sketchy description, it looks like you may just have forgotten to proxy *.foo 
URLs to Tomcat, and Apache is trying to serve them locally (and not finding them).

If your Apache configuration includes statements like
JkMount /*.do workerx
add a
JkMount /*.foo workerx
and restart Apache.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org