Re: Getting a heap dump on OOME from Tomcat-as-a-service on Windows?

2010-02-02 Thread Peter Crowther
On 1 February 2010 22:23, Laird Nelson ljnel...@gmail.com wrote:
 Gave Everyone full control of the C:\crap directory.  Configured Tomcat
 through the service monitor to also append -XX:HeapDumpPath=C:\crap to the
 list of Java options.  Started and stopped the service.  Ran the build.
 Heap dumped, but no file was produced.  Searched the entire computer for
 .hprof files; no results.

 Anything else before giving up?

Follow the process with Process Explorer* from sysinternals (or
Technet, these days) and see whether/where it's trying to write the
file and what's stopping it from doing so.

- Peter

* Worth its weight in gold for tracing this kind of error

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



Re: Tomcat 100% CPU usage after moving from Java 5 to 6

2010-02-02 Thread Jesse Klaasse


Christopher Schultz-2 wrote:
 
 Can you give us a timestamp for when the trouble started? Reading GC
 output is pretty tedious.
 

I believe the trouble started around 15 - 20 minutes before the end of the
gc log, so that would be from ~61h36m.


Christopher Schultz-2 wrote:
 
 Also, what happens if you remove all your *GC* options (other than
 logging) from your JAVA_OPTS?
 

I am quite hesitant to try this. This is a production environment, and all
in all Tomcat is performing pretty good now, in comparison to what the
situation was before.
By all GC options, do you also mean the UseConcMarkSweepGC? Wouldn't the
GC become serial then (with pauses which stop the whole webapp for a while)?
And also the +DisableExplicitGC?


Christopher Schultz-2 wrote:
 
 Is this reproducible?
 

Well, as I said, Tomcat is working much more stable now than it did before.
However, once in a few days it still becomes unresponsive, while CPU usage
stays incredibly low. I have tried load tests using jMeter on our
development environment, but it's working fine then. Must have something to
do with the real (more diverse, less predictable/repetitive) traffic on
the production environment, I guess..
-- 
View this message in context: 
http://old.nabble.com/Tomcat-100--CPU-usage-after-moving-from-Java-5-to-6-tp27305110p27416818.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



changing trace level of 'internal' tomcat logs

2010-02-02 Thread Lominchar García , José Luis
Hi,
¿does somebody knows what I have to do to change trace level of 
jakarta_service_date.log and stdout_date.log from 'info' to 'warn'?
Thanks!



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



Re: changing trace level of 'internal' tomcat logs

2010-02-02 Thread Konstantin Kolinko
2010/2/2 Lominchar García, José Luis jllo...@mapfre.com:
 Hi,
 ¿does somebody knows what I have to do to change trace level of
 jakarta_service_date.log  and stdout_date.log from 'info' to 'warn'?

 jakarta_service_date.log :

Start  All Programs  Apache Tomcat 6.0  Configure Tomcat

then switch to the Logging page and choose Level, one of: Error,
Info, Warning, Debug.

 stdout_date.log:

java.util.logging.ConsoleHandler.level = WARNING
(in conf\logging.properties)

See java.util.logging log level names here:
http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Level.html


Best regards,
Konstantin Kolinko

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



one webapp - two security constraints

2010-02-02 Thread rjgallac

Hi 

I was hoping someone could help. I have searched the forums, tomcat docs and
various other sites and cant see anyone else looking to try this.

I'm looking to deploy one webapp with two urls. depending on the url one
will be asked to enter username and password and the other will not.

I was hoping this was going to be as easy as in the server.xml

Host name=host1 appBase=webapps/files unpackWARs=true
autoDeploy=true xmlValidation=false xmlNamespaceAware=false
Aliashost1-rjgallac/Alias
Valve 
className=org.apache.catalina.valves.FastCommonAccessLogValve
directory=logs  prefix=owl_log. suffix=.txt pattern=common
resolveHosts=false/
Context path= 
docBase=${catalina.home}/webapps/files
Resources 
className=org.apache.naming.resources.FileDirContext/
/Context
/Host
Host name=host2 appBase=webapps/files unpackWARs=true
autoDeploy=true xmlValidation=false xmlNamespaceAware=false
Aliashost2-rjgallac/Alias
Context path= 
docBase=${catalina.home}/webapps/files
Resources 
className=org.apache.naming.resources.FileDirContext/
/Context
/Host 

and the web.xml

security-constraint
display-namelogin to OWL/display-name
web-resource-collection
web-resource-namehost/web-resource-name
url-pattern/*/url-pattern
/web-resource-collection
auth-constraint
role-nametest/role-name
/auth-constraint
security-role
role-nametestusers/role-name
/security-role   
/security-constraint

login-config
auth-methodBASIC/auth-method
/login-config


So the question is two hosts. One web app.  One protected the other not.  I
imagine I need two web.xml files to be able to achieve such a thing.

This did seem to work for a second but I think that was luck or caching or
something.  Its probably not possible to do such a thing.  My other option
is to put this in a build script to create two war files with two different
web.xml files.

Again, any help appreciated.
regards
Rob
-- 
View this message in context: 
http://old.nabble.com/one-webapp---two-security-constraints-tp27418280p27418280.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: Trouble redeploying WAR that uses SQL Server integrated authentication

2010-02-02 Thread Dieter Decavele
My guess is the warning you get is because the web app loads your jdbc driver 
class.  This eventually gets registered with DriverManager but this class has 
been loaded by the containers classloader.  If the container wouldn't forcibly 
unregister this your webapp loaded classes would still be referenced through 
the DriverManager-Driver-WebappClassLoader-every loaded class for the webapp.

The error is probably due to the fact that a classloader can only load a native 
library once.  Which would implicate that your web app classloader is still 
somewhere referenced.  Log4J also has the same problem as jdbc driver, maybe 
you're using it?


Van: Eric Fikus [eric.fi...@akqa.com]
Verzonden: dinsdag 2 februari 2010 02:43
Aan: users@tomcat.apache.org
Onderwerp: Trouble redeploying WAR that uses SQL Server integrated 
authentication

Hello,

I have an application that is configured to use Windows integrated security
to connect to a SQL Server database.  This is a Grails application--I don't
know if that is a factor or not.  The application is packaged as a WAR file.
I can deploy this application and it works as expected.  However, I am not
able to undeploy and subsequently redeploy the application.


When I undeploy, I see an error message like



Feb 1, 2010 5:09:10 PM org.apache.catalina.loader.WebappClassLoader
clearReferencesJdbc
SEVERE: A web application registered the JBDC driver
[com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to unregister it
when the web application was stopped. To prevent a memory leak, the JDBC
Driver has been forcibly unregistered.


When I try to deploy again, I see



Feb 1, 2010 5:19:39 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI
WARNING: Failed to load the sqljdbc_auth.dll


and finally an exception like this one:



com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not
configured for integrated authentication.
at
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:170)
(etc...)


(Note that the driver is correctly configured, as the initial deployment
works without problems.)


Since I'm seeing this with the combination of Grails, Tomcat, and SQL
Server, I'm not sure where the problem may be.  I do not have this problem
when the driver is configured to use SQL authentication.


This is with Windows Server 2008/SQL Server 2008/MS JDBC drivers 2.0/Tomcat
6.0.24.


Thank you,

Eric Fikus
--
View this message in context: 
http://old.nabble.com/Trouble-redeploying-WAR-that-uses-SQL-Server-integrated-authentication-tp27414392p27414392.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



NullPointerException in MimeHeaders

2010-02-02 Thread Bertalan Kis
Hi,

At my company we can see NullPointerExceptions in the catalina.out files (see 
the attachments). We use Tomcat 6.0.14 on our 4 servers to handle web service 
calls from another tier of the application. The errors occur when the soap call 
was processed and ready to send the prepared response back to the clients. The 
errors force the web services client framework to resend the same soap request 
to the Tomcats when they are processed again. Some of our web services treat 
this as a business logic failure.

We can't reproduce the issue on our test and development environments, it is 
appearing only on the production environment. The errors are seen usually 1-2 
servers. When we restart the tomcats the errors can disappear from a server, 
but it may appear on another. The first errors were appeared after a restart of 
the platform, there were no new application deployed or configuration change 
made. Before the errors the same version of the application was running more 
than one and half month without problem. Different versions of the application 
was running fine for more than a half year.

Tomcat developers gave me a hint to try the 
org.apache.catalina.connector.RECYCLE_FACADES=true system property to avoid 
reuse of request and response objects, but it was not working.

We have no idea what can cause this. Can the clients cause the error?
I hope someone can help me find a solution for this issue.

Bertalan Kis




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

RE: NullPointerException in MimeHeaders

2010-02-02 Thread Bertalan Kis
It seems attachments are disabled.
Here are the stacktraces:

Jan 29, 2010 1:13:20 AM com.sun.xml.ws.transport.http.servlet.WSServletDelegate 
doGet
SEVERE: caught throwable
java.lang.NullPointerException
at 
org.apache.tomcat.util.http.MimeHeaders.setValue(MimeHeaders.java:269)
at 
org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1521)
at 
org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:934)
at org.apache.coyote.Response.action(Response.java:183)
at org.apache.coyote.Response.sendHeaders(Response.java:379)
at 
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:305)
at 
org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:288)
at 
org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:98)
at 
com.sun.xml.stream.writers.UTF8OutputStreamWriter.flush(UTF8OutputStreamWriter.java:162)
at 
com.sun.xml.stream.writers.XMLStreamWriterImpl.flush(XMLStreamWriterImpl.java:401)
at 
com.sun.xml.stream.writers.XMLStreamWriterImpl.get(XMLStreamWriterImpl.java:2117)
at 
com.sun.xml.ws.streaming.XMLStreamWriterUtil.getOutputStream(XMLStreamWriterUtil.java:69)
at 
com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:313)
at 
com.sun.xml.ws.message.AbstractMessageImpl.writeTo(AbstractMessageImpl.java:142)
at 
com.sun.xml.ws.encoding.StreamSOAPCodec.encode(StreamSOAPCodec.java:108)
at 
com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:258)
at 
com.sun.xml.ws.transport.http.HttpAdapter.encodePacket(HttpAdapter.java:320)
at 
com.sun.xml.ws.transport.http.HttpAdapter.access$100(HttpAdapter.java:93)
at 
com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:454)
at 
com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
at 
com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
at 
com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:129)
at 
com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:160)
at 
com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
com.dnaO2.openspace.client.filter.MetadataRequestSynchFilter.doFilter(MetadataRequestSynchFilter.java:54)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
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:175)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at 
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:354)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)

Jan 29, 2010 1:13:20 AM com.sun.xml.ws.transport.http.servlet.WSServletDelegate 
doGet
SEVERE: caught throwable
java.lang.NullPointerException
at 
org.apache.tomcat.util.http.MimeHeaders.setValue(MimeHeaders.java:267)
at 
org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1521)
at 
org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:934)
at org.apache.coyote.Response.action(Response.java:183)
at org.apache.coyote.Response.sendHeaders(Response.java:379)
at 
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:305)
at 
org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:288)
at 
org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:98)
at 

RE: NullPointerException in MimeHeaders

2010-02-02 Thread Caldarale, Charles R
 From: Bertalan Kis [mailto:bertalan@razorfish.com]
 Subject: RE: NullPointerException in MimeHeaders
 
 com.dnaO2.openspace.client.filter.MetadataRequestSynchFilter.doFilter
 (MetadataRequestSynchFilter.java:54)

The above is the spot you should be looking at, since that's the only stack 
entry for your code.

One possible problem is incorrect variable scope, such as using a static or 
instance variable in a filter or servlet when you should be using a local one.  
Static and instance variables are shared by all requests, so any concurrent 
threads using them can trip each other up.  The same issue applies to 
request-specific information being stored in a session while multiple requests 
are being processed.

 - 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: NullPointerException in MimeHeaders

2010-02-02 Thread Bertalan Kis
Hi,

That piece of code was not changed since 2008 March and the application was 
working fine with this code more than half year.
I can't see any suspicious in that class, maybe you can:

public void doFilter(ServletRequest request, ServletResponse response,
FilterChain filterChain) throws IOException, ServletException {
if (isMetadataRequest(request)) {   
log.info(Metadata request (wsdl/xsd) received, performing 
synchronization.);

synchronized (lock) {
filterChain.doFilter(request, response);
}
} else {
filterChain.doFilter(request, response); // row 54
}
}

private boolean isMetadataRequest(ServletRequest request) {
return request.getParameter(wsdl) != null || 
request.getParameter(WSDL) != null ||
request.getParameter(xsd) != null;
}

Cheers,

Bertalan Kis 

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: 02 February 2010 12:53
To: Tomcat Users List
Subject: RE: NullPointerException in MimeHeaders

 From: Bertalan Kis [mailto:bertalan@razorfish.com]
 Subject: RE: NullPointerException in MimeHeaders
 
 com.dnaO2.openspace.client.filter.MetadataRequestSynchFilter.doFilter
 (MetadataRequestSynchFilter.java:54)

The above is the spot you should be looking at, since that's the only stack 
entry for your code.

One possible problem is incorrect variable scope, such as using a static or 
instance variable in a filter or servlet when you should be using a local one.  
Static and instance variables are shared by all requests, so any concurrent 
threads using them can trip each other up.  The same issue applies to 
request-specific information being stored in a session while multiple requests 
are being processed.

 - 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



RE: one webapp - two security constraints

2010-02-02 Thread Caldarale, Charles R
 From: rjgallac [mailto:rgallac...@ufi.com]
 Subject: one webapp - two security constraints

You didn't bother to tell us the version of Tomcat you're using, so the 
following comments are based on using a 6.0.x level (but should also apply to 
5.5.x).

 Host name=host1 appBase=webapps/files unpackWARs=true

The appBase setting is wrong; it should be just webapps, not webapps/files. 
 Having appBase the same as any docBase is illegal.

 Context path= docBase=${catalina.home}/webapps/files

It's really, really bad form to put Context elements in server.xml.  In 
addition, the above gets you *two* deployments for this Host, since the 
webapp will be deployed once as ROOT, and again as files.  Name the webapp 
directory or .war file ROOT (case sensitive), move the Context element to 
webapps/ROOT/META-INF/context.xml where it belongs, and remove the illegal path 
and docBase attributes.

   Host name=host2 appBase=webapps/files

Ditto.

 Context path= docBase=${catalina.home}/webapps/files

Ditto.

 So the question is two hosts. One web app.

No, you actually had four webapps, since there was double deployment for each 
Host.  Each Host will *always* have a separate copy of the webapp, even if 
they point to the same appBase.  (BTW, having two Host elements using the 
same appBase is a tad risky if you ever try redeployment on the fly.)  You 
cannot have multiple Host elements sharing a webapp in memory - it simply 
doesn't work that way.

You could use SecurityFilter to keep just one copy of the webapp and have that 
filter check for whether or not to apply the security constraint.  Look here 
for details:
http://securityfilter.sourceforge.net/

 - 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: NullPointerException in MimeHeaders

2010-02-02 Thread Caldarale, Charles R
 From: Bertalan Kis [mailto:bertalan@razorfish.com]
 Subject: RE: NullPointerException in MimeHeaders
 
 I can't see any suspicious in that class, maybe you can:

The fact that the filter /sometimes/ chooses synchronization makes me very 
suspicious, especially since the failure occurred on the non-synchronized path. 
 No failures being recorded for some time could well be a function of the load 
on the system and the occurrence of simultaneous requests.

 - 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: NullPointerException in MimeHeaders

2010-02-02 Thread Bertalan Kis
Maybe, but I think this means that we should see the errors on all the servers 
and not only some of them.
Currently we have 2 servers with errors and 2 without errors. It will change 
when we restart tomcats.

Bertalan Kis 

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: 02 February 2010 13:13
To: Tomcat Users List
Subject: RE: NullPointerException in MimeHeaders

 From: Bertalan Kis [mailto:bertalan@razorfish.com]
 Subject: RE: NullPointerException in MimeHeaders
 
 I can't see any suspicious in that class, maybe you can:

The fact that the filter /sometimes/ chooses synchronization makes me very 
suspicious, especially since the failure occurred on the non-synchronized path. 
 No failures being recorded for some time could well be a function of the load 
on the system and the occurrence of simultaneous requests.

 - 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



Threadlocal problem

2010-02-02 Thread Malcolm Warren
SEVERE: A web application created a ThreadLocal with key of type 
[org.apache.commons.lang.builder.ToStringStyle$1] (value 
[org.apache.commons.lang.builder.tostringstyl...@66a37d72]) and a value 
of type [java.util.HashSet] (value [[]]) but failed to remove it when 
the web application was stopped. To prevent a memory leak, the 
ThreadLocal has been forcibly removed.




I get this message with every hot redeploy, which is a little worrying. 
Anybody know what it's about?


This started with the latest Tomcat 6 version: 6.0.24.
I'm pleased with this new version because it also pointed out politely 
that I hadn't closed a thread I'd opened.


I've fixed my Thread but I still get the message shown at the beginning 
of this email.



I don't use ThreadLocal in my code at all, so it's Tomcat who's creating 
this ThreadLocal for some reason, but since it's not mine it's something 
I can't do much about, presumably.




Thanks for any help you may be able to give.

regards,
Malcolm Warren







Re: Threadlocal problem

2010-02-02 Thread Mark Thomas
On 02/02/2010 13:31, Malcolm Warren wrote:
 SEVERE: A web application created a ThreadLocal with key of type
 [org.apache.commons.lang.builder.ToStringStyle$1] (value
 [org.apache.commons.lang.builder.tostringstyl...@66a37d72]) and a value
 of type [java.util.HashSet] (value [[]]) but failed to remove it when
 the web application was stopped. To prevent a memory leak, the
 ThreadLocal has been forcibly removed.
 
 
 
 I get this message with every hot redeploy, which is a little worrying.
 Anybody know what it's about?

The message says it all. Something created a ThreadLocal but didn't
clean it up. Tomcat cleaned it up to prevent a memory leak.

 This started with the latest Tomcat 6 version: 6.0.24.
 I'm pleased with this new version because it also pointed out politely
 that I hadn't closed a thread I'd opened.

This is all part of the new memory leak protection added for 6.0.24. It
is good to hear that people are finding it useful.

 I've fixed my Thread but I still get the message shown at the beginning
 of this email.
 
 I don't use ThreadLocal in my code at all, so it's Tomcat who's creating
 this ThreadLocal for some reason, but since it's not mine it's something
 I can't do much about, presumably.

It isn't Tomcat's (Tomcat doesn't ship with commons-lang) so I am pretty
sure it is yours. Chances are it isn't something you are doing directly
but maybe something a library you are using is doing?

If a library is adding a ThreadLocal to a request processing thread it
*must* remove it before the request completes to avoid a potential
memory leak. If it doesn't, I would argue that is a bug in the library.
At a stretch, if the library provides a mechanism to clean these up on
web app shutdown that is just about OK but that could would need to be
carefully coded.

Mark



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



Re: Tomcat dies suddenly

2010-02-02 Thread Carl

Chris,

There appears to be some bling that openSuse has that Slackware doesn't but 
otherwise they seem to be the same.  I tried openSuse because 1) Dell stated 
they had tested their servers with that distribution and 2) Sun stated that 
the Java distribution had been tested using openSuse.  My thought was there 
might be a subtle difference that could either explain what I was seeing or 
give me a clue to what was happening.  No luck with either.


However, I have found a couple of things that might account for the 
failures:


1.  Slackware, by default, installs a version of Java (1.6.0_16.)  I knew 
this but apparently neglected to remove it using the package manager (I 
noticed it was still installed because nepomuk was starting a java process 
which was showing up in VisualJVM.)  So, there were two versions of Java 
running, one from /usr/bin/java and one from /usr/local/java.  Don't 
remember what JAVA_HOME was set to and not certain how Tomcat actually 
started but both JAVA_HOME and PATH are correct now.


2.  One of the servers had no swap.  Should not have been a problem since I 
don't recall ever getting to the maximum physical memory (4GB) on that 
machine.  However, I suspect if the system ever hit the physical memory 
limit, we could well see the OOM killer.


I did restrict the heap (yesterday) to 500MB and the garbage collection was 
hit frequently and performed properly so it seems my hypothesis that it 
might be the GC process is false.


So, the monitoring continues.

Thanks,

Carl

- Original Message - 
From: Christopher Schultz ch...@christopherschultz.net

To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, February 01, 2010 4:31 PM
Subject: Re: Tomcat dies suddenly



-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Carl,

On 1/30/2010 12:32 PM, Carl wrote:

I have had the problem on both openSuse and Slackware which has lead me
to believe the problem is in the JVM.


...or the kernel.

Is there an appreciable difference between OpenSUSE and Slackware in
your environment? They may be on slightly different kernel patch levels,
or glibc levels, etc. but it always boils down to the Linux kernel and
GNU libc.

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

iEYEARECAAYFAktnSEkACgkQ9CaO5/Lv0PBkqQCeOzFkYmDqCtMQpfmB7q9nZrBD
a+IAoKLzHfv6T16FMZrC84aO6v4d7P5p
=7wgJ
-END PGP SIGNATURE-

-
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: Threadlocal problem

2010-02-02 Thread Cyrille Le Clerc
Hello,

Your threadLocal variable is created by the reflectionToString feature
of Jakarta Commons Lang ToStringBuilder (1).

This thread local variable seems to be used to prevent infinite
recursion when ToStringBuilder traverse the objects.

I didn't see yet a way (servlet filter, etc) to cleanup this ThreadLocal.

Cyrille
--
Cyrille Le Clerc
clecl...@xebia.fr

(1) 
http://fisheye6.atlassian.com/browse/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/ToStringStyle.java?r=594386#l136

On Tue, Feb 2, 2010 at 2:44 PM, Mark Thomas ma...@apache.org wrote:

 On 02/02/2010 13:31, Malcolm Warren wrote:
  SEVERE: A web application created a ThreadLocal with key of type
  [org.apache.commons.lang.builder.ToStringStyle$1] (value
  [org.apache.commons.lang.builder.tostringstyl...@66a37d72]) and a value
  of type [java.util.HashSet] (value [[]]) but failed to remove it when
  the web application was stopped. To prevent a memory leak, the
  ThreadLocal has been forcibly removed.
 
 
 
  I get this message with every hot redeploy, which is a little worrying.
  Anybody know what it's about?

 The message says it all. Something created a ThreadLocal but didn't
 clean it up. Tomcat cleaned it up to prevent a memory leak.

  This started with the latest Tomcat 6 version: 6.0.24.
  I'm pleased with this new version because it also pointed out politely
  that I hadn't closed a thread I'd opened.

 This is all part of the new memory leak protection added for 6.0.24. It
 is good to hear that people are finding it useful.

  I've fixed my Thread but I still get the message shown at the beginning
  of this email.
 
  I don't use ThreadLocal in my code at all, so it's Tomcat who's creating
  this ThreadLocal for some reason, but since it's not mine it's something
  I can't do much about, presumably.

 It isn't Tomcat's (Tomcat doesn't ship with commons-lang) so I am pretty
 sure it is yours. Chances are it isn't something you are doing directly
 but maybe something a library you are using is doing?

 If a library is adding a ThreadLocal to a request processing thread it
 *must* remove it before the request completes to avoid a potential
 memory leak. If it doesn't, I would argue that is a bug in the library.
 At a stretch, if the library provides a mechanism to clean these up on
 web app shutdown that is just about OK but that could would need to be
 carefully coded.

 Mark



 -
 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: Threadlocal problem

2010-02-02 Thread Malcolm Warren

Thanks for your very helpful answers.

I shall gradually cut out reflectionToString: unfortunately I've used it 
quite a lot, because it was useful!


Thanks again,
Malcolm Warren


Cyrille Le Clerc ha scritto:

Hello,

Your threadLocal variable is created by the reflectionToString feature
of Jakarta Commons Lang ToStringBuilder (1).

This thread local variable seems to be used to prevent infinite
recursion when ToStringBuilder traverse the objects.

I didn't see yet a way (servlet filter, etc) to cleanup this ThreadLocal.

Cyrille
--
Cyrille Le Clerc
clecl...@xebia.fr

(1) 
http://fisheye6.atlassian.com/browse/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/ToStringStyle.java?r=594386#l136

On Tue, Feb 2, 2010 at 2:44 PM, Mark Thomas ma...@apache.org wrote:
  

On 02/02/2010 13:31, Malcolm Warren wrote:


SEVERE: A web application created a ThreadLocal with key of type
[org.apache.commons.lang.builder.ToStringStyle$1] (value
[org.apache.commons.lang.builder.tostringstyl...@66a37d72]) and a value
of type [java.util.HashSet] (value [[]]) but failed to remove it when
the web application was stopped. To prevent a memory leak, the
ThreadLocal has been forcibly removed.



I get this message with every hot redeploy, which is a little worrying.
Anybody know what it's about?
  

The message says it all. Something created a ThreadLocal but didn't
clean it up. Tomcat cleaned it up to prevent a memory leak.



This started with the latest Tomcat 6 version: 6.0.24.
I'm pleased with this new version because it also pointed out politely
that I hadn't closed a thread I'd opened.
  

This is all part of the new memory leak protection added for 6.0.24. It
is good to hear that people are finding it useful.



I've fixed my Thread but I still get the message shown at the beginning
of this email.

I don't use ThreadLocal in my code at all, so it's Tomcat who's creating
this ThreadLocal for some reason, but since it's not mine it's something
I can't do much about, presumably.
  

It isn't Tomcat's (Tomcat doesn't ship with commons-lang) so I am pretty
sure it is yours. Chances are it isn't something you are doing directly
but maybe something a library you are using is doing?

If a library is adding a ThreadLocal to a request processing thread it
*must* remove it before the request completes to avoid a potential
memory leak. If it doesn't, I would argue that is a bug in the library.
At a stretch, if the library provides a mechanism to clean these up on
web app shutdown that is just about OK but that could would need to be
carefully coded.

Mark



-
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


  




how to modify classpath on tomcat4.1.27

2010-02-02 Thread bhavik shah
HI I have installed tomcat 4.1.27 as a windows service.
I want to modify the classpath and add the following line: c:\program
files\documentum\shared\custom.jar

Where should I modify the classpath?

thanks
bhavik


Fw: Serialization error while deploying Axis2 Cluster

2010-02-02 Thread Shailesh Potnis
Hi Tomcat Users:

I encountered a problem while using Axis2 cluster and asked for help in axis2 
users group but seems like this may be related to Tomcat Tribes framework.  

 I am getting the following error when I deploy a sinple service version to 
axis2 cluster.  Here is the error

Could not send command message ContextClusteringCommandCollection to group 
since it is not serializable.

Also it seems that it cannot bind to one of the servers in the cluster:

[INFO] New member 10.xxx.xxx.xxx:4001(apache.axis2.domain) joined cluster.
Jan 29, 2010 2:40:07 PM org.apache.catalina.tribes.transport.ReceiverBase bind
INFO: Unable to bind server socket to:abc.com/10.xxx.xxx.xxx:4
099 throwing error.
Jan 29, 2010 2:40:07 PM org.apache.catalina.tribes.transport.nio.NioReceiver sta
rt
SEVERE: Unable to start cluster receiver
java.net.BindException: Cannot assign requested address
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:
119)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:52)
at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.j
ava:205)
at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.j
ava:217)
at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.j


The error persists even after I added excludes with the class that is not being 
serialized.  Turning serialization off however, stops this error from getting 
reported.  However, I would like to test serialization.  Any thoughts?


defaults
exclude name=local_*/
exclude name=LOCAL_*/
exclude name=key/
exclude name=EndpointKey/
exclude name=ContextClusteringCommandCollection/
/defaults
context class=org.apache.axis2.context.ConfigurationContext
exclude name=UseAsyncOperations/
exclude name=SequencePropertyBeanMap/
exclude name=EndpointKey/
exclude name=key/
exclude name=ContextClusteringCommandCollection/
/context
context class=org.apache.axis2.context.ServiceGroupContext
exclude name=my.sandesha.*/
exclude name=ContextClusteringCommandCollection/
/context
context class=org.apache.axis2.context.ServiceContext
exclude name=my.sandesha.*/
exclude name=EndpointKey/
exclude name=key/
exclude name=ContextClusteringCommandCollection/
/context


 Thank You and Best Regards


Sincerely


Shailesh





From: Shailesh Potnis potnis2...@yahoo.com
To: axis-u...@ws.apache.org
Sent: Fri, January 29, 2010 3:13:16 PM
Subject: Serialization error while deploying Axis2 Cluster


Hi All:

I am getting the following error when I deploy a sinple service version to 
axis2 cluster.  Here is the error

Could not send command message ContextClusteringCommandCollection to group 
since it is not serializable.

Also it seems that it cannot bind to one of the servers in the cluster:

[INFO] New member 10.xxx.xxx.xxx:4001(apache.axis2.domain) joined cluster.
Jan 29, 2010 2:40:07 PM org.apache.catalina.tribes.transport.ReceiverBase bind
INFO: Unable to bind server socket to:abc.com/10.xxx.xxx.xxx:4
099 throwing error.
Jan 29, 2010 2:40:07 PM org.apache.catalina.tribes.transport.nio.NioReceiver sta
rt
SEVERE: Unable to start cluster receiver
java.net.BindException: Cannot assign requested address
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:
119)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:52)
at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.j
ava:205)
at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.j
ava:217)
at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.j

I have attached my axis2.xml file (renamed as axis2.txt)

Could someone please suggest what may be causing it.

Thanks

Shailesh



 Thank You and Best Regards


Sincerely


Shailesh


  

Re: How to do error page forwarding...

2010-02-02 Thread Dan Armbrust

 1) - Is Tomcats handling of an error page defined in web.xml broken
 when a response has already been committed?
 Inconsistent? Yes. Broken? Maybe.

 2) - Is there anything I can do to force the browser to a proper error
 page after a response has been committed?
 No. Adding the error page to the end of the content is the best you can
 do but that is still a very fragile solution.

 Mark


Thanks.

I'll note the inconsistency in the bug tracker, in case someone feels
like fixing it.

Dan

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



Re: how to modify classpath on tomcat4.1.27

2010-02-02 Thread Pid

On 02/02/2010 15:05, bhavik shah wrote:

HI I have installed tomcat 4.1.27 as a windows service.


Why so old, and why not the most recent version in that series?


I want to modify the classpath and add the following line: c:\program
files\documentum\shared\custom.jar



Where should I modify the classpath?


You don't mess with the classpath directly.
You add the jar to your web application lib directory.

 myapp/WEB-INF/lib

or, you add it to one of Tomcat's lib directories.

 tomcat/server/lib
 tomcat/common/lib
 tomcat/shared/lib

depending on what the jar contains and is supposed to do.

If you're asking this type of question, you probably need to read the 
docs at http://tomcat.apache.org/



p



thanks
bhavik




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



Re: Currency code not supported, gcc 4.1, and related issues

2010-02-02 Thread Pid

On 01/02/2010 20:18, Caldarale, Charles R wrote:

From: Peter Smith [mailto:p...@citadelsecure.com]
Subject: Currency code not supported, gcc 4.1, and related issues

   java.lang.IllegalArgumentException: The currency code, £, is not
supported.
at java.util.Currency.getInstance(libgcj.so.7rh)


That's coming from GNU Java - which is not a useful JVM for running anything 
serious, such as Tomcat.  You need to install a real JVM (Sun, IBM, JRockit) 
and try again.


... and when you do, you need to input something other than a currency 
symbol into that method.  GBP will work, £ will not.


p




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



RE: 64bit IIS 7 and ISAPI Connector Question

2010-02-02 Thread Luis Esquivel
Thank you for your answer.  We are trying that.

-Original Message-
From: Jordan Michaels [mailto:jor...@viviotech.net] 
Sent: Monday, February 01, 2010 4:47 PM
To: Tomcat Users List
Subject: Re: 64bit IIS 7 and ISAPI Connector Question

Not personally, no (which was disappointing). I'd suggest giving the 
32-bit version of the connector a try. I got that one to work on a 
64-bit server very quickly and I have yet to see performance issues due 
to it only being 32-bit.

Unless you have specific 64-bit connector requirements, the 32-bit 
version should be just fine.

Warm regards,
Jordan Michaels
Vivio Technologies
http://www.viviotech.net/
Open BlueDragon Steering Committee
Railo Community Distributions


Luis Esquivel wrote:
 Hello,
 
 Has anyone gotten the above combination to work together? (64bit IIS 7 and 
 ISAPI connector)
 
 I get the following error:
 
 HTTP Error 500.0 - Internal Server Error
 Calling GetFilterVersion on ISAPI Filter c:\\isapi_redirect.dll failed
 ...
 Error Code 0x80070002
 
 Any help on this would be greatly appreciated.
 
 Thank you!
 
 Luis Esquivel
 Application Development
 Public Employees' Retirement Assoc. of Colorado
 1301 Pennsylvania Street
 Denver, CO 80203
 303 - 837 - 6296
 
 
 

-
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: 64bit IIS 7 and ISAPI Connector Question

2010-02-02 Thread Jordan Michaels

You're welcome. Let us know how it goes. =)

Warm regards,
Jordan Michaels
Vivio Technologies
http://www.viviotech.net/
Open BlueDragon Steering Committee
Railo Community Distributions


Luis Esquivel wrote:

Thank you for your answer.  We are trying that.

-Original Message-
From: Jordan Michaels [mailto:jor...@viviotech.net] 
Sent: Monday, February 01, 2010 4:47 PM

To: Tomcat Users List
Subject: Re: 64bit IIS 7 and ISAPI Connector Question

Not personally, no (which was disappointing). I'd suggest giving the 
32-bit version of the connector a try. I got that one to work on a 
64-bit server very quickly and I have yet to see performance issues due 
to it only being 32-bit.


Unless you have specific 64-bit connector requirements, the 32-bit 
version should be just fine.


Warm regards,
Jordan Michaels
Vivio Technologies
http://www.viviotech.net/
Open BlueDragon Steering Committee
Railo Community Distributions


Luis Esquivel wrote:

Hello,

Has anyone gotten the above combination to work together? (64bit IIS 7 and 
ISAPI connector)

I get the following error:

HTTP Error 500.0 - Internal Server Error
Calling GetFilterVersion on ISAPI Filter c:\\isapi_redirect.dll failed
...
Error Code 0x80070002

Any help on this would be greatly appreciated.

Thank you!

Luis Esquivel
Application Development
Public Employees' Retirement Assoc. of Colorado
1301 Pennsylvania Street
Denver, CO 80203
303 - 837 - 6296





-
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



Re: Tomcat dies suddenly

2010-02-02 Thread Dan Armbrust
Carl,

Maybe I missed it, but you still haven't clarified what you mean by
tomcat stops.

Does Tomcat do an orderly shutdown?
Does Tomcat appear to freeze (stop answering new requests)
Does the JVM hosting Tomcat crash?

Assuming you have a JVM crash issue here... you should try other JVMs
(32 bit, and/or other versions).
You should try different JVM switches.
And you should find the JVM crash log file - you should have one somewhere.

You can use these options on your JVM in your tomcat start sequence to
control where the JVM crash log will be written (And to force one for
an out of memory error)

-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/logFolder

Dan

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



Re: Tomcat 100% CPU usage after moving from Java 5 to 6

2010-02-02 Thread Dan Armbrust

 Well, as I said, Tomcat is working much more stable now than it did before.
 However, once in a few days it still becomes unresponsive, while CPU usage
 stays incredibly low.

Unresponsive, meaning what, exactly?  If the CPU is idle, but your
webapp isn't returning a response... it seems to indicate that your
webapp is waiting on something else... DB query, file read, whatever.
It seems unlikely that it would be blocked, consistently by a garbage
collection - especially with the heap sizes you are running with.

VisualJVM can give you a clue as to what threads are running, and
which ones are waiting when the system is unresponsive.

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



Re: tomcat memory usage

2010-02-02 Thread Dan Armbrust
FYI - look out for this WRT MaxNewSize and NewRatio:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6862534

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



Active DataSource Connection count never decreasing with PostgreSQL

2010-02-02 Thread Alexander Hartner
I have developed an application which accesses a database via Hibernate as well 
as directly via JDBC (datasource). The datasource is defined in the server.xml 
file as follows:

Context path= docBase=AddressBookServer.war 

  Environment name=LicenseFile value=Licensekey.license 
type=java.lang.String override=true/ 
  Environment name=BackupsFolder value=../backups 
type=java.lang.String override=true/   
 
  Resource name=jdbc/AddressBookDB auth=Container 
type=javax.sql.DataSource
 maxActive=25 maxIdle=5 maxWait=-1 removeAbandoned=true 
removeAbandonedTimeout=60 logAbandoned=true
 username=sa password= driverClassName=org.h2.Driver
 
url=jdbc:h2:tcp://localhost:28081/../db/AddressBookDB;LOCK_TIMEOUT=6/

  Realm className=org.apache.catalina.realm.JDBCRealm
driverName=org.h2.Driver

connectionURL=jdbc:h2:tcp://localhost:28081/../db/AddressBookDB;LOCK_TIMEOUT=6
connectionName=sa connectionPassword=
userTable=WEBUSERS userNameCol=USERID userCredCol=PASSWORD
userRoleTable=WEBROLES roleNameCol=ACCESSROLE/

/Context

By default I use an embedded H2 database and everything works great. The 
numActive count goes up during activity and decreases to 0 when there is no 
activity. Also the count generally matches the actual connections to the 
database as one would expect. If I use the same application with PostgreSQL 8.4 
however, the numActive count goes up and up, and only sometimes down. Generally 
sitting around 25 even though PostgreSQL only reports 4 idle connection. 

I already tried adding the following to my datasource configuration, however 
this did not make any difference so far.
removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true

I am using Tomcat 6.0.18 on OS X 10.6.2 with Java 1.6.

Any suggestion on how I can debug this further why Tomcat reports an incorrect 
numActive count and eventually runs out of possible connections. Currently it 
has to be restarted several times a day with PostgreSQL.

Thanks in advance
Alex


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



tomcat can not work on vista sometimes

2010-02-02 Thread chenll

hi, i installed tomcat 6 and jre 1.6 on Windows Vista. i started tomcat by 
clicking the file of bin\tomcat6.exe, and then type http://localhost:8080 in IE 
explorer, sometims it can work and link to webpage of Apache Tomcat, but 
sometimes i failed and it showed that failed to connect.
  
_
SkyDrive电子画册,带你领略精彩照片,分享“美”时“美”刻!
http://www.windowslive.cn/campaigns/e-magazine/ngmchina/?a=c

Re: tomcat memory usage

2010-02-02 Thread Carl

Dan,

These are the Javs opts currently set in catalina.sh:

JAVA_OPTS=-Xms512m -Xmx512m -XX:PermSize=384m -XX:MaxPermSize=384m -XX:+UseConcMarkSweepGC 
-XX:+CMSIncrementalMode -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+HeapDumpOnOutOfMemoryError 
-XX:HeapDumpPath=/usr/local/tomcat/logs

Do you see anything dangerous/wrong/not good?

Thanks,

Carl

- Original Message - 
From: Dan Armbrust daniel.armbrust.l...@gmail.com

To: Tomcat Users List users@tomcat.apache.org; p...@pidster.com
Sent: Tuesday, February 02, 2010 2:07 PM
Subject: Re: tomcat memory usage



FYI - look out for this WRT MaxNewSize and NewRatio:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6862534

-
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: 64bit IIS 7 and ISAPI Connector Question

2010-02-02 Thread Jordan Michaels
To clarify, did you get the 64-bit connector working with IIS7.5 and 
W2k8 64-bit?


Thanks for taking the time to post this. =)

Warm regards,
Jordan Michaels
Vivio Technologies
http://www.viviotech.net/
Open BlueDragon Steering Committee
Railo Community Distributions


Luis Esquivel wrote:

Ok,
This for anyone that might have to do this in the future.  We have the 
Connector working with Windows Server 2008 R2 (64 bit OS).  BTW, this server 
comes with IIS7.5.

It works fine with the 32 bit version of the isapi_redirect.dll.   The problem 
I was having was that I was making the registry changes to the wrong location 
for a 64 bit OS.

32 bit OS registry location:
[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi 
Redirector\1.0]

64 bit OS registry location must be here:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Jakarta 
Isapi Redirector\1.0]

The difference is this Wow6432Node.

OR save yourself some time and use the isapi_redirect.properties file instead 
of changing the registry.

Thanks.

-Original Message-
From: Jordan Michaels [mailto:jor...@viviotech.net] 
Sent: Tuesday, February 02, 2010 11:33 AM

To: Tomcat Users List
Subject: Re: 64bit IIS 7 and ISAPI Connector Question

You're welcome. Let us know how it goes. =)

Warm regards,
Jordan Michaels
Vivio Technologies
http://www.viviotech.net/
Open BlueDragon Steering Committee
Railo Community Distributions


Luis Esquivel wrote:

Thank you for your answer.  We are trying that.

-Original Message-
From: Jordan Michaels [mailto:jor...@viviotech.net] 
Sent: Monday, February 01, 2010 4:47 PM

To: Tomcat Users List
Subject: Re: 64bit IIS 7 and ISAPI Connector Question

Not personally, no (which was disappointing). I'd suggest giving the 
32-bit version of the connector a try. I got that one to work on a 
64-bit server very quickly and I have yet to see performance issues due 
to it only being 32-bit.


Unless you have specific 64-bit connector requirements, the 32-bit 
version should be just fine.


Warm regards,
Jordan Michaels
Vivio Technologies
http://www.viviotech.net/
Open BlueDragon Steering Committee
Railo Community Distributions


Luis Esquivel wrote:

Hello,

Has anyone gotten the above combination to work together? (64bit IIS 7 and 
ISAPI connector)

I get the following error:

HTTP Error 500.0 - Internal Server Error
Calling GetFilterVersion on ISAPI Filter c:\\isapi_redirect.dll failed
...
Error Code 0x80070002

Any help on this would be greatly appreciated.

Thank you!

Luis Esquivel
Application Development
Public Employees' Retirement Assoc. of Colorado
1301 Pennsylvania Street
Denver, CO 80203
303 - 837 - 6296




-
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


-
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 can not work on vista sometimes

2010-02-02 Thread Alexander Hartner
Please have a look in the Windows Event log and the Tomcat log for any error 
messages ?

On 2 Feb 2010, at 19:49, chenll wrote:

 
 hi, i installed tomcat 6 and jre 1.6 on Windows Vista. i started tomcat by 
 clicking the file of bin\tomcat6.exe, and then type http://localhost:8080 in 
 IE explorer, sometims it can work and link to webpage of Apache Tomcat, but 
 sometimes i failed and it showed that failed to connect.  
   
 _
 SkyDrive电子画册,带你领略精彩照片,分享“美”时“美”刻!
 http://www.windowslive.cn/campaigns/e-magazine/ngmchina/?a=c


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



Re: Tomcat 100% CPU usage after moving from Java 5 to 6

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

Jesse,

On 2/2/2010 3:23 AM, Jesse Klaasse wrote:
 Christopher Schultz-2 wrote:

 Can you give us a timestamp for when the trouble started? Reading GC
 output is pretty tedious.

 
 I believe the trouble started around 15 - 20 minutes before the end of the
 gc log, so that would be from ~61h36m.

That's 221760 minutes, and you only have two GC log lines near or after
that time:

222745.754: [GC 222745.754: [ParNew: 2566632K-34378K(2831168K),
0.1180327 secs] 3272635K-747297K(7025472K), 0.1187242 secs] [Times:
user=0.44 sys=0.02, real=0.13 secs]
223001.755: [GC 223001.756: [ParNew: 2550986K-55967K(2831168K),
0.1662147 secs] 3263905K-775682K(7025472K), 0.1667915 secs]

It's interesting that there's no timing data for that last statement. It
/is/ possible this is where the JVM went down. (Did it go down?)

Both of these GC runs seem to be collecting a /lot/ of garbage:

3272635K-747297K

That's a reduction of roughly 75%... though I guess in .13 seconds, it's
not taking so long, so it should be fine. I guess your webapp generates
a lot of temporary data, fast. At least it gets cleaned-up quickly.

 Also, what happens if you remove all your *GC* options (other than
 logging) from your JAVA_OPTS?
 
 I am quite hesitant to try this. This is a production environment, and all
 in all Tomcat is performing pretty good now, in comparison to what the
 situation was before.

Do you have a place where you can really play around with this?

 By all GC options, do you also mean the UseConcMarkSweepGC? Wouldn't the
 GC become serial then (with pauses which stop the whole webapp for a while)?

I don't believe the GC will do serial collections unless explicitly
told to do that. The days of stop the world garbage collection are
long gone.

 And also the +DisableExplicitGC?

That only causes the JVM to ignore calls to System.gc(), which aren't
guaranteed to do anything, anyway. Unless you are deploying unknown
webapps, this probably isn't doing anything at all.

 Is this reproducible?
 
 Well, as I said, Tomcat is working much more stable now than it did before.
 However, once in a few days it still becomes unresponsive, while CPU usage
 stays incredibly low. I have tried load tests using jMeter on our
 development environment, but it's working fine then. Must have something to
 do with the real (more diverse, less predictable/repetitive) traffic on
 the production environment, I guess..

I'd be interested in what a thread dump shows you during one of these
pauses. I agree with Dan: this sounds much more like your webapp is
waiting around for something like a db connection than doing anything
active. If the GC were running like crazy, I suspect you'd see more CPU
usage.

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

iEUEARECAAYFAktojf4ACgkQ9CaO5/Lv0PAcAwCWJdL0fddltpbT4xliEY3Cgiqc
3QCfYE4EvIedEbFtQnGWVbij29Oz234=
=rVYe
-END PGP SIGNATURE-

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



Re: tomcat can not work on vista sometimes

2010-02-02 Thread André Warnier
chenll wrote:
 hi, i installed tomcat 6 and jre 1.6 on Windows Vista. i started tomcat by 
 clicking the file of bin\tomcat6.exe, and then type http://localhost:8080 in 
 IE explorer, sometims it can work and link to webpage of Apache Tomcat, but 
 sometimes i failed and it showed that failed to connect.  
   

Hi.
Can you define sometimes (and the rest) a bit more precisely ?
Give us an example.
Like :
- Tomcat is version 6.x.y, as downloaded from this link : http://
- the JRE 1.6 is precisely this version : (use java -version)
- I start Tomcat this way : 
- On the same Windows machine, using IE, I enter this URL : 
  and I get the Tomcat start page
- I click reload page 5 times, and
   3 times I get the Tomcat start page
   2 times I get this message in the browser : .
- in the Tomcat logfiles, I see this : .

Thanks


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



Can't Disable Apache Tomcat

2010-02-02 Thread A. Wolf

Tomcat is set to disabled on my Vista machine.  But it still appears in the
taskbar and in task manager.  How do I prevent it from loading entirely at
startup?  I've looked under Admin Tools -- Services, but it's listed as
Disabled there.

This is really bothering me.  I'm about ready to uninstall all Apache
services from my machine, as I rarely use Apache and I don't want it to load
into RAM at startup.  Any help on removing it from RAM, apart from selecting
Exit every time I start my machine, would be greatly appreciated.

Anna

-- 
View this message in context: 
http://old.nabble.com/Can%27t-Disable-Apache-Tomcat-tp27427141p27427141.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



Still unable to get a heap dump from Tomcat running on Windows as a service

2010-02-02 Thread Laird Nelson
I am still unable to get Tomcat to dump heap when it encounters an
OutOfMemoryError.  My StackOverflow topic sums up what I've tried so far:
http://stackoverflow.com/questions/2172220/can-i-get-tomcat-running-as-a-service-to-dump-heap

I'm using the graphical program that comes up when you select Monitor
Tomcat from the Windows Start Menu.  I assume this is TomcatW.exe?

I have Tomcat 6.0.20 running as a service under the default local user
account, set to be allowed to interact with the desktop (I don't know if
this is necessary; I've tried it both ways with no effect on the outcome).

I've attempted to switch the startup mode to java from jvm to see if
that would make a difference, but in that case the service simply won't
start.

I've specified -XX:HeapDumpPath=C:\crap, and -XX:HeapDumpPath=C:/crap to no
avail.  C:\crap is world readable and writable.

I've set the working path for the Startup and Shutdown tabs to C:\crap and
C:/crap with no effect.

I've set memory to a minimum of 512 and a maximum of 1024 MB.

Finally, following the example of what was already there in the text box, I
entered the JVM options one per line.  The tomcat documentation says to
enter them separated by either a # or a ;, but I suspect that the GUI
tool may be taking them and turning line breaks into # characters for me.

Does anyone have any other suggestions to try before giving up on Tomcat in
favor of either Jetty or (God help me) JBoss?

Thanks much,
Laird


Re: Can't Disable Apache Tomcat

2010-02-02 Thread Len Popp
What exactly is it that appears in the Task Manager? Is it
tomcat6.exe? Or tomcat6w.exe? Or java.exe?

tomcat6.exe is the Tomcat service.
java.exe appears if you run Tomcat using startup.bat.
tomcat6w.exe is the Monitor Tomcat program. It is not Tomcat, it is
a separate small program for managing the Tomcat service.
-- 
Len



On Tue, Feb 2, 2010 at 15:47, A. Wolf a.lup...@gmail.com wrote:

 Tomcat is set to disabled on my Vista machine.  But it still appears in the
 taskbar and in task manager.  How do I prevent it from loading entirely at
 startup?  I've looked under Admin Tools -- Services, but it's listed as
 Disabled there.

 This is really bothering me.  I'm about ready to uninstall all Apache
 services from my machine, as I rarely use Apache and I don't want it to load
 into RAM at startup.  Any help on removing it from RAM, apart from selecting
 Exit every time I start my machine, would be greatly appreciated.

 Anna

 --
 View this message in context: 
 http://old.nabble.com/Can%27t-Disable-Apache-Tomcat-tp27427141p27427141.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



Tomcat 6.0 Manager role not working on RHEL 5.4

2010-02-02 Thread Ajay Tomar
Hi,
  I installed tomcat 6 on RHEL 5.4 and would like to get access to
manager app. But I am not able to get it work even after modifying
tomcat-users.xml.. Here is the output --- tomcat-users
!--
 role rolename=tomcat/
 role rolename=manager/
 role rolename=role1/
 user username=tomcat password=tomcat roles=tomcat,manager/
 user username=both password=tomcat roles=tomcat,role1/
 user username=role1 password=tomcat roles=role1/
 user username=tomadmin password=tomadmin roles=standard,manager/
--
/tomcat-users

I stopped and started tomcat... Any ideas what may be missing here.. I
can access localhost:8080 and see tomcat is running.. I am able to run
sample servlets and jsp

Thanks in advance..

aj

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



Re: Tomcat 6.0 Manager role not working on RHEL 5.4

2010-02-02 Thread Jordan Michaels
Looks like your manager and user entries are still within the 
comments. I'd also recommend changing the username and password to 
something much more obscure.


Warm regards,
Jordan Michaels
Vivio Technologies
http://www.viviotech.net/
Open BlueDragon Steering Committee
Railo Community Distributions


Ajay Tomar wrote:

Hi,
  I installed tomcat 6 on RHEL 5.4 and would like to get access to
manager app. But I am not able to get it work even after modifying
tomcat-users.xml.. Here is the output --- tomcat-users
!--
 role rolename=tomcat/
 role rolename=manager/
 role rolename=role1/
 user username=tomcat password=tomcat roles=tomcat,manager/
 user username=both password=tomcat roles=tomcat,role1/
 user username=role1 password=tomcat roles=role1/
 user username=tomadmin password=tomadmin roles=standard,manager/
--
/tomcat-users

I stopped and started tomcat... Any ideas what may be missing here.. I
can access localhost:8080 and see tomcat is running.. I am able to run
sample servlets and jsp

Thanks in advance..

aj

-
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 6.0 Manager role not working on RHEL 5.4

2010-02-02 Thread André Warnier

Ajay Tomar wrote:

Hi,
  I installed tomcat 6 on RHEL 5.4 and would like to get access to
manager app. But I am not able to get it work even after modifying
tomcat-users.xml.. Here is the output --- tomcat-users


See these little squibbles :


!-- --- **here**
 role rolename=tomcat/
 role rolename=manager/
 role rolename=role1/
 user username=tomcat password=tomcat roles=tomcat,manager/
 user username=both password=tomcat roles=tomcat,role1/
 user username=role1 password=tomcat roles=role1/
 user username=tomadmin password=tomadmin roles=standard,manager/
-- --- and **there** 


?

That's XML for begin comment and end comment respectively.

Don't feel bad, it happens about twice a week.


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



Re: Problem on Tomcat 6.0.20

2010-02-02 Thread Richard Sickler
On Mon, Feb 1, 2010 at 7:12 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Richard Sickler [mailto:richard.sick...@avagotech.com]
  Subject: Problem on Tomcat 6.0.20
 
  when I copy the war, (WebApplication2.war) to
  c:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps
  on my Windows Server 2008 machine, and rename it to ROOT.war

 Unless Tomcat is stopped, this is not good practice.  You first make then
 webapp visible to Tomcat as WebApplication2, then make that disappear and
 materialize the ROOT webapp.  Better to do the renaming as part of the copy
 to avoid confusing the container or make sure Tomcat is not running.

  Feb 1, 2010 6:33:14 PM org.apache.catalina.core.StandardContext
  resourcesStart
  SEVERE: Error starting static Resources
  java.lang.IllegalArgumentException: Document base
  C:\Program Files\Apache Software Foundation\
  Tomcat 6.0\webapps\WebApplication2 does not exist
  or is not a readable directory

 You may well have a WebApplication2.xml file in the conf/Catalina/[host]
 directory, left over from a previous deployment attempt.  Check for that and
 delete it.


You were correct.  I removed a file and a directory named WebApplication2,
and that cleared up that problem.  On to the next undocumented feature!
Thanks.


  - 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: Still unable to get a heap dump from Tomcat running on Windows as a service

2010-02-02 Thread Caldarale, Charles R
 From: Laird Nelson [mailto:ljnel...@gmail.com]
 Subject: Still unable to get a heap dump from Tomcat running on Windows
 as a service
 
 I am still unable to get Tomcat to dump heap when it encounters an
 OutOfMemoryError.

You appear to be unique in that regard, since no one else seems to be having 
that problem.

 I'm using the graphical program that comes up when you select Monitor
 Tomcat from the Windows Start Menu.  I assume this is TomcatW.exe?

Not quite; it's tomcat6w.exe (note the digit and no caps).

 I have Tomcat 6.0.20 running as a service under the default 
 local user account

What's a default local user account?  Try using a real account, possibly one 
in the administrators group to see if that makes a difference.

 set to be allowed to interact with the desktop

Not needed.

 I've specified -XX:HeapDumpPath=C:\crap, and -XX:HeapDumpPath=C:/crap
 to no avail.

Try just leaving that parameter out.

 I've set the working path for the Startup and Shutdown tabs
 to C:\crap and C:/crap with no effect.

The Shutdown working path doesn't matter, since that's not normally used.  Try 
setting the Startup path to the Tomcat installation directory after 
reinstalling Tomcat.  The direction of the slash doesn't seem to matter; I get 
the .hprof file generated in the designated directory regardless of which I use.

 I've set memory to a minimum of 512 and a maximum of 1024 MB.

You normally want those to be the same for a server environment to avoid heap 
thrashing.

 I entered the JVM options one per line.

That is a requirement.

 The tomcat documentation says to enter them separated by either 
 a # or a ;

That's for command-line usage, not the GUI.

 Does anyone have any other suggestions to try before giving up on
 Tomcat in favor of either Jetty or (God help me) JBoss?

Sounds like a baby with the bathwater solution...

I would try removing the existing Tomcat service, reinstalling the current 
(6.0.24) Tomcat from the .zip download, using the service.bat script to create 
the service, and only then try recreating the OOM problem.  Unpack the .zip 
download into someplace other than C:\Program Files.  Also try setting the 
Level on the Logging tab to Debug rather than Error to see if that shows 
anything interesting.

 - 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: Problem on Tomcat 6.0.20

2010-02-02 Thread Caldarale, Charles R
 From: Richard Sickler [mailto:richard.sick...@avagotech.com]
 Subject: Re: Problem on Tomcat 6.0.20
 
 I removed a file and a directory named WebApplication2, and that
 cleared up that problem.  On to the next undocumented feature!

It's fully documented:

Context elements may be explicitly defined:
...
* In individual files (with a .xml extension) in the 
$CATALINA_BASE/conf/[enginename]/[hostname]/ directory. The name of the file 
(less the .xml extension) will be used as the context path. Multi-level context 
paths may be defined using #, e.g. foo#bar.xml for a context path of /foo/bar. 
The default web application may be defined by using a file called ROOT.xml.
* Only if a context file does not exist for the application in the 
$CATALINA_BASE/conf/[enginename]/[hostname]/, in an individual file at 
/META-INF/context.xml inside the application files. If the web application is 
packaged as a WAR then /META-INF/context.xml will be copied to 
$CATALINA_BASE/conf/[enginename]/[hostname]/ and renamed to match the 
application's context path. Once this file exists, it will not be replaced if a 
new WAR with a newer /META-INF/context.xml is placed in the host's appBase.

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

 - 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: Still unable to get a heap dump from Tomcat running on Windows as a service

2010-02-02 Thread Caldarale, Charles R
 From: Caldarale, Charles R
 Subject: RE: Still unable to get a heap dump from Tomcat running on
 Windows as a service
 
 I would try removing the existing Tomcat service, reinstalling the
 current (6.0.24) Tomcat from the .zip download

I would also create a bin/setenv.bat script to set the desired CATALINA_OPTS 
settings, and start Tomcat with the startup.bat script.  It's easier debugging 
configuration and application problems this way than when Tomcat is running as 
a service.

 - 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: Still unable to get a heap dump from Tomcat running on Windows as a service

2010-02-02 Thread Laird Nelson
On Tue, Feb 2, 2010 at 4:19 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Laird Nelson [mailto:ljnel...@gmail.com]
  Subject: Still unable to get a heap dump from Tomcat running on Windows
  as a service
 
  I am still unable to get Tomcat to dump heap when it encounters an
  OutOfMemoryError.

 You appear to be unique in that regard, since no one else seems to be
 having that problem.


Well aware of that; thanks!  The reason I'm bringing it up on this list is
just because I'm using the graphical tool without doing any egregious
hacking, and it is not working the way I would expect it to.  In such cases
I blame the software until it is proven that I am putting in bad inputs, at
which point I cheerfully blame myself and move on.  No one has accused me so
far of putting in bad inputs, and I can't see any myself.


  I have Tomcat 6.0.20 running as a service under the default
  local user account

 What's a default local user account?


The one selected by default when one chooses the Log On tab of the
graphical Tomcat monitor.  The value of the label is: Local System
account.  That radio button is checked.


  Try using a real account, possibly one in the administrators group to see
 if that makes a difference.


I will try this; thanks.


   set to be allowed to interact with the desktop

 Not needed.


I'll make sure this is off.


   I've specified -XX:HeapDumpPath=C:\crap, and -XX:HeapDumpPath=C:/crap
  to no avail.

 Try just leaving that parameter out.


Yep; tried that too.

The Shutdown working path doesn't matter, since that's not normally used.
  Try setting the Startup path to the Tomcat installation directory after
 reinstalling Tomcat.  The direction of the slash doesn't seem to matter; I
 get the .hprof file generated in the designated directory regardless of
 which I use.


OK.


   I've set memory to a minimum of 512 and a maximum of 1024 MB.

 You normally want those to be the same for a server environment to avoid
 heap thrashing.


OK; will change.


   I entered the JVM options one per line.

 That is a requirement.


Good to know; thanks.


  Does anyone have any other suggestions to try before giving up on
  Tomcat in favor of either Jetty or (God help me) JBoss?

 I would try removing the existing Tomcat service, reinstalling the current
 (6.0.24) Tomcat from the .zip download, using the service.bat script to
 create the service, and only then try recreating the OOM problem.  Unpack
 the .zip download into someplace other than C:\Program Files.  Also try
 setting the Level on the Logging tab to Debug rather than Error to see if
 that shows anything interesting.


OK; for various reasons I can't do the reinstall (without bureaucratic
wrangling).  I did the initial install from the Windows executable installer
available from the main download site.  It was beautifully simple and I let
it set things up for me.  Is there any reason to suppose that such an
installation is somehow borked?  Is there a problem with the out-of-the-box
Windows experience that is heavily promoted on the Apache site?

Thanks for the help!

Best,
Laird


RE: Can't Disable Apache Tomcat

2010-02-02 Thread Caldarale, Charles R
 From: A. Wolf [mailto:a.lup...@gmail.com]
 Subject: Can't Disable Apache Tomcat
 
 Tomcat is set to disabled on my Vista machine.

That's the Tomcat service, not the GUI interface.

 But it still appears in the taskbar and in task manager.

That's the GUI management tool.

 How do I prevent it from loading entirely at startup?

Somewhere, you've got a registry entry or startup script referring to 
tomcat?w.exe //MS// (where the ? is Tomcat base level - which you didn't tell 
us).  Delete the registry entry or startup script.

 This is really bothering me.

Why?

 I rarely use Apache and I don't want it to load into RAM 
 at startup.

Perhaps you're confusing Windows with DOS - we have virtual memory now, so 
anything that's not being used pages out to disk rather quickly if the real 
memory space is needed.

 - 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: Still unable to get a heap dump from Tomcat running on Windows as a service

2010-02-02 Thread Sateesh Narahari
The default user account 'System' has some weird permission state on
Windows, so try the admin user.  Also, review the event log  ( Windows Log,
Security ) if it yields any information. 

I believe you can also download resource kit from Microsoft that has tools
that lets you watch all objects opened by a process ( so, look if Tomcat is
even trying to open the file ). Its been a while, so don't recall tool
sytax.


-Original Message-
From: Laird Nelson [mailto:ljnel...@gmail.com] 
Sent: Tuesday, February 02, 2010 1:31 PM
To: Tomcat Users List
Subject: Re: Still unable to get a heap dump from Tomcat running on Windows
as a service

On Tue, Feb 2, 2010 at 4:19 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Laird Nelson [mailto:ljnel...@gmail.com]
  Subject: Still unable to get a heap dump from Tomcat running on Windows
  as a service
 
  I am still unable to get Tomcat to dump heap when it encounters an
  OutOfMemoryError.

 You appear to be unique in that regard, since no one else seems to be
 having that problem.


Well aware of that; thanks!  The reason I'm bringing it up on this list is
just because I'm using the graphical tool without doing any egregious
hacking, and it is not working the way I would expect it to.  In such cases
I blame the software until it is proven that I am putting in bad inputs, at
which point I cheerfully blame myself and move on.  No one has accused me so
far of putting in bad inputs, and I can't see any myself.


  I have Tomcat 6.0.20 running as a service under the default
  local user account

 What's a default local user account?


The one selected by default when one chooses the Log On tab of the
graphical Tomcat monitor.  The value of the label is: Local System
account.  That radio button is checked.


  Try using a real account, possibly one in the administrators group to see
 if that makes a difference.


I will try this; thanks.


   set to be allowed to interact with the desktop

 Not needed.


I'll make sure this is off.


   I've specified -XX:HeapDumpPath=C:\crap, and -XX:HeapDumpPath=C:/crap
  to no avail.

 Try just leaving that parameter out.


Yep; tried that too.

The Shutdown working path doesn't matter, since that's not normally used.
  Try setting the Startup path to the Tomcat installation directory after
 reinstalling Tomcat.  The direction of the slash doesn't seem to matter; I
 get the .hprof file generated in the designated directory regardless of
 which I use.


OK.


   I've set memory to a minimum of 512 and a maximum of 1024 MB.

 You normally want those to be the same for a server environment to avoid
 heap thrashing.


OK; will change.


   I entered the JVM options one per line.

 That is a requirement.


Good to know; thanks.


  Does anyone have any other suggestions to try before giving up on
  Tomcat in favor of either Jetty or (God help me) JBoss?

 I would try removing the existing Tomcat service, reinstalling the current
 (6.0.24) Tomcat from the .zip download, using the service.bat script to
 create the service, and only then try recreating the OOM problem.  Unpack
 the .zip download into someplace other than C:\Program Files.  Also try
 setting the Level on the Logging tab to Debug rather than Error to see if
 that shows anything interesting.


OK; for various reasons I can't do the reinstall (without bureaucratic
wrangling).  I did the initial install from the Windows executable installer
available from the main download site.  It was beautifully simple and I let
it set things up for me.  Is there any reason to suppose that such an
installation is somehow borked?  Is there a problem with the out-of-the-box
Windows experience that is heavily promoted on the Apache site?

Thanks for the help!

Best,
Laird


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



RE: Still unable to get a heap dump from Tomcat running on Windows as a service

2010-02-02 Thread Caldarale, Charles R
 From: Laird Nelson [mailto:ljnel...@gmail.com]
 Subject: Re: Still unable to get a heap dump from Tomcat running on
 Windows as a service
 
 The one selected by default when one chooses the Log On tab of the
 graphical Tomcat monitor.  The value of the label is: Local System
 account.  That radio button is checked.

That's not a user account, that's the system account, with pretty much no 
privileges to do anything.

  Try using a real account, possibly one in the administrators 
  group to see if that makes a difference.
 
 I will try this; thanks.

All my testing has been done with a real account, so that may well be 
difference.

 Is there any reason to suppose that such an installation is 
 somehow borked?

Probably not; it's just that the .zip download gives you more options, which 
can make debugging problems like this much easier.

 Is there a problem with the out-of-the-box Windows experience
 that is heavily promoted on the Apache site?

Not sure it's promoted; I think it's mostly there for the casual Windows 
users who become panic-stricken when there's no .exe or .msi installer.

 - 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: Can't Disable Apache Tomcat

2010-02-02 Thread Jeffrey Janner
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Tuesday, February 02, 2010 3:36 PM
To: Tomcat Users List
Subject: RE: Can't Disable Apache Tomcat

 From: A. Wolf [mailto:a.lup...@gmail.com]
 Subject: Can't Disable Apache Tomcat
 
 Tomcat is set to disabled on my Vista machine.

That's the Tomcat service, not the GUI interface.

 But it still appears in the taskbar and in task manager.

That's the GUI management tool.

You can always right-click on it after startup and choose Exit.


 How do I prevent it from loading entirely at startup?

Somewhere, you've got a registry entry or startup script referring to
tomcat?w.exe //MS// (where the ? is Tomcat base level - which you
didn't tell us).  Delete the registry entry or startup script.

If you're not using Tomcat, then just uninstall it.  Otherwise, you'll
need to remove it using the registry editor.  The location is
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run.  Delete the
ApacheTomcatMonitor value.

Note: all traditional caveats and warnings about messin' with the
Windows registry apply.

Jeff

***  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: Still unable to get a heap dump from Tomcat running on Windows as a service

2010-02-02 Thread Laird Nelson
On Tue, Feb 2, 2010 at 4:40 PM, Sateesh Narahari sateesh.narah...@gmail.com
 wrote:

 The default user account 'System' has some weird permission state on
 Windows, so try the admin user.


OK; leery of running my Tomcat as the administrator, but am not up to speed
on which Windows users would be better choices.  I naturally assumed that
the local user selected by default was appropriate.


  Also, review the event log  ( Windows Log,
 Security ) if it yields any information.


Yep; did that; no issues.


 I believe you can also download resource kit from Microsoft that has tools
 that lets you watch all objects opened by a process ( so, look if Tomcat is
 even trying to open the file ). Its been a while, so don't recall tool
 sytax.


Thanks!

Best,
Laird


Re: Still unable to get a heap dump from Tomcat running on Windows as a service

2010-02-02 Thread Laird Nelson
On Tue, Feb 2, 2010 at 4:41 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

 That's not a user account, that's the system account, with pretty much no
 privileges to do anything.


...which is pretty much how I like it.  :-)  I'm not a Windows guy, so bear
with me for a moment: since I have moved the permissions on the working
directory up such that Everyone has Full Control, surely then the system
account could drop a file in that directory?  Or is there some other
privilege setting that says even if there's permission granted to the
filesystem, the system account shalt not write even unto it?

Thanks again for the help.

Best,
Laird


RE: 64bit IIS 7 and ISAPI Connector Question

2010-02-02 Thread Luis Esquivel
Actually, I got the 32-bit connector working on W2k8 64 bit with IIS7.5. 

I don't mind posting at all!  If it helps someone out there cool. 

-Original Message-
From: Jordan Michaels [mailto:jor...@viviotech.net] 
Sent: Tuesday, February 02, 2010 1:14 PM
To: Tomcat Users List
Subject: Re: 64bit IIS 7 and ISAPI Connector Question

To clarify, did you get the 64-bit connector working with IIS7.5 and 
W2k8 64-bit?

Thanks for taking the time to post this. =)

Warm regards,
Jordan Michaels
Vivio Technologies
http://www.viviotech.net/
Open BlueDragon Steering Committee
Railo Community Distributions


Luis Esquivel wrote:
 Ok,
 This for anyone that might have to do this in the future.  We have the 
 Connector working with Windows Server 2008 R2 (64 bit OS).  BTW, this server 
 comes with IIS7.5.
 
 It works fine with the 32 bit version of the isapi_redirect.dll.   The 
 problem I was having was that I was making the registry changes to the wrong 
 location for a 64 bit OS.
 
 32 bit OS registry location:
 [HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi 
 Redirector\1.0]
 
 64 bit OS registry location must be here:
 [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Jakarta 
 Isapi Redirector\1.0]
 
 The difference is this Wow6432Node.
 
 OR save yourself some time and use the isapi_redirect.properties file instead 
 of changing the registry.
 
 Thanks.
 
 -Original Message-
 From: Jordan Michaels [mailto:jor...@viviotech.net] 
 Sent: Tuesday, February 02, 2010 11:33 AM
 To: Tomcat Users List
 Subject: Re: 64bit IIS 7 and ISAPI Connector Question
 
 You're welcome. Let us know how it goes. =)
 
 Warm regards,
 Jordan Michaels
 Vivio Technologies
 http://www.viviotech.net/
 Open BlueDragon Steering Committee
 Railo Community Distributions
 
 
 Luis Esquivel wrote:
 Thank you for your answer.  We are trying that.

 -Original Message-
 From: Jordan Michaels [mailto:jor...@viviotech.net] 
 Sent: Monday, February 01, 2010 4:47 PM
 To: Tomcat Users List
 Subject: Re: 64bit IIS 7 and ISAPI Connector Question

 Not personally, no (which was disappointing). I'd suggest giving the 
 32-bit version of the connector a try. I got that one to work on a 
 64-bit server very quickly and I have yet to see performance issues due 
 to it only being 32-bit.

 Unless you have specific 64-bit connector requirements, the 32-bit 
 version should be just fine.

 Warm regards,
 Jordan Michaels
 Vivio Technologies
 http://www.viviotech.net/
 Open BlueDragon Steering Committee
 Railo Community Distributions


 Luis Esquivel wrote:
 Hello,

 Has anyone gotten the above combination to work together? (64bit IIS 7 and 
 ISAPI connector)

 I get the following error:

 HTTP Error 500.0 - Internal Server Error
 Calling GetFilterVersion on ISAPI Filter c:\\isapi_redirect.dll failed
 ...
 Error Code 0x80070002

 Any help on this would be greatly appreciated.

 Thank you!

 Luis Esquivel
 Application Development
 Public Employees' Retirement Assoc. of Colorado
 1301 Pennsylvania Street
 Denver, CO 80203
 303 - 837 - 6296



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



RE: Still unable to get a heap dump from Tomcat running on Windows as a service

2010-02-02 Thread Caldarale, Charles R
 From: Laird Nelson [mailto:ljnel...@gmail.com]
 Subject: Re: Still unable to get a heap dump from Tomcat running on
 Windows as a service
 
 I'm not a Windows guy, so bear with me for a moment:

I'm not sure there's anyone who really understands Windows security.

 Or is there some other privilege setting that says even if there's
 permission granted to the filesystem, the system account shalt not
 write even unto it?

Windows security settings are truly bizarre, and the Local System Account is 
subject to restrictions that don't seem to make any sense.  It certainly *can* 
write some files, otherwise Tomcat wouldn't be able to function at all.  BTW, 
on Vista, you can't seem to change the account the Tomcat service runs under 
with the GUI tool - it has to be done with the Administrative Tools - Services 
snapin; don't know if that's true for Server 2K3.

I just tried forcing an OOME dump with Tomcat running under the Local System 
Account - and it worked.  This is under Vista 64, not Server 2K3, and starting 
with the .zip download.

You could always try downloading and installing the .zip version in an 
alternate location, and install the service under an alternate name just for 
testing.  I don't have access to a Server 2K3 system to play with.

 - 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: tomcat memory usage

2010-02-02 Thread Dan Armbrust
Nope, but I'm not an expert with these (at all).

I use something pretty similar, the only real difference is that I
haven't turned on the CMSIncrementalMode.  My apps haven't shown an
issue with long pause times, so I haven't researched/tested it yet.

Dan

On Tue, Feb 2, 2010 at 1:55 PM, Carl c...@etrak-plus.com wrote:
 Dan,

 These are the Javs opts currently set in catalina.sh:

 JAVA_OPTS=-Xms512m -Xmx512m -XX:PermSize=384m -XX:MaxPermSize=384m
 -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+PrintGCDetails
 -XX:+PrintGCTimeStamps -XX:+HeapDumpOnOutOfMemoryError
 -XX:HeapDumpPath=/usr/local/tomcat/logs
 Do you see anything dangerous/wrong/not good?

 Thanks,

 Carl

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



Re: how to modify classpath on tomcat4.1.27

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

Bhavik,

On 2/2/2010 10:05 AM, bhavik shah wrote:
 HI I have installed tomcat 4.1.27 as a windows service.
 I want to modify the classpath and add the following line: c:\program
 files\documentum\shared\custom.jar
 
 Where should I modify the classpath?

Instead of modifying the CLASSPATH, why not put your custom JAR either
into Tomcat's shared library directory (shared/lib IIRC) or into the
JVM's endorsed libraries directory (%JRE_HOME%\lib\endorsed on a 1.4
JVM... I assume you're way back in 2003 with your JVM, too).

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

iEYEARECAAYFAktoqaoACgkQ9CaO5/Lv0PCqUACfc1JU0VHP9gcHQNHKUp3OZ4IH
owIAn3lyz5pZl6JfCQan7pftQHljAT/U
=ZOId
-END PGP SIGNATURE-

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



Re: Active DataSource Connection count never decreasing with PostgreSQL

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

Alexander,

On 2/2/2010 2:44 PM, Alexander Hartner wrote:
 I have developed an application which accesses a database via
 Hibernate as well as directly via JDBC (datasource). The datasource is
 defined in the server.xml file as follows:
 
 Context path= docBase=AddressBookServer.war

:(

Put this into either META-INF/context.xml within your WAR/webapp
directory, or into CATALINA_BASE/Catalina/[hostname]/ROOT.xml

Remove the path and docBase attributes when you move the Context
element.

   Environment name=LicenseFile value=Licensekey.license 
 type=java.lang.String override=true/ 
   Environment name=BackupsFolder value=../backups 
 type=java.lang.String override=true/   
  
   Resource name=jdbc/AddressBookDB auth=Container 
 type=javax.sql.DataSource
  maxActive=25 maxIdle=5 maxWait=-1 removeAbandoned=true 
 removeAbandonedTimeout=60 logAbandoned=true
  username=sa password= driverClassName=org.h2.Driver
  
 url=jdbc:h2:tcp://localhost:28081/../db/AddressBookDB;LOCK_TIMEOUT=6/

That URL looks fishy, with .. in its name. It that a relative disk
path? If so, you're asking for deployment headaches in the future.

   Realm className=org.apache.catalina.realm.JDBCRealm
 driverName=org.h2.Driver
 
 connectionURL=jdbc:h2:tcp://localhost:28081/../db/AddressBookDB;LOCK_TIMEOUT=6
 connectionName=sa connectionPassword=
 userTable=WEBUSERS userNameCol=USERID userCredCol=PASSWORD
 userRoleTable=WEBROLES roleNameCol=ACCESSROLE/

Consider using DataSourceRealm instead of JDBCRealm: JDBCRealm uses a
single Connection object (thereby serializing logins) and has had a
bunch of concurrency issues in the past. DataSourceRealm can use your
previously-configured DataSource for Connections. Or, you can define an
authentication-only DataSource that is used only by the DataSourceRealm.

 By default I use an embedded H2 database and everything works great.
 The numActive count goes up during activity and decreases to 0 when
 there is no activity. Also the count generally matches the actual
 connections to the database as one would expect. If I use the same
 application with PostgreSQL 8.4 however, the numActive count goes up and
 up, and only sometimes down. Generally sitting around 25 even though
 PostgreSQL only reports 4 idle connection.
 
 I already tried adding the following to my datasource configuration,
 however this did not make any difference so far.
 removeAbandoned=true removeAbandonedTimeout=60
 logAbandoned=true

Did you look at your log files after setting these parameters?

 I am using Tomcat 6.0.18 on OS X 10.6.2 with Java 1.6.
 
 Any suggestion on how I can debug this further why Tomcat reports an
 incorrect numActive count and eventually runs out of possible
 connections. Currently it has to be restarted several times a day with
 PostgreSQL.

While there are other possibilities, you might want to read this:
http://blog.christopherschultz.net/index.php/2009/03/16/properly-handling-pooled-jdbc-connections/

I would /highly/ recommend running with maxActive=1 in all
environments except for production, as you will likely trigger any
Connection leaks much more quickly that way.

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

iEYEARECAAYFAktoq7QACgkQ9CaO5/Lv0PCUzwCgrDZffO+r8bHFsYLbwelii0mC
rlgAoIfO6KH1IDzEZawRyHyW7+gKRdnD
=zA4A
-END PGP SIGNATURE-

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



Re: Problem on Tomcat 6.0.20

2010-02-02 Thread Dan Armbrust
On Tue, Feb 2, 2010 at 3:23 PM, Caldarale, Charles R
chuck.caldar...@unisys.com wrote:
 From: Richard Sickler [mailto:richard.sick...@avagotech.com]
 Subject: Re: Problem on Tomcat 6.0.20

 I removed a file and a directory named WebApplication2, and that
 cleared up that problem.  On to the next undocumented feature!

 It's fully documented:

 Context elements may be explicitly defined:
 ...
    * ... If the web application is packaged as a WAR then 
 /META-INF/context.xml will be copied to 
 $CATALINA_BASE/conf/[enginename]/[hostname]/ and renamed to match the 
 application's context path. Once this file exists, it will not be replaced if 
 a new WAR with a newer /META-INF/context.xml is placed in the host's appBase.


Documented, yes.  Astonishingly silly and surprising behaviour?  Also yes.

Good luck getting them to improve it.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45979
https://issues.apache.org/bugzilla/show_bug.cgi?id=32284

Near as I can tell, this surprising and bizarre behaviour occurs
because Remy likes it that way.

In my opinion, Tomcat should remember if it copied the file out of a
war file... and if the war file is replaced, it should overwrite the
file with the new file from the new war file.

Is it trivial?  Not exactly, Tomcat would have to somehow keep track
of if the file was manually modified or not... but really, it just
needs to keep a hash of the file somewhere so it can check if the file
has been changed since it put it there.

I think Tomcat should also log a warning message when it doesn't copy
a context.xml from a war file... because the developer has made a
mistake at this point - someone manually changed one version, but
didn't change the one in the war file.

The current design leads to people having problems like you have -
because beginning developers aren't (and really) shouldn't have to be
aware of this nasty gotcha of Tomcat.

Dan

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



Re: Still unable to get a heap dump from Tomcat running on Windows as a service

2010-02-02 Thread André Warnier

Laird Nelson wrote:

On Tue, Feb 2, 2010 at 4:40 PM, Sateesh Narahari sateesh.narah...@gmail.com

wrote:



The default user account 'System' has some weird permission state on
Windows, so try the admin user.



OK; leery of running my Tomcat as the administrator, but am not up to speed
on which Windows users would be better choices.  I naturally assumed that
the local user selected by default was appropriate.


The Local System account is the usual local built-in account used to 
run Services. It has quite extensive privileges on the local machine 
(like the permission to run Services), but has no access to Windows 
network resources.  That includes stuff like network shares, network 
printers etc..
It can however run programs that open TCP/IP sockets to/from anywhere. 
Go figure.


The suggestion of Chuck to run Tomcat as an Administrator is, I believe, 
just a temporary measure to verify if the fact that you are not getting 
the logfiles you expect, would be due to a permission problem to some 
local directory. It would be nice to eliminate that possible source of 
trouble.



Later on, you can revert to LocalSystem, or to some other user, local or 
domain-based.  Which one you choose is a matter of your in-house 
policies, or which resources the apps running in Tomcat will need to 
access later.
Just make sure that while you are running as Administrator, your Tomcat 
does not inadvertently create some files to which later, when it runs as 
another user again, it would not be able to write anymore.




While we are at it, the difference between the .exe version, and the 
.zip version :


The .exe version is like a shortcut, for people used to Windows 
installer programs and who just want to install and run Tomcat as a 
Windows Service, with a gui program (tomcat?w.exe) to set the run 
parameters in the Registry.  With that version, you cannot run Tomcat in 
a command-line window for instance.


The .zip version is more similar to the way you install Tomcat under 
Unix/Linux : you get a bunch of additional scripts and files in the 
tomcat/bin directory, which allow you to run Tomcat in a command-line 
window, which sometimes makes it easier to debug a problem.
It also contains scripts to install and configure Tomcat as a Windows 
Service, but they are a bit more command-line oriented rather than 
graphical.


The real pros tend to prefer the .zip.
;-)

It's the same Tomcat in both cases however.


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



Re: Still unable to get a heap dump from Tomcat running on Windows as a service

2010-02-02 Thread Peter Crowther
On 2 February 2010 21:48, Laird Nelson ljnel...@gmail.com wrote:
 OK; leery of running my Tomcat as the administrator, but am not up to speed
 on which Windows users would be better choices.  I naturally assumed that
 the local user selected by default was appropriate.

LocalSystem can impersonate any user on the computer, but has no
rights over the network.  It's actually a very highly privileged
account - if an application running as LocalSystem wanted to, it could
impersonate the local Administrator account without requiring a
password.  There are a few niceties about what that impersonated
Administrator account could do... but not many.

If you doubt this, note that IIS runs as LocalSystem and uses
impersonation to handle integrated login - it just sets the thread
handling the request to the required identity before handling the
request, and sets it back afterwards ;-).

 I believe you can also download resource kit from Microsoft that has tools
 that lets you watch all objects opened by a process ( so, look if Tomcat is
 even trying to open the file ). Its been a while, so don't recall tool
 sytax.

Process Explorer (
http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx ) would
be my weapon of choice here.

- Peter

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



RE: Still unable to get a heap dump from Tomcat running on Windows as a service

2010-02-02 Thread Caldarale, Charles R
 From: Caldarale, Charles R
 Subject: RE: Still unable to get a heap dump from Tomcat running on
 Windows as a service
 
 I just tried forcing an OOME dump with Tomcat running under the Local
 System Account - and it worked.  This is under Vista 64, not Server
 2K3, and starting with the .zip download.

BTW, increasing the logging level of the service wrapper got me these messages 
in jakarta_service_xxx.log when the OOME was hit:

[2010-02-02 15:59:40] [info] java.lang.OutOfMemoryError: Java heap space
[2010-02-02 15:59:40] [info] Dumping heap to java_pid3468.hprof ...
[2010-02-02 15:59:40] [info] Heap dump file created [9116554 bytes in 0.261 
secs]

You might try changing your log level and see if something interesting shows up.

- 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: Still unable to get a heap dump from Tomcat running on Windows as a service

2010-02-02 Thread André Warnier

Caldarale, Charles R wrote:
...



You might try changing your log level and see if something interesting shows up.

I guess that phrases like that one explain why one talks about the Art 
of computer programming, and not the Science of ditto.


That, along with the fact that in this thread, the subject of every post 
contains a funny character between as and a service, except for 
Chuck's posts, which don't.




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



Re: Still unable to get a heap dump from Tomcat running on Windows as a service

2010-02-02 Thread Filip Hanik - Dev Lists

set the HeapDumpPath option, so you can actually write to a location on disk

On 02/02/2010 02:19 PM, Caldarale, Charles R wrote:

From: Laird Nelson [mailto:ljnel...@gmail.com]
Subject: Still unable to get a heap dump from Tomcat running on Windows
as a service

I am still unable to get Tomcat to dump heap when it encounters an
OutOfMemoryError.
 

You appear to be unique in that regard, since no one else seems to be having 
that problem.

   

I'm using the graphical program that comes up when you select Monitor
Tomcat from the Windows Start Menu.  I assume this is TomcatW.exe?
 

Not quite; it's tomcat6w.exe (note the digit and no caps).

   

I have Tomcat 6.0.20 running as a service under the default
local user account
 

What's a default local user account?  Try using a real account, possibly one 
in the administrators group to see if that makes a difference.

   

set to be allowed to interact with the desktop
 

Not needed.

   

I've specified -XX:HeapDumpPath=C:\crap, and -XX:HeapDumpPath=C:/crap
to no avail.
 

Try just leaving that parameter out.

   

I've set the working path for the Startup and Shutdown tabs
to C:\crap and C:/crap with no effect.
 

The Shutdown working path doesn't matter, since that's not normally used.  Try 
setting the Startup path to the Tomcat installation directory after 
reinstalling Tomcat.  The direction of the slash doesn't seem to matter; I get 
the .hprof file generated in the designated directory regardless of which I use.

   

I've set memory to a minimum of 512 and a maximum of 1024 MB.
 

You normally want those to be the same for a server environment to avoid heap 
thrashing.

   

I entered the JVM options one per line.
 

That is a requirement.

   

The tomcat documentation says to enter them separated by either
a # or a ;
 

That's for command-line usage, not the GUI.

   

Does anyone have any other suggestions to try before giving up on
Tomcat in favor of either Jetty or (God help me) JBoss?
 

Sounds like a baby with the bathwater solution...

I would try removing the existing Tomcat service, reinstalling the current 
(6.0.24) Tomcat from the .zip download, using the service.bat script to create 
the service, and only then try recreating the OOM problem.  Unpack the .zip 
download into someplace other than C:\Program Files.  Also try setting the 
Level on the Logging tab to Debug rather than Error to see if that shows 
anything interesting.

  - 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



RE: Still unable to get a heap dump from Tomcat running on Windows as a service

2010-02-02 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com]
 Subject: Re: Still unable to get a heap dump from Tomcat running on
 Windows as a service
 
 I guess that phrases like that one explain why one talks about the Art
 of computer programming, and not the Science of ditto.

Knuth knew whereof he spoke.  Having been at this a long time, and holding a 
mechanical engineering degree, I always get a laugh (or get upset) when someone 
uses the term software engineer.

 the subject of every post contains a funny character between as
 and a service, except for Chuck's posts, which don't.

That's because I try to remember to delete the silly tab character that 
somebody's mailer keeps inserting...

 - 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: Still unable to get a heap dump from Tomcat running on Windows as a service

2010-02-02 Thread Caldarale, Charles R
 From: Filip Hanik - Dev Lists [mailto:devli...@hanik.com]
 Subject: Re: Still unable to get a heap dump from Tomcat running on
 Windows as a service
 
 set the HeapDumpPath option, so you can actually write to a 
 location on disk

You're late to the party; that's already been tried, to no effect.  It's not 
needed if the Startup tab has the Working Path set - which Laird has also 
tried.  Seems to work for everyone but him.

 - 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: Active DataSource Connection count never decreasing with PostgreSQL

2010-02-02 Thread Alexander Hartner
Hi Christopher,

Thanks for your suggestion.


On 2 Feb 2010, at 22:48, Christopher Schultz wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Alexander,
 
 On 2/2/2010 2:44 PM, Alexander Hartner wrote:
 I have developed an application which accesses a database via
 Hibernate as well as directly via JDBC (datasource). The datasource is
 defined in the server.xml file as follows:
 
Context path= docBase=AddressBookServer.war
 
 :(
 
 Put this into either META-INF/context.xml within your WAR/webapp
 directory, or into CATALINA_BASE/Catalina/[hostname]/ROOT.xml
 
 Remove the path and docBase attributes when you move the Context
 element.

I really like it that way as it allows me to configure what I need to in one 
central place without having to touch or expand the WAR file.

 
  Environment name=LicenseFile value=Licensekey.license 
 type=java.lang.String override=true/ 
  Environment name=BackupsFolder value=../backups 
 type=java.lang.String override=true/   
 
  Resource name=jdbc/AddressBookDB auth=Container 
 type=javax.sql.DataSource
 maxActive=25 maxIdle=5 maxWait=-1 removeAbandoned=true 
 removeAbandonedTimeout=60 logAbandoned=true
 username=sa password= driverClassName=org.h2.Driver
 
 url=jdbc:h2:tcp://localhost:28081/../db/AddressBookDB;LOCK_TIMEOUT=6/
 
 That URL looks fishy, with .. in its name. It that a relative disk
 path? If so, you're asking for deployment headaches in the future.

This also works great for me. My database folder is relative the the startup 
script. Really don't want my database in the bin folder of tomcat, but ../db 
works just great.

 
  Realm className=org.apache.catalina.realm.JDBCRealm
driverName=org.h2.Driver

 connectionURL=jdbc:h2:tcp://localhost:28081/../db/AddressBookDB;LOCK_TIMEOUT=6
connectionName=sa connectionPassword=
userTable=WEBUSERS userNameCol=USERID userCredCol=PASSWORD
userRoleTable=WEBROLES roleNameCol=ACCESSROLE/
 
 Consider using DataSourceRealm instead of JDBCRealm: JDBCRealm uses a
 single Connection object (thereby serializing logins) and has had a
 bunch of concurrency issues in the past. DataSourceRealm can use your
 previously-configured DataSource for Connections. Or, you can define an
 authentication-only DataSource that is used only by the DataSourceRealm.

I didn't know about DataSourceRealm and will try that. Thanks for this 
suggestion.

 
 By default I use an embedded H2 database and everything works great.
 The numActive count goes up during activity and decreases to 0 when
 there is no activity. Also the count generally matches the actual
 connections to the database as one would expect. If I use the same
 application with PostgreSQL 8.4 however, the numActive count goes up and
 up, and only sometimes down. Generally sitting around 25 even though
 PostgreSQL only reports 4 idle connection.
 
 I already tried adding the following to my datasource configuration,
 however this did not make any difference so far.
 removeAbandoned=true removeAbandonedTimeout=60
 logAbandoned=true
 
 Did you look at your log files after setting these parameters?

Yes, I saw the initial messages, but nothing since.

 
 I am using Tomcat 6.0.18 on OS X 10.6.2 with Java 1.6.
 
 Any suggestion on how I can debug this further why Tomcat reports an
 incorrect numActive count and eventually runs out of possible
 connections. Currently it has to be restarted several times a day with
 PostgreSQL.
 
 While there are other possibilities, you might want to read this:
 http://blog.christopherschultz.net/index.php/2009/03/16/properly-handling-pooled-jdbc-connections/
 
 I would /highly/ recommend running with maxActive=1 in all
 environments except for production, as you will likely trigger any
 Connection leaks much more quickly that way.

Not really an option since this is on a production server. On my test system 
using H2 I am not observing any issues.  Currently on the production 
environment using PostgreSQL I have numActive = 13, numIdle =1  in jconsole.

However using the following query I see that 16 connections are all idle.
SELECT datname,usename,procpid,client_addr,waiting,query_start,current_query 
FROM pg_stat_activity ;
Thanks for your help so far. I will read the article and let you know what I 
find.

 
 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
 iEYEARECAAYFAktoq7QACgkQ9CaO5/Lv0PCUzwCgrDZffO+r8bHFsYLbwelii0mC
 rlgAoIfO6KH1IDzEZawRyHyW7+gKRdnD
 =zA4A
 -END PGP SIGNATURE-
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 

Regards
Alex



RE: Active DataSource Connection count never decreasing with PostgreSQL

2010-02-02 Thread Caldarale, Charles R
 From: Alexander Hartner [mailto:a...@j2anywhere.com]
 Subject: Re: Active DataSource Connection count never decreasing with
 PostgreSQL
 
  Put this into either META-INF/context.xml within your WAR/webapp
  directory, or into CATALINA_BASE/Catalina/[hostname]/ROOT.xml
 
  Remove the path and docBase attributes when you move the
  Context element.
 
 I really like it that way as it allows me to configure what I need to
 in one central place without having to touch or expand the WAR file.

And it breaks things.  You are now getting double deployment, once under the 
name AddressBookServer and once again as ROOT.  Do it the right way, by 
renaming your .war file to ROOT.war, and placing the Context element in 
conf/Catalina/[host]/ROOT.xml - that also avoids having to change the contents 
of the .war file.  (Note that Chris' suggesting was missing part of the path.)  
As Chris said, when you do that, remove the path and docBase attributes.

 This also works great for me. My database folder is relative the the
 startup script.

That's really asking for trouble.  A parser has complete freedom to ignore any 
.. entry in a URL, so if it happens to be working now, you're extremely lucky, 
and there's no guarantee it will work tomorrow.  The URL is *not* relative to 
any current directory, since it doesn't target the file system per se.

 - 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: Active DataSource Connection count never decreasing with PostgreSQL

2010-02-02 Thread Alexander Hartner
The URL is interpreted by the JDBC driver / database. If you take a look at the 
database documentation even tilde ~ is suggested. Otherwise the database is 
relative to the working directory

http://www.h2database.com/html/cheatSheet.html

However this has got nothing to do with my issue which is only apparent on 
postgresql and now H2.

I had a look at the article you posted a link to. I am using JSTL SQL 
statements which use the datasource and otherwise an hibernate entitymanager. I 
guess it could be that I missed an entityManager.close somewhere, yet I do 
apply the same close handling with try catch finally suggested by your article. 
I was hoping that the logAbandoned flag would produce any warnings, however so 
far I have not seen anything. It's also strange that this is only apparent on 
PostgreSQL and not H2. It could well be that H2 is more forgiving to unclosed 
connections though.

Thanks again for all your suggestions.
Alex


On 3 Feb 2010, at 00:15, Caldarale, Charles R wrote:

 From: Alexander Hartner [mailto:a...@j2anywhere.com]
 Subject: Re: Active DataSource Connection count never decreasing with
 PostgreSQL
 
 Put this into either META-INF/context.xml within your WAR/webapp
 directory, or into CATALINA_BASE/Catalina/[hostname]/ROOT.xml
 
 Remove the path and docBase attributes when you move the
 Context element.
 
 I really like it that way as it allows me to configure what I need to
 in one central place without having to touch or expand the WAR file.
 
 And it breaks things.  You are now getting double deployment, once under the 
 name AddressBookServer and once again as ROOT.  Do it the right way, by 
 renaming your .war file to ROOT.war, and placing the Context element in 
 conf/Catalina/[host]/ROOT.xml - that also avoids having to change the 
 contents of the .war file.  (Note that Chris' suggesting was missing part of 
 the path.)  As Chris said, when you do that, remove the path and docBase 
 attributes.
 
 This also works great for me. My database folder is relative the the
 startup script.
 
 That's really asking for trouble.  A parser has complete freedom to ignore 
 any .. entry in a URL, so if it happens to be working now, you're extremely 
 lucky, and there's no guarantee it will work tomorrow.  The URL is *not* 
 relative to any current directory, since it doesn't target the file system 
 per se.
 
 - 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



Re: Active DataSource Connection count never decreasing with PostgreSQL

2010-02-02 Thread Alexander Hartner
The following log message is reported during startup :

2010-Feb-03 00:34:36 [JCLLoggerAdapter - INFO] Using datasource: 
java:/comp/env/jdbc/AddressBookDB
AbandonedObjectPool is used 
(org.apache.tomcat.dbcp.dbcp.abandonedobjectp...@1f4175)
   LogAbandoned: true
   RemoveAbandoned: true
   RemoveAbandonedTimeout: 60
2010-Feb-03 00:34:36 [JCLLoggerAdapter - INFO] RDBMS: PostgreSQL, version: 8.4.2

Regards
Alex

On 3 Feb 2010, at 00:15, Caldarale, Charles R wrote:

 From: Alexander Hartner [mailto:a...@j2anywhere.com]
 Subject: Re: Active DataSource Connection count never decreasing with
 PostgreSQL
 
 Put this into either META-INF/context.xml within your WAR/webapp
 directory, or into CATALINA_BASE/Catalina/[hostname]/ROOT.xml
 
 Remove the path and docBase attributes when you move the
 Context element.
 
 I really like it that way as it allows me to configure what I need to
 in one central place without having to touch or expand the WAR file.
 
 And it breaks things.  You are now getting double deployment, once under the 
 name AddressBookServer and once again as ROOT.  Do it the right way, by 
 renaming your .war file to ROOT.war, and placing the Context element in 
 conf/Catalina/[host]/ROOT.xml - that also avoids having to change the 
 contents of the .war file.  (Note that Chris' suggesting was missing part of 
 the path.)  As Chris said, when you do that, remove the path and docBase 
 attributes.
 
 This also works great for me. My database folder is relative the the
 startup script.
 
 That's really asking for trouble.  A parser has complete freedom to ignore 
 any .. entry in a URL, so if it happens to be working now, you're extremely 
 lucky, and there's no guarantee it will work tomorrow.  The URL is *not* 
 relative to any current directory, since it doesn't target the file system 
 per se.
 
 - 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



Re: Still unable to get a heap dump from Tomcat running on Windows as a service

2010-02-02 Thread Laird Nelson
Thanks for sticking with me, guys.  No luck so far.  I will begin the
laborious process of requesting a reinstall.  :-(

(Incidentally, no service logs either, anywhere; this is all very bizarre.)

L

On Tue, Feb 2, 2010 at 7:01 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Filip Hanik - Dev Lists [mailto:devli...@hanik.com]
  Subject: Re: Still unable to get a heap dump from Tomcat running on
  Windows as a service
 
  set the HeapDumpPath option, so you can actually write to a
  location on disk

 You're late to the party; that's already been tried, to no effect.  It's
 not needed if the Startup tab has the Working Path set - which Laird has
 also tried.  Seems to work for everyone but him.

  - 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




Hi

2010-02-02 Thread Mohd Ismail
Question:  How to host more then one website on Tomcat 5.5 web server?


Re: NullPointerException in MimeHeaders

2010-02-02 Thread Konstantin Kolinko
2010/2/2 Bertalan Kis bertalan@razorfish.com:
 It seems attachments are disabled.
 Here are the stacktraces:

 Jan 29, 2010 1:13:20 AM 
 com.sun.xml.ws.transport.http.servlet.WSServletDelegate doGet
 SEVERE: caught throwable
 java.lang.NullPointerException
        at 
 org.apache.tomcat.util.http.MimeHeaders.setValue(MimeHeaders.java:269)
(...)

 At my company we can see NullPointerExceptions in the catalina.out files
 (see the attachments). We use Tomcat 6.0.14 on our 4 servers

https://issues.apache.org/bugzilla/show_bug.cgi?id=47655#c9

Though that might not help you to find an error in your code.

Best regards,
Konstantin Kolinko

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



Re: Problem on Tomcat 6.0.20

2010-02-02 Thread Mark Thomas
On 02/02/2010 22:57, Dan Armbrust wrote:
 On Tue, Feb 2, 2010 at 3:23 PM, Caldarale, Charles R
 chuck.caldar...@unisys.com wrote:
 From: Richard Sickler [mailto:richard.sick...@avagotech.com]
 Subject: Re: Problem on Tomcat 6.0.20

 I removed a file and a directory named WebApplication2, and that
 cleared up that problem.  On to the next undocumented feature!

 It's fully documented:

 Context elements may be explicitly defined:
 ...
* ... If the web application is packaged as a WAR then 
 /META-INF/context.xml will be copied to 
 $CATALINA_BASE/conf/[enginename]/[hostname]/ and renamed to match the 
 application's context path. Once this file exists, it will not be replaced 
 if a new WAR with a newer /META-INF/context.xml is placed in the host's 
 appBase.

 
 Documented, yes.  Astonishingly silly and surprising behaviour?  Also yes.
 
 Good luck getting them to improve it.
 https://issues.apache.org/bugzilla/show_bug.cgi?id=45979
 https://issues.apache.org/bugzilla/show_bug.cgi?id=32284
 
 Near as I can tell, this surprising and bizarre behaviour occurs
 because Remy likes it that way.
 
 In my opinion, Tomcat should remember if it copied the file out of a
 war file... and if the war file is replaced, it should overwrite the
 file with the new file from the new war file.

There are two opposing opinions on what is the correct behaviour here.
That is one, the other is that if I want to edit the context.xml Tomcat
should a) make this easy so I don't have to muck about with the WAR and
b) not overwrite my changes.

 Is it trivial?  Not exactly, Tomcat would have to somehow keep track
 of if the file was manually modified or not... but really, it just
 needs to keep a hash of the file somewhere so it can check if the file
 has been changed since it put it there.

The simpler solution is just not to expand it. Tomcat doesn't need to
expand it to read it.

 I think Tomcat should also log a warning message when it doesn't copy
 a context.xml from a war file... because the developer has made a
 mistake at this point - someone manually changed one version, but
 didn't change the one in the war file.

That is a good idea for an enhancement. As ever, patches welcome.

 The current design leads to people having problems like you have -
 because beginning developers aren't (and really) shouldn't have to be
 aware of this nasty gotcha of Tomcat.

And overwriting an edited context.xml has similar gotchas.

One idea I have seen proposed in the past is to make the extraction of
context.xml configurable per host. That should be fairly simple. Again,
patches welcome.

I've added https://issues.apache.org/bugzilla/show_bug.cgi?id=48662 to
track these ideas. Feel free to add to that.

Mark

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



Re: Hi

2010-02-02 Thread Mark Thomas
On 03/02/2010 05:08, Mohd Ismail wrote:
 Question:  How to host more then one website on Tomcat 5.5 web server?
 

http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html

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



Re: save session information

2010-02-02 Thread Mark Thomas
On 03/02/2010 05:28, Ashish Kulkarni wrote:
 Hi
 Is it possible with tomcat to save session information in database or some
 where which can be retrieved after restart, for example raisin
 provides symmetrical
 session which can be saved to database or file system

Hi. Yes.


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



Re: How to find network user id of user in servlet

2010-02-02 Thread Mark Thomas
On 03/02/2010 05:29, Ashish Kulkarni wrote:
 Hi
 How to find network user id who is logged into windows from servlet, there
 is a method in request getRemoteUser(), but it is returning null,

Tomcat doesn't support that directly. You need a 3rd party
authentication mechanism that supports windows authentication.

Mark


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



RE: How to find network user id of user in servlet

2010-02-02 Thread Hadole, Nishant IN BOM SISL
Using mod_auth_sspi.so module for Apache for windows authentication will help.

Configuration changes -

LoadModule sspi_auth_module modules/mod_auth_sspi.so

Location /X/servlet/ 
SSPIAuth On
AllowOverride None
Order allow,deny
Allow from all
AuthName XX
AuthType SSPI
SSPIAuth On
SSPIAuthoritative On
require valid-user
SSPIDomain XXX
/Location

With best regards,
Nishant Hadole
Mailto: nishant.had...@siemens.com
www.siemens.co.in
-Original Message-
From: Mark Thomas [mailto:ma...@apache.org]
Sent: Wednesday, 03 February, 2010 12:20 PM
To: Tomcat Users List
Subject: Re: How to find network user id of user in servlet

On 03/02/2010 05:29, Ashish Kulkarni wrote:
 Hi
 How to find network user id who is logged into windows from servlet, there
 is a method in request getRemoteUser(), but it is returning null,

Tomcat doesn't support that directly. You need a 3rd party
authentication mechanism that supports windows authentication.

Mark


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


Important notice: This e-mail and any attachment there to contains corporate 
proprietary information. If you have received it by mistake, please notify us 
immediately by reply e-mail and delete this e-mail and its attachments from 
your system.
Thank You.


RE: changing trace level of 'internal' tomcat logs

2010-02-02 Thread Lominchar García , José Luis

Hi

What bin/*.exe corresponds to 'Start  All Programs  Apache Tomcat 6.0  
Configure Tomcat' ?


java.util.logging.ConsoleHandler.level = WARNING
(in conf\logging.properties) didn't work ..

Thanks!



-Mensaje original-
De: Konstantin Kolinko [mailto:knst.koli...@gmail.com] 
Enviado el: martes, 02 de febrero de 2010 11:11
Para: Tomcat Users List
Asunto: Re: changing trace level of 'internal' tomcat logs

2010/2/2 Lominchar García, José Luis jllo...@mapfre.com:
 Hi,
 ¿does somebody knows what I have to do to change trace level of
 jakarta_service_date.log  and stdout_date.log from 'info' to 'warn'?

 jakarta_service_date.log :

Start  All Programs  Apache Tomcat 6.0  Configure Tomcat

then switch to the Logging page and choose Level, one of: Error,
Info, Warning, Debug.

 stdout_date.log:

java.util.logging.ConsoleHandler.level = WARNING
(in conf\logging.properties)

See java.util.logging log level names here:
http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Level.html


Best regards,
Konstantin Kolinko

-
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: How to find network user id of user in servlet

2010-02-02 Thread André Warnier

Ashish Kulkarni wrote:

Hi
How to find network user id who is logged into windows from servlet, there
is a method in request getRemoteUser(), but it is returning null,



This will definitely help :
http://www.ioplex.com/
Look for Jespa
It is free up to a number of users, and very reasonably priced after 
that.  It works perfectly, and is very easy to set up.


Otherwise, as someone else suggested and if you are using an Apache 
httpd front-end, you can also use an Apache httpd-based authentication, 
and pass the resulting user-id to Tomcat.
In a pure Windows environment, it should be possible to do soething 
similar with IIS as a front-end.



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



Re: changing trace level of 'internal' tomcat logs

2010-02-02 Thread André Warnier

Lominchar García wrote:

Hi

What bin/*.exe corresponds to 'Start  All Programs  Apache Tomcat 6.0  
Configure Tomcat' ?



bin/tomcat?w.exe  (where ? is the version of tomcat)


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