Re: Tomcat 6 crash, no log, no hs_err_pid file

2011-05-05 Thread Mikolaj Rydzewski

On Thu, 5 May 2011 02:19:59 +0200, Jakub Królikowski wrote:

Before upgrade, if jvm crashed, the hs_err_pid*.log file was always 
in

root home directory.


My $0.02: do not run tomcat as root.

You can try to log GC output to diagnose OOM errors.

--
Mikolaj Rydzewski m...@ceti.pl

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



HowTo place Manager-App

2011-05-05 Thread Alexander Diedler
Hello,

What´s the best place to make access to the manager-app?

1.   Place a separate context for Manager in the Host-Tag in the
server.xml

2.   Place the manager.xml in the /conf/Catalina/[Hostname]/ path?

 

Best regards

Alexander

 



smime.p7s
Description: S/MIME cryptographic signature


Re: Tomcat 6 crash, no log, no hs_err_pid file

2011-05-05 Thread Thomas Freitag
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Jakub,

On 05/05/2011 02:19 AM, Jakub Królikowski wrote:
 I made an Tomcat and JVM upgrade few weeks ago (to Tomcat 6.0.32 and
 jdk 1.6.0.24), and since that time I can notice a very strange
 behavior:
 sometimes, even once a day, Tomcat stops suddenly. There is no java
 process anymore, there is no errors in catalina.out log file,
 and, what is the most confusing, there is no hs_err_pid*.log file
 anywhere, or I cannot find it.
 Before upgrade, if jvm crashed, the hs_err_pid*.log file was always in
 root home directory.

I'm not really sure if the hotspot error file is placed in the home
directory or the current working dir. Two java options might help you:
1) -XX:ErrorFile=path/hs_err_pid%p.log (I usually place the file in
the tomcat log directory ($CATALINA_BASE/logs).
2) -XX:OnError=executable (You can run any command you like).

Your milage may vary, if the JVM is killed with SIGKILL, no files will
appear.

 This is my enviroment, takes with JMX:
 
 VM arguments:
 -Djava.util.logging.config.file=/usr/lib/tomcat/conf/logging.properties
 -Xmx3000m -Xms1500m -Xmn700m -XX:PermSize=768m -XX:MaxPermSize=1000m
 -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode
 -XX:+CMSIncrementalPacing -XX:CMSIncrementalDutyCycleMin=0
 -XX:CMSIncrementalDutyCycle=10 -XX:+UseParNewGC
 -XX:+CMSClassUnloadingEnabled -XX:MaxGCPauseMillis=250
 -XX:MaxGCMinorPauseMillis=100
 -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false
 -Dcom.sun.management.jmxremote
 -Dcom.sun.management.jmxremote.authenticate=true
 -Dcom.sun.management.jmxremote.password.file=/usr/lib/tomcat/conf/jmxremote.password
 -Dcom.sun.management.jmxremote.access.file=/usr/lib/tomcat/conf/jmxremote.access
 -Dcom.sun.management.jmxremote.ssl=false
 -Djava.rmi.server.hostname=xxx.xxx.xxx.xxx
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 -Djava.endorsed.dirs=/usr/lib/tomcat/endorsed
 -Dcatalina.base=/usr/lib/tomcat -Dcatalina.home=/usr/lib/tomcat
 -Djava.io.tmpdir=/usr/lib/tomcat/temp

Looks okay for me, just curious: Do you really need that large perm gen?

Regards,
- -- 
Thomas Freitag
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk3CoAsACgkQGE5pHr3PKuVowACfdMOwEeqq7Hyjta6ZmJZ74z7j
9LwAnjXR4vJ69gqC7cxxn5v4whEPV8iP
=W1xu
-END PGP SIGNATURE-

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



Re: HowTo place Manager-App

2011-05-05 Thread Thomas Freitag
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello Alexander,

On 05/05/2011 10:53 AM, Alexander Diedler wrote:
 What´s the best place to make access to the manager-app?
 
 1.   Place a separate context for Manager in the Host-Tag in the
 server.xml
 
 2.   Place the manager.xml in the /conf/Catalina/[Hostname]/ path?

Quoting the docs: For Tomcat 6, unlike Tomcat 4.x, it is NOT
recommended to place Context elements directly in the server.xml file.
This is because it makes modifying the Context configuration more
invasive since the main conf/server.xml file cannot be reloaded without
restarting Tomcat. (see:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html)

I'd suggests option 2, even if the quoted argument does not really hold
in your case...

Regards,
- -- 
Thomas Freitag
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk3CoRgACgkQGE5pHr3PKuW/jgCfabb3+XZVhi3unAyyFyiTWTEg
NMEAn38mIhjuntCcC3Hd3kP6XZtFzjo/
=F8d0
-END PGP SIGNATURE-

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



Re: Tomcat 6 Struts 1.3

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

Cpanon,

On 5/4/2011 2:47 PM, cpanon wrote:
 What I find so inscrutable is I know I am hitting the second state with the 
 different jsp for the report tile.  I know that b/c I have a breakpoint set 
 on 
 the return mapping.findForward(posSO);  What I expect is TC or Jasper to 
 detect the tiles-defs is different than the one presenting to this session 
 and 
 process it with the current session attributes, render it and insert it into 
 the 
 page in the report tile.  I have to do this b/c I need to keep my applet 
 running 
 and not shut down.  It is something systemic for sure.  I know tiles works 
 for 
 thousands of other developers.  How can it work for me perfectly the first 
 time 
 and fail and successive time with a different state?  Am I not correct in my 
 expectation of Tiles processing and the fact that it works for others?  Any 
 further ideas?  

I think it might be time to switch-over to the Tiles mailing list. I
though you were having trouble with URLs not being resolved correctly
which Tomcat might have some control over. This seems to be squarely a
tiles issue.

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

iEYEARECAAYFAk3CpV0ACgkQ9CaO5/Lv0PAMBQCgsGgM7NK5YUq0OGuSU+h/9eL2
jEUAn0dW9TkAgJ6ep6wSovyZB/g8mPKV
=fM/f
-END PGP SIGNATURE-

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



Re: 100% CPU Usage when stopping Tomcat after OOM condition

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

Felix,

On 5/4/2011 1:07 AM, Felix Schumacher wrote:
 It could've been the garbage collector itself. Just yesterday I had 
 an oom on permgen, which lead to a major-gc loop. I could see the
 loop nicely as I had enabled logging of gc activity with
 -Xloggc:$CATALINA_BASE/logs/gc.log -XX:+PrintGCDetails 
 -XX:PrintGCTimeStamps

I don't recall any of the GC threads actually going anything in my
thread dump, but it's possible I just missed it. This situation is
trivially reproducable, so I'll check again next time it happens.

If the GC is going into a tight loop to try to free-up space, that seems
like a bug to me... the GC ought to detect that it's not accomplishing
anything and ... well, I guess throw another OOME.

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

iEYEARECAAYFAk3CpfkACgkQ9CaO5/Lv0PCKpQCeJOibvjER/FbeLvIVVEzcCTMj
EWIAni0egoiA4Q8CxZKzQ3DL0ePo2O5K
=Q5AF
-END PGP SIGNATURE-

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



Release date for Tomcat 7.0.13?

2011-05-05 Thread Chris Dumoulin
Can anyone give a rough guess as to when Tomcat 7.0.13 will be released?
There's a fix in there that I'm looking forward to getting.

Thanks,
Chris

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



Re: Release date for Tomcat 7.0.13?

2011-05-05 Thread Mark Thomas
On 05/05/2011 14:47, Chris Dumoulin wrote:
 Can anyone give a rough guess as to when Tomcat 7.0.13 will be released?
 There's a fix in there that I'm looking forward to getting.

Tomcat 7 releases around the start of every month. 7.0.13 is a little
overdue. I have just finished working through the open bugs and just
have the recently agreed changes to maxConnections for the HTTP-BIO
connector to apply. Once those are done I'll do a test cycle and,
assuming everything passes, start the release process. If all goes to
plan, expect a 7.0.13 tag late tomorrow, the vote over the weekend and
early next week with the release towards the end of next week. Keep an
eye on the dev list for progress.

If something crops up at $work, the tests fail or something goes
horribly wrong with the ASF infra then I may well get distracted and the
release will be delayed until I or another committer get around to it.

Mark



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



Re: Slow SSL connections after Tomcat 5 to 7 migration

2011-05-05 Thread Michał Kapituła

Hello,
I've made some thread dumps with https connection in progress.

W dniu 2011-05-04 15:49, Caldarale, Charles R pisze:

From: Michał Kapituła [mailto:michal.kapit...@comarch.pl]
Subject: Slow SSL connections after Tomcat 5 to 7 migration
I've just tested the page generation time via local network (and
browser's cache off) and the page is being fully loaded in circa 2
seconds (with Firebug on) when using http, while loading the same
page using secure connection took as much as 10 times longer.

If the CPU usage is not high during page generation over SSL, and the network 
isn't inducing delays, then the threads must be waiting for something.  Can you 
take some thread dumps during the delay period and find out what they're stuck 
on?  (My suspicion is reads from /dev/random, but I thought that was only 
during Tomcat initialization.)


  Really I don't know what to search for there (maybe you could give me 
some clues?). Could you explain why reading from /dev/random possibly 
could be the case here?


I thought that seperate SSL Handshake could be made for each of the 
requests, but I can't see such behaviour in the dumps. Only one or zero 
threads commiting a handshake, others appear to autoaccept it (maybe not 
a precise term).



Also, is Tomcat front-ended by anything (e.g., httpd), or are you accessing it 
directly?

No, it isn't.



Did anything else change when you upgraded Tomcat?  For example, the JVM 
version?

No, nothing changed. Btw - the Tomcat version is 7.0.12 and JDK's is 6.0.14

I'll update JDK tommorow, I'm not sure if it will change anything, but 
won't hurt neither...



I'll appretiate any additional help from you guys. Maybe there's any 
additional info I could provide to make things more clear? Please let me 
know.


Regards,
Michał

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



Re: Release date for Tomcat 7.0.13?

2011-05-05 Thread Chris Dumoulin
Thanks for the info Mark!

On May 5, 2011 09:59:54 am Mark Thomas wrote:
 On 05/05/2011 14:47, Chris Dumoulin wrote:
  Can anyone give a rough guess as to when Tomcat 7.0.13 will be released?
  There's a fix in there that I'm looking forward to getting.
 
 Tomcat 7 releases around the start of every month. 7.0.13 is a little
 overdue. I have just finished working through the open bugs and just
 have the recently agreed changes to maxConnections for the HTTP-BIO
 connector to apply. Once those are done I'll do a test cycle and,
 assuming everything passes, start the release process. If all goes to
 plan, expect a 7.0.13 tag late tomorrow, the vote over the weekend and
 early next week with the release towards the end of next week. Keep an
 eye on the dev list for progress.
 
 If something crops up at $work, the tests fail or something goes
 horribly wrong with the ASF infra then I may well get distracted and the
 release will be delayed until I or another committer get around to it.
 
 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: Tomcat 6.0.32 on 64-bit 2008 server - Event 1000, Application Error

2011-05-05 Thread fsmaniac
Andre:  I followed your idea and did the following - uninstalled the .exe 
install of 6.0.32, extracted the 64-bit zip, and copied my old conf folder 
back on top of the one that the zip created.  Added the environment variable 
JAVA_HOME in Windows.  Ran startup.bat - Tomcat tries to start, but Windows 
then pops up a message saying Java(TM) Platform SE binary has stopped 
working, and I am forced to click close this program.

Windows still notes an Event 1000, Application Error in its logs, and I get 
the following error.  The faulting application this time is java.exe as 
opposed to tomcat6.exe (as it was previously):

Faulting application name: java.exe, version: 6.0.250.6, time stamp: 0x4da6a804
Faulting module name: jvm.dll, version: 20.0.0.11, time stamp: 0x4da6d3c2
Exception code: 0xc094
Fault offset: 0x00308eef
Faulting process id: 0xa2c
Faulting application start time: 0x01cc0b2f6534c0ca
Faulting application path: C:\Program Files\Java\jdk1.6.0_25\bin\java.exe
Faulting module path: C:\Program Files\Java\jdk1.6.0_25\jre\bin\server\jvm.dll
Report Id: a2f45f74-7722-11e0-a592-005056a10003

This error is the same (save for the version numbers and path differences) when 
using JDK 6u24 and 6u25 64-bit.  I don't know if this helps at all, but here is 
the output from startup.bat when running with 6u25:
Using CATALINA_BASE:   c:\Program Files\Apache Software Foundation\Tomcat 6.0
Using CATALINA_HOME:   c:\Program Files\Apache Software Foundation\Tomcat 6.0
Using CATALINA_TMPDIR: c:\Program Files\Apache Software Foundation\Tomcat 
6.0\temp
Using JRE_HOME:C:\Program Files\Java\jdk1.6.0_25
Using CLASSPATH:   c:\Program Files\Apache Software Foundation\Tomcat 
6.0\bin\bootstrap.jar

I'm still at a loss here.  Any ideas what this now points to?


(Terence:  Haven't gotten there yet, as it is a new install.  I might end up 
trying that at some point - what did you remove from the registry?)



 


A suggestion to try to pin down the problem somewhere : let's run your Tomcat, 
not as a Windows Service under the procrun daemon, but as a console 
application, directly from java. 
(If its a VM under VMware, then you have an easy console access, and you don't 
care if you have to login and run tomcat in a command window, right ?) 
 
For that, you'll have to download a full tomcat zip-file (from the same place 
where you got the .exe).  The zip file contains additional scripts allowing to 
start tomcat from the command-line. 
You can unzip it in a new directory, or right over the one that's there. 
(You may want to save the contents of your conf sub-directory, and restore 
them after the unzip). 
Then you should be able to navigate to the bin directory and start tomcat in 
the command window (with startup.bat), without involving the tomcat6.exe. 
You will probably need to create a setenv.bat first, and set JAVA_HOME in it. 
I believe that all that is explained in the running.txt file that comes with 
it. 
 
If tomcat starts and stops consistently that way, then I would say that it is a 
strong clue that procrun (tomcat6.exe) has something to do with the problem. 

 

 


 

 

-Original Message-
From: André Warnier a...@ice-sa.com
To: Tomcat Users List users@tomcat.apache.org
Sent: Wed, May 4, 2011 4:07 pm
Subject: Re: Tomcat 6.0.32 on 64-bit 2008 server - Event 1000, Application 
Error


A suggestion to try to pin down the problem somewhere : let's run your Tomcat, 
not as a Windows Service under the procrun daemon, but as a console 
application, directly from java. 
(If its a VM under VMware, then you have an easy console access, and you don't 
care if you have to login and run tomcat in a command window, right ?) 
 
For that, you'll have to download a full tomcat zip-file (from the same place 
where you got the .exe).  The zip file contains additional scripts allowing to 
start tomcat from the command-line. 
You can unzip it in a new directory, or right over the one that's there. 
(You may want to save the contents of your conf sub-directory, and restore 
them after the unzip). 
Then you should be able to navigate to the bin directory and start tomcat in 
the command window (with startup.bat), without involving the tomcat6.exe. 
You will probably need to create a setenv.bat first, and set JAVA_HOME in it. 
I believe that all that is explained in the running.txt file that comes with 
it. 
 
If tomcat starts and stops consistently that way, then I would say that it is a 
strong clue that procrun (tomcat6.exe) has something to do with the problem. 
 
 
fsman...@netscape.net wrote: 
 Chuck:  Before I encountered this, I had Maximum memory pool at 2048 (and 
 -XX:MaxPermSize=256m), as that's what the app I am looking to install wants.  
 It worked fine then, but after the stop/start, failed.  When Tomcat decided 
 to finally come back to life earlier today after a power down and a cold 
 boot, I didn't set the heap size/MaxPermSize at all.  When I touched the 
 config and restarted, it 

Deployment problem on Tomcat 7.0.12

2011-05-05 Thread Dmitri Pissarenko
Hi!

When I try to deploy a WAR file by dropping it into webapps directory, I get
following message in the console:

04.05.2011 19:34:07 org.apache.catalina.startup.HostConfig deployWAR
SEVERE: Error deploying configuration descriptor xyz.war

I didn't find any hints about the detailed cause of this in the logs.

Where can I find out the details (e. g. the stack trace) about this failure?

Thanks in advance

Dmitri

P. S.: Here's the web.xml file:

?xml version=1.0 encoding=UTF-8?
web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns=http://java.sun.com/xml/ns/javaee; xmlns:web=
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
id=WebApp_ID version=2.5
display-namemyapp/display-name
context-param
description
Vaadin production mode/description
param-nameproductionMode/param-name
param-valuefalse/param-value
/context-param
servlet
servlet-nameProject Control Center Application/servlet-name

servlet-classcom.vaadin.terminal.gwt.server.ApplicationServlet/servlet-class
init-param
description
Vaadin application class to start/description
param-nameapplication/param-name

param-valueat.mycompany.myapp.ProjectControlCenterApplication/param-value
/init-param
/servlet
servlet-mapping
servlet-nameProject Control Center Application/servlet-name
url-pattern/*/url-pattern
/servlet-mapping
welcome-file-list
welcome-fileindex.html/welcome-file
welcome-fileindex.htm/welcome-file
welcome-fileindex.jsp/welcome-file
welcome-filedefault.html/welcome-file
welcome-filedefault.htm/welcome-file
welcome-filedefault.jsp/welcome-file
/welcome-file-list
listener

listener-classat.mycompany.myapp.impl.persistence.DatabaseStartStopServletContextListener/listener-class
/listener
session-config
session-timeout480/session-timeout
/session-config
/web-app


Re: Tomcat 6.0.32 on 64-bit 2008 server - Event 1000, Application Error

2011-05-05 Thread André Warnier

fsman...@netscape.net wrote:

Andre:  I followed your idea and did the following - uninstalled the .exe install of 6.0.32, extracted the 
64-bit zip, and copied my old conf folder back on top of the one that the zip created.  Added the 
environment variable JAVA_HOME in Windows.  Ran startup.bat - Tomcat tries to start, but Windows then pops up 
a message saying Java(TM) Platform SE binary has stopped working, and I am forced to click 
close this program.

Windows still notes an Event 1000, Application Error in its logs, and I get the 
following error.  The faulting application this time is java.exe as opposed to 
tomcat6.exe (as it was previously):

Faulting application name: java.exe, version: 6.0.250.6, time stamp: 0x4da6a804
Faulting module name: jvm.dll, version: 20.0.0.11, time stamp: 0x4da6d3c2
Exception code: 0xc094
Fault offset: 0x00308eef
Faulting process id: 0xa2c
Faulting application start time: 0x01cc0b2f6534c0ca
Faulting application path: C:\Program Files\Java\jdk1.6.0_25\bin\java.exe
Faulting module path: C:\Program Files\Java\jdk1.6.0_25\jre\bin\server\jvm.dll
Report Id: a2f45f74-7722-11e0-a592-005056a10003

This error is the same (save for the version numbers and path differences) when 
using JDK 6u24 and 6u25 64-bit.  I don't know if this helps at all, but here is 
the output from startup.bat when running with 6u25:
Using CATALINA_BASE:   c:\Program Files\Apache Software Foundation\Tomcat 6.0
Using CATALINA_HOME:   c:\Program Files\Apache Software Foundation\Tomcat 6.0
Using CATALINA_TMPDIR: c:\Program Files\Apache Software Foundation\Tomcat 
6.0\temp
Using JRE_HOME:C:\Program Files\Java\jdk1.6.0_25
Using CLASSPATH:   c:\Program Files\Apache Software Foundation\Tomcat 
6.0\bin\bootstrap.jar

I'm still at a loss here.  Any ideas what this now points to?


Not really. But it definitely excludes procrun/tomcat6.exe as a source of the 
problem.
I also believe that it is unlikely that the same exact RAM addresses are being used in 
your various tests, so this would also tend to reduce the possibility of a 
hardware-related issue.


So far thus, it seems to point to either a problem in the JVM itself, or in something 
which you particular setup is making the JVM do.


So let's try to change the JVM.
It should be possible, even under a 64-bit Windows, to install a 32-bit JVM, no 
?
(and Tomcat will run the same as long as you do not use exotic Heap size 
values).
Install it at a different location than your current one, change the JAVA_HOME or JRE_HOME 
in your setenv.bat to point to this new JVM, and re-run the same test.



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



Re: Slow SSL connections after Tomcat 5 to 7 migration

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

Michał,

On 5/5/2011 10:21 AM, Michał Kapituła wrote:
 I thought that seperate SSL Handshake could be made for each of the
 requests, but I can't see such behaviour in the dumps. Only one or zero
 threads commiting a handshake, others appear to autoaccept it (maybe not
 a precise term).

[snip]

 No, nothing changed. Btw - the Tomcat version is 7.0.12 and JDK's is 6.0.14

If you are using the BIO connector (which it looks like you are due to
org.apache.coyote.http11.Http11Protocol in your Connector), then
Tomcat doesn't have a great deal of control over the SSL handshake, etc.
process. That's all up to the JRE itself since all of the SSL
implementation comes from there. Tomcat can affect certain things like
the ciphers used, etc. but basically everything is done by the runtime,
not by Tomcat.

Can you double-check to see if you are using the APR versions of the
HTTP connectors? The best way to tell what's going on is to look at the
startup messages when the connectors initialize themselves and emit a
short log message to catalina.out. That will tell us what connector is
actually being used.

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

iEYEARECAAYFAk3C1WgACgkQ9CaO5/Lv0PAUqQCfQ7hQtIx6VTlUTIm34BagDGMh
9gAAmwWcAqVhBhqt0CngBQT9fmwCX30I
=0pxy
-END PGP SIGNATURE-

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



Re: Deployment problem on Tomcat 7.0.12

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

Dmitri,

On 5/5/2011 10:55 AM, Dmitri Pissarenko wrote:
 When I try to deploy a WAR file by dropping it into webapps directory, I get
 following message in the console:
 
 04.05.2011 19:34:07 org.apache.catalina.startup.HostConfig deployWAR
 SEVERE: Error deploying configuration descriptor xyz.war
 
 I didn't find any hints about the detailed cause of this in the logs.

 Where can I find out the details (e. g. the stack trace) about this failure?

Tomcat is capable of generating several log files depending upon the
configuration. Are you using the default logging configuration?

Check any of the files in logs/* to see if any of them have error
messages. Sometimes they are found in catalina.out, sometimes in
[host].log, etc.

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

iEYEARECAAYFAk3C1dcACgkQ9CaO5/Lv0PAC7QCbBeFElXPdqcBpiiiIOZ6/UQs+
S10An04qXAjP+QXx3H/YDgVOdbdhk75a
=/s6A
-END PGP SIGNATURE-

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



RE: tomcat 7: is it possible to config tomcat common classloader to point to other location?

2011-05-05 Thread Yongqin Xu

Hello, Churck,

I tried to use $CATALINA_OPTS env to set my ${oracle.common.home} variable in 
common.loader property,
starting TC has no problem, but when shutting down TC, it gives me error saying 
it could not find the jar. I 
added echo to print CATALINA_OPTS in catalina.sh script.

[yoxu@dadvml0008 bin]$ ./startup.sh
Using CATALINA_OPTS:  
-Doracle.common.home=/scratch/yoxu/view_storage/yoxu_maincred/oracle/oracle_common
Using CATALINA_BASE:   /scratch/yoxu/tomcat/tc-1
Using CATALINA_HOME:   /scratch/yoxu/tomcat/apache-tomcat-7.0.12
Using CATALINA_TMPDIR: /scratch/yoxu/tomcat/tc-1/temp
Using JRE_HOME:/usr
Using CLASSPATH:   
/scratch/yoxu/tomcat/apache-tomcat-7.0.12/bin/bootstrap.jar:/scratch/yoxu/tomcat/apache-tomcat-7.0.12/bin/tomcat-juli.jar
[yoxu@dadvml0008 bin]$ ./shutdown.sh
Using CATALINA_OPTS:  
-Doracle.common.home=/scratch/yoxu/view_storage/yoxu_maincred/oracle/oracle_common
Using CATALINA_BASE:   /scratch/yoxu/tomcat/tc-1
Using CATALINA_HOME:   /scratch/yoxu/tomcat/apache-tomcat-7.0.12
Using CATALINA_TMPDIR: /scratch/yoxu/tomcat/tc-1/temp
Using JRE_HOME:/usr
Using CLASSPATH:   
/scratch/yoxu/tomcat/apache-tomcat-7.0.12/bin/bootstrap.jar:/scratch/yoxu/tomcat/apache-tomcat-7.0.12/bin/tomcat-juli.jar
May 5, 2011 10:10:39 AM org.apache.catalina.startup.ClassLoaderFactory 
validateFile
WARNING: Problem with JAR file 
[/scratch/yoxu/tomcat/tc-1/bin/${oracle.common.home}/modules/features/adf.share.ca_11.1.1.jar],
 exists: [false], canRead: [false]

You can see I tried to set ${oracle.common.home} pointing to a valid location, 
but
TC could not recognize it. Do you know what missing? 





 From: chuck.caldar...@unisys.com
 To: users@tomcat.apache.org
 Date: Mon, 2 May 2011 23:57:21 -0500
 Subject: RE: tomcat 7: is it possible to config tomcat common classloader to 
 point to other location?
 
  From: Yongqin Xu [mailto:yong...@hotmail.com] 
  Subject: RE: tomcat 7: is it possible to config tomcat common classloader 
  to point to other location?
 
  I mean, can I define my own placeholder there?
 
 It's not a placeholder, it's a reference to a system property, evaluated when 
 the .xml or .properties file is scanned.  Read the doc:
 
 Apache Ant-style variable substitution is supported; a system property with 
 the name propname may be used in a configuration file using the syntax 
 ${propname}. All system properties are available including those set using 
 the -D syntax, those automatically made available by the JVM and those 
 configured in the $CATALINA_BASE/conf/catalina.properties file.
 
 http://tomcat.apache.org/tomcat-7.0-doc/config/index.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: modjk apache response questions

2011-05-05 Thread Harsimranjit singh Kler
Hi
any other input required ?

On Wed, May 4, 2011 at 9:48 AM, Harsimranjit singh Kler simran...@gmail.com
 wrote:



  Hi




 i have done testing as required using ab- please find details :.

 Please let me knw if anything other details required.

 Is this always manadatory that maxthread in tomcat shoud equal to
 maxclient(apache)?

 in my case traffic always distributes among 3 tomcats so i assume to give
 500 maxthread on each tomcat(also high values for maxthread in tomcat not
 recomended)


 Not sure if following worker setting is proper?

   *http.conf*

 IfModule mpm_worker_module

 ServerLimit 50

 StartServers 2

 MaxClients 1500

 MinSpareThreads 50

 MaxSpareThreads 600

 ThreadsPerChild 50

 MaxRequestsPerChild 0



   /IfModule
  *Server.xml(for three tomcat)***

 Connector port=8008

enableLookups=false redirectPort=8443

 maxThreads=500 minSpareThreads=25

maxSpareThreads=75 acceptCount=100
protocol=AJP/1.3 /


 *TEST*

 # ./ab -n 150 -c 50 http://10.58.116.20/test/test.html

 This is ApacheBench, Version 2.3 $Revision: 655654 $

 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/

 Licensed to The Apache Software Foundation, http://www.apache.org/



 Benchmarking 10.58.116.20 (be patient).done





 Server Software:Apache/2.2.17

 Server Hostname:10.58.116.20

 Server Port:80



 Document Path:  /test/test.html

 Document Length:104 bytes



 Concurrency Level:  50

 Time taken for tests:   0.369 seconds

 Complete requests:  150

 Failed requests:0

 Write errors:   0

 Total transferred:  52500 bytes

 HTML transferred:   15600 bytes

 Requests per second:406.96 [#/sec] (mean)

 Time per request:   122.863 [ms] (mean)

 Time per request:   2.457 [ms] (mean, across all concurrent requests)

 Transfer rate:  139.10 [Kbytes/sec] received



 Connection Times (ms)

   min  mean[+/-sd] median   max

 Connect:01   0.3  1   1

 Processing: 1  112 111.2 84 337

 Waiting:1  112 111.2 84 337

 Total:  1  113 111.3 85 338



 Percentage of the requests served within a certain time (ms)

   50% 85

   66%141

   75%185

   80%215

   90%330

   95%335

   98%336

   99%337

  100%338 (longest request)







 *]# ./ab -n 3000 -c 1000 **http://10.58.116.20/test/test.html***

 This is ApacheBench, Version 2.3 $Revision: 655654 $

 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/

 Licensed to The Apache Software Foundation, http://www.apache.org/



 Benchmarking 10.58.116.20 (be patient)

 Completed 300 requests

 Completed 600 requests

 Completed 900 requests

 Completed 1200 requests

 Completed 1500 requests

 Completed 1800 requests

 Completed 2100 requests

 Completed 2400 requests

 Completed 2700 requests

 Completed 3000 requests

 Finished 3000 requests





 Server Software:Apache/2.2.17

 Server Hostname:10.58.116.20

 Server Port:80



 Document Path:  /test/test.html

 Document Length:104 bytes



 Concurrency Level:  1000

 Time taken for tests:   7.246 seconds

 Complete requests:  3000

 Failed requests:0

 Write errors:   0

 Total transferred:  105 bytes

 HTML transferred:   312000 bytes

 Requests per second:414.00 [#/sec] (mean)

 Time per request:   2415.471 [ms] (mean)

 Time per request:   2.415 [ms] (mean, across all concurrent requests)

 Transfer rate:  141.50 [Kbytes/sec] received



 Connection Times (ms)

   min  mean[+/-sd] median   max

 Connect:0   31 277.8  03001

 Processing: 1 1384 2297.01367218

 Waiting:1 1383 2296.01367217

 Total: 57 1415 2308.51407246



 Percentage of the requests served within a certain time (ms)

   50%140

   66%326

   75%   1756

   80%   3103

   90%   6392

   95%   6670

   98%   7065

   99%   7175

  100%   7246 (longest request)


 On Wed, May 4, 2011 at 2:55 AM, André Warnier a...@ice-sa.com wrote:

 Christopher Schultz wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 André,

 On 5/2/2011 12:40 PM, André Warnier wrote:

 He has 3 tomcats though.
 Or did I misread that ?


 Oh, well, there still might be a problem. No httpd configuration was
 shown (only workers.properties), so there are still situations where the
 connections can be way-off.

 For instance, if session stickiness is used and you get very unlucky,
 it's possible that two Tomcat backends will sit idle while the third
 will be handling 100% of the traffic. If that instance only has 500
 connections available, there will be 1500 active connections
 bearing-down on it. :(


 Yes.  Session stickines is used, and this scenario has been mentioned.
 I have been 

storing images

2011-05-05 Thread alexis
Hello all, im facing an issue, ive been testing for a while different 
approaches without success.

I have a servlet that basically does

. creates an image
. store the image on disk
. returns an html img tag pointing to the stored image.

reason why the servlet doesnt returns the image directly using a response type 
image/png is the servlet is called from an ajax script, this ajax script 
renders the inner text inside a div on a jsp page on the same context that the 
server runs. ajax can only render html on divs, there's no way to return binary 
content (the image) from the servlet to the ajax script.


So, i have to create the image on the servlet (done) , store the image on the 
disk (done), and return the img tab also done. Thing is, where im able to 
store the image from the servlet im not able to read it from the jsp. 

I tried with /tmp, i tried with servletcontext.getpath to store the file on 
that dir, nothing seems to work. where should i store and reference those 
images to be written by the servlet and read by the jsp?

thanks in advance


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



Re: storing images

2011-05-05 Thread David kerber

On 5/5/2011 2:19 PM, alexis wrote:

Hello all, im facing an issue, ive been testing for a while different 
approaches without success.

I have a servlet that basically does

. creates an image
. store the image on disk
. returns an htmlimg  tag pointing to the stored image.

reason why the servlet doesnt returns the image directly using a response type 
image/png is the servlet is called from an ajax script, this ajax script 
renders the inner text inside a div on a jsp page on the same context that the 
server runs. ajax can only render html on divs, there's no way to return binary 
content (the image) from the servlet to the ajax script.


So, i have to create the image on the servlet (done) , store the image on the disk 
(done), and return theimg  tab also done. Thing is, where im able to store 
the image from the servlet im not able to read it from the jsp.

I tried with /tmp, i tried with servletcontext.getpath to store the file on 
that dir, nothing seems to work. where should i store and reference those 
images to be written by the servlet and read by the jsp?


Will java.io.tmpdir work?

D

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



Re: Re: Tomcat 6.0.32 on 64-bit 2008 server - Event 1000, Application Error

2011-05-05 Thread Terence M. Bandoian

 On 1:59 PM, fsman...@netscape.net wrote:

Andre:  I followed your idea and did the following - uninstalled the .exe install of 6.0.32, extracted the 
64-bit zip, and copied my old conf folder back on top of the one that the zip created.  Added the 
environment variable JAVA_HOME in Windows.  Ran startup.bat - Tomcat tries to start, but Windows then pops up 
a message saying Java(TM) Platform SE binary has stopped working, and I am forced to click 
close this program.

Windows still notes an Event 1000, Application Error in its logs, and I get the 
following error.  The faulting application this time is java.exe as opposed to 
tomcat6.exe (as it was previously):

Faulting application name: java.exe, version: 6.0.250.6, time stamp: 0x4da6a804
Faulting module name: jvm.dll, version: 20.0.0.11, time stamp: 0x4da6d3c2
Exception code: 0xc094
Fault offset: 0x00308eef
Faulting process id: 0xa2c
Faulting application start time: 0x01cc0b2f6534c0ca
Faulting application path: C:\Program Files\Java\jdk1.6.0_25\bin\java.exe
Faulting module path: C:\Program Files\Java\jdk1.6.0_25\jre\bin\server\jvm.dll
Report Id: a2f45f74-7722-11e0-a592-005056a10003

This error is the same (save for the version numbers and path differences) when 
using JDK 6u24 and 6u25 64-bit.  I don't know if this helps at all, but here is 
the output from startup.bat when running with 6u25:
Using CATALINA_BASE:   c:\Program Files\Apache Software Foundation\Tomcat 6.0
Using CATALINA_HOME:   c:\Program Files\Apache Software Foundation\Tomcat 6.0
Using CATALINA_TMPDIR: c:\Program Files\Apache Software Foundation\Tomcat 
6.0\temp
Using JRE_HOME:C:\Program Files\Java\jdk1.6.0_25
Using CLASSPATH:   c:\Program Files\Apache Software Foundation\Tomcat 
6.0\bin\bootstrap.jar

I'm still at a loss here.  Any ideas what this now points to?


(Terence:  Haven't gotten there yet, as it is a new install.  I might end up 
trying that at some point - what did you remove from the registry?)






A suggestion to try to pin down the problem somewhere : let's run your Tomcat, 
not as a Windows Service under the procrun daemon, but as a console 
application, directly from java.
(If its a VM under VMware, then you have an easy console access, and you don't 
care if you have to login and run tomcat in a command window, right ?)

For that, you'll have to download a full tomcat zip-file (from the same place 
where you got the .exe).  The zip file contains additional scripts allowing to start 
tomcat from the command-line.
You can unzip it in a new directory, or right over the one that's there.
(You may want to save the contents of your conf sub-directory, and restore 
them after the unzip).
Then you should be able to navigate to the bin directory and start tomcat in the 
command window (with startup.bat), without involving the tomcat6.exe.
You will probably need to create a setenv.bat first, and set JAVA_HOME in it.
I believe that all that is explained in the running.txt file that comes with 
it.

If tomcat starts and stops consistently that way, then I would say that it is a 
strong clue that procrun (tomcat6.exe) has something to do with the problem.










-Original Message-
From: André Warniera...@ice-sa.com
To: Tomcat Users Listusers@tomcat.apache.org
Sent: Wed, May 4, 2011 4:07 pm
Subject: Re: Tomcat 6.0.32 on 64-bit 2008 server - Event 1000, Application 
Error


A suggestion to try to pin down the problem somewhere : let's run your Tomcat, 
not as a Windows Service under the procrun daemon, but as a console 
application, directly from java.
(If its a VM under VMware, then you have an easy console access, and you don't 
care if you have to login and run tomcat in a command window, right ?)

For that, you'll have to download a full tomcat zip-file (from the same place 
where you got the .exe).  The zip file contains additional scripts allowing to start 
tomcat from the command-line.
You can unzip it in a new directory, or right over the one that's there.
(You may want to save the contents of your conf sub-directory, and restore 
them after the unzip).
Then you should be able to navigate to the bin directory and start tomcat in the 
command window (with startup.bat), without involving the tomcat6.exe.
You will probably need to create a setenv.bat first, and set JAVA_HOME in it.
I believe that all that is explained in the running.txt file that comes with 
it.

If tomcat starts and stops consistently that way, then I would say that it is a 
strong clue that procrun (tomcat6.exe) has something to do with the problem.


fsman...@netscape.net wrote:

Chuck:  Before I encountered this, I had Maximum memory pool at 2048 (and 
-XX:MaxPermSize=256m), as that's what the app I am looking to install wants.  It worked 
fine then, but after the stop/start, failed.  When Tomcat decided to finally come back to 
life earlier today after a power down and a cold boot, I didn't set the heap 
size/MaxPermSize at all.  When I touched the config and 

RE: storing images

2011-05-05 Thread Caldarale, Charles R
 From: alexis [mailto:alz...@gmail.com] 
 Subject: storing images

 So, i have to create the image on the servlet (done) , store 
 the image on the disk (done), and return the img tab also 
 done. Thing is, where im able to store the image from the 
 servlet im not able to read it from the jsp. 

As David suggests, java.io.tmpdir is probably a bit safer than /tmp, since you 
have some control over that and it can be isolated from other programs running 
on the same box.

The real problem is how to retrieve the images once stored.  Tomcat normally 
uses its built-in DefaultServlet to deliver static content, but that only works 
with files stored within a given webapp (and you should never write into a 
webapp's deployment directory).

You have a couple of options:

1) Create a dummy webapp whose sole purpose is to provide a location for the 
dynamically generated images.  Create some directory outside of Tomcat's file 
structure to hold the images, and place a Context element in 
conf/Catalina/[host]/[dummyAppName].xml with a docBase attribute (and nothing 
else) that points to that directory.  The img tags should refer to 
[dummyAppName] as the URL for retrieving the images.

 - or -

2) Create a subclass of DefaultServlet that knows where you put the images, and 
direct image references to it via the appropriate servlet-mapping in your 
WEB-INF/web.xml file.  Not sure which methods of the DefaultServlet you'll have 
to override.

 - 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 6.0.32 on 64-bit 2008 server - Event 1000, Application Error

2011-05-05 Thread Caldarale, Charles R
 From: fsman...@netscape.net [mailto:fsman...@netscape.net] 
 Subject: Re: Tomcat 6.0.32 on 64-bit 2008 server - Event 1000, Application 
 Error

 Faulting application name: java.exe, version: 6.0.250.6, time stamp: 
 0x4da6a804
 Faulting module name: jvm.dll, version: 20.0.0.11, time stamp: 0x4da6d3c2
 Exception code: 0xc094
 Fault offset: 0x00308eef

So you're getting a divide fault very, very early in JVM initialization.  This 
could be a corrupted JVM installation, or perhaps some side effect of the 
strange clock you appear to have on this W2K8 system.

Can you run java from the command line?  Even if you can, it would probably be 
worth it to remove the existing JVM, and reinstall it.  (Switching to a 32-bit 
JVM is an option, but probably not a viable one, given your desired heap size.)

Have you rebooted the sever?

 - Chuck


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



RE: Slow SSL connections after Tomcat 5 to 7 migration

2011-05-05 Thread Caldarale, Charles R
 From: Michał Kapituła [mailto:michal.kapit...@comarch.pl] 
 Subject: Re: Slow SSL connections after Tomcat 5 to 7 migration

 Really I don't know what to search for there (maybe you 
 could give me some clues?).

Look to see what the threads are doing.  Some will be waiting on monitors, some 
might actually be doing work, some might be stuck on I/O requests.  You have to 
look at each call stack to see (a laborious process, unfortunately).  It's 
often useful to take several thread dumps a few seconds apart and see what's 
changing and what isn't.

 Could you explain why reading from /dev/random possibly 
 could be the case here?

Because /dev/random (unlike /dev/urandom) can wait an arbitrarily long time to 
gather enough randomness before returning data.  This is especially problematic 
on virtual machines running as servers, which have very little going on to 
generate entropy.

 - Chuck


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



Re: Tomcat 6.0.32 on 64-bit 2008 server - Event 1000, Application Error

2011-05-05 Thread fsmaniac
After some waiting with Tomcat still down, I tried startup.bat again, and so 
far I'm not getting any errors.  I've been starting and stopping Tomcat with 
the .bat scripts, and can't seem to get it to break.  Time has been my enemy 
the past few days with this, so I'm expecting it to break at some point.  I'll 
keep an eye on it for now and see what happens, and will report back.

Andre and others:  Thank you for all your help so far - hopefully some solid 
information will appear as to why this is happening...

 


So far thus, it seems to point to either a problem in the JVM itself, or in 
something which you particular setup is making the JVM do. 
 
So let's try to change the JVM. 
It should be possible, even under a 64-bit Windows, to install a 32-bit JVM, no 
? 
(and Tomcat will run the same as long as you do not use exotic Heap size 
values). 
Install it at a different location than your current one, change the JAVA_HOME 
or JRE_HOME in your setenv.bat to point to this new JVM, and re-run the same 
test. 

 

 


 

 

-Original Message-
From: André Warnier a...@ice-sa.com
To: Tomcat Users List users@tomcat.apache.org
Sent: Thu, May 5, 2011 11:50 am
Subject: Re: Tomcat 6.0.32 on 64-bit 2008 server - Event 1000, Application 
Error


fsman...@netscape.net wrote: 
 Andre:  I followed your idea and did the following - uninstalled the .exe 
 install of 6.0.32, extracted the 64-bit zip, and copied my old conf folder 
 back on top of the one that the zip created.  Added the environment variable 
 JAVA_HOME in Windows.  Ran startup.bat - Tomcat tries to start, but Windows 
 then pops up a message saying Java(TM) Platform SE binary has stopped 
 working, and I am forced to click close this program. 
  Windows still notes an Event 1000, Application Error in its logs, and I 
  get the following error.  The faulting application this time is java.exe 
  as opposed to tomcat6.exe (as it was previously): 
  Faulting application name: java.exe, version: 6.0.250.6, time stamp: 
  0x4da6a804 
 Faulting module name: jvm.dll, version: 20.0.0.11, time stamp: 0x4da6d3c2 
 Exception code: 0xc094 
 Fault offset: 0x00308eef 
 Faulting process id: 0xa2c 
 Faulting application start time: 0x01cc0b2f6534c0ca 
 Faulting application path: C:\Program Files\Java\jdk1.6.0_25\bin\java.exe 
 Faulting module path: C:\Program 
 Files\Java\jdk1.6.0_25\jre\bin\server\jvm.dll 
 Report Id: a2f45f74-7722-11e0-a592-005056a10003 
  This error is the same (save for the version numbers and path differences) 
  when using JDK 6u24 and 6u25 64-bit.  I don't know if this helps at all, 
  but here is the output from startup.bat when running with 6u25: 
 Using CATALINA_BASE:   c:\Program Files\Apache Software Foundation\Tomcat 
 6.0 
 Using CATALINA_HOME:   c:\Program Files\Apache Software Foundation\Tomcat 
 6.0 
 Using CATALINA_TMPDIR: c:\Program Files\Apache Software Foundation\Tomcat 
 6.0\temp 
 Using JRE_HOME:C:\Program Files\Java\jdk1.6.0_25 
 Using CLASSPATH:   c:\Program Files\Apache Software Foundation\Tomcat 
 6.0\bin\bootstrap.jar 
  I'm still at a loss here.  Any ideas what this now points to? 
 
Not really. But it definitely excludes procrun/tomcat6.exe as a source of the 
problem. 
I also believe that it is unlikely that the same exact RAM addresses are being 
used in your various tests, so this would also tend to reduce the possibility 
of a hardware-related issue. 
 
So far thus, it seems to point to either a problem in the JVM itself, or in 
something which you particular setup is making the JVM do. 
 
So let's try to change the JVM. 
It should be possible, even under a 64-bit Windows, to install a 32-bit JVM, no 
? 
(and Tomcat will run the same as long as you do not use exotic Heap size 
values). 
Install it at a different location than your current one, change the JAVA_HOME 
or JRE_HOME in your setenv.bat to point to this new JVM, and re-run the same 
test. 
 
- 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org 
For additional commands, e-mail: users-h...@tomcat.apache.org 
 

 


Preventing or recovering from SocketException: Interrupted system call

2011-05-05 Thread Joel Klein


I'm using Tomcat 5.5 to host a webapp that we deploy on Windows, Linux, 
and OS X.  The webapp includes a Java Native Library.


Right now we're seeing a scenario only on Mac OS X where Tomcat shuts 
down with this message:


SEVERE: StandardServer.await: accept:
java.net.SocketException: Interrupted system call
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:402)
at java.net.ServerSocket.implAccept(ServerSocket.java:450)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at 
org.apache.catalina.core.StandardServer.await(StandardServer.java:379)

The user scenario that reproduces this is one where we're pretty sure 
system signals are being fired, which could account for why the system 
call is interrupted.


This has been seen with Java 1.5 on OS X 10.5.8 and Java 1.6.0_24 on OS 
X 10.6.7.


My question to the list is whether it will work to modify 
StandardServer.java to ignore the exception and continue on.  My 
understanding is the interrupted system call isn't actually fatal.


Are there other ideas for either preventing or recovering from this 
situation?


--
Joel Klein
Kernel Developer, Wolfram Research, Inc.

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



Re: Tomcat 6 Struts 1.3

2011-05-05 Thread cpanon
Hi Martin
What is so odd is it is all loading just fine as witnessed by the fact that the 
default case works.  Either the frameset way, the tiles way or the most 
primitive jsp:include, all show the default client view, cache the applet and 
work quite well.  The problem is when I want to change the client view remove 
the form bean, make the change for the jsp desired, add the form bean to the 
session and forward, it fails.





From: Martin Gainty mgai...@hotmail.com
To: Tomcat Users List users@tomcat.apache.org
Sent: Wed, May 4, 2011 8:38:36 PM
Subject: RE: Tomcat 6 Struts 1.3


tiles-defs.xml is loaded by struts-config.xml
struts-config.xml is loaded by WEB-INF/web.xml
web.xml is loaded by the container at webapp initialisation

except when attribute reloadable=true for Context 
Set to true if you want Catalina to monitor classes in
/WEB-INF/classes/ and /WEB-INF/lib for
changes, and automatically reload the web application if a change
is detected.  This feature is very useful during application
development, but it requires significant runtime overhead and is
not recommended for use on deployed production applications.  That's
why the default setting for this attribute is false.  You
can use the Manager web
application, however, to trigger reloads of deployed applications
on demand.

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

Martin 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

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




 Date: Wed, 4 May 2011 11:47:57 -0700
 From: cpa...@yahoo.com
 Subject: Re: Tomcat 6 Struts 1.3
 To: users@tomcat.apache.org
 
 Hi  Chris
 What I find so inscrutable is I know I am hitting the second state with the 
 different jsp for the report tile.  I know that b/c I have a breakpoint set 
 on 

 the return mapping.findForward(posSO);  What I expect is TC or Jasper to 
 detect the tiles-defs is different than the one presenting to this session 
 and 

 process it with the current session attributes, render it and insert it into 
the 

 page in the report tile.  I have to do this b/c I need to keep my applet 
running 

 and not shut down.  It is something systemic for sure.  I know tiles works 
 for 

 thousands of other developers.  How can it work for me perfectly the first 
 time 

 and fail and successive time with a different state?  Am I not correct in my 
 expectation of Tiles processing and the fact that it works for others?  Any 
 further ideas?  
 
 
 
 
 
 
 From: Christopher Schultz ch...@christopherschultz.net
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Tue, May 3, 2011 4:08:50 PM
 Subject: Re: Tomcat 6 Struts 1.3
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 cpanon,
 
 On 5/2/2011 4:04 PM, cpanon wrote:
  Thank you for your attention.
 
 No problem.
 
  What is odd and almost answers all the questions, leaving the BIG
  one, is that all three techniques work the first time.
 
 Hah... that actually raises more questions than answers IMO.
 
  That means that all the resolving, mapping and substitution work.
  The proxy names are all resolved in the framset(not shown), tiles and
  jsp:include.  In the second state what I expected is the recompiling
  of the ccAuth15_soDetail_fragment.jsp, caching the other areas and
  presenting the different view to the client.  By nothing I mean
  that the original view is shown even thought I know, via setting a
  breakpoint, I hit the second state but do now show the proper jsp.
 
 Why would the JSP be recompiled? You aren't changing the code, so it
 should just be re-running the already-compiled code. Maybe you're not
 explaining it well enough for me to understand.
 
 Are you sure you don't somehow hit the first state again somehow?
 
  I have read this about the attribute antiResourceLocking, however
  that was in 5.5 and I assume it is fully fixed or know(no google cit
  it), but 6.0.30.  Does this help with any further 

RE: storing images

2011-05-05 Thread Leo Donahue - PLANDEVX
-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Subject: RE: storing images

 From: alexis [mailto:alz...@gmail.com]
 Subject: storing images


You have a couple of options:

1) Create a dummy webapp whose sole purpose is to provide a location for
the dynamically generated images.  Create some directory outside of
Tomcat's file structure to hold the images, and place a Context
element in conf/Catalina/[host]/[dummyAppName].xml with a docBase
attribute (and nothing else) that points to that directory.  The img
tags should refer to [dummyAppName] as the URL for retrieving the
images.

 - Chuck


That is exactly what we did for our web app that generates images.
http://planning.maricopa.gov/agsoutput/_ags_mapad578dbb026f4429aa755f471b259bd3.jpg

our 2011 images were not so great... regarding the mosaic.


Leo

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



Re: storing images

2011-05-05 Thread alexis
perfect, ill check this.

Thanks for the answer.


On May 5, 2011, at 5:42 PM, Leo Donahue - PLANDEVX wrote:

 -Original Message-
 From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
 Subject: RE: storing images
 
 From: alexis [mailto:alz...@gmail.com]
 Subject: storing images
 
 
 You have a couple of options:
 
 1) Create a dummy webapp whose sole purpose is to provide a location for
 the dynamically generated images.  Create some directory outside of
 Tomcat's file structure to hold the images, and place a Context
 element in conf/Catalina/[host]/[dummyAppName].xml with a docBase
 attribute (and nothing else) that points to that directory.  The img
 tags should refer to [dummyAppName] as the URL for retrieving the
 images.
 
 - Chuck
 
 
 That is exactly what we did for our web app that generates images.
 http://planning.maricopa.gov/agsoutput/_ags_mapad578dbb026f4429aa755f471b259bd3.jpg
 
 our 2011 images were not so great... regarding the mosaic.
 
 
 Leo
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


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



Re: modjk apache response questions

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

Harsimranjit,

On 5/5/2011 2:14 PM, Harsimranjit singh Kler wrote:
 any other input required ?

To me, it just looks like higher load=slower response time. Sounds like
you have maxed-out your hardware.

A 20x load increase with only a 2x response time increase seems like
reasonable scaling to me.

What are we looking for, here?

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

iEYEARECAAYFAk3DObgACgkQ9CaO5/Lv0PAqywCguWngSeBts8BKHKEKNmAnOcEU
/7MAoIaQ+n4z8Y6L8CBCQQhDeLfCeZBL
=miDt
-END PGP SIGNATURE-

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



Re: storing images

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

Alexis,

On 5/5/2011 2:19 PM, alexis wrote:
 I have a servlet that basically does
 
 . creates an image
 . store the image on disk
 . returns an html img tag pointing to the stored image.
 
 there's no way to return binary content (the image) from the servlet to the 
 ajax script.

What about JSON? Not that I think it's a terribly good idea, but it's
just a thought.

Another thought is possibly using a database, relational or otherwise,
rather than the file system. Of course, you'd have to write your own
servlet to access the image from the database instead of the filesystem,
so I'm not sure it buys you much over the other solutions presented already.

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

iEYEARECAAYFAk3DOjkACgkQ9CaO5/Lv0PDzmgCeK2tN3eH+aVY6ElmFiKRe+cj7
WZcAn0Yj9qSklAynFdBeyRsL/wl0TpWD
=41U2
-END PGP SIGNATURE-

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



Re: storing images

2011-05-05 Thread alexis
What i did (im testing and profiling it) is.

As the images are around 10/12 and each image has around 30 to 35k.

Im storing the images as servletcontext attribute.

So calling to the servlet with ?code=1 builds and stores image1 on servlet 
context. And returns html with img src=servlet?get=1

So ajax sends that to the jsp that calls servlet?get and that returns the image.

It's working now, what im profiling is to verify no matter how many users are 
requesting images, image1 is the same for every user and if one user builds up 
the image again, all others gets the new one.

As those images are stored on servletcontext, all are shared among the webapp 
so images are not duplicated or triplicated or n-cated.

I dont know if it's a good solution, but up to know it's working and really 
fast.


Regards


Enviado desde blackberry

-Original Message-
From: Christopher Schultz ch...@christopherschultz.net
Date: Thu, 05 May 2011 20:00:57 
To: Tomcat Users Listusers@tomcat.apache.org
Reply-To: Tomcat Users List users@tomcat.apache.org
Subject: Re: storing images

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Alexis,

On 5/5/2011 2:19 PM, alexis wrote:
 I have a servlet that basically does
 
 . creates an image
 . store the image on disk
 . returns an html img tag pointing to the stored image.
 
 there's no way to return binary content (the image) from the servlet to the 
 ajax script.

What about JSON? Not that I think it's a terribly good idea, but it's
just a thought.

Another thought is possibly using a database, relational or otherwise,
rather than the file system. Of course, you'd have to write your own
servlet to access the image from the database instead of the filesystem,
so I'm not sure it buys you much over the other solutions presented already.

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

iEYEARECAAYFAk3DOjkACgkQ9CaO5/Lv0PDzmgCeK2tN3eH+aVY6ElmFiKRe+cj7
WZcAn0Yj9qSklAynFdBeyRsL/wl0TpWD
=41U2
-END PGP SIGNATURE-

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



Re: Tomcat 6 crash, no log, no hs_err_pid file

2011-05-05 Thread Jakub Królikowski
On Thu, May 5, 2011 at 3:03 AM, Caldarale, Charles R
chuck.caldar...@unisys.com wrote:
 From: Jakub Królikowski [mailto:ja...@pakamera.com.pl]
 Subject: Tomcat 6 crash, no log, no hs_err_pid file

 sometimes, even once a day, Tomcat stops suddenly. There is no java
 process anymore, there is no errors in catalina.out log file,
 and, what is the most confusing, there is no hs_err_pid*.log file
 anywhere, or I cannot find it.

 Classic symptoms of the Linux OOM killer.  Are you sure your system has 
 enough RAM and swap space for *all* of your active processes?  There may be a 
 kernel-generated log entry buried in some obscure location that describes the 
 event.

 Did you look in /tmp for the hs_err_pid file?  The JVM will write it there if 
 it can't write to the current directory (or at least it used to).


Yes. There is no any hs_err_pid in /tmp unfortunately...




  - 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: Tomcat 6 crash, no log, no hs_err_pid file

2011-05-05 Thread Jakub Królikowski
On Thu, May 5, 2011 at 8:54 AM, Mikolaj Rydzewski m...@ceti.pl wrote:
 On Thu, 5 May 2011 02:19:59 +0200, Jakub Królikowski wrote:

 Before upgrade, if jvm crashed, the hs_err_pid*.log file was always in
 root home directory.

 My $0.02: do not run tomcat as root.


Why?




 You can try to log GC output to diagnose OOM errors.

 --
 Mikolaj Rydzewski m...@ceti.pl

 -
 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 crash, no log, no hs_err_pid file

2011-05-05 Thread Jakub Królikowski
On Thu, May 5, 2011 at 3:03 PM, Thomas Freitag tho...@freit.ag wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hi Jakub,

 On 05/05/2011 02:19 AM, Jakub Królikowski wrote:
 I made an Tomcat and JVM upgrade few weeks ago (to Tomcat 6.0.32 and
 jdk 1.6.0.24), and since that time I can notice a very strange
 behavior:
 sometimes, even once a day, Tomcat stops suddenly. There is no java
 process anymore, there is no errors in catalina.out log file,
 and, what is the most confusing, there is no hs_err_pid*.log file
 anywhere, or I cannot find it.
 Before upgrade, if jvm crashed, the hs_err_pid*.log file was always in
 root home directory.

 I'm not really sure if the hotspot error file is placed in the home
 directory or the current working dir. Two java options might help you:
 1) -XX:ErrorFile=path/hs_err_pid%p.log (I usually place the file in
 the tomcat log directory ($CATALINA_BASE/logs).
 2) -XX:OnError=executable (You can run any command you like).

Thanks, I will observe logs for a while now!



 Your milage may vary, if the JVM is killed with SIGKILL, no files will
 appear.

 This is my enviroment, takes with JMX:

 VM arguments:
 -Djava.util.logging.config.file=/usr/lib/tomcat/conf/logging.properties
 -Xmx3000m -Xms1500m -Xmn700m -XX:PermSize=768m -XX:MaxPermSize=1000m
 -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode
 -XX:+CMSIncrementalPacing -XX:CMSIncrementalDutyCycleMin=0
 -XX:CMSIncrementalDutyCycle=10 -XX:+UseParNewGC
 -XX:+CMSClassUnloadingEnabled -XX:MaxGCPauseMillis=250
 -XX:MaxGCMinorPauseMillis=100
 -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false
 -Dcom.sun.management.jmxremote
 -Dcom.sun.management.jmxremote.authenticate=true
 -Dcom.sun.management.jmxremote.password.file=/usr/lib/tomcat/conf/jmxremote.password
 -Dcom.sun.management.jmxremote.access.file=/usr/lib/tomcat/conf/jmxremote.access
 -Dcom.sun.management.jmxremote.ssl=false
 -Djava.rmi.server.hostname=xxx.xxx.xxx.xxx
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 -Djava.endorsed.dirs=/usr/lib/tomcat/endorsed
 -Dcatalina.base=/usr/lib/tomcat -Dcatalina.home=/usr/lib/tomcat
 -Djava.io.tmpdir=/usr/lib/tomcat/temp

 Looks okay for me, just curious: Do you really need that large perm gen?


You mean these params: -XX:PermSize=768m -XX:MaxPermSize=1000m ?
Well, my app is under intensive development now and I need to reload
context quite often.
I know it's a big numbers, but without that after few reloads I'm
getting a memory exception.




 Regards,
 - --
 Thomas Freitag
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (GNU/Linux)

 iEYEARECAAYFAk3CoAsACgkQGE5pHr3PKuVowACfdMOwEeqq7Hyjta6ZmJZ74z7j
 9LwAnjXR4vJ69gqC7cxxn5v4whEPV8iP
 =W1xu
 -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: storing images

2011-05-05 Thread Martin Gainty

achieved if you correspond the userid-imageid parameter with the acquired image 
identifier e.g.
?code=1.1 puts user1 image 1 on servlet and returns img src=servlet?get=1.1
 ?code=1.2 puts user1 image 2 on servlet and returns img src=servlet?get=1.2
 ?code=2.1 puts user2 image 1 on servlet and returns img src=servlet?get=2.1

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




 Subject: Re: storing images
 To: users@tomcat.apache.org
 From: alz...@gmail.com
 Date: Fri, 6 May 2011 00:19:06 +
 
 What i did (im testing and profiling it) is.
 
 As the images are around 10/12 and each image has around 30 to 35k.
 
 Im storing the images as servletcontext attribute.
 
 So calling to the servlet with ?code=1 builds and stores image1 on servlet 
 context. And returns html with 
img src=servlet?get=1
 
 So ajax sends that to the jsp that calls servlet?get and that returns the 
 image.
 
 It's working now, what im profiling is to verify no matter how many users are 
 requesting images, image1 is the same for every user and if one user builds 
 up the image again, all others gets the new one.
 
 As those images are stored on servletcontext, all are shared among the webapp 
 so images are not duplicated or triplicated or n-cated.
 
 I dont know if it's a good solution, but up to know it's working and really 
 fast.
 
 
 Regards
 
 
 Enviado desde blackberry
 
 -Original Message-
 From: Christopher Schultz ch...@christopherschultz.net
 Date: Thu, 05 May 2011 20:00:57 
 To: Tomcat Users Listusers@tomcat.apache.org
 Reply-To: Tomcat Users List users@tomcat.apache.org
 Subject: Re: storing images
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Alexis,
 
 On 5/5/2011 2:19 PM, alexis wrote:
  I have a servlet that basically does
  
  . creates an image
  . store the image on disk
  . returns an html img tag pointing to the stored image.
  
  there's no way to return binary content (the image) from the servlet to the 
  ajax script.
 
 What about JSON? Not that I think it's a terribly good idea, but it's
 just a thought.
 
 Another thought is possibly using a database, relational or otherwise,
 rather than the file system. Of course, you'd have to write your own
 servlet to access the image from the database instead of the filesystem,
 so I'm not sure it buys you much over the other solutions presented already.
 
 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
 iEYEARECAAYFAk3DOjkACgkQ9CaO5/Lv0PDzmgCeK2tN3eH+aVY6ElmFiKRe+cj7
 WZcAn0Yj9qSklAynFdBeyRsL/wl0TpWD
 =41U2
 -END PGP SIGNATURE-
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
  

Re: storing images

2011-05-05 Thread alexis
Yes for the ajax.

If im getting it well, i have no need to tie the user with an image instance. 
image1 is the same for every users.

Isnt servletcontext shared within the webapp? Meaning that every session access 
the same servletcontext?

Regards

Enviado desde blackberry

-Original Message-
From: Martin Gainty mgai...@hotmail.com
Date: Thu, 5 May 2011 21:26:12 
To: Tomcat Users Listusers@tomcat.apache.org
Reply-To: Tomcat Users List users@tomcat.apache.org
Subject: RE: storing images


achieved if you correspond the userid-imageid parameter with the acquired image 
identifier e.g.
?code=1.1 puts user1 image 1 on servlet and returns img src=servlet?get=1.1
 ?code=1.2 puts user1 image 2 on servlet and returns img src=servlet?get=1.2
 ?code=2.1 puts user2 image 1 on servlet and returns img src=servlet?get=2.1

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




 Subject: Re: storing images
 To: users@tomcat.apache.org
 From: alz...@gmail.com
 Date: Fri, 6 May 2011 00:19:06 +
 
 What i did (im testing and profiling it) is.
 
 As the images are around 10/12 and each image has around 30 to 35k.
 
 Im storing the images as servletcontext attribute.
 
 So calling to the servlet with ?code=1 builds and stores image1 on servlet 
 context. And returns html with 
img src=servlet?get=1
 
 So ajax sends that to the jsp that calls servlet?get and that returns the 
 image.
 
 It's working now, what im profiling is to verify no matter how many users are 
 requesting images, image1 is the same for every user and if one user builds 
 up the image again, all others gets the new one.
 
 As those images are stored on servletcontext, all are shared among the webapp 
 so images are not duplicated or triplicated or n-cated.
 
 I dont know if it's a good solution, but up to know it's working and really 
 fast.
 
 
 Regards
 
 
 Enviado desde blackberry
 
 -Original Message-
 From: Christopher Schultz ch...@christopherschultz.net
 Date: Thu, 05 May 2011 20:00:57 
 To: Tomcat Users Listusers@tomcat.apache.org
 Reply-To: Tomcat Users List users@tomcat.apache.org
 Subject: Re: storing images
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Alexis,
 
 On 5/5/2011 2:19 PM, alexis wrote:
  I have a servlet that basically does
  
  . creates an image
  . store the image on disk
  . returns an html img tag pointing to the stored image.
  
  there's no way to return binary content (the image) from the servlet to the 
  ajax script.
 
 What about JSON? Not that I think it's a terribly good idea, but it's
 just a thought.
 
 Another thought is possibly using a database, relational or otherwise,
 rather than the file system. Of course, you'd have to write your own
 servlet to access the image from the database instead of the filesystem,
 so I'm not sure it buys you much over the other solutions presented already.
 
 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
 iEYEARECAAYFAk3DOjkACgkQ9CaO5/Lv0PDzmgCeK2tN3eH+aVY6ElmFiKRe+cj7
 WZcAn0Yj9qSklAynFdBeyRsL/wl0TpWD
 =41U2
 -END PGP SIGNATURE-
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
  


RE: storing images

2011-05-05 Thread Martin Gainty

yes session variables would be specific to user's session
servlet-context and params are available to any requestor who accesses the 
servlet

Martin Gainty 
__ 
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und 
Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

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




 Subject: Re: storing images
 To: users@tomcat.apache.org
 From: alz...@gmail.com
 Date: Fri, 6 May 2011 01:32:40 +
 
 Yes for the ajax.
 
 If im getting it well, i have no need to tie the user with an image instance. 
 image1 is the same for every users.
 
 Isnt servletcontext shared within the webapp? Meaning that every session 
 access the same servletcontext?
 
 Regards
 
 Enviado desde blackberry
 
 -Original Message-
 From: Martin Gainty mgai...@hotmail.com
 Date: Thu, 5 May 2011 21:26:12 
 To: Tomcat Users Listusers@tomcat.apache.org
 Reply-To: Tomcat Users List users@tomcat.apache.org
 Subject: RE: storing images
 
 
 achieved if you correspond the userid-imageid parameter with the acquired 
 image identifier e.g.
 ?code=1.1 puts user1 image 1 on servlet and returns img src=servlet?get=1.1
  ?code=1.2 puts user1 image 2 on servlet and returns img src=servlet?get=1.2
  ?code=2.1 puts user2 image 1 on servlet and returns img src=servlet?get=2.1
 
 are you using XMLHTTPRequest for ajax ?
 Martin Gainty 
 __ 
 Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
  Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene 
 Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte 
 Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht 
 dient lediglich dem Austausch von Informationen und entfaltet keine 
 rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von 
 E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
 Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
 destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
 l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci 
 est interdite. Ce message sert à l'information seulement et n'aura pas 
 n'importe quel effet légalement obligatoire. Étant donné que les email 
 peuvent facilement être sujets à la manipulation, nous ne pouvons accepter 
 aucune responsabilité pour le contenu fourni.
 
 
 
 
  Subject: Re: storing images
  To: users@tomcat.apache.org
  From: alz...@gmail.com
  Date: Fri, 6 May 2011 00:19:06 +
  
  What i did (im testing and profiling it) is.
  
  As the images are around 10/12 and each image has around 30 to 35k.
  
  Im storing the images as servletcontext attribute.
  
  So calling to the servlet with ?code=1 builds and stores image1 on servlet 
  context. And returns html with 
 img src=servlet?get=1
  
  So ajax sends that to the jsp that calls servlet?get and that returns the 
  image.
  
  It's working now, what im profiling is to verify no matter how many users 
  are requesting images, image1 is the same for every user and if one user 
  builds up the image again, all others gets the new one.
  
  As those images are stored on servletcontext, all are shared among the 
  webapp so images are not duplicated or triplicated or n-cated.
  
  I dont know if it's a good solution, but up to know it's working and really 
  fast.
  
  
  Regards
  
  
  Enviado desde blackberry
  
  -Original Message-
  From: Christopher Schultz ch...@christopherschultz.net
  Date: Thu, 05 May 2011 20:00:57 
  To: Tomcat Users Listusers@tomcat.apache.org
  Reply-To: Tomcat Users List users@tomcat.apache.org
  Subject: Re: 

Re: Tomcat 6 crash, no log, no hs_err_pid file

2011-05-05 Thread Thomas Freitag
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Jakub,

On 05/06/2011 02:38 AM, Jakub Królikowski wrote:
 VM arguments:
 -Djava.util.logging.config.file=/usr/lib/tomcat/conf/logging.properties
 -Xmx3000m -Xms1500m -Xmn700m -XX:PermSize=768m -XX:MaxPermSize=1000m
 -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode
 -XX:+CMSIncrementalPacing -XX:CMSIncrementalDutyCycleMin=0
 -XX:CMSIncrementalDutyCycle=10 -XX:+UseParNewGC
 -XX:+CMSClassUnloadingEnabled -XX:MaxGCPauseMillis=250
 -XX:MaxGCMinorPauseMillis=100
 -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false
 -Dcom.sun.management.jmxremote
 -Dcom.sun.management.jmxremote.authenticate=true
 -Dcom.sun.management.jmxremote.password.file=/usr/lib/tomcat/conf/jmxremote.password
 -Dcom.sun.management.jmxremote.access.file=/usr/lib/tomcat/conf/jmxremote.access
 -Dcom.sun.management.jmxremote.ssl=false
 -Djava.rmi.server.hostname=xxx.xxx.xxx.xxx
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 -Djava.endorsed.dirs=/usr/lib/tomcat/endorsed
 -Dcatalina.base=/usr/lib/tomcat -Dcatalina.home=/usr/lib/tomcat
 -Djava.io.tmpdir=/usr/lib/tomcat/temp

 Looks okay for me, just curious: Do you really need that large perm gen?

You mean these params: -XX:PermSize=768m -XX:MaxPermSize=1000m ?
Well, my app is under intensive development now and I need to reload
context quite often.
I know it's a big numbers, but without that after few reloads I'm
getting a memory exception.

Yes, that is a good reason, consider using a current version of Tomcat
(6.0.32 or 7.0.12). They will give you hints where memory leaks are, so
you can fix them.

Regards,
- -- 
Thomas Freitag
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk3De7sACgkQGE5pHr3PKuWZTgCdHaIp31WBTbWlDIMWa8vuJ2eH
CWMAnR8sYlRwLKxHtcnFXOgmmbA1Xj21
=ak0c
-END PGP SIGNATURE-

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