Re: Help:tomcat 6.0.18 showdown automatically!

2010-05-10 Thread André Warnier

red phoenix wrote:

tomcat6 shutdown after ten minutes, localhost.2010-05-09.log is follows:
2010-5-9 22:36:12 org.apache.catalina.core.ApplicationContext log
 Info: Initializing Spring root WebApplicationContext
 2010-5-9 22:45:12 org.apache.catalina.core.ApplicationContext log
 Info: Initializing Spring root WebApplicationContext

But when server.xml file is follows:
 ...
 Host name=localhost  appBase=webapps
 unpackWARs=true autoDeploy=true
 xmlValidation=false xmlNamespaceAware=false

After 30 minutes,tomcat6 shutdown automatically. There is no any new log in
log files! I am puzzled with it. I don't know what raise tomcat 6
shutdown automatically.

There are a few known reasons why Tomcat would stop, but there must be a 
trace somewhere. Have you checked the system's Event Logs ?


What happens when you start Tomcat from the startup.bat file in the 
Tomcat/bin directory ?




My log files are follows:

...

Info: validateJarFile(Q:\Tomcat\webapps\MyApp\WEB-INF\lib\servlet-api.jar) -
jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
javax/servlet/Servlet.class


The above indicates that you have a copy of servlet-api.jar where it 
says, in your webapp dir. It should not be there.

For Tomcat6, it should be only in tomcat_dir/lib.

By the way, it would help if you would indicate :
- the exact version of Windows; 32- or 64-bit ?
- the version of the Java JVM; 32- or 64-bit ?
- how much RAM you have on that system
- the precise version of Tomcat : 6.x.y
- where you downloaded it from, and which exact download link you used
  (the .exe service installer, or the .zip version ?)
- how you are starting Tomcat : as a Windows Service ?
- how do you know that Tomcat stopped, if there is nothing in the logs ?
- what appears in the Windows Event logs, when Tomcat stops ?

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



Re: Help:tomcat 6.0.18 showdown automatically!

2010-05-10 Thread Gregor Schneider
No idea if it has to do with your problem, but

On Mon, May 10, 2010 at 2:21 AM, red phoenix rodphoe...@gmail.com wrote:
 Info: validateJarFile(Q:\Tomcat\webapps\MyApp\WEB-INF\lib\servlet-api.jar) -
 jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
 javax/servlet/Servlet.class

get rid of that outdated servlet-api.jar - you don't need it anyways.

Rgds

Gregor
-- 
just because you're paranoid, don't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available
@ http://pgpkeys.pca.dfn.de:11371
@ http://pgp.mit.edu:11371/
skype:rc46fi

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



Tomcat and negotiate auth-method

2010-05-10 Thread Francois Rigault
Hi

I was looking for information on how to enable single sign on on Tomcat 
(I'm using Tomcat 5.5 on Unix) with the SPNEGO mechanism, more 
specifically I would like to authenticate using a Kerberos ticket.

I found out that there is already an existing JAASRealm, which is able to 
verify my credentials against a Kerberos authentication service - but 
still I need to provide my credentials. There are also third party valves, 
but I did not found any free one working on Unix that would support a 
negotiate auth-method.

Has anyone ever configured a Tomcat server with seamless authentication ?
Is there a plan to support a negotiate auth-method integrated with tomcat 
?

Thanks and regards

Francois



Re: Tomcat and negotiate auth-method

2010-05-10 Thread Mark Thomas
On 10/05/2010 09:36, Francois Rigault wrote:
 Hi
 
 I was looking for information on how to enable single sign on on Tomcat 
 (I'm using Tomcat 5.5 on Unix) with the SPNEGO mechanism, more 
 specifically I would like to authenticate using a Kerberos ticket.
 
 I found out that there is already an existing JAASRealm, which is able to 
 verify my credentials against a Kerberos authentication service - but 
 still I need to provide my credentials. There are also third party valves, 
 but I did not found any free one working on Unix that would support a 
 negotiate auth-method.
 
 Has anyone ever configured a Tomcat server with seamless authentication ?
 Is there a plan to support a negotiate auth-method integrated with tomcat 
 ?

https://issues.apache.org/bugzilla/show_bug.cgi?id=48685

Mark



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



RE: Tomcat and openjpa javaagent

2010-05-10 Thread n0weak

 Try putting that jar into Tomcat's bin directory instead.  It must be
available to the system classloader, not Tomcat's common classloader.

This had no effect. Tomcat in startup script sets the CLASSPATH variable to
$CATALINA_HOME/bin/bootstrap.jar, so i tried to modify it in catalina.sh
to $CATALINA_HOME/bin/commons-lang-2.3.jar. Now tomcat starts, but when
launching my application I'm getting more exceptions, first:

Caused by: NoClassDefFoundError: javax/persistence/spi/PersistenceProvider 

I've added geronimo-jpa_3.0_spec-1.0.jar and then I got

Caused by: java.lang.ClassNotFoundException:
javax.transaction.Synchronization

so it asks me for a bunch of libs from my WEB-INF/lib directory. And finally
JVM says it is unable to load classes from my app. So i think it is not a
right way to fix my problem)  Hoping for your help!
-- 
View this message in context: 
http://old.nabble.com/Tomcat-and-openjpa-javaagent-tp28506406p28509633.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 and openjpa javaagent

2010-05-10 Thread Pid
On 10/05/2010 10:57, n0weak wrote:
 
 Try putting that jar into Tomcat's bin directory instead.  It must be
 available to the system classloader, not Tomcat's common classloader.
 
 This had no effect. Tomcat in startup script sets the CLASSPATH variable to
 $CATALINA_HOME/bin/bootstrap.jar, so i tried to modify it in catalina.sh
 to $CATALINA_HOME/bin/commons-lang-2.3.jar. Now tomcat starts, but when
 launching my application I'm getting more exceptions, first:
 
 Caused by: NoClassDefFoundError: javax/persistence/spi/PersistenceProvider 
 
 I've added geronimo-jpa_3.0_spec-1.0.jar and then I got
 
 Caused by: java.lang.ClassNotFoundException:
 javax.transaction.Synchronization
 
 so it asks me for a bunch of libs from my WEB-INF/lib directory. And finally
 JVM says it is unable to load classes from my app. So i think it is not a
 right way to fix my problem)  Hoping for your help!


Perhaps the OpenJPA list would be a better place to ask this question?


p



signature.asc
Description: OpenPGP digital signature


invalidate a session twice to log out user? Why?

2010-05-10 Thread Yucca Nel
My command button only logs out the user on a secondt click, is there a reason? 
I am using tomcat 6 as follows:

jsf...

h:commandButton rendered=#{request.userPrincipal!=null} 
action=#{logoutForm.logout} value=#{uOptMsg.logOut}/h:commandButton


and in my backing bean ...

public String logout() throws IOException, ServletException {





ExternalContext ectx =
FacesContext.getCurrentInstance().getExternalContext();
  HttpServletRequest request =
(HttpServletRequest)ectx.getRequest();
  HttpServletResponse response =
(HttpServletResponse)ectx.getResponse();
request.getSession(false).invalidate();
  return home;
}

is there another wway to invalidate the session created by tomcat to represesnt 
a logged in user?

Re: Tomcat and openjpa javaagent

2010-05-10 Thread Yucca Nel
geronumolibs need a jee container to function otherwise the classes will 
never be instantiated. Use hibernate as a possible workaround


--
From: n0weak n0w...@gmail.com
Sent: Monday, May 10, 2010 11:57 AM
To: users@tomcat.apache.org
Subject: RE: Tomcat and openjpa javaagent




Try putting that jar into Tomcat's bin directory instead.  It must be

available to the system classloader, not Tomcat's common classloader.

This had no effect. Tomcat in startup script sets the CLASSPATH variable 
to

$CATALINA_HOME/bin/bootstrap.jar, so i tried to modify it in catalina.sh
to $CATALINA_HOME/bin/commons-lang-2.3.jar. Now tomcat starts, but when
launching my application I'm getting more exceptions, first:

Caused by: NoClassDefFoundError: javax/persistence/spi/PersistenceProvider

I've added geronimo-jpa_3.0_spec-1.0.jar and then I got

Caused by: java.lang.ClassNotFoundException:
javax.transaction.Synchronization

so it asks me for a bunch of libs from my WEB-INF/lib directory. And 
finally

JVM says it is unable to load classes from my app. So i think it is not a
right way to fix my problem)  Hoping for your help!
--
View this message in context: 
http://old.nabble.com/Tomcat-and-openjpa-javaagent-tp28506406p28509633.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




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



Re: Tomcat does not honor acceptCount configuration variable

2010-05-10 Thread Timir Hazarika
Andre,

Response from Leon just about summarizes this issue: the shock absorber you
mention is not configurable. Setting the acceptCount to 1 or nine hundred
produces exactly the same behavior in terms of connections awaiting
response.

The stricter scheme hence, serves as a usable application workaround for
now.

Timir


Re: Tomcat does not honor acceptCount configuration variable

2010-05-10 Thread André Warnier

Timir Hazarika wrote:

Andre,

Response from Leon just about summarizes this issue: the shock absorber you
mention is not configurable. Setting the acceptCount to 1 or nine hundred
produces exactly the same behavior in terms of connections awaiting
response.


Then that would be a bug, no ? In the sense that the documentation says :

acceptCount 

The maximum queue length for incoming connection requests when all 
possible request processing threads are in use. Any requests received 
when the queue is full will be refused. The default value is 100.


http://tomcat.apache.org/tomcat-6.0-doc/config/http.html


The stricter scheme hence, serves as a usable application workaround for
now.


If the above bug is real, then yes, it makes a difference.
I still believe that handling this at the level of a front-end makes 
more sense.  At least there, you can return something nice rather than 
brutally rejecting the connection, and you can also examine the request 
to determine if you really want to block it or not.



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



Re: Tomcat and openjpa javaagent

2010-05-10 Thread n0weak

Well, I set openjpa-all-2.0.0.jar as javaagent, and all startup exceptions
are gone. Still there is no runtime optimization available, an exeption is
being throwed when accessing the database: 

Caused by: openjpa-2.0.0-r422266:935683 nonfatal user error
org.apache.openjpa.persistence.ArgumentException: This configuration
disallows runtime optimization, but the following listed types were not
enhanced at build time or at class load time with a javaagent:
-- 
View this message in context: 
http://old.nabble.com/Tomcat-and-openjpa-javaagent-tp28506406p28511183.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 does not honor acceptCount configuration variable

2010-05-10 Thread Jess Holle
If you're talking about the non-native AJP connector, then this is a 
long-standing issue.


acceptCount is essentially ignored in this case and all concurrent 
requests above pool size /minus 2/ go off into limbo and are not handled 
properly.  I don't understand the off-by-2 error, but it is clearly there.


If you're talking about some other connector, then I cannot speak to 
that -- as I use the pure Java (non-NIO for stability) connector.  
Native connectors are just too painful to build, update, and 
troubleshoot across all the platforms I deal with.  This clearly isn't 
going to change no matter how stable these connectors are and I need to 
use Apache anyway, so native connectors are a dead end.  It's either 
old-IO or NIO, but it needs to be pure Java for me.


--
Jess Holle

On 5/10/2010 7:35 AM, André Warnier wrote:

Timir Hazarika wrote:

Andre,

Response from Leon just about summarizes this issue: the shock 
absorber you
mention is not configurable. Setting the acceptCount to 1 or nine 
hundred

produces exactly the same behavior in terms of connections awaiting
response.


Then that would be a bug, no ? In the sense that the documentation says :

acceptCount

The maximum queue length for incoming connection requests when all 
possible request processing threads are in use. Any requests received 
when the queue is full will be refused. The default value is 100.


http://tomcat.apache.org/tomcat-6.0-doc/config/http.html

The stricter scheme hence, serves as a usable application 
workaround for

now.


If the above bug is real, then yes, it makes a difference.
I still believe that handling this at the level of a front-end makes 
more sense.  At least there, you can return something nice rather than 
brutally rejecting the connection, and you can also examine the 
request to determine if you really want to block it or not.



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






RE: Almost figured out how to satisfy container and managed bean login.

2010-05-10 Thread Leo Donahue - PLANDEVX
 anyone know why? 
Without seeing your web.xml, I have no idea.


 it never reaches the j_security check servlet
However, are you trying to do FORM based authentication?  Then read this:  
http://java.sun.com/javaee/5/docs/tutorial/doc/bncbe.html#bncbq

And here is an example: 
http://java.sun.com/javaee/5/docs/tutorial/doc/bncbx.html#bncca


 I have a double login requirement...
If you are using container managed security, you can use isUserInRole, no?

Leo

-Original Message-
From: Yucca Nel [mailto:yucca...@live.co.za] 
Sent: Sunday, May 09, 2010 1:22 PM
To: Tomcat Users List
Subject: Almost figured out how to satisfy container and managed bean login.

I have a double login requirement because I need some finer detals that 
tomcst's container authentication does not seem to provide.
I need a way to atore username in business logic scope when logged in (mainly 
just  the username) my current solution is not working as follows:

I submit action to backing method which is coded in the jsf as follows in the 
login page:


f:view
body style=background-color:#7b68ee;margin:auto
div align=center id=headerjsp:include page=/header.jsp//div
div align=center
div align=center id=centred-contentstyle=border-width:3px; 
border-style: solid; border-color: #7fffd4;width:800px
div id=h1 align=center
h:outputText value=#{loginMsg.h1}... style=color:white; 
font-family:fantasy;font-size:large;/br
h:outputText value=#{loginMsg.h2}... style=color:white; 
font-family:fantasy;font-size:large;//div
div align=center
h:form
h:panelGrid columns=2

h:outputText value=#{registerMsg.userName}: 
style=color:yellow;/
h:inputText id=j_username 
value=#{loginForm.username} 
title=#{registerMsg.userNameTitle}required=true

f:validateLength maximum=20 minimum=6/
h:outputText value=#{registerMsg.password}: 
style=color:yellow;/
h:inputSecret id=j_passwword 
value=#{loginForm.password} 
title=#{registerMsg.passwordTitle}required=true 

/h:inputSecret

/h:panelGrid

h:commandButton action=#{loginForm.confirmCredentials} 
value=#{loginMsg.login}style=color:#20b2aa; /
br
/h:form

then in loginForm.java I have the method coded as follows to set my managed 
bean and hopefuly dispatch on continer needed login credentials. 


public String confirmCredentials() throws IOException, ServletException {   
 UserSession userSession =

(UserSession)FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get(userSession);

if (UserManagerBean.confirmLogin(username, password)) {

UsersEntity user = UserManagerBean.findUser(username);
userSession.setCurrentUser(user);
return home;
}
FacesMessage message = new FacesMessage();
message.setSummary(Login Error);
message.setDetail(Unable to log you in -
   +   username and password combination not found.);
message.setSeverity(FacesMessage.SEVERITY_WARN);
FacesContext.getCurrentInstance().addMessage(null,message);
ExternalContext ectx =
FacesContext.getCurrentInstance().getExternalContext();
  HttpServletRequest request =
(HttpServletRequest)ectx.getRequest();
  HttpServletResponse response =
(HttpServletResponse)ectx.getResponse();
  RequestDispatcher dispatcher =
request.getRequestDispatcher(j_security_check);
  dispatcher.forward(request,response);
  return null;
}

it never reaches the j_security check servlet

anyone know why?

The method works fine when called from outside containers security context 
defined around the  page request.



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



Re: confused with Tomcat...

2010-05-10 Thread macbd1
Being unfamiliar with 'Tomcat' and concerned this error problem might be 
from it being surreptitiously downloaded with a java-update to some 'hidden' 
location on my PC, or some such thing, I find today the problem has 
disappeared.  I spend a lot of time with current event news and in 
retrospect now believe most if not all of these 'errors' occurred with one 
news organization.  Nothing in my 'Processes' or 'Services' seems suspicious 
or abnormal.  Maybe others complained to the error-prone news agency?


Thank you Chuck and all for your quick and helpful responses.  I will know 
how to better analyze this problem if errors return.


I still know little if anything about the world of Apache Tomcat but 
presently don't have time to thoroughly investigate.  Good luck and be safe.


Mac

- Original Message - 
From: Caldarale, Charles R chuck.caldar...@unisys.com

To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, May 09, 2010 2:23 PM
Subject: RE: confused with Tomcat...



From: macbd1 [mailto:mac...@hughes.net]
Subject: confused with Tomcat...

a couple of months ago or so I began having problems concerning
error announcements when attempting to open a web page on internet.


A specific web site, or all of them?


Wayyy too often an error window appears stating the following,
as example, all error announcements are identical except of
course for label of the web page:

HTTP Status 404 - /2010/05/07/supreme-court-update-no-white-smoke-yet/
type Status report
message /2010/05/07/supreme-court-update-no-white-smoke-yet/
description The requested resource (/2010/05/07/supreme-court-update-
no-white-smoke-yet/) is not available.
Apache Tomcat/5.5.23


That just shows the site in question is using a slightly outdated version of 
Tomcat.



Refreshing sometimes allows the page to open but highlighting the URL
in browser window and pressing 'Enter' _*always*_ allows the web page
to open.  Can anyone please advise what the heck is going on here or
how to correct this?  Thanks for any help.


If this is happening on one web site only, it's their problem, and there's 
nothing you can do about it other than complain to them.  If it's happening 
on multiple, unrelated web sites, it could be your browser is broken, your 
OS's TCP/IP stack is flakey, your router (if you have one) is garbling 
things, your cable/DSL/dialup modem is malfunctioning, or your ISP is 
unreliable.


- Chuck





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



mod_jk socket_timeout elaboration

2010-05-10 Thread Bob Jewell
Using mod_jk 1.2.28 on Apache 2.2.3  (please redirect me if there is a better 
list for mod_jk issues)

I am encountering socket timeouts, I believe, but I need help understanding 
what's actually happening.

As a test, I have a simple jsp that does a sleep(6000) (10 seconds), so when I 
hit this test url on a setup with no other traffic (where the servers are on 
the same fast network), I can reproduce the problem every time.  When I comment 
out the sleep, I get no error.

Mon May 10 10:31:01.119 2010] [15471:3086317328] [info] 
ajp_connection_tcp_get_message::jk_ajp_common.c (1150): (appserver1) can't 
receive the response header message from tomcat, network problems or tomcat 
(10.0.1.108:8009) is down (errno=11)
[Mon May 10 10:31:01.119 2010] [15471:3086317328] [error] 
ajp_get_reply::jk_ajp_common.c (1962): (appserver1) Tomcat is down or refused 
connection. No response has been sent to the client (yet)
[Mon May 10 10:31:01.119 2010] [15471:3086317328] [info] 
ajp_service::jk_ajp_common.c (2447): (appserver1) sending request to tomcat 
failed (recoverable),  (attempt=1)


This happens with socket_timeout set to 10.  I can make this all go away by 
setting socket_timeout to something really high, or 0, but I'd like to 
understand what's happening.

socket_timeout is supposed to be in seconds, but I get these error messages 
logged at around 1 second. I have to increase socket_timeout to above 30 or so 
for it to work, but I still get the error back faster than I can really measure.

worker properties:
worker.worker_template.port=8009
worker.worker_template.type=ajp13
worker.worker_template.lbfactor=1
worker.worker_template.ping_timeout=1000
worker.worker_template.ping_mode=A
worker.worker_template.socket_timeout=10
worker.worker_template.connection_pool_timeout=600


Thanks,
Bob


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



RE: Re : Re : Re : Re : Re : Tomcat 5.5.29 does not accept connections from outside

2010-05-10 Thread Jeffrey Janner
Yes, the DLL is included in 5.5.29 now.  It no longer downloads, since the 
downloaded version was ancient.  Now you get the one that was current when the 
release was built.  Much better I think.
Jeff

-Original Message-
From: Eyrignoux Marc [mailto:eyrig...@yahoo.fr] 
Sent: Friday, May 07, 2010 4:36 PM
To: Tomcat Users List
Subject: Re : Re : Re : Re : Re : Tomcat 5.5.29 does not accept connections 
from outside


Hi Jeff,

Good guess: I had always the native libraries installed on Tomcat 5.5.29.
For Tomcat 5.5.17, it depends: for the 2 firsts installs, I installed the 
native libraries. But the dll wouldn't download for the next ones, so I pressed 
cancell, and they didn't install.
Anyway, the connection with Tomcat 5.5.17 always worked from outside computers 
(with and without the native libraries).
There was not this download problem with Tomcat 5.5.29: I guess the dll came 
within the install of Tomcat 5.5.29.
I am not at work until monday, I will give you the version numbers then.

Sorry for c'est au pied du mur...: I pressed the wrong button.

See you,
Marc.










Marc -
Do you have the native libraries installed?
What are their releases Tomcat 5.5.17 vs. 5.5.29?
To find out, explore to the Tomcat 5.5\bin directory and right-click on 
tcnative-1.dll.
Look at the Details tab and see what it has for file version.
Jeff

-Original Message-
From: Eyrignoux Marc [mailto:eyrig...@yahoo.fr] 
Sent: Friday, May 07, 2010 9:25 AM
To: Tomcat Users List
Subject: Re : Re : Re : Tomcat 5.5.29 does not accept connections from outside



Hi Charles,

 You can try setting the address attribute of your Connector 
elements to 0.0.0.0 to force IPv4.

It works, thank you 
NB: Other people might experience the same problem. I don't know where it comes 
from, may be from an interaction between Windows Server 2008 and Tomcat 5.5.29 ?

Thank you again,
Marc.

NB: for the other questions:
- Nothing interesting in the logs
- I use the same JDK for both 5.5.17 and 5.5.29: j2sdk1.5.0_16
- -Djava.net.preferIPv4Stack=true didn't help
- my server.xml is the one installed by default with Tomcat, without any 
changes (but the 0.0.0.0 which I have just added). I don't paste it here 
since the problem is solved, and I don't want to spam you with long emails.











 From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
 Subject: RE: Re : Re : Tomcat 5.5.29 does not accept connections from
 outside
 
 It appears to be listening only on IPv6, not IPv4.
 
 Check the logs for 5.5.29 to see if anything interesting is being
 reported.
 
 Post your server.xml, preferably with comments removed and passwords
 obfuscated.
 
 You can try setting the address attribute of your Connector elements
 to 0.0.0.0 to force IPv4.

Also, are you using the same JVM for both 5.5.17 and 5.5.29?  Do you have any 
command line parameters set?  You can try setting:

-Djava.net.preferIPv4Stack=true

to see if that helps.

- 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


  

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



***  NOTICE  *
This message is intended for the use of the individual or entity to which 
it is addressed and may contain information that is privileged, 
confidential, and exempt from disclosure under applicable law.  If the 
reader of this message is not the intended recipient or the employee or 
agent responsible for delivering this message to the intended recipient, 
you are hereby notified that any dissemination, distribution, or copying 
of this communication is strictly prohibited.  If you have received this 
communication in error, please notify us immediately by reply or by 
telephone (call us collect at 512-343-9100) and immediately delete this 
message and all its attachments.





-
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



***  NOTICE  *
This message is intended for the use of the individual or entity to which 
it is 

RE: Re : Re : Re : Tomcat 5.5.29 does not accept connections from outside

2010-05-10 Thread Jeffrey Janner
Well, I for one care, because it's one more work-around I'll have to pass along 
to every customer of ours that upgrades to a new Windows server.   It's not a 
real issue in my personal environment, since all hosted customers are 
configured with hard IPs, but most of our customer base install without 
worrying about the IP address aspect of it.
(Thought now that I think back on it, I may have already addressed this in our 
installer by forcing address=0.0.0.0.)
It would be nice that things work as documented/expected.

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Saturday, May 08, 2010 9:03 AM
To: Tomcat Users List
Subject: Re: Re : Re : Re : Tomcat 5.5.29 does not accept connections from 
outside


Also, does anyone care, or is this something where we'll just try to 
track the issue each time someone asks ?


***  NOTICE  *
This message is intended for the use of the individual or entity to which 
it is addressed and may contain information that is privileged, 
confidential, and exempt from disclosure under applicable law.  If the 
reader of this message is not the intended recipient or the employee or 
agent responsible for delivering this message to the intended recipient, 
you are hereby notified that any dissemination, distribution, or copying 
of this communication is strictly prohibited.  If you have received this 
communication in error, please notify us immediately by reply or by 
telephone (call us collect at 512-343-9100) and immediately delete this 
message and all its attachments.


RE: mod_jk socket_timeout elaboration

2010-05-10 Thread Caldarale, Charles R
 From: Bob Jewell [mailto:jewe...@franklin.edu]
 Subject: mod_jk socket_timeout elaboration

 I have a simple jsp that does a sleep(6000) (10 seconds)

That looks like 6 seconds to me...

 This happens with socket_timeout set to 10.

To can quote previous responses from Rainer:

Don't use socket_timeout.  Use version 1.2.28 and socket_connect_timeout.

http://marc.info/?l=tomcat-userm=125897176719328w=2

More information:

http://marc.info/?l=tomcat-userm=125675257720614w=2

And more detail:

socket_timeout is a difficult beast and I generally do not recommend using it. 
mod_jk uses it in some special situations in order to be able to abort waiting 
for data. It is not directly 'how long a socket will be kept open'. How long a 
socket is kept open depends on how the socket gets used.

Usually you can get away pretty good using CPing and ping_timeout, 
socket_connect_timeout, eventually reply_timeout with max_reply_timeouts.

http://marc.info/?l=tomcat-userm=125663788907668w=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.



RE: 100% CPU when Tomcat 5.5.20 is run on Windows Server 2003 on VM machine

2010-05-10 Thread Jeffrey Janner
Remove the war file and restart.  If Tomcat doesn't go to 100%, then the
problem is with the application.
If it does, then provide more details as others have requested.

-Original Message-
From: Joseph Freemaker [mailto:joseph_freema...@yahoo.com] 
Sent: Sunday, May 09, 2010 9:48 AM
To: users@tomcat.apache.org
Subject: Re: 100% CPU when Tomcat 5.5.20 is run on Windows Server 2003
on VM machine

Hi,



Tomcat immediately goes to 100% CPU usage after starting on a VM
machine. Have
disabled AJP.

The war file application starts, however the Windows tomcat process is
at 100% CPU usage.


The messages (they all are the typical messages) in the Tomcat log
provide no hints on what the issue may be.

Any suggestions would be appreciated.

Thanks


  

***  NOTICE  *
This message is intended for the use of the individual or entity to which 
it is addressed and may contain information that is privileged, 
confidential, and exempt from disclosure under applicable law.  If the 
reader of this message is not the intended recipient or the employee or 
agent responsible for delivering this message to the intended recipient, 
you are hereby notified that any dissemination, distribution, or copying 
of this communication is strictly prohibited.  If you have received this 
communication in error, please notify us immediately by reply or by 
telephone (call us collect at 512-343-9100) and immediately delete this 
message and all its attachments.


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



RE: Re : Re : Re : Tomcat 5.5.29 does not accept connections from outside

2010-05-10 Thread Caldarale, Charles R
 From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com]
 Subject: RE: Re : Re : Re : Tomcat 5.5.29 does not accept connections
 from outside
 
 It would be nice that things work as documented/expected.

You might have to take that up with Microsoft, since indications are that's 
where the problem may reside.

 - 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: IMP:Failure in editing files in Tomcat

2010-05-10 Thread Jeffrey Janner
Windows User Account Control strikes again!

-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: Sunday, May 09, 2010 4:37 PM
To: Tomcat Users List
Subject: Re: IMP:Failure in editing files in Tomcat

On 09/05/2010 17:59, anoop singh khimani wrote:
 Hi,
 i have installed Apache Tomcat 6.0 in my machine which is having 
 windows 7 as operating system. i have made a folder in webapps in 
 tomcat directory. whenever i wanted to save any file in my folder, it 
 gives me an error that you should have administrator privileges to 
 edit the file.
 in my system there is only one user account and that also is 
 Administrator and i am using the same. i am not able to do stuff due 
 to this error. can you please help regarding this.

Not really, it's not a Tomcat problem as far as I can see.
It seems like a Windows problem.


p

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



***  NOTICE  *
This message is intended for the use of the individual or entity to which 
it is addressed and may contain information that is privileged, 
confidential, and exempt from disclosure under applicable law.  If the 
reader of this message is not the intended recipient or the employee or 
agent responsible for delivering this message to the intended recipient, 
you are hereby notified that any dissemination, distribution, or copying 
of this communication is strictly prohibited.  If you have received this 
communication in error, please notify us immediately by reply or by 
telephone (call us collect at 512-343-9100) and immediately delete this 
message and all its attachments.


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



RE: Re : Re : Re : Tomcat 5.5.29 does not accept connections from outside

2010-05-10 Thread Jeffrey Janner
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Subject: RE: Re : Re : Re : Tomcat 5.5.29 does not accept connections from 
outside

 From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com]
 Subject: RE: Re : Re : Re : Tomcat 5.5.29 does not accept connections
 from outside
 
 It would be nice that things work as documented/expected.

You might have to take that up with Microsoft, since indications are that's 
where the problem may reside.

+2

***  NOTICE  *
This message is intended for the use of the individual or entity to which 
it is addressed and may contain information that is privileged, 
confidential, and exempt from disclosure under applicable law.  If the 
reader of this message is not the intended recipient or the employee or 
agent responsible for delivering this message to the intended recipient, 
you are hereby notified that any dissemination, distribution, or copying 
of this communication is strictly prohibited.  If you have received this 
communication in error, please notify us immediately by reply or by 
telephone (call us collect at 512-343-9100) and immediately delete this 
message and all its attachments.


NioReceiver using 100% CPU

2010-05-10 Thread Schoenemann, Ryan
I have 2 Tomcat 6.0.16 servers set up in a cluster running on a Windows
2003 VM as a windows service, with java version 1.6.0_10.  After 10 - 14
days of running one of the Tomcat instances will start using 100% of the
server CPU.  

 

Through JConsole I see that the NIOReciever thread is the top CPU using
thread, where it is usually at the bottom with next to none CPU usage.
When I restart the Tomcat6 windows service everything goes back to
normal, but a couple of days later the other server in the cluster will
need to be restarted.  I searched for similar occurrences but I was only
able to find a problem with the NIO selector while running on Linux, and
it was supposed to be fixed in a previous build of 1.6.  

 

I used the cluster setup from the tomcat manual, with the exception of
using synchronous replication.  

 

Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
channelSendOptions=4

Manager
className=org.apache.catalina.ha.session.DeltaManager

expireSessionsOnShutdown=false
notifyListenersOnReplication=true /

Channel
className=org.apache.catalina.tribes.group.GroupChannel

Membership
className=org.apache.catalina.tribes.membership.McastService

address=228.0.0.4 port=45564
frequency=500 dropTime=3000 /

Receiver
className=org.apache.catalina.tribes.transport.nio.NioReceiver

address=auto port=4000
autoBind=100 selectorTimeout=5000

maxThreads=6 /

Sender
className=org.apache.catalina.tribes.transport.ReplicationTransmitter

Transport
className=org.apache.catalina.tribes.transport.nio.PooledParallelSender
 /

/Sender

Interceptor
className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetec
tor /

Interceptor
className=org.apache.catalina.tribes.group.interceptors.MessageDispatch
15Interceptor /

/Channel

Valve
className=org.apache.catalina.ha.tcp.ReplicationValve filter= /

Valve
className=org.apache.catalina.ha.session.JvmRouteBinderValve /

ClusterListener
className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListene
r /

ClusterListener
className=org.apache.catalina.ha.session.ClusterSessionListener /

/Cluster

 

I took a thread dump during the most recent occurrence:

 

[2010-05-04 07:49:40] [info] NioReceiver 

[2010-05-04 07:49:40] [info] daemon 

[2010-05-04 07:49:40] [info] prio=6 tid=0x54f9b400 

[2010-05-04 07:49:40] [info] nid=0x2e8 

[2010-05-04 07:49:40] [info] runnable 

[2010-05-04 07:49:40] [info] [0x5522f000..0x5522fa18]

[2010-05-04 07:49:40] [info]java.lang.Thread.State: RUNNABLE

[2010-05-04 07:49:40] [info] at
sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)

[2010-05-04 07:49:40] [info] at
sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(Unknown Source)

[2010-05-04 07:49:40] [info] at
sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(Unknown Source)

[2010-05-04 07:49:40] [info] at
sun.nio.ch.WindowsSelectorImpl.doSelect(Unknown Source)

[2010-05-04 07:49:40] [info] at
sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)

[2010-05-04 07:49:40] [info] - locked 0x07563448 

[2010-05-04 07:49:40] [info] (a sun.nio.ch.Util$1)

[2010-05-04 07:49:40] [info] - locked 0x07563458 

[2010-05-04 07:49:40] [info] (a java.util.Collections$UnmodifiableSet)

[2010-05-04 07:49:40] [info] - locked 0x075633d0 

[2010-05-04 07:49:40] [info] (a sun.nio.ch.WindowsSelectorImpl)

[2010-05-04 07:49:40] [info] at
sun.nio.ch.SelectorImpl.select(Unknown Source)

[2010-05-04 07:49:40] [info] at
org.apache.catalina.tribes.transport.nio.NioReceiver.listen(NioReceiver.
java:243)

[2010-05-04 07:49:40] [info] at
org.apache.catalina.tribes.transport.nio.NioReceiver.run(NioReceiver.jav
a:353)

[2010-05-04 07:49:40] [info] at java.lang.Thread.run(Unknown
Source)

 

 

The only other thing I have noticed is that every evening around the
same time I see the following messages posted in the catalina log for 5
- 30 minutes:

 

Apr 28, 2010 6:47:16 PM
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector
memberDisappeared

INFO: Received
memberDisappeared[org.apache.catalina.tribes.membership.MemberImpl[tcp:/
/{10, -116, 111, 42}:4000,{10, -116, 111, 42},4000,
alive=155973672,id={78 -71 -19 48 57 82 65 122 -80 52 -24 28 -126 95 77
27 }, payload={}, command={}, domain={}, ]] message. Will verify.

 

Apr 28, 2010 6:47:16 PM
org.apache.catalina.tribes.transport.nio.NioReceiver socketTimeouts

WARNING: Channel key is registered, but has had no interest ops for the
last 3000 ms. (cancelled:false):sun.nio.ch.selectionkeyi...@a3ae07 last
access:2010-04-28 

Re: Issue with clustering

2010-05-10 Thread Filip Hanik - Dev Lists

try upgrading

On 05/04/2010 08:24 AM, Marc Wilmots wrote:

Hi List,

Since a few weeks now, I started to notice in the catalina.out log file
messages regarding the cluster's operatability.
It reports that a member or members in my cluster have disappeared, and
appeared (member still alive) again. That's reasonable...the strange thing
is that they occur at exactly the same time.

Sometimes this message appears several times in a minute, and sometimes it
doesn't appear for several  minutes.
I'm using Tomcat 6.0.18 with JDK 1.6.0_14 64bit on RedHat Linux 5.2.

I'm thinking about several posibilities here, as for example a bad switch or
something. Although, the thing is, I have other Tomcat instances in the same
network that do not show this behavior.

I would really apreciate it if someone could shed a light on what I can
investigate next.

As an example, I paste some output from my log:

Apr 29, 2010 1:43:31 PM org.apache.catalina.tribes.
group.interceptors.TcpFailureDetector memberDisappeared
INFO: Received
memberDisappeared[org.apache.catalina.tribes.membership.MemberImpl[tcp://{10,
-68, 4, -36}:4003,{10, -68, 4, -36},4003, alive=23576482,id={17 96 -31 30
-112 76 73 -38 -87 6 -74 21 -124 117 18 -66 }, payload={}, command={},
domain={}, ]] message. Will verify.
Apr 29, 2010 1:43:31 PM
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector
memberDisappeared
INFO: Verification complete. Member still
alive[org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, -68, 4,
-36}:4003,{10, -68, 4, -36},4003, alive=23576482,id={17 96 -31 30 -112 76 73
-38 -87 6 -74 21 -124 117 18 -66 }, payload={}, command={}, domain={}, ]]
Apr 29, 2010 1:47:59 PM
org.apache.catalina.tribes.transport.nio.ParallelNioSender doLoop
WARNING: Member send is failing for:tcp://{10, -68, 4, -37}:4003 ; Setting
to suspect and retrying.
Apr 29, 2010 1:47:59 PM
org.apache.catalina.tribes.transport.nio.ParallelNioSender doLoop
WARNING: Not retrying send for:tcp://{10, -68, 4, -37}:4003; Sender is
disconnected.
Apr 29, 2010 1:47:59 PM
org.apache.catalina.tribes.transport.nio.ParallelNioSender doLoop
WARNING: Not retrying send for:tcp://{10, -68, 4, -37}:4003; Sender is
disconnected.
Apr 29, 2010 1:48:01 PM org.apache.catalina.ha.tcp.SimpleTcpCluster
memberDisappeared
INFO: Received member
disappeared:org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, -68,
4, -37}:4003,{10, -68, 4, -37},4003, alive=23477210,id={96 77 36 -51 -85 -17
67 -53 -107 -22 9 77 -71 78 -106 -112 }, payload={}, command={}, domain={},
]
Apr 29, 2010 1:48:01 PM
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector
performBasicCheck
INFO: Suspect member, confirmed
dead.[org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, -68, 4,
-37}:4003,{10, -68, 4, -37},4003, alive=23477210,id={96 77 36 -51 -85 -17 67
-53 -107 -22 9 77 -71 78 -106 -112 }, payload={}, command={}, domain={}, ]]
Apr 29, 2010 1:48:08 PM
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector
memberDisappeared
INFO: Received
memberDisappeared[org.apache.catalina.tribes.membership.MemberImpl[tcp://{10,
-68, 4, -37}:4003,{10, -68, 4, -37},4003, alive=24454627,id={96 77 36 -51
-85 -17 67 -53 -107 -22 9 77 -71 78 -106 -112 }, payload={}, command={},
domain={}, ]] message. Will verify.
Apr 29, 2010 1:48:08 PM
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector
memberDisappeared
INFO: Verification complete. Member
disappeared[org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, -68,
4, -37}:4003,{10, -68, 4, -37},4003, alive=24454627,id={96 77 36 -51 -85 -17
67 -53 -107 -22 9 77 -71 78 -106 -112 }, payload={}, command={}, domain={},
]]
Apr 29, 2010 1:48:08 PM org.apache.catalina.ha.tcp.SimpleTcpCluster
memberDisappeared
INFO: Received member
disappeared:org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, -68,
4, -37}:4003,{10, -68, 4, -37},4003, alive=24454627,id={96 77 36 -51 -85 -17
67 -53 -107 -22 9 77 -71 78 -106 -112 }, payload={}, command={}, domain={},
]
Apr 29, 2010 1:48:09 PM
org.apache.catalina.tribes.transport.nio.ParallelNioSender doLoop
WARNING: Member send is failing for:tcp://{10, -68, 4, -37}:4003 ; Setting
to suspect and retrying.
Apr 29, 2010 1:48:09 PM
org.apache.catalina.tribes.transport.nio.ParallelNioSender doLoop
WARNING: Not retrying send for:tcp://{10, -68, 4, -37}:4003; Sender is
disconnected.
Apr 29, 2010 1:48:09 PM
org.apache.catalina.tribes.transport.nio.ParallelNioSender doLoop
WARNING: Not retrying send for:tcp://{10, -68, 4, -37}:4003; Sender is
disconnected.
Apr 29, 2010 1:48:09 PM
org.apache.catalina.tribes.transport.nio.ParallelNioSender doLoop
WARNING: Not retrying send for:tcp://{10, -68, 4, -37}:4003; Sender is
disconnected.
Apr 29, 2010 1:48:09 PM
org.apache.catalina.tribes.transport.nio.ParallelNioSender doLoop
WARNING: Not retrying send for:tcp://{10, -68, 4, -37}:4003; Sender is
disconnected.
Apr 29, 2010 1:48:09 PM
org.apache.catalina.tribes.transport.nio.ParallelNioSender doLoop
WARNING: Not 

Re: mod_jk socket_timeout elaboration

2010-05-10 Thread Bob Jewell
- Charles R Caldarale chuck.caldar...@unisys.com wrote:
  From: Bob Jewell [mailto:jewe...@franklin.edu]
  Subject: mod_jk socket_timeout elaboration
 
  I have a simple jsp that does a sleep(6000) (10 seconds)
 
 That looks like 6 seconds to me...

Er, good call.  not going to explain my embarrassingly potent math
skills today.  


 
  This happens with socket_timeout set to 10.
 
 To can quote previous responses from Rainer:
 
 Don't use socket_timeout.  Use version 1.2.28 and
 socket_connect_timeout.
 
 http://marc.info/?l=tomcat-userm=125897176719328w=2
 
 More information:
 
 http://marc.info/?l=tomcat-userm=125675257720614w=2
 
 And more detail:
 
 socket_timeout is a difficult beast and I generally do not recommend
 using it. 
 mod_jk uses it in some special situations in order to be able to abort
 waiting 
 for data. It is not directly 'how long a socket will be kept open'.
 How long a 
 socket is kept open depends on how the socket gets used.
 
 Usually you can get away pretty good using CPing and ping_timeout, 
 socket_connect_timeout, eventually reply_timeout with
 max_reply_timeouts.
 
 http://marc.info/?l=tomcat-userm=125663788907668w=2
 
  - Chuck
 

Thanks for the info.  And apologies for making you link me instead of finding 
it through searches, but I was apparently searching for the wrong things.   
We'll run these suggestions through some tests and hopefully I won't have more 
questions.

-bob

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



Re: confused with Tomcat...

2010-05-10 Thread André Warnier

macbd1 wrote:
...


I still know little if anything about the world of Apache Tomcat but 
presently don't have time to thoroughly investigate.  


Well then, a quick primer : Apache Tomcat is a special kind of webserver 
(more precisely named a servlet engine), whose main function is to run 
web applications written in the Java programming language, commonly 
called webapps and/or servlets, which generate what is called 
active content (as opposed to purely static html pages).
Apache Tomcat also belongs to the categories of free software (in the 
sense that it costs nothing) and open source software (in the sense 
that anyone can look at the code and re-use it), and is made and 
supported entirely by volunteers.  Most of them are Java programmers, 
but a surprising number of them are fairly normal people.



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



Re: confused with Tomcat...

2010-05-10 Thread David kerber

On 5/10/2010 3:18 PM, André Warnier wrote:

macbd1 wrote:
...


I still know little if anything about the world of Apache Tomcat but
presently don't have time to thoroughly investigate.


Well then, a quick primer : Apache Tomcat is a special kind of webserver
(more precisely named a servlet engine), whose main function is to run
web applications written in the Java programming language, commonly
called webapps and/or servlets, which generate what is called
active content (as opposed to purely static html pages).
Apache Tomcat also belongs to the categories of free software (in the
sense that it costs nothing) and open source software (in the sense
that anyone can look at the code and re-use it), and is made and
supported entirely by volunteers. Most of them are Java programmers, but
a surprising number of them are fairly normal people.


Really?  I have yet to meet any of them who are; certainly there are 
none in my office ;-D


D

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



Running PHP 5.2.X on Tomcat 5.5?

2010-05-10 Thread Gregers Blach

Hi,

I'm looking for instructions on how to get a Tomcat 5.5 to run PHP 
5.2.X. The reason is that it would be very helpful to run PHPMyAdmin to 
better support underlying MySQL 5.0.X databases.


Some specs on my test system:

- Running on Windows 7 x64 (poduction system is WinServer 2003, 
eventually WinServer 2008)

- Tomcat 5.5
- MySQL 5.0.X
- PHP 5.2.X
- PHPMyAdmin 3.3.X

I have succesfully installed the Tomcat and can log in to 
http://localhost:8080 as expected.


I do not know how to configure Tomcat to run PHP, and the sparse 
instructions I can find on the web all seem to be rather old:


http://www.softminer.net/2009/05/how-to-install-or-run-php-on-tomcat-6.html
http://blog.taragana.com/index.php/archive/running-php-5x-on-windows-using-tomcat-4x-or-5x/

For instance, what puzzles me, is that the newest PECL package 
(http://museum.php.net/php5/pecl-5.2.6-Win32.zip) does not contain the 
file php5servlet.dll, nor the file php_java.dll??


Any hints would be highly appreciated! :o)

Regards,

Greg

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



Appserver Queues Filling Up

2010-05-10 Thread Ben Knight
Apache version:2.2.3

JBoss version:  5

JBoss Web: 2.1.3.GA http://2.1.3.ga/

mod_jk:   1.2.30



Dear community,



We are having a Wicket-based Java application deployed in a production
server cluster using Apache (2.2.3) with mod_jk (1.2.30) as load balancing
component w/ sticky session and Jboss 5 as application container for the
Java application.



We are inconsistently seeing an issue in our production environment where
our AJP queues between Apache and Jboss as shown in the JMX console fill up
with requests to the point where the application server is no longer taking
on any new requests. When looking at all involved system components (overall
traffic, load db, process list db, load of all clustered application server
nodes) nothing points towards a capacity issue which would explain why the
calls are being stalled in the AJP queue. Instead all systems appear
sufficiently idle.



So far, our only remedy to this issue is to restart the appservers and the
load balancer which only occasionally clears the AJP queues.



We are trying to figure out why the queues are filling up to the point that
no calls get returned to the end user although the system is not under a
high load.



Has anyone else experienced similar problems?

Are there any other system metrics we should monitor that could explain the
queuing behavior?

Is this potentially a mod_jk issue? If so, is it advisable to swap mod_jk
with mod_cluster to resolve the issue?



Any advice is highly appreciated. If I can provide additional information
for the sake of troubleshooting I would be more than willing to do so.



/Ben





*Ben Knight*
System Engineer • Fi



*T:* +1 212 941 5220 / *M:* +1 917 664 0297
ben.kni...@f-i.com / www.f-i.com



This communication is confidential and is only intended for
the use of the individual or entity to which it is directed.
It may contain information that is privileged and exempt from
disclosure under applicable law. If you are not the Intended
recipient, please notify us immediately. You should not copy
it or disclose its content to any other person.


Re: Tomcat and openjpa javaagent

2010-05-10 Thread n0weak

According to the advice from 
http://openjpa.208410.n2.nabble.com/openjpa-javaagent-enhancement-with-tomcat-td5029993.html
this thread  I switched to build-time enhancement, and it worked for me.
-- 
View this message in context: 
http://old.nabble.com/Tomcat-and-openjpa-javaagent-tp28506406p28517128.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: NioReceiver using 100% CPU

2010-05-10 Thread Pid
On 10/05/2010 18:58, Schoenemann, Ryan wrote:
 I have 2 Tomcat 6.0.16 servers set up in a cluster running on a Windows
 2003 VM as a windows service, with java version 1.6.0_10.  After 10 - 14
 days of running one of the Tomcat instances will start using 100% of the
 server CPU.  

Can you upgrade to the latest version? 6.0.16 is getting on a bit...


p

 Through JConsole I see that the NIOReciever thread is the top CPU using
 thread, where it is usually at the bottom with next to none CPU usage.
 When I restart the Tomcat6 windows service everything goes back to
 normal, but a couple of days later the other server in the cluster will
 need to be restarted.  I searched for similar occurrences but I was only
 able to find a problem with the NIO selector while running on Linux, and
 it was supposed to be fixed in a previous build of 1.6.  
 
  
 
 I used the cluster setup from the tomcat manual, with the exception of
 using synchronous replication.  
 
  
 
 Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
 channelSendOptions=4
 
 Manager
 className=org.apache.catalina.ha.session.DeltaManager
 
 expireSessionsOnShutdown=false
 notifyListenersOnReplication=true /
 
 Channel
 className=org.apache.catalina.tribes.group.GroupChannel
 
 Membership
 className=org.apache.catalina.tribes.membership.McastService
 
 address=228.0.0.4 port=45564
 frequency=500 dropTime=3000 /
 
 Receiver
 className=org.apache.catalina.tribes.transport.nio.NioReceiver
 
 address=auto port=4000
 autoBind=100 selectorTimeout=5000
 
 maxThreads=6 /
 
 Sender
 className=org.apache.catalina.tribes.transport.ReplicationTransmitter
 
 Transport
 className=org.apache.catalina.tribes.transport.nio.PooledParallelSender
  /
 
 /Sender
 
 Interceptor
 className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetec
 tor /
 
 Interceptor
 className=org.apache.catalina.tribes.group.interceptors.MessageDispatch
 15Interceptor /
 
 /Channel
 
 Valve
 className=org.apache.catalina.ha.tcp.ReplicationValve filter= /
 
 Valve
 className=org.apache.catalina.ha.session.JvmRouteBinderValve /
 
 ClusterListener
 className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListene
 r /
 
 ClusterListener
 className=org.apache.catalina.ha.session.ClusterSessionListener /
 
 /Cluster
 
  
 
 I took a thread dump during the most recent occurrence:
 
  
 
 [2010-05-04 07:49:40] [info] NioReceiver 
 
 [2010-05-04 07:49:40] [info] daemon 
 
 [2010-05-04 07:49:40] [info] prio=6 tid=0x54f9b400 
 
 [2010-05-04 07:49:40] [info] nid=0x2e8 
 
 [2010-05-04 07:49:40] [info] runnable 
 
 [2010-05-04 07:49:40] [info] [0x5522f000..0x5522fa18]
 
 [2010-05-04 07:49:40] [info]java.lang.Thread.State: RUNNABLE
 
 [2010-05-04 07:49:40] [info] at
 sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
 
 [2010-05-04 07:49:40] [info] at
 sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(Unknown Source)
 
 [2010-05-04 07:49:40] [info] at
 sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(Unknown Source)
 
 [2010-05-04 07:49:40] [info] at
 sun.nio.ch.WindowsSelectorImpl.doSelect(Unknown Source)
 
 [2010-05-04 07:49:40] [info] at
 sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
 
 [2010-05-04 07:49:40] [info] - locked 0x07563448 
 
 [2010-05-04 07:49:40] [info] (a sun.nio.ch.Util$1)
 
 [2010-05-04 07:49:40] [info] - locked 0x07563458 
 
 [2010-05-04 07:49:40] [info] (a java.util.Collections$UnmodifiableSet)
 
 [2010-05-04 07:49:40] [info] - locked 0x075633d0 
 
 [2010-05-04 07:49:40] [info] (a sun.nio.ch.WindowsSelectorImpl)
 
 [2010-05-04 07:49:40] [info] at
 sun.nio.ch.SelectorImpl.select(Unknown Source)
 
 [2010-05-04 07:49:40] [info] at
 org.apache.catalina.tribes.transport.nio.NioReceiver.listen(NioReceiver.
 java:243)
 
 [2010-05-04 07:49:40] [info] at
 org.apache.catalina.tribes.transport.nio.NioReceiver.run(NioReceiver.jav
 a:353)
 
 [2010-05-04 07:49:40] [info] at java.lang.Thread.run(Unknown
 Source)
 
  
 
  
 
 The only other thing I have noticed is that every evening around the
 same time I see the following messages posted in the catalina log for 5
 - 30 minutes:
 
  
 
 Apr 28, 2010 6:47:16 PM
 org.apache.catalina.tribes.group.interceptors.TcpFailureDetector
 memberDisappeared
 
 INFO: Received
 memberDisappeared[org.apache.catalina.tribes.membership.MemberImpl[tcp:/
 /{10, -116, 111, 42}:4000,{10, -116, 111, 42},4000,
 alive=155973672,id={78 -71 -19 48 57 82 65 122 -80 52 -24 28 -126 95 77
 27 }, payload={}, command={}, domain={}, ]] message. 

Re: Running PHP 5.2.X on Tomcat 5.5?

2010-05-10 Thread Pid
On 10/05/2010 21:11, Gregers Blach wrote:
 Hi,
 
 I'm looking for instructions on how to get a Tomcat 5.5 to run PHP
 5.2.X. The reason is that it would be very helpful to run PHPMyAdmin to
 better support underlying MySQL 5.0.X databases.

 Some specs on my test system:
 
 - Running on Windows 7 x64 (poduction system is WinServer 2003,
 eventually WinServer 2008)
 - Tomcat 5.5
 - MySQL 5.0.X
 - PHP 5.2.X
 - PHPMyAdmin 3.3.X
 
 I have succesfully installed the Tomcat and can log in to
 http://localhost:8080 as expected.
 
 I do not know how to configure Tomcat to run PHP, and the sparse
 instructions I can find on the web all seem to be rather old:
 
 http://www.softminer.net/2009/05/how-to-install-or-run-php-on-tomcat-6.html
 http://blog.taragana.com/index.php/archive/running-php-5x-on-windows-using-tomcat-4x-or-5x/
 
 
 For instance, what puzzles me, is that the newest PECL package
 (http://museum.php.net/php5/pecl-5.2.6-Win32.zip) does not contain the
 file php5servlet.dll, nor the file php_java.dll??
 
 Any hints would be highly appreciated! :o)

Is there a particular reason to use Tomcat instead of HTTPD?


p


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




signature.asc
Description: OpenPGP digital signature


RE: Context in conf/Catalina/localhost question

2010-05-10 Thread Leo Donahue - PLANDEVX
NetBeans 6.8 won't even run the webapp within the IDE unless the path attribute 
is set in META-INF/context.xml  I understand why the IDE needs the path to run 
the webapp from the the NetBeans work directory, but do the NetBeans people 
talk to the Tomcat people? :)

Maybe, the clean and build tool in NetBeans could strip that out when it 
creates the war file?  I'm just saying.  People forget.


-Original Message-
From: Leo Donahue - PLANDEVX [mailto:leodona...@mail.maricopa.gov] 
Sent: Sunday, May 09, 2010 6:27 PM
To: 'Tomcat Users List'
Subject: RE: Context in conf/Catalina/localhost question

This always happens.  Once I send a question I find the answer.  Normally I've 
been copying expanded webapp directories to the webapps folder when I have 
Tomcat stopped for other server maintenance.  I forgot that I experimented with 
deploying a war file for the apnxy servlet.  I'm going to point the finger at 
NetBeans for adding the path attribute to my context.  Tomcat was just doing 
what it is supposed to under automatic deployment:  
http://tomcat.apache.org/tomcat-6.0-doc/config/host.html#Automatic%20Application%20Deployment



-Original Message-
From: Leo Donahue - PLANDEVX [mailto:leodona...@mail.maricopa.gov]
Sent: Sunday, May 09, 2010 6:17 PM
To: 'Tomcat Users List'
Subject: Context in conf/Catalina/localhost question

I've noticed that sometimes when I make a change to an existing webapp or 
deploy a new one, that the file contents created in conf/Catalina/localhost do 
not match the contents of the context file in META-INF/context.xml of the 
webapp dir.

Tomcat 6.0.24 - still. Upgrade is coming.

Example, I added a valve to each of my webapps context.xml to turn on the 
access logs.  The valve was the same for each webap, I only changed the name of 
the access log file name.  Three of four webapps produced a log file, but one 
webapp would not produce an access log file, no matter how many times I 
restarted Tomcat - deleted the cache in the work directory and removed previous 
entries in conf/Catalina/localhost.

http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
... You may define as many Context elements as you wish. Each such Context 
MUST have a unique context path. In addition, a Context must be present with a 
context path equal to a zero-length string. This Context becomes the default 
web application for this virtual host, and is used to process all requests that 
do not match any other Context's context path ...


Contents of the apnxy servlet META-INF/context.xml that keep appearing in 
conf/Catalina/localhost, and I didn't even have the path attribute set in that 
file:
?xml version=1.0 encoding=UTF-8?
Context antiJARLocking=true path=/apnxy /Context


I finally just stopped Tomcat, deleted the cache in work dir, renamed and 
manually copied the apnxy.xml file from META-INF/context.xml to 
conf/Catalina/localhost and started Tomcat.  Access log for apnxy_... appeared. 
 What did I miss?


Contents of each access log valve:

?xml version=1.0 encoding=UTF-8?
Context antiJARLocking=true
!-- Log all requests to Tomcat root --
Valve className=org.apache.catalina.valves.AccessLogValve 
directory=logs
prefix=apnxy_access_log. suffix=.txt pattern=common 
resolveHosts=false/ /Context



Contents of context.xml in conf directory:

?xml version='1.0' encoding='utf-8'?
!-- The contents of this file will be loaded for each web application -- 
Context

!-- Default set of monitored resources --
WatchedResourceWEB-INF/web.xml/WatchedResource

!-- Uncomment this to disable session persistence across Tomcat restarts 
--
!--
Manager pathname= /
--

!-- Uncomment this to enable Comet connection tacking (provides events
 on session expiration as well as webapp lifecycle) --
!--
Valve className=org.apache.catalina.valves.CometConnectionManagerValve /
--

/Context

Leo



-
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: Context in conf/Catalina/localhost question

2010-05-10 Thread Leo Donahue - PLANDEVX
NetBeans 6.8 Output window:

In-place deployment at C:\NetBeans_Projects\webappname\build\web
Cannot deploy the module. The context.xml file seems to be broken. Check 
whether it is well-formed and valid.
C:\NetBeans_Projects\webappname\nbproject\build-impl.xml:584: The module has 
not been deployed.



-Original Message-
From: Leo Donahue - PLANDEVX [mailto:leodona...@mail.maricopa.gov] 
Sent: Monday, May 10, 2010 2:51 PM
To: 'Tomcat Users List'
Subject: RE: Context in conf/Catalina/localhost question

NetBeans 6.8 won't even run the webapp within the IDE unless the path attribute 
is set in META-INF/context.xml  I understand why the IDE needs the path to run 
the webapp from the the NetBeans work directory, but do the NetBeans people 
talk to the Tomcat people? :)

Maybe, the clean and build tool in NetBeans could strip that out when it 
creates the war file?  I'm just saying.  People forget.


-Original Message-
From: Leo Donahue - PLANDEVX [mailto:leodona...@mail.maricopa.gov]
Sent: Sunday, May 09, 2010 6:27 PM
To: 'Tomcat Users List'
Subject: RE: Context in conf/Catalina/localhost question

This always happens.  Once I send a question I find the answer.  Normally I've 
been copying expanded webapp directories to the webapps folder when I have 
Tomcat stopped for other server maintenance.  I forgot that I experimented with 
deploying a war file for the apnxy servlet.  I'm going to point the finger at 
NetBeans for adding the path attribute to my context.  Tomcat was just doing 
what it is supposed to under automatic deployment:  
http://tomcat.apache.org/tomcat-6.0-doc/config/host.html#Automatic%20Application%20Deployment



-Original Message-
From: Leo Donahue - PLANDEVX [mailto:leodona...@mail.maricopa.gov]
Sent: Sunday, May 09, 2010 6:17 PM
To: 'Tomcat Users List'
Subject: Context in conf/Catalina/localhost question

I've noticed that sometimes when I make a change to an existing webapp or 
deploy a new one, that the file contents created in conf/Catalina/localhost do 
not match the contents of the context file in META-INF/context.xml of the 
webapp dir.

Tomcat 6.0.24 - still. Upgrade is coming.

Example, I added a valve to each of my webapps context.xml to turn on the 
access logs.  The valve was the same for each webap, I only changed the name of 
the access log file name.  Three of four webapps produced a log file, but one 
webapp would not produce an access log file, no matter how many times I 
restarted Tomcat - deleted the cache in the work directory and removed previous 
entries in conf/Catalina/localhost.

http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
... You may define as many Context elements as you wish. Each such Context 
MUST have a unique context path. In addition, a Context must be present with a 
context path equal to a zero-length string. This Context becomes the default 
web application for this virtual host, and is used to process all requests that 
do not match any other Context's context path ...


Contents of the apnxy servlet META-INF/context.xml that keep appearing in 
conf/Catalina/localhost, and I didn't even have the path attribute set in that 
file:
?xml version=1.0 encoding=UTF-8?
Context antiJARLocking=true path=/apnxy /Context


I finally just stopped Tomcat, deleted the cache in work dir, renamed and 
manually copied the apnxy.xml file from META-INF/context.xml to 
conf/Catalina/localhost and started Tomcat.  Access log for apnxy_... appeared. 
 What did I miss?


Contents of each access log valve:

?xml version=1.0 encoding=UTF-8?
Context antiJARLocking=true
!-- Log all requests to Tomcat root --
Valve className=org.apache.catalina.valves.AccessLogValve 
directory=logs
prefix=apnxy_access_log. suffix=.txt pattern=common 
resolveHosts=false/ /Context



Contents of context.xml in conf directory:

?xml version='1.0' encoding='utf-8'?
!-- The contents of this file will be loaded for each web application -- 
Context

!-- Default set of monitored resources --
WatchedResourceWEB-INF/web.xml/WatchedResource

!-- Uncomment this to disable session persistence across Tomcat restarts 
--
!--
Manager pathname= /
--

!-- Uncomment this to enable Comet connection tacking (provides events
 on session expiration as well as webapp lifecycle) --
!--
Valve className=org.apache.catalina.valves.CometConnectionManagerValve /
--

/Context

Leo



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

Re: Appserver Queues Filling Up

2010-05-10 Thread Juha Laiho

On 05/10/2010 11:35 PM, Ben Knight wrote:

Apache version:2.2.3
JBoss version:  5
JBoss Web: 2.1.3.GAhttp://2.1.3.ga/
mod_jk:   1.2.30

We are inconsistently seeing an issue in our production environment where
our AJP queues between Apache and Jboss as shown in the JMX console fill up
with requests to the point where the application server is no longer taking
on any new requests. When looking at all involved system components (overall
traffic, load db, process list db, load of all clustered application server
nodes) nothing points towards a capacity issue which would explain why the
calls are being stalled in the AJP queue. Instead all systems appear
sufficiently idle.


Those symptoms look like an application deadlock.

Thread dump of the Java server processes at time of the hang might
well help (hoping that the deadlock is not bad enough to prohibit
logging the thread dump).
--
..Juha

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



RE: Running PHP 5.2.X on Tomcat 5.5?

2010-05-10 Thread Martin Gainty

as tc is already multi-threaded i dont have to build tc as multithreaded 
http://tomcat.apache.org/tomcat-5.5-doc/config/http.html

i downloaded the latest tar and i didnt see instructions for multi-threaded 
library build of mod-PHP
http://www.php.net
?
Martin Gainty 
__ 
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: Mon, 10 May 2010 22:31:13 +0100
 From: p...@pidster.com
 To: users@tomcat.apache.org
 Subject: Re: Running PHP 5.2.X on Tomcat 5.5?
 
 On 10/05/2010 21:11, Gregers Blach wrote:
  Hi,
  
  I'm looking for instructions on how to get a Tomcat 5.5 to run PHP
  5.2.X. The reason is that it would be very helpful to run PHPMyAdmin to
  better support underlying MySQL 5.0.X databases.
 
  Some specs on my test system:
  
  - Running on Windows 7 x64 (poduction system is WinServer 2003,
  eventually WinServer 2008)
  - Tomcat 5.5
  - MySQL 5.0.X
  - PHP 5.2.X
  - PHPMyAdmin 3.3.X
  
  I have succesfully installed the Tomcat and can log in to
  http://localhost:8080 as expected.
  
  I do not know how to configure Tomcat to run PHP, and the sparse
  instructions I can find on the web all seem to be rather old:
  
  http://www.softminer.net/2009/05/how-to-install-or-run-php-on-tomcat-6.html
  http://blog.taragana.com/index.php/archive/running-php-5x-on-windows-using-tomcat-4x-or-5x/
  
  
  For instance, what puzzles me, is that the newest PECL package
  (http://museum.php.net/php5/pecl-5.2.6-Win32.zip) does not contain the
  file php5servlet.dll, nor the file php_java.dll??
  
  Any hints would be highly appreciated! :o)
 
 Is there a particular reason to use Tomcat instead of HTTPD?
 
 
 p
 
 
  Regards,
  
  Greg
  
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
  
 
 
  
_
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccountocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4

RE: Context in conf/Catalina/localhost question

2010-05-10 Thread Mark Eggers
I just ran a series of tests on my Linux platform. I've not rebooted yet to run 
this on Windows, but I don't imagine there will be any change.

Environment (all 32 bit):

OS:  Fedora 11 with latest patches
Java:JRE / JDK 1.6.0_20 from Sun
Tomcat:  6.0.26 installed in my local account for development / testing
NetBeans:6.8 installed globally in /opt/netbeans-6.8
Application: DVDStore based on the NetBeans tutorial

Scenario 1

a. Start NetBeans
b. Load standard project (DVDStore)
c. Set as main project
d. Run (without building first)

Expected result: Browser with new tab containing the application pops up
Actual result:   Browser with new tab containing the application pops up

DVDStore.xml generated in $CATALINA_HOME/conf/Catalina/localhost contains 
path=/DVDStore and appBase=/home/mdeggers/NB8-Projects/DVDStore/build/web

I did not put these entries into web/META-INF/context.xml in the source tree.

Right mouse clicking on the project node and selecting clean removes
$CATALINA_HOME/conf/Catalina/localhost/DVDStore.xml and all traces of the web 
application from $CATALINA_HOME/work/Catalina/localhost.

Scenario 2

a. Clean and build web application
b. Use Tomcat manager to deploy web application (DVDStore)
c. Browse to localhost:8080/DVDStore

Expected result: Application works as before
Actual result:   Application works as before

Note that in this case, the $CATALINA_HOME/conf/Catalina/localhost/DVDStore.xml 
file does NOT have the path or docBase attributes in Context.

Undeploying via the Tomcat manager cleanly removes all traces (war file, 
webapps directory, work directory, and DVDStore.xml).

Trivial modifications of a JSP file (adding a meta content=blah item) 
appear immediately in the running application if I started with F6 (run).

I did manage to run into the posted exception once, but I have been unable to 
reproduce it.

Cleaning out .netbeans/6.8/var/cache may help.

Summary:

Do not add appBase and path to META-INF/context.xml in the actual project. 
NetBeans 6.8 seems to manage that properly (merging existing context.xml 
information with the path and appBase attributes).

. . . . just my two cents

/mde/

--- On Mon, 5/10/10, Leo Donahue - PLANDEVX leodona...@mail.maricopa.gov 
wrote:

 From: Leo Donahue - PLANDEVX leodona...@mail.maricopa.gov
 Subject: RE: Context in conf/Catalina/localhost question
 To: 'Tomcat Users List' users@tomcat.apache.org
 Date: Monday, May 10, 2010, 3:02 PM
 NetBeans 6.8 Output window:
 
 In-place deployment at
 C:\NetBeans_Projects\webappname\build\web
 Cannot deploy the module. The context.xml file seems to be
 broken. Check whether it is well-formed and valid.
 C:\NetBeans_Projects\webappname\nbproject\build-impl.xml:584:
 The module has not been deployed.
 
 
 
 -Original Message-
 From: Leo Donahue - PLANDEVX [mailto:leodona...@mail.maricopa.gov]
 
 Sent: Monday, May 10, 2010 2:51 PM
 To: 'Tomcat Users List'
 Subject: RE: Context in conf/Catalina/localhost question
 
 NetBeans 6.8 won't even run the webapp within the IDE
 unless the path attribute is set in
 META-INF/context.xml  I understand why the IDE needs
 the path to run the webapp from the the NetBeans work
 directory, but do the NetBeans people talk to the Tomcat
 people? :)
 
 Maybe, the clean and build tool in NetBeans could strip
 that out when it creates the war file?  I'm just
 saying.  People forget.
 
 
 -Original Message-
 From: Leo Donahue - PLANDEVX [mailto:leodona...@mail.maricopa.gov]
 Sent: Sunday, May 09, 2010 6:27 PM
 To: 'Tomcat Users List'
 Subject: RE: Context in conf/Catalina/localhost question
 
 This always happens.  Once I send a question I find
 the answer.  Normally I've been copying expanded webapp
 directories to the webapps folder when I have Tomcat stopped
 for other server maintenance.  I forgot that I
 experimented with deploying a war file for the apnxy
 servlet.  I'm going to point the finger at NetBeans for
 adding the path attribute to my context.  Tomcat was
 just doing what it is supposed to under automatic
 deployment:  
 http://tomcat.apache.org/tomcat-6.0-doc/config/host.html#Automatic%20Application%20Deployment
 
 
 
 -Original Message-
 From: Leo Donahue - PLANDEVX [mailto:leodona...@mail.maricopa.gov]
 Sent: Sunday, May 09, 2010 6:17 PM
 To: 'Tomcat Users List'
 Subject: Context in conf/Catalina/localhost question
 
 I've noticed that sometimes when I make a change to an
 existing webapp or deploy a new one, that the file contents
 created in conf/Catalina/localhost do not match the contents
 of the context file in META-INF/context.xml of the webapp
 dir.
 
 Tomcat 6.0.24 - still. Upgrade is coming.
 
 Example, I added a valve to each of my webapps context.xml
 to turn on the access logs.  The valve was the same for
 each webap, I only changed the name of the access log file
 name.  Three of four webapps produced a log file, but
 one webapp would not produce an access log file, no matter
 how many times I 

Re: JAXBContext leaks memory

2010-05-10 Thread Shaun Senecal
jvisualvm is an excellent tool, and so is MAT
(http://www.eclipse.org/mat/downloads.php).  If you can figure out
which instances are increasing (as Pid indicated) its very easy to
check the path of those objects to the garbage collector using one of
these tools.  From there its usually easy to see what the cause of the
leak is and correct it.  I'm not familiar with jconsole, but I have
used the mat/jvisualvm approach several times before.




On Wed, May 5, 2010 at 1:36 AM, Mark Shifman mark.shif...@yale.edu wrote:
 Thanks.
 I'll try Jconsole.
 mas

 On 05/04/2010 12:28 PM, Pid wrote:
 On 04/05/2010 14:10, Mark Shifman wrote:

 On 05/03/2010 02:53 PM, Pid wrote:
 On 03/05/2010 18:30, Mark Shifman wrote:

 On 05/03/2010 12:48 PM, Pid wrote:
 On 03/05/2010 17:15, Mark Shifman wrote:
 I have a web app running under tomcat-6.0.26 with 
 JreMemoryLeakPreventionListener, java jdk1.6.0_18.

 Using jmap -histo pid, I can watch 
 com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl, etc increase in 
 number
 after running my unmarshal action, followed by undeploy and redeploy.  
 Find Leaks in the manager also finds leaks.

 Do you see log messages referring to potential leaks in the catalina.out
 log (assuming you're on a unix variant)?

 If so, can you post them please?

 There are no messages in catalia.out concerning leaks (I am using Linux     
  2.6.18-92.1.22.el5)
 I also got rid of timeBetweenEvictionRunsMillis in datasource since it 
 causes a leaky TimerThread).


 What does the manager 'find leaks' command report exactly?
 ...
 leak (use a profiler to confirm):
 /yp_results

 There are some useful commands in the JDK which may help track down
 exactly which class is causing the problem.

  jmap -histo pid

 (and other jmap subcommands)

 If you take a snapshot periodically, esp after reload cycles you may be
 able to see which classes are increasing in number.


 If you can get a VisualVM working, or connect a JConsole to the remote
 VM you may be able to poke around and see which classes aren't being
 garbage collected.


 My webapp is named yp_results.

 After a few undeploy/redeploy cycles does the number of
 WebappClassLoader's also increase?

 Yes it increases 1 for each undeploy/redeploy cycle.

 snip... 

 Maybe.

 JAXBContext.newInstance() can take a ClassLoader argument.  Is there 
 some ClassLoader I should be using that will get around this?

 OK, so I've looked at JAXBContext (and JAXBContextImpl) and it doesn't
 (after quick read through) look like it's storing the classloader
 argument anywhere during the newInstance call, which is the usual source
 of leaks.


 Where is the jar with the above code, in a webapp?
 The code above in in the war for the web app in a class in 
 WEB-INF/classes/org/blablabla

 It is called via a class that looks like this:

 public class JAXBMascot {
    protected static Log log = LogFactory.getLog(JAXBMascot.class);
    private XMLEventReader reader;
    private Unmarshaller u = 
 JAXBContextMascot.INSTANCE.createUnmarshaller();

 You're setting the XMLEventReader, Unmarshaller  InputStream as
 instance field values, rather than completing the parsing in the
 getInstance() method?
 I have really big xmls to unmarshall so I am using streaming them in and 
 unmarshalling the elements I want
 and then insert into my database. I need the reader to see where I am and 
 then the umarshaller

 I'll have a look at the code below a bit later, am pushed for time right
 now.


 p



 I didn't show the all the methods of JAXBMascot but here is workhorse:
      public T T getNextElement(String theElement, String elementAfter, 
 Class Tclazz) {
              String elname = ;
              T h = null;
              try {
                      while(reader.hasNext()){
                        if(reader.peek().isStartElement()){
                               elname = 
 reader.peek().asStartElement().getName().getLocalPart();
                               if(elname.equals(theElement)){
                                     h= u.unmarshal(reader, 
 clazz).getValue();
                                     return h;
                               }
                        } else if(reader.peek().isEndElement()){
                                      elname = 
 reader.peek().asEndElement().getName().getLocalPart();
                                      if(elname.equals(elementAfter)){
                                              return h;
                                      }
                              }

                        reader.nextEvent();
                      }
              } catch (XMLStreamException e) {
                      throw new RuntimeException(e);
              } catch (JAXBException e) {
                      throw new RuntimeException(e);
              }
              return h;
     }

 It also has a close method to clean up after I have gotten all the elements.
      public void close(){
              try {
                      reader.close();
       

Re: Running PHP 5.2.X on Tomcat 5.5?

2010-05-10 Thread Gregers Blach

Hi p,

Not other than that Tomcat is already installed running the primary 
application.


PHPMyAdmin would be a very nice add-on in order to better support MySQL 
databases.


/G

-Original Message-
From: Pid p...@pidster.com
To: Tomcat Users List users@tomcat.apache.org
Sent: Mon, May 10, 2010 11:31 pm
Subject: Re: Running PHP 5.2.X on Tomcat 5.5?


On 10/05/2010 21:11, Gregers Blach wrote:

Hi,

I'm looking for instructions on how to get a Tomcat 5.5 to run PHP
5.2.X. The reason is that it would be very helpful to run PHPMyAdmin 

to

better support underlying MySQL 5.0.X databases.

Some specs on my test system:

- Running on Windows 7 x64 (poduction system is WinServer 2003,
eventually WinServer 2008)
- Tomcat 5.5
- MySQL 5.0.X
- PHP 5.2.X
- PHPMyAdmin 3.3.X

I have succesfully installed the Tomcat and can log in to
http://localhost:8080 as expected.

I do not know how to configure Tomcat to run PHP, and the sparse
instructions I can find on the web all seem to be rather old:



http://www.softminer.net/2009/05/how-to-install-or-run-php-on-tomcat-6.html



http://blog.taragana.com/index.php/archive/running-php-5x-on-windows-using-tomcat-4x-or-5x/



For instance, what puzzles me, is that the newest PECL package
(http://museum.php.net/php5/pecl-5.2.6-Win32.zip) does not contain the
file php5servlet.dll, nor the file php_java.dll??

Any hints would be highly appreciated! :o)


Is there a particular reason to use Tomcat instead of HTTPD?


p



Regards,

Greg

-
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