Deployment specific configuration - best practice

2009-11-16 Thread Rainer Frey
Hi,

I'm preparing a sample webapp for this list to illustrate a problem that I 
have with JDBC driver loading in a servlet. Anyone who'd try this would need 
to edit the jdbc connection data to test with a local DB. What is the easiest 
method for you to configure a webapp that I'll provide?

 * settings as init params in web.xml
 * settings in /META-INF/context.xml (both ways you'd need to upack, edit, 
repack and deploy)
 * a separate context file along with the war file
 * any other idea?

Rainer

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



Re: servlet exception when processing TLD

2009-11-16 Thread André Warnier

MilleBii wrote:
Not sure how to fully disable security 

...
Under Ubuntu, there is probably a file /etc/default/tomcat, which is 
invoked by the tomcat startup script in /etc/init.d.

In the file /etc/default/tomcat, there should be a line like
TOMCAT_SECURITY=YES
Setting it to NO will diable the security manager.

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



Re: servlet exception when processing TLD

2009-11-16 Thread Konstantin Kolinko
2009/11/16 MilleBii mille...@gmail.com:
 Not sure how to fully disable security but I added the following which I
 understand should grand all rights to classes under my webapp:

 1.  grant codeBase file:${catalina.home}/webapps/nutch-1.0/- {
  permission java.security.AllPermission;
  }; in  conf/catalina.policy

It should be
file:${catalina.base}/webapps/nutch-1.0/- {


 2. /etc/init.d/tomcat6 restart

 3. start webapp  by admin

 Still the same error...

 2009/11/15 Pid p...@pidster.com

 On 15/11/2009 19:33, MilleBii wrote:

 Nothing... is there a way to get more details actually ?

 Did another trial I installed Tomcat 6 and deployed the same app, still a
 problem but I get another issue probably more meaning full


 You're running Tomcat with the Security Manager enabled.

 Presumably the Ubuntu package automatically configures the Security Manager
 in it's startup config.  You should examine those files for more clues as to
 how you can disable it.

 If you can disable the Security Manager temporarily, see if the application
 starts up.  If not, send more error log info showing what happened and we'll
 try to assist.

 If it does, re-enable it and you'll have to to figure out what the
 application is trying to do, then add appropriate permissions in
 tomcat/conf/catalina.policy.

 There's more information about the SM here:

  http://tomcat.apache.org/tomcat-6.0-doc/security-manager-howto.html




 p


  SEVERE: Exception  sending initialized context event  (context
 initialized)

 at listener class instance  (listener)
 org.apache.nutch.searcher.NutchBean$NutchBeanConstructor
 java.lang.RuntimeException: java.security.AccessControlException: access
 denied (java.lang.reflect.ReflectPermission suppressAccessChecks)
     at

 org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:81)
     at
 org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1366)
     at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:56)
     at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1379)
     at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:215)
     at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:120)
     at org.apache.nutch.searcher.NutchBean.init(NutchBean.java:89)
     at org.apache.nutch.searcher.NutchBean.init(NutchBean.java:77)
     at

 org.apache.nutch.searcher.NutchBean$NutchBeanConstructor.contextInitialized(NutchBean.java:425)
     at

 org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
     at
 org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)


 So I'm stuck still.

 2009/11/15 Caldarale, Charles Rchuck.caldar...@unisys.com

  From: MilleBii [mailto:mille...@gmail.com]
 Subject: servlet exception when processing TLD

 SEVERE: Error reading tld listeners javax.servlet.ServletException:

 Exception when processing TLD at the ressource path
 /WEB-INF/taglibs-i18n.tld dans le contexte /nutch-1.0
 javax.servlet.ServletException: Exception when processing TLD at the
 ressource path  /WEB-INF/taglibs-i18n.tld dans le contexte /nutch-1.0
         at
 org.apache.catalina.startup.TldConfig.tldScanTld(TldConfig.java:555)


 The above exception is a wrapper for the underlying cause.  Is there
 another, nested exception displayed in the logs?

  - 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




 --
 -MilleBii-


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



Re: Deployment specific configuration - best practice

2009-11-16 Thread Leon Rosenberg
On Mon, Nov 16, 2009 at 9:26 AM, Rainer Frey rainer.f...@inxmail.de wrote:
 Hi,

 I'm preparing a sample webapp for this list to illustrate a problem that I
 have with JDBC driver loading in a servlet. Anyone who'd try this would need
 to edit the jdbc connection data to test with a local DB. What is the easiest
 method for you to configure a webapp that I'll provide?

  * settings as init params in web.xml
  * settings in /META-INF/context.xml (both ways you'd need to upack, edit,
 repack and deploy)
  * a separate context file along with the war file
  * any other idea?

It may be an overkill for this concrete scenario, but take a look at
ConfigureMe configuration framework:
https://configureme.dev.java.net in particular:
http://infra.anotheria.net/confluence/display/CONFIGUREME/GettingStarted

regards
Leon


 Rainer

 -
 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: Deployment specific configuration - best practice

2009-11-16 Thread Ziggy
Why do you need to provide a sample webapp? Usually if you post your
database configuration, the exception that you are getting and the code
where the exception is raised people should be able to figure out why there
is a problem. :)




On Mon, Nov 16, 2009 at 11:28 AM, Leon Rosenberg 
rosenberg.l...@googlemail.com wrote:

 On Mon, Nov 16, 2009 at 9:26 AM, Rainer Frey rainer.f...@inxmail.de
 wrote:
  Hi,
 
  I'm preparing a sample webapp for this list to illustrate a problem that
 I
  have with JDBC driver loading in a servlet. Anyone who'd try this would
 need
  to edit the jdbc connection data to test with a local DB. What is the
 easiest
  method for you to configure a webapp that I'll provide?
 
   * settings as init params in web.xml
   * settings in /META-INF/context.xml (both ways you'd need to upack,
 edit,
  repack and deploy)
   * a separate context file along with the war file
   * any other idea?

 It may be an overkill for this concrete scenario, but take a look at
 ConfigureMe configuration framework:
 https://configureme.dev.java.net in particular:
 http://infra.anotheria.net/confluence/display/CONFIGUREME/GettingStarted

 regards
 Leon

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




The server encountered an internal error () that prevented it from fulfilling this request

2009-11-16 Thread Bala_ji

The server encountered an internal error () that prevented it from fulfilling
this request message in IWSS server.  Please help
http://old.nabble.com/file/p26370991/iwss%2Bapache%2Berror.jpg 
-- 
View this message in context: 
http://old.nabble.com/The-server-encountered-an-internal-error-%28%29-that-prevented-it-from-fulfilling-this-request-tp26370991p26370991.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: Deployment of war file into a common locatiion

2009-11-16 Thread Pid

On 16/11/2009 07:47, ajaypal wrote:


Hi ,
My name is Ajay and I have one web application which my whole team wants to
access . My problem is that all my team is scattered on different places (at
onsite and offshore) on different networks , So if I deploy that web
application on my system , all team members cant access it


Well, if it's on your computer, how could they?


. Also I cant ask each and every member of my team to deply that application
on there own systems.



Can anyone suggest me that is there any servlet container (i e tomcat or be
it any servlet container) where I can deploy me application and all my team
mates can use that online.


Er, yes.
Tomcat.

It is rather your responsibility to find a suitable location where you 
can deploy the app.  You might try Google App Engine, if you're 
struggling to find an actual server to deploy to.



p



Thanks in advance
Ajay :)



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



Webapp reload and DriverManager in Tomcat 6.0 trunk

2009-11-16 Thread Rainer Frey

Hi,

I found a problem when using DriverManager.getConnection() with a build from 
current 6.0 SVN (this morning). Basically I have a Servlet that's loaded on 
startup and does following in its init() method:

try
{
Class.forName( driver );
}
catch( ClassNotFoundException x )
{
log( x.toString(), x );
}
Connection con = null;
try
{
con = DriverManager.getConnection( url, user, pass );
log( connection established:  + con.toString() );
}
catch( SQLException x )
{
log( x.toString(), x );
throw new ServletException( x.toString(), x );
}

After starting Tomcat, I get the following expected output:

Nov 16, 2009 1:56:11 PM org.apache.catalina.core.ApplicationContext log
INFO: DBTestServlet: connection established: 
org.postgresql.jdbc4.jdbc4connect...@17ec9f7
Nov 16, 2009 1:56:12 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()

But when reloading the context (by touching web.xml), I get the following 
exception:

Nov 16, 2009 1:56:32 PM org.apache.catalina.core.ApplicationContext log
SEVERE: DBTestServlet: java.sql.SQLException: No suitable driver found for 
jdbc:postgresql://127.0.0.1/inxmail
java.sql.SQLException: No suitable driver found for 
jdbc:postgresql://127.0.0.1/inxmail
at java.sql.DriverManager.getConnection(DriverManager.java:602)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at com.inxmail.test.DBTestServlet.init(DBTestServlet.java:49)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4149)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4458)
at 
org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1192)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1290)
at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:296)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at 
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Thread.java:619)
Nov 16, 2009 1:56:32 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /testdb threw load() exception

I tested with Java 6 (1.6.0_17) and JDBC 3 and 4 Drivers for Oracle 
(ojdbc1.4.jar from Oracle 10, ojdbc6 from Oracle 11) as well as PostgreSQL.

Everything works fine with Tomcat 6.0.20.

The error originally occured in a much more complicated application with a 
home-grown DB connection pool, but the servlet I mentioned above exhibits 
this behavior. For anyone willing to test: here is a  .war file with this 
servlet, please edit web.xml to fill in your DB connection details.
http://download.inxmail.com/data/user/rfy/testdb.war

I'm testing our application for compatibility with the upcoming 6.0.21 
release, so I'd be grateful if s.o. could try to verify whether this is a 
Bug, so it has a chance to be addressed before 6.0.21

Thanks, and sorry for the lengthy message
Rainer




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



Re: The server encountered an internal error () that prevented it from fulfilling this request

2009-11-16 Thread Peter Crowther
2009/11/16 Bala_ji talk2b...@gmail.com:

 The server encountered an internal error () that prevented it from fulfilling
 this request message in IWSS server.  Please help
 http://old.nabble.com/file/p26370991/iwss%2Bapache%2Berror.jpg

You have a null pointer exception, caused by either your application
code or something in com.trend.iwss.gui.  This is not a Tomcat
problem, it is a problem with your application.

- Peter

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



Re: Webapp reload and DriverManager in Tomcat 6.0 trunk

2009-11-16 Thread Mikolaj Rydzewski

Rainer Frey wrote:
I found a problem when using DriverManager.getConnection() with a build from 
current 6.0 SVN (this morning). Basically I have a Servlet that's loaded on 
startup and does following in its init() method:
  

You should really use JNDI to obtain DataSource.

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


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



RE: Deployment specific configuration - best practice

2009-11-16 Thread Martin Gainty

i think i will buy in UK as the price is only 2.29 (excl VAT)

can you post html to demo JDBC parameters?
any advantages for returning JSON over plain text?

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




 Date: Mon, 16 Nov 2009 12:28:30 +0100
 Subject: Re: Deployment specific configuration - best practice
 From: rosenberg.l...@googlemail.com
 To: users@tomcat.apache.org
 
 On Mon, Nov 16, 2009 at 9:26 AM, Rainer Frey rainer.f...@inxmail.de wrote:
  Hi,
 
  I'm preparing a sample webapp for this list to illustrate a problem that I
  have with JDBC driver loading in a servlet. Anyone who'd try this would need
  to edit the jdbc connection data to test with a local DB. What is the 
  easiest
  method for you to configure a webapp that I'll provide?
 
   * settings as init params in web.xml
   * settings in /META-INF/context.xml (both ways you'd need to upack, edit,
  repack and deploy)
   * a separate context file along with the war file
   * any other idea?
 
 It may be an overkill for this concrete scenario, but take a look at
 ConfigureMe configuration framework:
 https://configureme.dev.java.net in particular:
 http://infra.anotheria.net/confluence/display/CONFIGUREME/GettingStarted
 
 regards
 Leon
 
 
  Rainer
 
  -
  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
 
  
_
Hotmail: Trusted email with Microsoft's powerful SPAM protection.
http://clk.atdmt.com/GBL/go/177141664/direct/01/
http://clk.atdmt.com/GBL/go/177141664/direct/01/


Re: Webapp reload and DriverManager in Tomcat 6.0 trunk

2009-11-16 Thread Rainer Frey
On Monday 16 November 2009 14:32:41 Mikolaj Rydzewski wrote:
 Rainer Frey wrote:
  I found a problem when using DriverManager.getConnection() with a build
  from current 6.0 SVN (this morning). Basically I have a Servlet that's
  loaded on startup and does following in its init() method:

 You should really use JNDI to obtain DataSource.

That's generally right. This is about a legcy application, and I want to make 
sure it still works after a minor version update of tomcat. So lets please 
leave such discussion out of this thread.

Rainer

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



Re: Webapp reload and DriverManager in Tomcat 6.0 trunk

2009-11-16 Thread Rainer Frey
On Monday 16 November 2009 14:24:37 Rainer Frey wrote:
 Hi,

 I found a problem when using DriverManager.getConnection() with a build
 from current 6.0 SVN (this morning). 
[...]
 Everything works fine with Tomcat 6.0.20.

I forgot a very important information: the JDBC driver is in tomcat/lib  
because our server usually runs several instances of the same webapp, and the 
customers have to add the JDBC driver themselves because we can't supply them 
due to licensing issues.

Rainer 

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



Re: Deployment specific configuration - best practice

2009-11-16 Thread Leon Rosenberg
Hello Martin,

i think you are mixing up topics :-)

 any advantages for returning JSON over plain text?
JSON is not as bloated as xml, but more flexible as property files,
has a validateable syntax and a set of standart parsers to use.

regards
Leon

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



Re: Deployment specific configuration - best practice

2009-11-16 Thread Pid

On 16/11/2009 13:39, Martin Gainty wrote:


i think i will buy in UK as the price is only 2.29 (excl VAT)
can you post html to demo JDBC parameters?
any advantages for returning JSON over plain text?


Early start this week, chaps, a triple shuffle from Martin to open.
I'll follow with:- Auf seinen Nasen schreitet einher das Nasobēm.


p




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

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





Date: Mon, 16 Nov 2009 12:28:30 +0100
Subject: Re: Deployment specific configuration - best practice
From: rosenberg.l...@googlemail.com
To: users@tomcat.apache.org

On Mon, Nov 16, 2009 at 9:26 AM, Rainer Freyrainer.f...@inxmail.de  wrote:

Hi,

I'm preparing a sample webapp for this list to illustrate a problem that I
have with JDBC driver loading in a servlet. Anyone who'd try this would need
to edit the jdbc connection data to test with a local DB. What is the easiest
method for you to configure a webapp that I'll provide?

  * settings as init params in web.xml
  * settings in /META-INF/context.xml (both ways you'd need to upack, edit,
repack and deploy)
  * a separate context file along with the war file
  * any other idea?


It may be an overkill for this concrete scenario, but take a look at
ConfigureMe configuration framework:
https://configureme.dev.java.net in particular:
http://infra.anotheria.net/confluence/display/CONFIGUREME/GettingStarted

regards
Leon



Rainer

-
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



_
Hotmail: Trusted email with Microsoft's powerful SPAM protection.
http://clk.atdmt.com/GBL/go/177141664/direct/01/
http://clk.atdmt.com/GBL/go/177141664/direct/01/




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



Error starting the web server

2009-11-16 Thread John McCleskey
I'm recieving the following errors when starting my Tomcat server. I'm
attempting to deploy a web application using a .WAR file and have configured
the server to run servlets. Any help would be greatly appreciated.


*[jk_jni_worker.c (1028)]: Fail- could not initialize Tomcat *

*[jk_worker.c (220)]: wc_create_worker init failed for inprocess *
*[jk_worker.c (297)]: build_worker_map failed to create workerinprocess *

-- 
Regards,

John
http://www.linkedin.com/in/johnmccleskey


Re: Webapp reload and DriverManager in Tomcat 6.0 trunk

2009-11-16 Thread Pid

On 16/11/2009 13:54, Rainer Frey wrote:

On Monday 16 November 2009 14:24:37 Rainer Frey wrote:

Hi,

I found a problem when using DriverManager.getConnection() with a build
from current 6.0 SVN (this morning).

[...]

Everything works fine with Tomcat 6.0.20.


I forgot a very important information: the JDBC driver is in tomcat/lib
because our server usually runs several instances of the same webapp, and the
customers have to add the JDBC driver themselves because we can't supply them
due to licensing issues.


In your test servlet, can you add some logging to see which classloader 
the successfully loaded driver class has, the first time you start the app?



p




Rainer

-
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: Error starting the web server

2009-11-16 Thread Pid

On 16/11/2009 14:00, John McCleskey wrote:

I'm recieving the following errors when starting my Tomcat server. I'm
attempting to deploy a web application using a .WAR file and have configured
the server to run servlets. Any help would be greatly appreciated.


*[jk_jni_worker.c (1028)]: Fail-  could not initialize Tomcat *

*[jk_worker.c (220)]: wc_create_worker init failed for inprocess *
*[jk_worker.c (297)]: build_worker_map failed to create workerinprocess *



Some clues as to the HTTPD, Tomcat, mod_jk(presumably?), JVM, OS type 
and versions would be useful.


Your Tomcat server.xml, mod_jk.conf, workers.properties and other 
pertinent config files are also likely to be useful, as would any other 
log messages, e.g. catalina.out.



p

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



Tomcat DBCP Connection Pooling to MySQL limited number of connection issue in Spring2.5 + Hibernate3 + commons-DBCP1.2

2009-11-16 Thread Yagnesh Chawda

Hi,
  I am using Spring 2.5, Hibernate 3 and MySQL (5.0.45 (32 Bit), 5.0.84(64
Bit)) with commons-DBCP 1.2 in Tomcat-5.5

My issue is that even after specifying Connection pool of initialSize=40
and minIdle=35, my App. server is never keep only 9 connections open under
zero load condition. What I could figure out from the MySQL log was that,
server did created 40 connections, but also dropped each connection in 1-2
seconds after connection started. I have max_connection=200 in MySQL, and
time to keep idle connection in MySQL is also 8Hrs. 
  
Under load, App server creates connections upto 95 as I have described
it as maxActive=95
I confirmed it thru show global status and show processlist on MySQL
prompt while simulating a heavy traffic thru JMeter.

I tried with c3p0 from Hibernate, but no luck. Outcome is exactly same.
So am wondering what the issue is ??

 My bean definition is as follows for DBCP:


bean id=dataSource destroy-method=close
class=org.apache.commons.dbcp.BasicDataSource
!--property name=driverClassName
value=com.mysql.jdbc.jdbc2.optional.MysqlDataSource/
property name=url value=${db.url}/
property name=username value=${db.user}/
property name=password value=${db.pass}/
property name=initialSize value=40/
property name=minIdle value=35/
property name=maxActive value=95/
property name=maxWait value=2/ --
/bean



!-- Hibernate related Beans definition starts here --
bean  id=sessionFactory
  
class=org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean
   property name=dataSource ref=dataSource /


   property name=annotatedClasses
   list
 valuecom.domain.Company/value
 valuecom.domain.Country/value
   /list
   /property
   property name=hibernateProperties
props
prop key=hibernate.show_sqlfalse/prop
prop key=hibernate.format_sqlfalse/prop
prop 
key=hibernate.dialectorg.hibernate.dialect.MySQLDialect/prop
prop
key=hibernate.transaction.factory_classorg.hibernate.transaction.JDBCTransactionFactory/prop

prop
key=hibernate.cache.provider_classorg.hibernate.cache.EhCacheProvider/prop
prop
key=hibernate.cache.provider_configuration_file_resource_pathmy-ehcache.xml/prop
prop 
key=hibernate.cache.use_structured_entriestrue/prop
prop 
key=hibernate.cache.use_second_level_cachetrue/prop
prop key=hibernate.cache.use_query_cachetrue/prop
prop key=hibernate.default_batch_fetch_size30/prop
prop key=hibernate.jdbc.batch_size30/prop
prop key=hibernate.generate_statisticstrue/prop
prop key=hibernate.order_updatestrue/prop
prop 
key=hibernate.connection.release_modeauto/prop
/props
   /property
/bean

-- 
View this message in context: 
http://old.nabble.com/Tomcat-DBCP-Connection-Pooling-to-MySQL-limited-number-of-connection-issue-in-Spring2.5-%2B-Hibernate3-%2B-commons-DBCP1.2-tp26372475p26372475.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Tomcat DBCP Connection Pooling to MySQL limited number of connection issue in Spring2.5 + Hibernate3 + commons-DBCP1.2

2009-11-16 Thread Evan Siegel
UNSUBSCRIBE ME!
I have been emailing you guys for over a week to unsubcribe me. PLEASE CEASE 
AND DESIST FROM SENDING ME MORE MAILINGS FROM THIS LIST!

 
font color=redPlease visit our websites at/font
http://www.geocities.com/evan_j_siegel'http://www.geocities.com/evan_j_siegel;http://www.geocities.com/evan_j_siegel
and
http://www.qlineorientalist.com/IranRises'http://www.qlineorientalist.com/IranRises;http://www.qlineorientalist.com/IranRises
Thank you.





From: Yagnesh Chawda yagnesh.cha...@gmail.com
To: users@tomcat.apache.org
Sent: Mon, November 16, 2009 9:09:51 AM
Subject: Tomcat DBCP Connection Pooling to MySQL limited number of connection 
issue in Spring2.5 + Hibernate3 + commons-DBCP1.2


Hi,
  I am using Spring 2.5, Hibernate 3 and MySQL (5.0.45 (32 Bit), 5.0.84(64
Bit)) with commons-DBCP 1.2 in Tomcat-5.5

My issue is that even after specifying Connection pool of initialSize=40
and minIdle=35, my App. server is never keep only 9 connections open under
zero load condition. What I could figure out from the MySQL log was that,
server did created 40 connections, but also dropped each connection in 1-2
seconds after connection started. I have max_connection=200 in MySQL, and
time to keep idle connection in MySQL is also 8Hrs. 
  
Under load, App server creates connections upto 95 as I have described
it as maxActive=95
I confirmed it thru show global status and show processlist on MySQL
prompt while simulating a heavy traffic thru JMeter.

I tried with c3p0 from Hibernate, but no luck. Outcome is exactly same.
So am wondering what the issue is ??

My bean definition is as follows for DBCP:


bean id=dataSource destroy-method=close
class=org.apache.commons.dbcp.BasicDataSource
!--property name=driverClassName
value=com.mysql.jdbc.jdbc2.optional.MysqlDataSource/
property name=url value=${db.url}/
property name=username value=${db.user}/
property name=password value=${db.pass}/
property name=initialSize value=40/
property name=minIdle value=35/
property name=maxActive value=95/
property name=maxWait value=2/ --
/bean



!-- Hibernate related Beans definition starts here --
bean  id=sessionFactory
  
class=org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean
   property name=dataSource ref=dataSource /


   property name=annotatedClasses
   list
 valuecom.domain.Company/value
 valuecom.domain.Country/value
   /list
   /property
   property name=hibernateProperties
props
prop key=hibernate.show_sqlfalse/prop
prop key=hibernate.format_sqlfalse/prop
prop 
key=hibernate.dialectorg.hibernate.dialect.MySQLDialect/prop
prop
key=hibernate.transaction.factory_classorg.hibernate.transaction.JDBCTransactionFactory/prop

prop
key=hibernate.cache.provider_classorg.hibernate.cache.EhCacheProvider/prop
prop
key=hibernate.cache.provider_configuration_file_resource_pathmy-ehcache.xml/prop
prop key=hibernate.cache.use_structured_entriestrue/prop
prop key=hibernate.cache.use_second_level_cachetrue/prop
prop key=hibernate.cache.use_query_cachetrue/prop
prop key=hibernate.default_batch_fetch_size30/prop
prop key=hibernate.jdbc.batch_size30/prop
prop key=hibernate.generate_statisticstrue/prop
prop key=hibernate.order_updatestrue/prop
prop key=hibernate.connection.release_modeauto/prop
/props
   /property
/bean

-- 
View this message in context: 
http://old.nabble.com/Tomcat-DBCP-Connection-Pooling-to-MySQL-limited-number-of-connection-issue-in-Spring2.5-%2B-Hibernate3-%2B-commons-DBCP1.2-tp26372475p26372475.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


  

Re: Tomcat DBCP Connection Pooling to MySQL limited number of connection issue in Spring2.5 + Hibernate3 + commons-DBCP1.2

2009-11-16 Thread Pid

On 16/11/2009 14:12, Evan Siegel wrote:

UNSUBSCRIBE ME!
I have been emailing you guys for over a week to unsubcribe me.

 PLEASE CEASE AND DESIST FROM SENDING ME MORE MAILINGS FROM THIS LIST!

You guys?  There's only one email from you, that I can see to this 
list, which is this one.  So... ?


You managed to subscribe to the list, can't you follow the instructions 
on how to unsubscribe?  Clues at the bottom of every email.



p



font color=redPlease visit our websites at/font
http://www.geocities.com/evan_j_siegel'http://www.geocities.com/evan_j_siegel;http://www.geocities.com/evan_j_siegel
and
http://www.qlineorientalist.com/IranRises'http://www.qlineorientalist.com/IranRises;http://www.qlineorientalist.com/IranRises
Thank you.





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



Re: Error starting the web server

2009-11-16 Thread André Warnier
Just substituting momentarily for Chuck and Pid while they warm up for 
the day :


John McCleskey wrote:

I'm recieving the following errors when starting my Tomcat server. I'm
attempting to deploy a web application using a .WAR file and have configured
the server to run servlets. 

Really ? How did you do that ?



*[jk_jni_worker.c (1028)]: Fail- could not initialize Tomcat *

*[jk_worker.c (220)]: wc_create_worker init failed for inprocess *
*[jk_worker.c (297)]: build_worker_map failed to create workerinprocess *


Strange. That does not look like a Tomcat logfile, somehow.
Nor, so far, like a Tomcat problem.

Do you care to tell us what you are really doing, with which Tomcat,
which server in front (apparently), on which platform, and where you
found the above messages ?

This sounds very much like a voice from the (very) distant past, like in :
http://tomcat.apache.org/connectors-doc/generic_howto/workers.html
which says (in the Workers Types section) :
jni	DEPRECATED: This worker knows how to forward requests to in-process 
Tomcat workers using JNI.


I remember seeing that DEPRECATED mention as far back as.. say Tomcat 
4.1.  That was a long time ago.  I'm not sure that you will find anyone 
who still remembers what that thing was doing.



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



Re: Webapp reload and DriverManager in Tomcat 6.0 trunk

2009-11-16 Thread Rainer Frey (Inxmail GmbH)
On Monday 16 November 2009 15:00:32 Pid wrote:
 On 16/11/2009 13:54, Rainer Frey wrote:
  I forgot a very important information: the JDBC driver is in tomcat/lib
  because our server usually runs several instances of the same webapp, and
  the customers have to add the JDBC driver themselves because we can't
  supply them due to licensing issues.

 In your test servlet, can you add some logging to see which classloader
 the successfully loaded driver class has, the first time you start the app?

It is (as expected), the tomcat common classloader, also at reload.

INFO: DBTestServlet: Class org.postgresql.Driver loaded by 
org.apache.catalina.loader.standardclassloa...@184ec44
   ^^^
Tomcat start

Nov 16, 2009 3:12:11 PM org.apache.catalina.core.ApplicationContext log
INFO: DBTestServlet: connection established: 
org.postgresql.jdbc4.jdbc4connect...@121177e
Nov 16, 2009 3:12:11 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Nov 16, 2009 3:12:11 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Nov 16, 2009 3:12:41 PM org.apache.catalina.core.ApplicationContext log
INFO: DBTestServlet: Class org.postgresql.Driver loaded by 
org.apache.catalina.loader.standardclassloa...@184ec44
   ^^^
Context reload

Nov 16, 2009 3:12:41 PM org.apache.catalina.core.ApplicationContext log
SEVERE: DBTestServlet: java.sql.SQLException: No suitable driver found for 
jdbc:postgresql://127.0.0.1/inxmail
java.sql.SQLException: No suitable driver found for 
jdbc:postgresql://127.0.0.1/inxmail
at java.sql.DriverManager.getConnection(DriverManager.java:602)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at com.inxmail.test.DBTestServlet.init(DBTestServlet.java:50)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
 

I uploaded the webapp again with this logging, and also uploaded the full 
servlet source file to 
http://download.inxmail.de/data/user/rfy/DBTestServlet.java

Rainer

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



Re: Error starting the web server

2009-11-16 Thread John McCleskey
I'm running the web server on an iSeries v5r4 and the jdk is 1.3.

It appears that the jvm is throwing an exception:


java.lang.NoClassDefFoundError: org/xml/sax/helpers/DefaultHandler

java.lang.NoClassDefFoundError: org/apache/struts/legacy/GenericDataSource
Guessing my classpath must be incorrect.

On Mon, Nov 16, 2009 at 8:08 AM, Pid p...@pidster.com wrote:

 On 16/11/2009 14:00, John McCleskey wrote:

 I'm recieving the following errors when starting my Tomcat server. I'm
 attempting to deploy a web application using a .WAR file and have
 configured
 the server to run servlets. Any help would be greatly appreciated.


 *[jk_jni_worker.c (1028)]: Fail-  could not initialize Tomcat *

 *[jk_worker.c (220)]: wc_create_worker init failed for inprocess *
 *[jk_worker.c (297)]: build_worker_map failed to create workerinprocess *


 Some clues as to the HTTPD, Tomcat, mod_jk(presumably?), JVM, OS type and
 versions would be useful.

 Your Tomcat server.xml, mod_jk.conf, workers.properties and other pertinent
 config files are also likely to be useful, as would any other log messages,
 e.g. catalina.out.



 p

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




-- 
Regards,

John
http://www.linkedin.com/in/johnmccleskey


Re: Error starting the web server

2009-11-16 Thread John McCleskey
Sounds like I may be on a much earlier version of ASF Tomcat on my
production server (worked fine in test). How do I tell what version of
Tomcat I'm running on an iSeries?

On Mon, Nov 16, 2009 at 8:19 AM, André Warnier a...@ice-sa.com wrote:

 Just substituting momentarily for Chuck and Pid while they warm up for the
 day :


 John McCleskey wrote:

 I'm recieving the following errors when starting my Tomcat server. I'm
 attempting to deploy a web application using a .WAR file and have
 configured
 the server to run servlets.

 Really ? How did you do that ?


 *[jk_jni_worker.c (1028)]: Fail- could not initialize Tomcat *


 *[jk_worker.c (220)]: wc_create_worker init failed for inprocess *
 *[jk_worker.c (297)]: build_worker_map failed to create workerinprocess *

 Strange. That does not look like a Tomcat logfile, somehow.
 Nor, so far, like a Tomcat problem.

 Do you care to tell us what you are really doing, with which Tomcat,
 which server in front (apparently), on which platform, and where you
 found the above messages ?

 This sounds very much like a voice from the (very) distant past, like in :
 http://tomcat.apache.org/connectors-doc/generic_howto/workers.html
 which says (in the Workers Types section) :
 jni DEPRECATED: This worker knows how to forward requests to in-process
 Tomcat workers using JNI.

 I remember seeing that DEPRECATED mention as far back as.. say Tomcat 4.1.
  That was a long time ago.  I'm not sure that you will find anyone who still
 remembers what that thing was doing.



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




-- 
Regards,

John
http://www.linkedin.com/in/johnmccleskey


Re: Error starting the web server

2009-11-16 Thread John McCleskey
Here is my httpd:

  *1* *   # Configuration originally created by Create HTTP Server wizard on
Fri Nov 13 16:08:48 CST 2009* *  2* *   LoadModule jk_module
/QSYS.LIB/QHTTPSVR.LIB/QZTCJK.SRVPGM* *  3* *   Listen 10.201.21.152:80* *
  4* *   DocumentRoot /www/webserver3/webapps/* *  5* *   Options -ExecCGI
-FollowSymLinks -SymLinksIfOwnerMatch -Includes -IncludesNoExec -Indexes
-MultiViews* *  6* *   LogFormat %h %l %u %t \%r\ %s %b \%{Referer}i\
\%{User-Agent}i\ combined* *  7* *   LogFormat %{Cookie}n \%r\ %t
cookie* *  8* *   LogFormat %{User-agent}i agent* *  9* *   LogFormat
%{Referer}i - %U referer* *  10* *   LogFormat %h %l %u %t \%r\ %s
%b common* *  11* *   CustomLog logs/access_log combined* *  12* *   LogMaint
logs/access_log 7 0* *  13* *   LogMaint logs/error_log 7 0* *  14* *
 HotBackup
Off* *  15* *   AccessFileName .htaccess* *  16* *   SetEnvIf User-Agent
Mozilla/2 nokeepalive* *  17* *   SetEnvIf User-Agent JDK/1\.0
force-response-1.0* *  18* *   SetEnvIf User-Agent Java/1\.0
force-response-1.0* *  19* *   SetEnvIf User-Agent RealPlayer 4\.0
force-response-1.0* *  20* *   SetEnvIf User-Agent MSIE 4\.0b2;
nokeepalive* *  21* *   SetEnvIf User-Agent MSIE 4\.0b2;
force-response-1.0* *  22* *   JkWorkersFile
/www/webserver3/conf/workers.properties* *  23* *   JkLogFile
/www/webserver3/logs/jk.log* *  24* *   JkLogLevel Error* *  25* *   JkMount
/servlet/* inprocess* *  26* *   JkMount /fp5250 inprocess* *  27* *   JkMount
/fp5250/* inprocess* *  28* *   DirectoryIndex index.html* *  29* *
Directory
/* *  30* *Order Deny,Allow* *  31* *Deny From all* *  32*
   */Directory* *  33* *   Directory /www/webserver3/htdocs* *
34* *
Order Allow,Deny* *  35* *Allow From all* *  36**/Directory*

On Mon, Nov 16, 2009 at 8:33 AM, John McCleskey jmccleske...@gmail.comwrote:

 Sounds like I may be on a much earlier version of ASF Tomcat on my
 production server (worked fine in test). How do I tell what version of
 Tomcat I'm running on an iSeries?


 On Mon, Nov 16, 2009 at 8:19 AM, André Warnier a...@ice-sa.com wrote:

 Just substituting momentarily for Chuck and Pid while they warm up for the
 day :


 John McCleskey wrote:

 I'm recieving the following errors when starting my Tomcat server. I'm
 attempting to deploy a web application using a .WAR file and have
 configured
 the server to run servlets.

 Really ? How did you do that ?


 *[jk_jni_worker.c (1028)]: Fail- could not initialize Tomcat *


 *[jk_worker.c (220)]: wc_create_worker init failed for inprocess *
 *[jk_worker.c (297)]: build_worker_map failed to create workerinprocess *

 Strange. That does not look like a Tomcat logfile, somehow.
 Nor, so far, like a Tomcat problem.

 Do you care to tell us what you are really doing, with which Tomcat,
 which server in front (apparently), on which platform, and where you
 found the above messages ?

 This sounds very much like a voice from the (very) distant past, like in :
 http://tomcat.apache.org/connectors-doc/generic_howto/workers.html
 which says (in the Workers Types section) :
 jni DEPRECATED: This worker knows how to forward requests to
 in-process Tomcat workers using JNI.

 I remember seeing that DEPRECATED mention as far back as.. say Tomcat 4.1.
  That was a long time ago.  I'm not sure that you will find anyone who still
 remembers what that thing was doing.



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




 --
  Regards,

 John
 http://www.linkedin.com/in/johnmccleskey





-- 
Regards,

John
http://www.linkedin.com/in/johnmccleskey


Re: Error starting the web server

2009-11-16 Thread David Smith

 jdk is 1.3
Ouch!  You really should consider an upgrade.  What version of tomcat do
you have ... it hasn't been recommended that anyone set classpath since
tomcat 3 days.  And then it was a nightmare trying to engineer
classpaths so all the apps and tomcat were happy.  More details would be
great.

--David

John McCleskey wrote:
 I'm running the web server on an iSeries v5r4 and the jdk is 1.3.

 It appears that the jvm is throwing an exception:


 java.lang.NoClassDefFoundError: org/xml/sax/helpers/DefaultHandler

 java.lang.NoClassDefFoundError: org/apache/struts/legacy/GenericDataSource
 Guessing my classpath must be incorrect.

 On Mon, Nov 16, 2009 at 8:08 AM, Pid p...@pidster.com wrote:

   
 On 16/11/2009 14:00, John McCleskey wrote:

 
 I'm recieving the following errors when starting my Tomcat server. I'm
 attempting to deploy a web application using a .WAR file and have
 configured
 the server to run servlets. Any help would be greatly appreciated.


 *[jk_jni_worker.c (1028)]: Fail-  could not initialize Tomcat *

 *[jk_worker.c (220)]: wc_create_worker init failed for inprocess *
 *[jk_worker.c (297)]: build_worker_map failed to create workerinprocess *


   
 Some clues as to the HTTPD, Tomcat, mod_jk(presumably?), JVM, OS type and
 versions would be useful.

 Your Tomcat server.xml, mod_jk.conf, workers.properties and other pertinent
 config files are also likely to be useful, as would any other log messages,
 e.g. catalina.out.



 

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



RE: Error starting the web server

2009-11-16 Thread Caldarale, Charles R
 From: John McCleskey [mailto:jmccleske...@gmail.com]
 Subject: Re: Error starting the web server
 
 I'm running the web server on an iSeries v5r4 and the jdk is 1.3.

JDK 1.3 hasn't been supported in a long, long time.  Given André's assessment, 
the Tomcat version and connector you're using also have not been supported for 
ages.

 How do I tell what version of Tomcat I'm running on an iSeries?

Supported levels of Tomcat have a version.sh script that will display that 
information.

You may well be on your own here, unless you want to upgrade to reasonable 
versions of the JVM and Tomcat.

 - Chuck


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



Re: Error starting the web server

2009-11-16 Thread John McCleskey
I'm running Apache 5.5 with a jdk 1.4 on my windows test server and
everything works fine, so it appears these two may be the issue. Let me chat
with our sys admin to determine when an upgrade can be completed. Thanks for
your help.

On Mon, Nov 16, 2009 at 8:39 AM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: John McCleskey [mailto:jmccleske...@gmail.com]
  Subject: Re: Error starting the web server
 
  I'm running the web server on an iSeries v5r4 and the jdk is 1.3.

 JDK 1.3 hasn't been supported in a long, long time.  Given André's
 assessment, the Tomcat version and connector you're using also have not been
 supported for ages.

  How do I tell what version of Tomcat I'm running on an iSeries?

 Supported levels of Tomcat have a version.sh script that will display that
 information.

 You may well be on your own here, unless you want to upgrade to reasonable
 versions of the JVM and Tomcat.

  - Chuck


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




-- 
Regards,

John
http://www.linkedin.com/in/johnmccleskey


Re: Tomcat DBCP Connection Pooling to MySQL limited number of connection issue in Spring2.5 + Hibernate3 + commons-DBCP1.2

2009-11-16 Thread Peter Crowther
2009/11/16 Pid p...@pidster.com:
 You managed to subscribe to the list, can't you follow the instructions on
 how to unsubscribe?  Clues at the bottom of every email.

We keep saying that, and it keeps being a problem for users.

The email-based unsubscribe appears to be unreliable, I suspect due to
an overzealous spam filter being applied to messages arriving at it.
I don't know whether it's possible to implement an alternative web
form-based approach that mails the user to confirm the unsubscribe,
but allows the user to paste a verify code into the unsubscribe page
so that they never have to email the Apache list server.

- Peter

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



RE: Deployment specific configuration - best practice

2009-11-16 Thread Caldarale, Charles R
 From: Pid [mailto:p...@pidster.com]
 Subject: Re: Deployment specific configuration - best practice
 
 Auf seinen Nasen schreitet einher das Nasobēm.

Es steht noch nicht im Brehm.
Es steht noch nicht im Meyer.
Und auch im Brockhaus nicht.

Vielleicht, nur auf dem Tomcat-Mailing-Liste.

 - 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: Error starting the web server

2009-11-16 Thread John McCleskey
It appears that we have several JDK's loaded on our file system (up to jdk
1.5). what apache configuration files need to be modified to point to the
correct jdk? i've modified the workers.properties. any other locations I
should modify?


worker.list=inprocess

worker.inprocess.type=jni

worker.inprocess.cmd_line=-config

worker.inprocess.cmd_line=/www/webserver3/conf/server.xml

worker.inprocess.sysprops=java.version=1.5

worker.inprocess.sysprops=tomcat.home=/www/webserver3

worker.inprocess.sysprops=os400.dir.create.auth=X

worker.inprocess.sysprops=os400.file.create.auth=*NONE

worker.inprocess.stdout=/www/webserver3/logs/jvmstdout.txt

worker.inprocess.stderr=/www/webserver3/logs/jvmstderr.txt

worker.inprocess.class_path=/QIBM/ProdData/HTTPA/java/lib/webserver.jar

worker.inprocess.cmd_line=/www/webserver3/conf/server.xml

worker.inprocess.sysprops=java.version=1.5

worker.inprocess.sysprops=tomcat.home=/www/webserver3

worker.inprocess.sysprops=os400.dir.create.auth=X

worker.inprocess.sysprops=os400.file.create.auth=*NONE

worker.inprocess.stdout=/www/webserver3/logs/jvmstdout.txt

worker.inprocess.stderr=/www/webserver3/logs/jvmstderr.txt

worker.inprocess.class_path=/QIBM/ProdData/HTTPA/java/lib/webserver.jar

worker.inprocess.class_path=/QIBM/ProdData/HTTPA/java/lib/servlet.jar

worker.inprocess.class_path=/QIBM/ProdData/HTTPA/java/lib/parser.jar

worker.inprocess.class_path=/QIBM/ProdData/HTTPA/java/lib/jaxp.jar

worker.inprocess.class_path=/QIBM/ProdData/HTTPA/java/lib/jasper.jar

worker.inprocess.class_path=/QIBM/ProdData/java400/jdk15/lib/tools.jar


On Mon, Nov 16, 2009 at 8:48 AM, John McCleskey jmccleske...@gmail.comwrote:

 I'm running Apache 5.5 with a jdk 1.4 on my windows test server and
 everything works fine, so it appears these two may be the issue. Let me chat
 with our sys admin to determine when an upgrade can be completed. Thanks for
 your help.

 On Mon, Nov 16, 2009 at 8:39 AM, Caldarale, Charles R 
 chuck.caldar...@unisys.com wrote:

  From: John McCleskey [mailto:jmccleske...@gmail.com]
  Subject: Re: Error starting the web server
 
  I'm running the web server on an iSeries v5r4 and the jdk is 1.3.

 JDK 1.3 hasn't been supported in a long, long time.  Given André's
 assessment, the Tomcat version and connector you're using also have not been
 supported for ages.

  How do I tell what version of Tomcat I'm running on an iSeries?

 Supported levels of Tomcat have a version.sh script that will display that
 information.

 You may well be on your own here, unless you want to upgrade to reasonable
 versions of the JVM and Tomcat.

  - Chuck


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




  --
 Regards,

 John
 http://www.linkedin.com/in/johnmccleskey





-- 
Regards,

John
http://www.linkedin.com/in/johnmccleskey


RE: search engine

2009-11-16 Thread Neil Aggarwal
Jill:

 Is there any search engine you would recommend that could 
 search public, and non public( page needs login) pages?

If your pages are HTML, you can use something like 
HtDig:
http://www.htdig.org/

If your pages are part of a web app, I have done
this in the past:
1. Write some code to pull the text content from
each page and store them in a MySQL table
with a full text index.
2. When your users perform a search, you run
a full text search query and return
the result.

I hope this helps,
  Neil

--
Neil Aggarwal, (281)846-8957, http://UnmeteredVPS.net
Host your tomcat app on a CentOS VPS for only $25/month!
Unmetered bandwidth, 7 day no risk trial, Google Checkout


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



RE: Error starting the web server

2009-11-16 Thread Neil Aggarwal
John:

 It appears that we have several JDK's loaded on our file 
 system (up to jdk
 1.5). what apache configuration files need to be modified to 
 point to the
 correct jdk? i've modified the workers.properties. any other 
 locations I
 should modify?

I choose a JDK by setting a JAVA_HOME
environment variable in /etc/init.d/tomcat.

Here is a sample:
JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk.x86_64

Neil

--
Neil Aggarwal, (281)846-8957, http://UnmeteredVPS.net
Host your tomcat app on a CentOS VPS for only $25/month!
Unmetered bandwidth, 7 day no risk trial, Google Checkout 
 


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



Re: Deployment of war file into a common locatiion

2009-11-16 Thread ajaypal

I don't think that would be a solution because that application is fetching
some  values  from database also and through the google app engine I may not
be able to get those values from the database.


Pid Ster wrote:
 
 On 16/11/2009 07:47, ajaypal wrote:

 Hi ,
 My name is Ajay and I have one web application which my whole team wants
 to
 access . My problem is that all my team is scattered on different places
 (at
 onsite and offshore) on different networks , So if I deploy that web
 application on my system , all team members cant access it
 
 Well, if it's on your computer, how could they?
 
. Also I cant ask each and every member of my team to deply that
application
 on there own systems.
  
 Can anyone suggest me that is there any servlet container (i e tomcat or
 be
 it any servlet container) where I can deploy me application and all my
 team
 mates can use that online.
 
 Er, yes.
 Tomcat.
 
 It is rather your responsibility to find a suitable location where you 
 can deploy the app.  You might try Google App Engine, if you're 
 struggling to find an actual server to deploy to.
 
 
 p
 
 
 Thanks in advance
 Ajay :)
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Deployment-of-war-file-into-a-common-locatiion-tp26367503p26374012.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: Deployment of war file into a common locatiion

2009-11-16 Thread Neil Aggarwal
Ajay:

 I don't think that would be a solution because that 
 application is fetching
 some  values  from database also and through the google app 
 engine I may not
 be able to get those values from the database.

You will need to put both your database and tomcat
app on a server that supports servlets.

Neil

--
Neil Aggarwal, (281)846-8957, http://UnmeteredVPS.net
Host your tomcat app on a CentOS VPS for only $25/month!
Unmetered bandwidth, 7 day no risk trial, Google Checkout


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



RE: search engine

2009-11-16 Thread Jill Han
There are .html, .php, .jsp, .pdf pages on the apache server.

Thanks,

Jill
-Original Message-
From: Neil Aggarwal [mailto:n...@jammconsulting.com] 
Sent: Monday, November 16, 2009 9:15 AM
To: 'Tomcat Users List'
Subject: RE: search engine
X-HOSTLOC: alverno.edu/10.0.60.10

Jill:

 Is there any search engine you would recommend that could 
 search public, and non public( page needs login) pages?

If your pages are HTML, you can use something like 
HtDig:
http://www.htdig.org/

If your pages are part of a web app, I have done
this in the past:
1. Write some code to pull the text content from
each page and store them in a MySQL table
with a full text index.
2. When your users perform a search, you run
a full text search query and return
the result.

I hope this helps,
  Neil

--
Neil Aggarwal, (281)846-8957, http://UnmeteredVPS.net
Host your tomcat app on a CentOS VPS for only $25/month!
Unmetered bandwidth, 7 day no risk trial, Google Checkout


-
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: search engine

2009-11-16 Thread Konstantin Kolinko
2009/11/16 Jill Han jill@alverno.edu:
 Sorry, for the non-tomcat issue, but I still hope I can get helps here.
 Is there any search engine you would recommend that could search public, and 
 non public( page needs login) pages?

 Thanks as always,

 Jill


Maybe you should look at
http://lucene.apache.org/

I have not used it yet, but at least they have more knowledge.


Best regards,
Konstantin Kolinko

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



jdbc-pool ignoring minIdle ?

2009-11-16 Thread Xavier Poinsard

Hi all,

I have seen a strange behaviour with the new Tomcat jdbc-pool (1.0.7.1).
It seems to ignore the minIdle parameter.
I have been able to reproduce it with a simple program.
minIdle is set to 5 and after a few seconds, I don't have any idle 
connection left.

Could anybody confirm the bug or point the mistake in my configuration ?
Thanks in advance.
Best regards,
Xavier.

Here is the test program :

public class TestPool {
public static void main(String[] args) throws Exception {
PoolProperties p = new PoolProperties();
p.setUrl(jdbc:postgresql:XXX);
p.setDriverClassName(org.postgresql.Driver);
p.setUsername(login);
p.setPassword(password);
p.setDefaultAutoCommit(false);
p.setJmxEnabled(false);
p.setTestWhileIdle(true);
p.setTestOnBorrow(true);
p.setValidationQuery(SELECT 1);
p.setTestOnReturn(false);
p.setMaxActive(30);
p.setInitialSize(5);
p.setMaxWait(20);
p.setMaxAge(43200);
p.setMinIdle(5);
p.setMaxIdle(15);
p.setLogAbandoned(true);
p.setRemoveAbandoned(true);
p.setRemoveAbandonedTimeout(300);
p.setJdbcInterceptors(StatementFinalizer;ResetAbandonedTimer);

DataSource datasource = new DataSource();
datasource.setPoolProperties(p);
Connection con = null;
try {
while(true){
con = datasource.getConnection();
Statement st = con.createStatement();
ResultSet rs = st.executeQuery(select count(*) from 
users);
rs.close();
st.close();
System.out.println(Pool size :  
+datasource.getSize());
System.out.println(Idle :  
+datasource.getIdle());
System.out.println(Active :  
+datasource.getActive());
con.close();
Thread.sleep(1000);
}
} finally {
if (con!=null) try {con.close();}catch (Exception 
ignore) {}
}
}
}


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



RE: AccessLogValve calling order

2009-11-16 Thread George Sexton
Uh, if the Access Log Value logged before the request was complete, how
would it know the number of bytes written to log?

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
 

 -Original Message-
 From: Jason Brittain [mailto:jason.britt...@mulesource.com]
 Sent: Friday, November 13, 2009 7:12 PM
 To: Tomcat Users List
 Subject: Re: AccessLogValve calling order
 
 Hi Chris.
 
 Thanks for diagnosing this problem!  It appears you're right that it
 logs
 only after the session is invalidated (after the request is complete)
 on a
 logout request.  That bug has existed in the code for a very long time,
 unnoticed.  The AccessLogValve was initially implemented to log only
 after
 the request processing is complete so that the client never needs to
 wait
 for the logging to complete.  With the new addition of asynchronous
 logging,
 however, it's quite a bit less important to log only when the request
 is
 complete.  It seems like it would help if the access logger could be
 configurable to log either before or after handling the request (I'm
 not
 sure logging both before and after makes sense).  Your ideas for %Sr
 and
 %{methodName}rm both seem useful as well, though I think the
 %{methodName}rm
 one has potential security  side effect issues.  So, I would suggest
 implementing your first two ideas.  I'm also happy to help you with
 that, if
 you'd like.
 
 Cheers.
 --
 Jason Brittain
 MuleSoft http://www.mulesoft.com
 
 
 On Fri, Nov 13, 2009 at 2:22 PM, Christopher Schultz 
 ch...@christopherschultz.net wrote:
 
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
  All,
 
  Amazingly enough, I had my first need to use AccessLogValve today,
 and
  one of the things I wanted to print was the user's session id. No,
  problem: just add %S to the log pattern.
 
  Well, there is one problem: you can't spit-out the session id for
 logout
  requests because the logic for the AccessLogValve is:
 
  if(enabled)
invoke next valve
print log message
  else
invoke next valve
 
  Note that the request has essentially completed when the log message
 is
  generated. This makes complete sense as you typically want to log
  /after/ the request so you can do things like find out how many bytes
  were sent, how long the request took, etc.
 
  In my case, I want to have access to the session id before the
 session
  is invalidated (which happens in the logout servlet).
 
  Another option would be to get the requested session id from the
 request
  (which can only be done with the current AccessLogValve if the client
 is
  using cookies), though that can be misleading because anyone can
 request
  anything... it's not guaranteed to use a useful value.
 
  Anyhow, I was wondering if anyone had any suggestions short of
 heavily
  modifying the AccessLogValve or developing something from scratch.
 
  I'd also be happy to provide a patch for the AccessLogValve that add
 any
  or all of the following capabilities:
 
  1. Allow log before or after request (or both?)
  2. Add requested session id to standard pattern options (%Sr?)
  or
  3. Add %{xxx}rm to call ServletRequest.xxx and print the result
(allows ${getRequestedSessionId}rm
 
  Any comments?
 
  Thanks,
  - -chris
 


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



Re: Customizing Default Error page when Webapp stopped Or not loaded

2009-11-16 Thread Arunkumar Janarthanan
Thank you very much for the info Konstantin, is this applicable to Tomcat
5.5.9 ? that is the version we are using.

However can we customize the class and make this internal error disappeared
?

Please advice.

On Sun, Nov 15, 2009 at 11:45 AM, Konstantin Kolinko knst.koli...@gmail.com
 wrote:

 2009/11/15 Arunkumar Janarthanan arunkumar.webad...@gmail.com:
  I am having problem when thew webapp stopped or not loaded for some
 reason
  tomcat shows the default error page though I have error page configured
 in
  web.xml under application root.
 
  Do I have to modify *org.apache.catalina.valves.ErrorDispatcherValve*
  class file ?
 

 It is known as
 https://issues.apache.org/bugzilla/show_bug.cgi?id=41007

  Could anyone please advice if anyone already have implemented such change
 in
  this class file ?
 

 I have not heard of any implementation yet, though it might be that
 some do exist.

 Contributions are welcome.

  Many thanks
 
  Arun Janarthanan
 

 Best regards,
 Konstantin Kolinko

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




Re: jdbc-pool ignoring minIdle ?

2009-11-16 Thread Filip Hanik - Dev Lists
hi Xavier, the pool is not ignoring the minIdle flag, but you have 
configured

p.setMaxAge(43200);

This means,that if a connection has been connected longer than this, 
next time you call con.close() it will be closed and not returned to the 
pool.


The connection pool itself at this point in time will not create a new 
connection. Only when you actually call getConnection() may another 
connection be created.


Filip


On 11/16/2009 09:04 AM, Xavier Poinsard wrote:

Hi all,

I have seen a strange behaviour with the new Tomcat jdbc-pool (1.0.7.1).
It seems to ignore the minIdle parameter.
I have been able to reproduce it with a simple program.
minIdle is set to 5 and after a few seconds, I don't have any idle 
connection left.

Could anybody confirm the bug or point the mistake in my configuration ?
Thanks in advance.
Best regards,
Xavier.

Here is the test program :

public class TestPool {
public static void main(String[] args) throws Exception {
PoolProperties p = new PoolProperties();
p.setUrl(jdbc:postgresql:XXX);
p.setDriverClassName(org.postgresql.Driver);
p.setUsername(login);
p.setPassword(password);
p.setDefaultAutoCommit(false);
p.setJmxEnabled(false);
p.setTestWhileIdle(true);
p.setTestOnBorrow(true);
p.setValidationQuery(SELECT 1);
p.setTestOnReturn(false);
p.setMaxActive(30);
p.setInitialSize(5);
p.setMaxWait(20);
p.setMaxAge(43200);
p.setMinIdle(5);
p.setMaxIdle(15);
p.setLogAbandoned(true);
p.setRemoveAbandoned(true);
p.setRemoveAbandonedTimeout(300);
p.setJdbcInterceptors(StatementFinalizer;ResetAbandonedTimer);

DataSource datasource = new DataSource();
datasource.setPoolProperties(p);
Connection con = null;
try {
while(true){
con = datasource.getConnection();
Statement st = con.createStatement();
ResultSet rs = st.executeQuery(select count(*) from 
users);

rs.close();
st.close();
System.out.println(Pool size :  +datasource.getSize());
System.out.println(Idle :  +datasource.getIdle());
System.out.println(Active :  +datasource.getActive());
con.close();
Thread.sleep(1000);
}
} finally {
if (con!=null) try {con.close();}catch (Exception ignore) {}
}
}
}


-
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



Possible to do async processing?

2009-11-16 Thread David Balažic
Hi!

We are using tomcat 6.0 and now we have the need to trigger from the
service() method of a  servlet.

So:
 - a request arrives
 - the servlet triggers an async event
 - servlet sends response and closes
 - the async task is done (independent of servlet opeartion)

Is there a way to do this?

Or create threads by hand?

Regards,
David

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



RE: Possible to do async processing?

2009-11-16 Thread Joseph Morgan
Yes, there is a way, and I suspect you're doing fire-and-forget processing, 
but, could you give us a better idea as to what you are trying to do?  

Tomcat will handle servlet requests in multiple threads if needed, anyway.  So 
it may not be necessary.  I'm thinking you might want to investigate a 
messaging system, such as OpenMQ.

BTW:  To create a thread by hand, look at the Java docs for the Thread class 
and the Runnable interface. Keep in mind, this could get really out of hand if 
there are a lot of requests and you don't understand how to properly manage 
threads in this environment. 

Joe
 
-Original Message-
From: David Balažic [mailto:xerc...@gmail.com] 
Sent: Monday, November 16, 2009 11:44 AM
To: Tomcat Users List
Subject: Possible to do async processing?

Hi!

We are using tomcat 6.0 and now we have the need to trigger from the
service() method of a  servlet.

So:
 - a request arrives
 - the servlet triggers an async event
 - servlet sends response and closes
 - the async task is done (independent of servlet opeartion)

Is there a way to do this?

Or create threads by hand?

Regards,
David

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



Some advice on apache tomcat

2009-11-16 Thread Anthony Jay
Hi,
   I am in need of some advice. My current setup is a web application
   running on Jboss which serves static and dynamic content, jsp,
   servlets and xml on two non load balanced servers (hot spare using
   mysql replication). It currently uses Http Basic Authentication over
   SSL. This has been fine to date but since I dont use any of EJB or
   related features I think that it is overkill for my application, as
   well as being unflexible w.r.t. deployment and content management as
   the whole site is deployed as a single EAR. Initially it was
   fantastic as it was simple and easy to maintain but now every change
   requires a full build.

I am researching porting my site to Apache 2.2 and Tomcat, and hope to
gain the following.
1. Serve the static content from apache e.g. images, clips sound, text
files etc.
2. Install a CMS to offload content managment to others and also blog
functionality, Wordpress seems to be the tool of choice for ease of
usage and widespread usage, this seems to work fine in my test
environment.
3. Maintain current servlet and jsp (including xml) functionality on
tomcat. Instead of one super application I can deploy servlets as
seperate applications and update them seperately.
4. Use connectors such as mod_jk to load balance and provide failover. I
already have heartbeat and mod_jk installed on in high availabilty mode
using workers in a test environment and this is working as expected.
(Apache 2.2 and tomcat 6 running on centos 5.3).

At this point I have hit a brick wall w.r.t. what to do next. I have
been researching this for the past two weeks and the more I learn the
more I seem to be confused. There is so much documentation on some
things but almost none on others. I always fear that if there is nobody
asking questions about a certain topic it either means that a) There are
no problems using the technology or b) Nobody is using it at all.

My main issue now is about how the authentication works between Tomcat
and Apache.
I would like to use both Form based and http basic authentication on
protected resources running on both apache and tomcat.
i.e. Form based for humans and httpbasic for XML requests over ssl.
I have a user database in mysql containing username and password, roles
are in another table but these could be merged if required.

I also am confused by mod_jk and mod_proxy_ajp, they, seem to have much
feature overlap. mod_proxy_ajp in my view suffers terribly from the
missing *.jsp wildcard capability but has a much simpler configuration
and better future prospects as it is bundled with apache 2.2.

In terms of authentication, which should I use, mod_auth_mysql and
mod_auth_dbm (or mod_auth_form in future or something else?) and why?

In terms of single sign on how can I make the user experience seamless
between static content-managed pages and jsp/servlets? Will mod_jk
handle sso? This does not seem clear to me in all the pages I read. If I
configure form based auth in a login.jsp page will this be relayed to
apache after a redirect?

What is best practise and what should I be doing? If there is some hard
to find documentation out there with pointers and tips I would
appreciate a few links. Expert advice is appreciated.
Tony




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



Tomcat 6.0 requires JRE 5.0 issue

2009-11-16 Thread Elizabeth Gorkic

Hi, does anyone know what the 'official' Apache explanation is for the 
contradictory information in Tomcat 6 README and RELEASE-NOTES:
 
When you open http://apache.crihan.fr/dist/tomcat/tomcat-6/v6.0.20/README.html 
, you get this message:
 
Tomcat 6.0 requires JRE 5.0. Read the RELEASE-NOTES and the RUNNING.txt file in 
the distribution for more details.
 
If you open RELEASE-NOTES you will see=== Dependency Changes: 
=== 
Tomcat 6.0 is designed to run on JSE 5.0 and later
 
From the Release Notes I gather that I can use Java 6 (which is what a lot of 
developers do, so I know it works).  But, what does “Tomcat 6.0 requires JRE 
5.0” imply?  That Tomcat 6 will only be supported with Java 5, but one can run 
it on Java 6 at their own risk?  I mean, if I have a Tomcat problem while 
running Java 6, will my bug be considered for fixing?  
 
 Should the warning be removed from the site?  If yes, how do we make that 
happen?
 
My company has a policy to deploy only officially supported platforms, and I 
can’t move to Java 6 with Tomcat while “Tomcat 6.0 requires JRE 5.0” is there.  
 
Thank you for your help, Eliot
_
Bing brings you maps, menus, and reviews organized in one place.
http://www.bing.com/search?q=restaurantsform=MFESRPpubl=WLHMTAGcrea=TEXT_MFESRP_Local_MapsMenu_Resturants_1x1

Re: Possible to do async processing?

2009-11-16 Thread David Balažic
2009/11/16 Joseph Morgan joseph.mor...@ignitesales.com:
 Yes, there is a way, and I suspect you're doing fire-and-forget processing, 
 but, could you give us a better idea as to what you are trying to do?

 Tomcat will handle servlet requests in multiple threads if needed, anyway.  
 So it may not be necessary.  I'm thinking you might want to investigate a 
 messaging system, such as OpenMQ.

 BTW:  To create a thread by hand, look at the Java docs for the Thread class 
 and the Runnable interface. Keep in mind, this could get really out of hand 
 if there are a lot of requests and you don't understand how to properly 
 manage threads in this environment.

Yes, that is why I ask. (I know how to create threads).

So Tomcat has nothing like this in itself? Any trick , shortcut?

It will be something triggered like a few times in an hour and would
take less than a minute to process, to there should be no overload
problems (famous last words...)

Regards,
David

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



RE: Possible to do async processing?

2009-11-16 Thread George Sexton
A pretty simple way of doing this is to have your context init create a
background thread. Have the background thread monitor a queue for jobs.
Then, have the servlet place the job in the queue.

The background thread can either process the job itself, or create a worker
thread to process the job.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
 

 -Original Message-
 From: David Balažic [mailto:xerc...@gmail.com]
 Sent: Monday, November 16, 2009 10:44 AM
 To: Tomcat Users List
 Subject: Possible to do async processing?
 
 Hi!
 
 We are using tomcat 6.0 and now we have the need to trigger from the
 service() method of a  servlet.
 
 So:
  - a request arrives
  - the servlet triggers an async event
  - servlet sends response and closes
  - the async task is done (independent of servlet opeartion)
 
 Is there a way to do this?
 
 Or create threads by hand?
 
 Regards,
 David
 
 -
 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: Some advice on apache tomcat

2009-11-16 Thread Neil Aggarwal
Anthony:

 I am researching porting my site to Apache 2.2 and Tomcat, and hope to
 gain the following.
 1. Serve the static content from apache e.g. images, clips sound, text
 files etc.

I do that will all of my JSP apps.  I set up Apache on the
front end and use mod_jk to push JSP/servlet stuff into Tomcat.
It works very well and scales nicely.

 2. Install a CMS to offload content managment to others and also blog
 functionality, Wordpress seems to be the tool of choice for ease of
 usage and widespread usage, this seems to work fine in my test
 environment.

That should be no problem.  Wordpress is just a php app in front
of MySQL.

 3. Maintain current servlet and jsp (including xml) functionality on
 tomcat. Instead of one super application I can deploy servlets as
 seperate applications and update them seperately.

Are you talking about having multiple service in one webapp or
servlets in different webapps?

 4. Use connectors such as mod_jk to load balance and provide 
 failover.

Like you said, this works very well.

 My main issue now is about how the authentication works between Tomcat
 and Apache.
 I would like to use both Form based and http basic authentication on
 protected resources running on both apache and tomcat.
 i.e. Form based for humans and httpbasic for XML requests over ssl.
 I have a user database in mysql containing username and 
 password, roles
 are in another table but these could be merged if required.

I put all protected info in Tomcat and only use Apache for
sending public content.  If there is a static file that
needs protecting, I use a servlet that checks if they are
logged in and then opens and streams the file back to the
user.  It works well.

 In terms of single sign on how can I make the user experience seamless
 between static content-managed pages and jsp/servlets?

If you use one webapp with multiple servlets and serve
your protected static content from Tomcat, SSO is very
easy.

I hope this helps,
Neil

--
Neil Aggarwal, (281)846-8957, http://UnmeteredVPS.net
Host your tomcat app on a CentOS VPS for only $25/month!
Unmetered bandwidth, 7 day no risk trial, Google Checkout


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



Re: search engine

2009-11-16 Thread Pid

On 16/11/2009 14:34, Jill Han wrote:

Sorry, for the non-tomcat issue, but I still hope I can get helps here.
Is there any search engine you would recommend that could search public, and 
non public( page needs login) pages?

Thanks as always,

Jill



If you have a question we recommend you start by starting a new email to 
the list, rather than by replying to an existing email, which is called 
'thread hijacking'.



p




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



RE: Possible to do async processing?

2009-11-16 Thread Joseph Morgan
Sorry.. misunderstood your original when you asked if there was a way to create 
a Thread by hand

No tricks/shortcuts.  Are you saying each request will take a minute to process 
and is triggered a few times an hour?  I suspect the client is anxiously 
awaiting a response like OK, I got it, but not patient enough for a The 
request was successful.  

I'm still thinking a messaging system, especially if you want to requests to be 
processed regardless of the time the message was delivered, like, when maybe 
many requests hit near the same time.   

A quick hack on a messaging system is to simply have the servlet throw a record 
into a DB, file or something used as a messaging queue.  Then, a program 
external to Tomcat simply monitors the queue, picks up any existing requests, 
handles them, and starts monitoring again.  This way, Tomcat could go down 
without affecting if the messages are processed, or the monitor could be down 
without affecting if Tomcat can push in new requests.  The only thing that 
can't go down is the queue.

Joe


-Original Message-
From: David Balažic [mailto:xerc...@gmail.com] 
Sent: Monday, November 16, 2009 12:05 PM
To: Tomcat Users List
Subject: Re: Possible to do async processing?

2009/11/16 Joseph Morgan joseph.mor...@ignitesales.com:
 Yes, there is a way, and I suspect you're doing fire-and-forget processing, 
 but, could you give us a better idea as to what you are trying to do?

 Tomcat will handle servlet requests in multiple threads if needed, anyway.  
 So it may not be necessary.  I'm thinking you might want to investigate a 
 messaging system, such as OpenMQ.

 BTW:  To create a thread by hand, look at the Java docs for the Thread class 
 and the Runnable interface. Keep in mind, this could get really out of hand 
 if there are a lot of requests and you don't understand how to properly 
 manage threads in this environment.

Yes, that is why I ask. (I know how to create threads).

So Tomcat has nothing like this in itself? Any trick , shortcut?

It will be something triggered like a few times in an hour and would
take less than a minute to process, to there should be no overload
problems (famous last words...)

Regards,
David

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



Multiple war files for the same application context.

2009-11-16 Thread Ziggy
Hi guys,

Is it possible to deploy multiple war files for the same application? for
example if i have an application that is accessed via http:///
www.test.com/myapp, i would usually have a single war file called myapp.war
and deploy everthing in that one file.

is it possible to deploy myapp1ArticleManager.war, myapp1Forum.war etc and
have them all be as part of the one myapp application?

Any links or tutorials on how to do this would be very helpfull. And what is
the term used for this kind of deployment?

Thanks


Re: Multiple war files for the same application context.

2009-11-16 Thread Hassan Schroeder
On Mon, Nov 16, 2009 at 10:34 AM, Ziggy zigg...@gmail.com wrote:

 is it possible to deploy myapp1ArticleManager.war, myapp1Forum.war etc and
 have them all be as part of the one myapp application?

 ... And what is the term used for this kind of deployment?

impossible

HTH!
-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

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



Re: Multiple war files for the same application context.

2009-11-16 Thread Ziggy
Hi Hassan,

I was recently looking at a CMS portal and found that the portal allowed
plugins/application to be deployed as war files. The plugins themselves are
portlets so not quite the type of application i am using.

Is it the case that maybe it is possible with portlets but not standard
servlet based webapps?

Thanks


On Mon, Nov 16, 2009 at 6:39 PM, Hassan Schroeder 
hassan.schroe...@gmail.com wrote:

 On Mon, Nov 16, 2009 at 10:34 AM, Ziggy zigg...@gmail.com wrote:

  is it possible to deploy myapp1ArticleManager.war, myapp1Forum.war etc
 and
  have them all be as part of the one myapp application?
 
  ... And what is the term used for this kind of deployment?

 impossible

 HTH!
 --
 Hassan Schroeder  hassan.schroe...@gmail.com
 twitter: @hassan

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




Re: Customizing Default Error page when Webapp stopped Or not loaded

2009-11-16 Thread Konstantin Kolinko
2009/11/16 Arunkumar Janarthanan arunkumar.webad...@gmail.com:
 Thank you very much for the info Konstantin, is this applicable to Tomcat
 5.5.9 ? that is the version we are using.

Sure, because this issue is an old one. I would even say that
that is by design.

Also, there might be a lot of other issues in 5.5.9,
as well as those listed on
http://tomcat.apache.org/security-5.html


 However can we customize the class

On the conditions stated in the LICENSE

 and make this internal error disappeared
 ?

I do not know, I have not tried it.
They say your mileage may vary.

Maybe a separate Valve can intercept this error and react
appropriately. I do not see a need to change the default one.


 Contributions are welcome.

 Best regards,
 Konstantin Kolinko


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



RE: Multiple war files for the same application context.

2009-11-16 Thread Joseph Morgan
Are you trying to deploy elements of a larger applications separately?

It seems you just need different JAR files for the application, and,
though those can be deployed to the same web app separately, you're not
really gaining anything, since the app will have to be restarted anyway,
and you might as well stick with the WAR file.

Joe

-Original Message-
From: Ziggy [mailto:zigg...@gmail.com] 
Sent: Monday, November 16, 2009 12:35 PM
To: Tomcat Users List
Subject: Multiple war files for the same application context.

Hi guys,

Is it possible to deploy multiple war files for the same application?
for
example if i have an application that is accessed via http:///
www.test.com/myapp, i would usually have a single war file called
myapp.war
and deploy everthing in that one file.

is it possible to deploy myapp1ArticleManager.war, myapp1Forum.war etc
and
have them all be as part of the one myapp application?

Any links or tutorials on how to do this would be very helpfull. And
what is
the term used for this kind of deployment?

Thanks

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



Re: Multiple war files for the same application context.

2009-11-16 Thread Hassan Schroeder
On Mon, Nov 16, 2009 at 10:51 AM, Ziggy zigg...@gmail.com wrote:

 I was recently looking at a CMS portal and found that the portal allowed
 plugins/application to be deployed as war files. The plugins themselves are
 portlets so not quite the type of application i am using.

 Is it the case that maybe it is possible with portlets but not standard
 servlet based webapps?

Sure, the whole point of a portal is to integrate non-related apps
and data sources. So you access the portal context which basically
proxies in the output of those plugins.

You could certainly integrate the output of other contexts into your
primary one, using iframes, AJAX widgets, backend web services,
etc. but ultimately they're still separate contexts.

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

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



How2 Disable Browser Access to specific port

2009-11-16 Thread joeweder

We have an application where the user comes in through 8443 via https.

But the same app also communicates headlessly with other apps through a
separate data port (also https).

When client authentication is turned on for 8443 the user/browser can get
through the data port without being challenged (we don't turn on
client-authentication for the data port).

Question: How can I disable browser access through a specific port but
continue to allow headless https through?
-- 
View this message in context: 
http://old.nabble.com/How2-Disable-Browser-Access-to-specific-port-tp26377695p26377695.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: How2 Disable Browser Access to specific port

2009-11-16 Thread Peter Crowther
2009/11/16 joeweder joewe...@gmail.com:
 Question: How can I disable browser access through a specific port but
 continue to allow headless https through?

You *could* write a Filter that sniffed at the User-Agent header in
the https: request, but most browsers have ways of faking that - you
can't rely on *any* data coming in over the https stream to be
original rather than altered or injected by a cracker.  In essence,
there is no secure way of doing what you want.

Security by obscurity is poor security.  Have you thought about
designing the application correctly, so that headless https clients
have to authenticate?

- Peter

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



Re: Tomcat 6.0 requires JRE 5.0 issue

2009-11-16 Thread Peter Crowther
2009/11/16 Elizabeth Gorkic egor...@hotmail.com:
 My company has a policy to deploy only officially supported platforms

... then why are they running open source software such as Tomcat,
which has no official support?

- Peter

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



Re: Multiple war files for the same application context.

2009-11-16 Thread Ziggy
 Are you trying to deploy elements of a larger applications separately?
Yes that is exactly what i am trying to do.

I did consider the separate jar file option but i couldnt figure out a way
of including the jsp files in a jar file.

I basically have a large struts/Tiles based application and would like to
separate the deployment of each individual module of the application. I want
to try and avoid having to redeploy the whole application everytime there is
a change.


On Mon, Nov 16, 2009 at 7:10 PM, Joseph Morgan 
joseph.mor...@ignitesales.com wrote:

 Are you trying to deploy elements of a larger applications separately?

 It seems you just need different JAR files for the application, and,
 though those can be deployed to the same web app separately, you're not
 really gaining anything, since the app will have to be restarted anyway,
 and you might as well stick with the WAR file.

 Joe

 -Original Message-
 From: Ziggy [mailto:zigg...@gmail.com]
 Sent: Monday, November 16, 2009 12:35 PM
 To: Tomcat Users List
 Subject: Multiple war files for the same application context.

 Hi guys,

 Is it possible to deploy multiple war files for the same application?
 for
 example if i have an application that is accessed via http:///
 www.test.com/myapp, i would usually have a single war file called
 myapp.war
 and deploy everthing in that one file.

 is it possible to deploy myapp1ArticleManager.war, myapp1Forum.war etc
 and
 have them all be as part of the one myapp application?

 Any links or tutorials on how to do this would be very helpfull. And
 what is
 the term used for this kind of deployment?

 Thanks

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




RE: Tomcat 6.0 requires JRE 5.0 issue

2009-11-16 Thread Caldarale, Charles R
 From: Elizabeth Gorkic [mailto:egor...@hotmail.com]
 Subject: Tomcat 6.0 requires JRE 5.0 issue
 
 When you open http://apache.crihan.fr/dist/tomcat/tomcat-6/
 v6.0.20/README.html , you get this message:
 
 Tomcat 6.0 requires JRE 5.0. Read the RELEASE-NOTES and the RUNNING.txt
 file in the distribution for more details.

It's not at all clear where this README.html file comes from.  It's not part of 
the Tomcat source or binary distributions, and appears to exist only on the 
mirror web sites.  Rely on what's in the Tomcat downloads, which say Java SE 5 
or later.

 - 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: Multiple war files for the same application context.

2009-11-16 Thread Ziggy
I see what you mean Hassan. I had a look at how the core portal engine
accesses the portlets and it looks like it uses the plugins context to
access it and this is just hidden from the user.

thanks

On Mon, Nov 16, 2009 at 7:11 PM, Hassan Schroeder 
hassan.schroe...@gmail.com wrote:

 On Mon, Nov 16, 2009 at 10:51 AM, Ziggy zigg...@gmail.com wrote:

  I was recently looking at a CMS portal and found that the portal allowed
  plugins/application to be deployed as war files. The plugins themselves
 are
  portlets so not quite the type of application i am using.
 
  Is it the case that maybe it is possible with portlets but not standard
  servlet based webapps?

 Sure, the whole point of a portal is to integrate non-related apps
 and data sources. So you access the portal context which basically
 proxies in the output of those plugins.

 You could certainly integrate the output of other contexts into your
 primary one, using iframes, AJAX widgets, backend web services,
 etc. but ultimately they're still separate contexts.

 --
 Hassan Schroeder  hassan.schroe...@gmail.com
 twitter: @hassan

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




Re: Deployment of war file into a common locatiion

2009-11-16 Thread Ziggy
What exactly is the reason your team cannot access the application? It
doesnt sound like its a Tomcat issue but probably something related to your
network settings. Maybe the firewall?

How are they accessing your system?

On Mon, Nov 16, 2009 at 3:40 PM, Neil Aggarwal n...@jammconsulting.comwrote:

 Ajay:

  I don't think that would be a solution because that
  application is fetching
  some  values  from database also and through the google app
  engine I may not
  be able to get those values from the database.

 You will need to put both your database and tomcat
 app on a server that supports servlets.

Neil

 --
 Neil Aggarwal, (281)846-8957, http://UnmeteredVPS.net
 Host your tomcat app on a CentOS VPS for only $25/month!
 Unmetered bandwidth, 7 day no risk trial, Google Checkout


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




Re: Customizing Default Error page when Webapp stopped Or not loaded

2009-11-16 Thread Arunkumar Janarthanan
Hi Konstantin,

Thank you very much,I will look for the fix or an alternate option to fix
the issue.

Once again many thanks.

Cheers,
Arun Janarthanan

On Mon, Nov 16, 2009 at 2:00 PM, Konstantin Kolinko
knst.koli...@gmail.comwrote:

 2009/11/16 Arunkumar Janarthanan arunkumar.webad...@gmail.com:
  Thank you very much for the info Konstantin, is this applicable to Tomcat
  5.5.9 ? that is the version we are using.

 Sure, because this issue is an old one. I would even say that
 that is by design.

 Also, there might be a lot of other issues in 5.5.9,
 as well as those listed on
 http://tomcat.apache.org/security-5.html

 
  However can we customize the class

 On the conditions stated in the LICENSE

  and make this internal error disappeared
  ?

 I do not know, I have not tried it.
 They say your mileage may vary.

 Maybe a separate Valve can intercept this error and react
 appropriately. I do not see a need to change the default one.

 
  Contributions are welcome.
 
  Best regards,
  Konstantin Kolinko
 

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




RE: Some advice on apache tomcat

2009-11-16 Thread Anthony Jay
Hi Neil,
   Thanks for the comments, I really appreciate hearing from someone
   that has actual production experience using these technologies!

To answer your question below, I *could* have all my servlets in one
webapp but that would not be my preference. For example I would like the
capability be able to update a single servlet that serves XML without
affecting any other user interations with the server, or, more
realistically, to completely deploy a new application inluding
jsp/servlets into Tomcat as a customer beta and keep current
applications unaffected. (We have several new applications under
development!)
In addition Some servlets need http basic, some form based auth and
others not even ssl at all!

So from your mail I understand that you only use apache to serve static
pages that are not protected, thereby needing no authentication and
therefore you can contain all your Auth using Tomcat. This is good, how
do you handle ssl? Does Apache terminate any SSL, all ssl or only static
pages?

Tony


On Mon, 16 Nov 2009 12:24 -0600, Neil Aggarwal
n...@jammconsulting.com wrote:
 Anthony:
 
  I am researching porting my site to Apache 2.2 and Tomcat, and hope to
  gain the following.
  1. Serve the static content from apache e.g. images, clips sound, text
  files etc.
 
 I do that will all of my JSP apps.  I set up Apache on the
 front end and use mod_jk to push JSP/servlet stuff into Tomcat.
 It works very well and scales nicely.
 
  2. Install a CMS to offload content managment to others and also blog
  functionality, Wordpress seems to be the tool of choice for ease of
  usage and widespread usage, this seems to work fine in my test
  environment.
 
 That should be no problem.  Wordpress is just a php app in front
 of MySQL.
 
  3. Maintain current servlet and jsp (including xml) functionality on
  tomcat. Instead of one super application I can deploy servlets as
  seperate applications and update them seperately.
 
 Are you talking about having multiple service in one webapp or
 servlets in different webapps?
 
  4. Use connectors such as mod_jk to load balance and provide 
  failover.
 
 Like you said, this works very well.
 
  My main issue now is about how the authentication works between Tomcat
  and Apache.
  I would like to use both Form based and http basic authentication on
  protected resources running on both apache and tomcat.
  i.e. Form based for humans and httpbasic for XML requests over ssl.
  I have a user database in mysql containing username and 
  password, roles
  are in another table but these could be merged if required.
 
 I put all protected info in Tomcat and only use Apache for
 sending public content.  If there is a static file that
 needs protecting, I use a servlet that checks if they are
 logged in and then opens and streams the file back to the
 user.  It works well.
 
  In terms of single sign on how can I make the user experience seamless
  between static content-managed pages and jsp/servlets?
 
 If you use one webapp with multiple servlets and serve
 your protected static content from Tomcat, SSO is very
 easy.
 
 I hope this helps,
   Neil
 
 --
 Neil Aggarwal, (281)846-8957, http://UnmeteredVPS.net
 Host your tomcat app on a CentOS VPS for only $25/month!
 Unmetered bandwidth, 7 day no risk trial, Google Checkout
 
 
 -
 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: Possible to do async processing?

2009-11-16 Thread Pid

On 16/11/2009 18:19, George Sexton wrote:

A pretty simple way of doing this is to have your context init create a
background thread. Have the background thread monitor a queue for jobs.
Then, have the servlet place the job in the queue.



The background thread can either process the job itself, or create a worker
thread to process the job.


As George says, create a queue.  The Java 6 concurrency package is your 
friend here.


 java.util.concurrent.Executors
 java.util.concurrent.ExecutorService

Tomcat doesn't have any built-in functionality for this.


p




George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585



-Original Message-
From: David Balažic [mailto:xerc...@gmail.com]
Sent: Monday, November 16, 2009 10:44 AM
To: Tomcat Users List
Subject: Possible to do async processing?

Hi!

We are using tomcat 6.0 and now we have the need to trigger from the
service() method of a  servlet.

So:
  - a request arrives
  - the servlet triggers an async event
  - servlet sends response and closes
  - the async task is done (independent of servlet opeartion)

Is there a way to do this?

Or create threads by hand?

Regards,
David

-
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: Multiple war files for the same application context.

2009-11-16 Thread Pid

On 16/11/2009 19:25, Ziggy wrote:

Are you trying to deploy elements of a larger applications separately?

Yes that is exactly what i am trying to do.


You can deploy so-called 'multilevel' apps, if you want to separate out 
(somewhat) independant components - which may make build  deploy cycles 
easier, for example, as you don't have to replace and test the whole app.


The '#' hash character is used like so:

 myapp.war
 myapp#news.war
 myapp#admin.war

 /myapp/
 /myapp/news/
 /myapp/admin/


p



I did consider the separate jar file option but i couldnt figure out a way
of including the jsp files in a jar file.

I basically have a large struts/Tiles based application and would like to
separate the deployment of each individual module of the application. I want
to try and avoid having to redeploy the whole application everytime there is
a change.


On Mon, Nov 16, 2009 at 7:10 PM, Joseph Morgan
joseph.mor...@ignitesales.com  wrote:


Are you trying to deploy elements of a larger applications separately?

It seems you just need different JAR files for the application, and,
though those can be deployed to the same web app separately, you're not
really gaining anything, since the app will have to be restarted anyway,
and you might as well stick with the WAR file.

Joe

-Original Message-
From: Ziggy [mailto:zigg...@gmail.com]
Sent: Monday, November 16, 2009 12:35 PM
To: Tomcat Users List
Subject: Multiple war files for the same application context.

Hi guys,

Is it possible to deploy multiple war files for the same application?
for
example if i have an application that is accessed via http:///
www.test.com/myapp, i would usually have a single war file called
myapp.war
and deploy everthing in that one file.

is it possible to deploy myapp1ArticleManager.war, myapp1Forum.war etc
and
have them all be as part of the one myapp application?

Any links or tutorials on how to do this would be very helpfull. And
what is
the term used for this kind of deployment?

Thanks

-
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: Customizing Default Error page when Webapp stopped Or not loaded

2009-11-16 Thread Pid

On 16/11/2009 19:00, Konstantin Kolinko wrote:

2009/11/16 Arunkumar Janarthananarunkumar.webad...@gmail.com:

Thank you very much for the info Konstantin, is this applicable to Tomcat
5.5.9 ? that is the version we are using.


Sure, because this issue is an old one. I would even say that
that is by design.

Also, there might be a lot of other issues in 5.5.9,
as well as those listed on
http://tomcat.apache.org/security-5.html



However can we customize the class


On the conditions stated in the LICENSE


and make this internal error disappeared
?


I do not know, I have not tried it.
They say your mileage may vary.

Maybe a separate Valve can intercept this error and react
appropriately. I do not see a need to change the default one.


You can create a custom error valve - look at the Tomcat source code to 
see what the default one does - read the Host element attribute 
errorReportValveClass notes in the standard implementation.


 http://tomcat.apache.org/tomcat-5.5-doc/config/host.html


p



Contributions are welcome.

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



[OT] Intermittent deadlock in MySQL InnoDB transactions

2009-11-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

All,

If anyone has some good experience using InnoDB tables in MySQL, I'd
love some off-list communication. We are experiencing some intermittent
deadlock in code that runs very very frequently within our application
and appears to be coded correctly.

I'm posting to this list (instead of, say, the MySQL-user list) because
I'm already subscribed. :)

Serious takers, only, thanks.

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

iEYEARECAAYFAksBu1oACgkQ9CaO5/Lv0PAHuQCgrGJejmCXhIaOEU8xACPPiR5e
UusAn3uWiGCgETP9FPYJCJV0bpU84iN2
=E2oF
-END PGP SIGNATURE-

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



Re: AccessLogValve calling order

2009-11-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

George,

On 11/16/2009 11:35 AM, George Sexton wrote:
 Uh, if the Access Log Value logged before the request was complete, how
 would it know the number of bytes written to log?

If you read the whole first post, you'd see that I mentioned that.

- -chris

 
 George Sexton
 MH Software, Inc.
 http://www.mhsoftware.com/
 Voice: 303 438 9585
  
 
 -Original Message-
 From: Jason Brittain [mailto:jason.britt...@mulesource.com]
 Sent: Friday, November 13, 2009 7:12 PM
 To: Tomcat Users List
 Subject: Re: AccessLogValve calling order

 Hi Chris.

 Thanks for diagnosing this problem!  It appears you're right that it
 logs
 only after the session is invalidated (after the request is complete)
 on a
 logout request.  That bug has existed in the code for a very long time,
 unnoticed.  The AccessLogValve was initially implemented to log only
 after
 the request processing is complete so that the client never needs to
 wait
 for the logging to complete.  With the new addition of asynchronous
 logging,
 however, it's quite a bit less important to log only when the request
 is
 complete.  It seems like it would help if the access logger could be
 configurable to log either before or after handling the request (I'm
 not
 sure logging both before and after makes sense).  Your ideas for %Sr
 and
 %{methodName}rm both seem useful as well, though I think the
 %{methodName}rm
 one has potential security  side effect issues.  So, I would suggest
 implementing your first two ideas.  I'm also happy to help you with
 that, if
 you'd like.

 Cheers.
 --
 Jason Brittain
 MuleSoft http://www.mulesoft.com


 On Fri, Nov 13, 2009 at 2:22 PM, Christopher Schultz 
 ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 All,

 Amazingly enough, I had my first need to use AccessLogValve today,
 and
 one of the things I wanted to print was the user's session id. No,
 problem: just add %S to the log pattern.

 Well, there is one problem: you can't spit-out the session id for
 logout
 requests because the logic for the AccessLogValve is:

 if(enabled)
   invoke next valve
   print log message
 else
   invoke next valve

 Note that the request has essentially completed when the log message
 is
 generated. This makes complete sense as you typically want to log
 /after/ the request so you can do things like find out how many bytes
 were sent, how long the request took, etc.

 In my case, I want to have access to the session id before the
 session
 is invalidated (which happens in the logout servlet).

 Another option would be to get the requested session id from the
 request
 (which can only be done with the current AccessLogValve if the client
 is
 using cookies), though that can be misleading because anyone can
 request
 anything... it's not guaranteed to use a useful value.

 Anyhow, I was wondering if anyone had any suggestions short of
 heavily
 modifying the AccessLogValve or developing something from scratch.

 I'd also be happy to provide a patch for the AccessLogValve that add
 any
 or all of the following capabilities:

 1. Allow log before or after request (or both?)
 2. Add requested session id to standard pattern options (%Sr?)
 or
 3. Add %{xxx}rm to call ServletRequest.xxx and print the result
   (allows ${getRequestedSessionId}rm

 Any comments?

 Thanks,
 - -chris

 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAksBu44ACgkQ9CaO5/Lv0PAw4wCguv7l9vhQnpzPn8yNKYLR6GQw
P/YAn2Xhaz3AzZad0J+/5eAxmIXph2C6
=ZMwX
-END PGP SIGNATURE-

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



Re: Possible to do async processing?

2009-11-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

On 11/16/2009 1:04 PM, David Balažic wrote:
 2009/11/16 Joseph Morgan joseph.mor...@ignitesales.com:
 Yes, there is a way, and I suspect you're doing fire-and-forget
 processing, but, could you give us a better idea as to what you are
 trying to do?
 
 Tomcat will handle servlet requests in multiple threads if needed,
 anyway.  So it may not be necessary.  I'm thinking you might want
 to investigate a messaging system, such as OpenMQ.
 
 BTW:  To create a thread by hand, look at the Java docs for the
 Thread class and the Runnable interface. Keep in mind, this could
 get really out of hand if there are a lot of requests and you don't
 understand how to properly manage threads in this environment.
 
 Yes, that is why I ask. (I know how to create threads).

I would advise you not to create your own threads. Instead, use a thread
pool and queue your jobs into that. 3rd-party thread pools exist, or you
can use the ones available in Java 1.5+ in the java.util.concurrent
package. You can get started by reading the javadoc for
java.util.concurrent.ThreadPoolExecutor and going from there.

 So Tomcat has nothing like this in itself? Any trick , shortcut?

Nope: Tomcat does not provide any services like this.

 It will be something triggered like a few times in an hour and would 
 take less than a minute to process, to there should be no overload 
 problems (famous last words...)

:)

That's why I recommend against managing your own threads: if you do it
wrong, you can build a denial-of-service vector into your webapp. Using
a managed thread pool can help save you from shooting yourself in the foot.

Another option would be to queue the job in a database, then run a
completely separate process to go and process them batch-style. This
solution can even process jobs that were queued but not processed before
you took the server down for some reason.

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

iEYEARECAAYFAksBvL4ACgkQ9CaO5/Lv0PDOYACfbdxU+QpIuwSz06Z0c/HHFUjs
Pq0An3fNU9rGzjc2YZnFrw4E4TY4ngf7
=xAyX
-END PGP SIGNATURE-

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



Re: How2 Disable Browser Access to specific port

2009-11-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Joe,

On 11/16/2009 2:13 PM, joeweder wrote:
 We have an application where the user comes in through 8443 via https.
 
 But the same app also communicates headlessly with other apps through a
 separate data port (also https).

What port is that? Do these apps happen to be on the same machine? Same
network segment? Can you predict where officially-sanctioned requests
are coming from?

 Question: How can I disable browser access through a specific port but
 continue to allow headless https through?

Short answer: bind the private Connector to 127.0.0.1 and outside
clients cannot connect. Not on localhost? You could use an SSH tunnel,
or you could use IP-based filtering to reject requests not coming from
known hosts.

I agree with Peter's response, that you ought to force your clients to
authenticate themselves to your webapp -- including trusted webapp
clients.

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

iEYEARECAAYFAksBvrIACgkQ9CaO5/Lv0PC8FQCfZiNynoSUktL96iZEFRxszGlv
O2EAn3DgpUO4EoGqcaTUm/dEkyG3kJP+
=vGPs
-END PGP SIGNATURE-

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



Re: Some advice on apache tomcat

2009-11-16 Thread Pid

On 16/11/2009 17:53, Anthony Jay wrote:

Hi,
I am in need of some advice. My current setup is a web application
running on Jboss which serves static and dynamic content, jsp,
servlets and xml on two non load balanced servers (hot spare using
mysql replication). It currently uses Http Basic Authentication over
SSL. This has been fine to date but since I dont use any of EJB or
related features I think that it is overkill for my application, as
well as being unflexible w.r.t. deployment and content management as
the whole site is deployed as a single EAR. Initially it was
fantastic as it was simple and easy to maintain but now every change
requires a full build.

I am researching porting my site to Apache 2.2 and Tomcat, and hope to
gain the following.
1. Serve the static content from apache e.g. images, clips sound, text
files etc.
2. Install a CMS to offload content managment to others and also blog
functionality, Wordpress seems to be the tool of choice for ease of
usage and widespread usage, this seems to work fine in my test
environment.



3. Maintain current servlet and jsp (including xml) functionality on
tomcat. Instead of one super application I can deploy servlets as
seperate applications and update them seperately.


One servlet per application probably isn't an optimal solution.
Breaking a single large app into smaller components may be worth it - 
very much depends on your application.



4. Use connectors such as mod_jk to load balance and provide failover. I
already have heartbeat and mod_jk installed on in high availabilty mode
using workers in a test environment and this is working as expected.
(Apache 2.2 and tomcat 6 running on centos 5.3).

At this point I have hit a brick wall w.r.t. what to do next. I have
been researching this for the past two weeks and the more I learn the
more I seem to be confused.


What are you confused about?


There is so much documentation on some
things but almost none on others. I always fear that if there is nobody
asking questions about a certain topic it either means that a) There are
no problems using the technology or b) Nobody is using it at all.


There are lots of questions about mod_jk on this list each week.
Sometimes they're even different ones.  ;)


My main issue now is about how the authentication works between Tomcat
and Apache.


It's one way, Tomcat, as an 'inner' component, can defer to 
authentication set at the outer level in Apache HTTPD.

See the tomcatAuthentication attribute of the AJP connector.

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

Tomcat can't pass it's authenticated principal up to HTTPD.



I would like to use both Form based and http basic authentication on
protected resources running on both apache and tomcat.


You would probably need to seperate those parts into separate 
applications as FORM and BASIC can only be set once in each web.xml.


(You can of course duplicate the same class or jar in differently 
configured web apps.)



i.e. Form based for humans and httpbasic for XML requests over ssl.
I have a user database in mysql containing username and password, roles
are in another table but these could be merged if required.

I also am confused by mod_jk and mod_proxy_ajp, they, seem to have much
feature overlap. mod_proxy_ajp in my view suffers terribly from the
missing *.jsp wildcard capability but has a much simpler configuration
and better future prospects as it is bundled with apache 2.2.


They offer similar, largely overlapping functionality, you choose one or 
the other.


mod_proxy_ajp can of course handle *.jsp, when combined with 
mod_rewrite and the [P] proxy rewrite command.


 RewriteRule   ^/(.+)\.jsp(.+)?   ajp://tomcathost/$1.jsp$2   [P,L]


In terms of authentication, which should I use, mod_auth_mysql and
mod_auth_dbm (or mod_auth_form in future or something else?) and why?


Up to you.


In terms of single sign on how can I make the user experience seamless
between static content-managed pages and jsp/servlets? Will mod_jk
handle sso? This does not seem clear to me in all the pages I read. If I
configure form based auth in a login.jsp page will this be relayed to
apache after a redirect?


If you're using FORM (or BASIC) as your primary auth, then HTTPD should 
only serve unprotected content, as additional auth will be required.



What is best practise and what should I be doing? If there is some hard
to find documentation out there with pointers and tips I would
appreciate a few links. Expert advice is appreciated.
Tony


Sounds like you've got the right idea so far.


p



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

Re: search engine

2009-11-16 Thread André Warnier

Jill Han wrote:

Sorry, for the non-tomcat issue, but I still hope I can get helps here.


You are right, this is totally off-topic for this list.
But even so,


Is there any search engine you would recommend that could search public,


You mean, like Google, Yahoo etc.. ?

 and non public( page needs login) pages?


How would it do that ? ask you each time it encounters a page with a 
login ? How would it even determine that this page asks for a login ?
(Well ok, if it requires a Basic authentication, then maybe it could, 
but still).


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



Re: Possible to do async processing?

2009-11-16 Thread André Warnier

David Balažic wrote:

Hi!

We are using tomcat 6.0 and now we have the need to trigger from the
service() method of a  servlet.

So:
 - a request arrives
 - the servlet triggers an async event
 - servlet sends response and closes
 - the async task is done (independent of servlet opeartion)

Is there a way to do this?


Hi.
I am not the greatest Java or Tomcat guru here, so I do not even know if 
Java allows you to start an external (think OS-level) task to do something.

But on the face of it, I would think of this kind of scheme :
- a separate daemon is running, whose job it is to execute these async 
tasks. That one listens on some port, and accepts only requests coming 
from your webapp.
- you applet connects to that external server via TCP, sends it the 
request, gets an acknowledgement for the receipt of the request, and 
then proceeds to answer the client.


Almost any introductory book on network programming, in any programming 
language, will have examples of how to create a TCP server program.

Even in Java, I would think.

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



Re: Some advice on apache tomcat

2009-11-16 Thread André Warnier

Anthony Jay wrote:


My main issue now is about how the authentication works between Tomcat
and Apache.

That's the only one I can readily answer.
It is extremely simple with mod_jk.
If the user is authenticated at the Apache level, mod_jk will pass this 
on to the Tomcat server via AJP.
The only thing to do, is set the 'tomcatAuthentication=false' 
attribute in Tomcat's AJP Connector, and Tomcat will just believe the 
user-id sent by Apache and mod_jk.

I don't know if, or how, mod_proxy_ajp handles the same thing.



In terms of authentication, which should I use, mod_auth_mysql and
mod_auth_dbm (or mod_auth_form in future or something else?) and why?

There are many many possibilities for this under Apache httpd.  Just 
pick the one that you like best, on its own merits.
They all basically in the end result in the HTTP request being 
authenticated at the Apache httpd level (iow to have a user-id), and 
that's what you want.


What you then do with it under Tomcat is another story, but that is also 
your choice.



In terms of single sign on how can I make the user experience seamless
between static content-managed pages and jsp/servlets? Will mod_jk
handle sso? This does not seem clear to me in all the pages I read. If I
configure form based auth in a login.jsp page will this be relayed to
apache after a redirect?


No, but why would it be ?
Ah, if you want to do the authentication in Tomcat rather than in 
Apache, but still use it in Apache ?
There are ways, but you'll need to write your own Apache (httpd) 
authentication module. You could then define a dummy servlet in Tomcat, 
which just echoes the authenticated user-id (as gotten via 
getRemoteUser() e.g.). Then in Apache httpd, you would make a 
side-request (oherwise known as a sub-request) to this Tomcat webapp 
to get the user-id, and use it to authenticate the current request in 
Apache.
But that is a complicated scheme, probably only worth it if you find 
some Tomcat authentication method that does not exist in Apache httpd, 
which is unlikely.




What is best practise and what should I be doing? If there is some hard
to find documentation out there with pointers and tips I would
appreciate a few links. 


To read in the Apache httpd docs :
http://httpd.apache.org/docs/2.2/howto/auth.html

Also, personally I would recommend having a look around here :
http://cpan.uwinnipeg.ca/search?query=apache%3A%3Aauthmode=dist
This is the Perl library.  Even if you do not intend to do anything with 
Perl, the documentation of many of these modules is a goldmine of 
information about how things work.


Expert advice is appreciated.
You just got it.
;-)

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



Re: Tomcat 6.0 requires JRE 5.0 issue

2009-11-16 Thread André Warnier

Elizabeth Gorkic wrote:
 
My company has a policy to deploy only officially supported platforms, and I can’t move to Java 6 with Tomcat while “Tomcat 6.0 requires JRE 5.0” is there.  
 
Can you tell us which company that is, so that we make sure we never 
apply for a job there ?


Considering that Tomcat is free software, made by volunteers, and 
supported by volunteers on an ad-hoc basis, I an afraid that your 
company then should probably not deploy any Tomcat version at all.


Which would be a pity, but then hey, suppliers of officially supported 
software have to live also.


Sorry for this, I am reacting to the tone of your question in general.
I would imagine that anyone with a modicum of knowledge of Java would 
assume that requires Java 1.5 actually means .. or later.


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



Java Out of Heap Issue

2009-11-16 Thread kulbir Saini
Hi,

I have a Apache-tomcat environment serving simple .jsp's.

Issue - After few days of application  been up, we see Java heap out of
memory error.

Steps taken: The Tomcat was configured to run with default heap size. Seeing
Java Heap memory issue, i increased it and the setevn.sh file looks like -

CATALINA_OPTS='-Xms256m -Xmx256m -XX:+HeapDumpOnOutOfMemoryError
-Xloggc:/appl/gcdata/gcdata.txt -XX:+PrintGCDetails'

Looking at Garbage Collection graph it is seen -
1  minor Collections spikes to around 1sec after few hrs in between.
2 The maximum and minimum heap size is configured as 256MB, but slowly in
couple days, the total heap size reducing automatically and Full Collections
becomes frequent to a extend that minor collections stop happening. JVM
starts triggering only full collection.

just a snapshot of jmap,

[r...@saml-app lib]# jmap -heap 8130
Attaching to process ID 8130, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 1.5.0_18-b02

using thread-local object allocation.
Parallel GC with 4 thread(s)

Heap Configuration:
   MinHeapFreeRatio = 40
   MaxHeapFreeRatio = 70
   MaxHeapSize  = 268435456 (256.0MB)
   NewSize  = 2686976 (2.5625MB)
   MaxNewSize   = -65536 (-0.0625MB)
   OldSize  = 1835008 (1.75MB)
   NewRatio = 2
   SurvivorRatio= 8
   PermSize = 21757952 (20.75MB)
   MaxPermSize  = 88080384 (84.0MB)

Heap Usage:
PS Young Generation
Eden Space:
   capacity = 33947648 (32.375MB)
   used = 15199704 (14.495567321777344MB)
   free = 18747944 (17.879432678222656MB)
   44.77395311745898% used
From Space:
   capacity = 3276800 (3.125MB)
   used = 1835008 (1.75MB)
   free = 1441792 (1.375MB)
   56.0% used
To Space:
   capacity = 3735552 (3.5625MB)
   used = 0 (0.0MB)
   free = 3735552 (3.5625MB)
   0.0% used
PS Old Generation
   capacity = 178978816 (170.6875MB)
   used = 69737192 (66.5065689086914MB)
   free = 109241624 (104.1809310913086MB)
   38.96393638004623% used
PS Perm Generation
   capacity = 21757952 (20.75MB)
   used = 15172568 (14.469688415527344MB)
   free = 6585384 (6.280311584472656MB)
   69.73343814711973% used

JVM is 64bit. Once thing more, the application code is quite old and was
running on Java 1.4.

Any suggestions

Kulbir


Re: Possible to do async processing?

2009-11-16 Thread Elli Albek
Hi,
The advices given above are good. If you make this job triggered by a
servlet, then an attacker can use it to easily bring down your system
with excessive load.

You also have problems of clean shutdown. The thread pool that you
start needs to have blocking shutdown with some context listener, to
make sure that all jobs are finished when you undeploy or shut down
the server. This is not hard to do, but you should test it by making
sure a job finishes when you shut down. Just add a slow job that, and
kill the server.

Slow job:
public void run(){
System.out.println(Starting slow job);
try{
  Thread.sleep(6); // 1 min
}catch(Throwable e){
  e.printStachTrace();// possible kill, watch out for this
}
System.out.println(Finished slow job);
}

Add this job to the pool, shut down the server, and look at the logs
for the messages. You should also see the server hanging until the job
is completed.

A simpler option would be to write a java class with a main method,
and run it from cron. We have a bunch of those. Not dependent on
tomcat, no security problems. You can have many tomcats with the same
configuration, something that would be more difficult with a scheduler
that is part of your app.

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



Re: Some advice on apache tomcat

2009-11-16 Thread Elli Albek
You can also look at squid to serve static files and load balance. So
squid fronts tomcat and your other apps. Squid can serve your static
files as well. All you have to do it make sure your static files
return a cache header like max-age, and squid will serve them without
going to the origin (tomcat). Squid can also load balance tomcats and
route requests for multiple origins based on some rules. We have squid
doing virtual hosting of tomcats that run different apps, as well as
serving static content and caching dynamic content.

The down sides vs apache:
1. Not as many plugins and options
2. The configuration rules are simpler and more widely
known/understood in apache
3. Hard to rewrite URLs. Not impossible, but mod rewrite is much much
easier to deal with. Actually any manipulation of the request/response
is less than trivial on squid.

If you go for squid, 2.7 and above. Earlier versions are not as good
for reverse proxing.

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



Re: Java Out of Heap Issue

2009-11-16 Thread Elli Albek
You can try getting an object dump from a profiler and see which
objects are the source of memory starvation. Simple JSPs are very
unlikely to cause memory starvation, but you mentioned “application
code”, which implies that you have more than simple JSPs.

A few things you want to cross off your performance check list, which
will not solve your problem, but are generally necessary:
1. JVM -server option, just in case
2. Disable session persistence
3. If you application does not use sessions, disable them for all JSPs
(typical place to do it is header JSP include)
4. Force session termination, no long running sessions.
5. Remove all apps that you do not need. Tomcat comes with a few built
in apps and those are not trivial to find. Make sure conf/Catalina and
all its sub directories contain only apps that you need. Host manager
and such should be deleted. Same with war files.

What you describe in your memory graph is a simple memory leak.
Generally, I would look in that order:
1.  Sessions
2.  Application code
3.  Other webapps

1 and 3 are easy to deal with. If you don’t need sessions make sure
they are not created at all. If you do, force session termination
after a few minutes in master web.xml or other XML files. Notice that
one file can define a value and another can overwrite it, so you have
to make sure all are checked.

If that does not work, application code is the next candidate. You can
start with an object dump with a profiler or a simple code review/step
through in a debugger.

E

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



Re: Tomcat DBCP Connection Pooling to MySQL limited number of connection issue in Spring2.5 + Hibernate3 + commons-DBCP1.2

2009-11-16 Thread Mark Thomas
Peter Crowther wrote:
 2009/11/16 Pid p...@pidster.com:
 You managed to subscribe to the list, can't you follow the instructions on
 how to unsubscribe?  Clues at the bottom of every email.
 
 We keep saying that, and it keeps being a problem for users.
 
 The email-based unsubscribe appears to be unreliable, I suspect due to
 an overzealous spam filter being applied to messages arriving at it.
 I don't know whether it's possible to implement an alternative web
 form-based approach that mails the user to confirm the unsubscribe,
 but allows the user to paste a verify code into the unsubscribe page
 so that they never have to email the Apache list server.

It is clear that Evan is sending e-mail in HTML. That is almost enough on it's
own to trigger the spam filter and most e-mails manage to trigger a couple more
rules to push the score over the threshold.

I thought that spam filtering on unsubscribe addresses had been disabled. I'll
check that and if it hasn't see what can be done in that direction.

I note that there has been zero communication from Evan to the list owner. I'll
also note that the time it takes one of the list owners to unsubscribe someone
who complains to the list tends to be directly proportional to the rudeness of
the message. Given the tone of Evan's message I don't feel any great urge to
help him any time soon.

Mark


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



Re: Deployment specific configuration - best practice

2009-11-16 Thread Mark Thomas
Rainer Frey wrote:
  * settings in /META-INF/context.xml
This one please.

Tomcat will extract it on first deployment. OK that will fail but we can then
edit the extracted version and Tomcat will use that from then on.

Mark


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



Re: Java Out of Heap Issue

2009-11-16 Thread Anthony Jay
What I have found works well in some circumstances where you do not have
a profiler to hand.
1. Look for static declarations in your code that point to singletons or
collection objects. They might just grow and grow
2. You may not be using third party libs correctly, e.g. Not closing
connections, performing cleanup etc. RTFM just in case.
3. Perform amputations on your code if possible i.e. replace methods
with dummy invocations. You will *eventually* find the source of
festering objects that are not being gc'd. 
Tony 

On Mon, 16 Nov 2009 15:54 -0800, Elli Albek e...@sustainlane.com
wrote:
 You can try getting an object dump from a profiler and see which
 objects are the source of memory starvation. Simple JSPs are very
 unlikely to cause memory starvation, but you mentioned “application
 code”, which implies that you have more than simple JSPs.
 
 A few things you want to cross off your performance check list, which
 will not solve your problem, but are generally necessary:
 1. JVM -server option, just in case
 2. Disable session persistence
 3. If you application does not use sessions, disable them for all JSPs
 (typical place to do it is header JSP include)
 4. Force session termination, no long running sessions.
 5. Remove all apps that you do not need. Tomcat comes with a few built
 in apps and those are not trivial to find. Make sure conf/Catalina and
 all its sub directories contain only apps that you need. Host manager
 and such should be deleted. Same with war files.
 
 What you describe in your memory graph is a simple memory leak.
 Generally, I would look in that order:
 1.  Sessions
 2.  Application code
 3.  Other webapps
 
 1 and 3 are easy to deal with. If you don’t need sessions make sure
 they are not created at all. If you do, force session termination
 after a few minutes in master web.xml or other XML files. Notice that
 one file can define a value and another can overwrite it, so you have
 to make sure all are checked.
 
 If that does not work, application code is the next candidate. You can
 start with an object dump with a profiler or a simple code review/step
 through in a debugger.
 
 E
 
 -
 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: Some advice on apache tomcat

2009-11-16 Thread Anthony Jay
Thanks. Squid may be a contender but I need the CMS and blogging that
comes with apache/php. Although maybe someday our traffic may get to the
point where we will need squid to keep up! Now that would be a good
problem to have! Thanks for the pointer. 

On Mon, 16 Nov 2009 15:36 -0800, Elli Albek e...@sustainlane.com
wrote:
 You can also look at squid to serve static files and load balance. So
 squid fronts tomcat and your other apps. Squid can serve your static
 files as well. All you have to do it make sure your static files
 return a cache header like max-age, and squid will serve them without
 going to the origin (tomcat). Squid can also load balance tomcats and
 route requests for multiple origins based on some rules. We have squid
 doing virtual hosting of tomcats that run different apps, as well as
 serving static content and caching dynamic content.
 
 The down sides vs apache:
 1. Not as many plugins and options
 2. The configuration rules are simpler and more widely
 known/understood in apache
 3. Hard to rewrite URLs. Not impossible, but mod rewrite is much much
 easier to deal with. Actually any manipulation of the request/response
 is less than trivial on squid.
 
 If you go for squid, 2.7 and above. Earlier versions are not as good
 for reverse proxing.
 
 -
 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 requires JRE 5.0 issue

2009-11-16 Thread Mark Thomas
Caldarale, Charles R wrote:
 From: Elizabeth Gorkic [mailto:egor...@hotmail.com]
 Subject: Tomcat 6.0 requires JRE 5.0 issue

 When you open http://apache.crihan.fr/dist/tomcat/tomcat-6/
 v6.0.20/README.html , you get this message:

 Tomcat 6.0 requires JRE 5.0. Read the RELEASE-NOTES and the RUNNING.txt
 file in the distribution for more details.
 
 It's not at all clear where this README.html file comes from.

It originates from the ASF server that feeds the mirror system.

  Rely on what's in the Tomcat downloads, which say Java SE 5 or later.

+1. I have updated README.html for Tomcat 6.0.20 onwards which should get used
for future versions. The updated file should make it out to the mirror system in
the next 24 hours or so.

Mark


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



Re: Some advice on apache tomcat

2009-11-16 Thread Anthony Jay
Thank you very much for your informative comments. 
In terms of breaking an application into single servlets, I agree that
there would need to be strong reasons for doing it, and the clear one
that springs to mind is the requirement to have different authn methods
for each, None, Form, and http basic. But I take your point on board.

I really want to leverage as much flexibility between apache and tomcat
but keep the dependencies and configuration to a minimum. I dream of a
time where I can be lazy in the future. (Fat chance)
Is there a lack of form-based authentication module (production ready)
for apache or am I just really bad at finding things?
I would really like to force apache to do as much as possible of the ssl
and authn and leave tomcat to handle the actual work!
Regards,
Tony 

On Mon, 16 Nov 2009 21:07 +, Pid p...@pidster.com wrote:
 On 16/11/2009 17:53, Anthony Jay wrote:
  Hi,
  I am in need of some advice. My current setup is a web application
  running on Jboss which serves static and dynamic content, jsp,
  servlets and xml on two non load balanced servers (hot spare using
  mysql replication). It currently uses Http Basic Authentication over
  SSL. This has been fine to date but since I dont use any of EJB or
  related features I think that it is overkill for my application, as
  well as being unflexible w.r.t. deployment and content management as
  the whole site is deployed as a single EAR. Initially it was
  fantastic as it was simple and easy to maintain but now every change
  requires a full build.
 
  I am researching porting my site to Apache 2.2 and Tomcat, and hope to
  gain the following.
  1. Serve the static content from apache e.g. images, clips sound, text
  files etc.
  2. Install a CMS to offload content managment to others and also blog
  functionality, Wordpress seems to be the tool of choice for ease of
  usage and widespread usage, this seems to work fine in my test
  environment.
  
  3. Maintain current servlet and jsp (including xml) functionality on
  tomcat. Instead of one super application I can deploy servlets as
  seperate applications and update them seperately.
 
 One servlet per application probably isn't an optimal solution.
 Breaking a single large app into smaller components may be worth it - 
 very much depends on your application.
 
  4. Use connectors such as mod_jk to load balance and provide failover. I
  already have heartbeat and mod_jk installed on in high availabilty mode
  using workers in a test environment and this is working as expected.
  (Apache 2.2 and tomcat 6 running on centos 5.3).
 
  At this point I have hit a brick wall w.r.t. what to do next. I have
  been researching this for the past two weeks and the more I learn the
  more I seem to be confused.
 
 What are you confused about?
 
  There is so much documentation on some
  things but almost none on others. I always fear that if there is nobody
  asking questions about a certain topic it either means that a) There are
  no problems using the technology or b) Nobody is using it at all.
 
 There are lots of questions about mod_jk on this list each week.
 Sometimes they're even different ones.  ;)
 
  My main issue now is about how the authentication works between Tomcat
  and Apache.
 
 It's one way, Tomcat, as an 'inner' component, can defer to 
 authentication set at the outer level in Apache HTTPD.
 See the tomcatAuthentication attribute of the AJP connector.
 
   http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html
 
 Tomcat can't pass it's authenticated principal up to HTTPD.
 
 
  I would like to use both Form based and http basic authentication on
  protected resources running on both apache and tomcat.
 
 You would probably need to seperate those parts into separate 
 applications as FORM and BASIC can only be set once in each web.xml.
 
 (You can of course duplicate the same class or jar in differently 
 configured web apps.)
 
  i.e. Form based for humans and httpbasic for XML requests over ssl.
  I have a user database in mysql containing username and password, roles
  are in another table but these could be merged if required.
 
  I also am confused by mod_jk and mod_proxy_ajp, they, seem to have much
  feature overlap. mod_proxy_ajp in my view suffers terribly from the
  missing *.jsp wildcard capability but has a much simpler configuration
  and better future prospects as it is bundled with apache 2.2.
 
 They offer similar, largely overlapping functionality, you choose one or 
 the other.
 
 mod_proxy_ajp can of course handle *.jsp, when combined with 
 mod_rewrite and the [P] proxy rewrite command.
 
   RewriteRule   ^/(.+)\.jsp(.+)?   ajp://tomcathost/$1.jsp$2   [P,L]
 
  In terms of authentication, which should I use, mod_auth_mysql and
  mod_auth_dbm (or mod_auth_form in future or something else?) and why?
 
 Up to you.
 
  In terms of single sign on how can I make the user experience seamless
  between static 

RE: Some advice on apache tomcat

2009-11-16 Thread Neil Aggarwal
Tony:

 using Tomcat. This is good, how do you handle ssl? Does 
 Apache terminate any SSL, all ssl or only static pages?

Apache terminates the SSL connection and I use JkMount to
push JSP/Servlet stuff into Tomcat.

Neil

--
Neil Aggarwal, (281)846-8957, http://UnmeteredVPS.net
Host your tomcat app on a CentOS VPS for only $25/month!
Unmetered bandwidth, 7 day no risk trial, Google Checkout
 

__ Information from ESET NOD32 Antivirus, version of virus signature
database 4613 (20091116) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 


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



Re: Apache Tomcat Connector (AJP13) is corrupting html content

2009-11-16 Thread ndunn1979


Rainer Jung-3 wrote:
 
 
 BTW: Do you use the tomcat native connector? If so, try whether the
 problem comes from tcnative.
 
 

So, I tried increasing the log level on the Tomcat side, but it was a stab
in the dark because I'm not very familiar with the default style of logging
(I use log4j, and Tomcat is not setup to use that by default). I changed
some logger settings, but it didn't show me anything so I went ahead and
grabbed the tomcat source so I could determine if there was any logging to
be seen or if I had misconfigured the logging.properties file.

I checked the Connector class to find out where I should log and found the
check for APR support. I googled that and found the documentation
referencing the global AprLifecycleListener so I commented that out of the
server.xml file. That didn't change a thing, but I recognized the JNI call
in the test for APR support so I decided to rename tcnative-1.dll. That
forced it to use the java implementation of AJP and all of a sudden my page
works correctly.

So I know for a fact that the issue is with tcnative (thanks for that hint
Ranier).

That leaves me with a few questions:

Why did commenting out the following line not affect it's usage:
Listener className=org.apache.catalina.core.AprLifecycleListener /

The docs say:
The APR library is configured by the AprLifecycleListener. This listener is
configured as a global listener under the Server  element in server.xml. If
the listener can't find the APR/native library when it started, the library
path it searched will be displayed.

Could any of the configuration options (firstReadTimeout, pollTime,
pollerSize, useSendFile, sendfileSize) be causing my problems?

If so, what could be causing my system to behave incorrectly with the
default settings?

What should my next step be in trying to understand why this is not working
on my machine?


-- 
View this message in context: 
http://old.nabble.com/Apache-Tomcat-Connector-%28AJP13%29-is-corrupting-html-content-tp26320290p26382994.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Tomcat DBCP Connection Pooling to MySQL limited number of connection issue in Spring2.5 + Hibernate3 + commons-DBCP1.2

2009-11-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Yagnesh,

On 11/16/2009 9:09 AM, Yagnesh Chawda wrote:
  My bean definition is as follows for DBCP:
 
 bean id=dataSource destroy-method=close
 class=org.apache.commons.dbcp.BasicDataSource
   !--property name=driverClassName
 value=com.mysql.jdbc.jdbc2.optional.MysqlDataSource/
   property name=url value=${db.url}/
   property name=username value=${db.user}/
   property name=password value=${db.pass}/
   property name=initialSize value=40/
   property name=minIdle value=35/
   property name=maxActive value=95/
   property name=maxWait value=2/ --
   /bean

Your bean appears to be almost entirely commented-out. Is this your real
configuration?

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

iEYEARECAAYFAksCE8cACgkQ9CaO5/Lv0PDaRQCfWQPncqd/ykRg9AD4M43ag8FJ
UKkAn0sSdb3b/pUDp9RDDV9KJG1noqys
=MAA7
-END PGP SIGNATURE-

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



MISC; Tomcat-5.5.12; After one Tomcat Cluster node shutdown, sessionDestroyed been called before contextDestroyed

2009-11-16 Thread Imad Hachem

Dear all,
 
I am using Tomcat-5.5.12 as Clustering nodes, and after one node shutdown 
sessionDestroyed is called before contextDestroyed.
 
How can I know if sessionDestroyed is called from session.invalidate() from the 
real expiration of the session or shutdown of one cluster node?
 
Note that on sessionDestroyed event, I am using a Logout behavior to logout my 
users from the DATABASE.
 
I have tried to set a KEY on the context (or application scope) to check on it 
during the sessionDestroyed event, but it seems the context is destroyed after 
the session destroy event.
 
Is there any event listener that I can use before the sessionDestroyed to 
differentiate if one cluster node has been shutdown or my session has been 
expired?
 
Or is how to configure the contextDestroy to be called before the sessions 
destroy?
 
Thanks in advance for your help.

Best Regards,
Imad Hachem 

System Engineer 


  
_
Windows Live: Make it easier for your friends to see what you’re up to on 
Facebook.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_2:092009

Tomcat - Xms and Xmx size

2009-11-16 Thread abdul razack
Hi,
 
I am using tomcat-5.5.23 for JSP/servlet application on Windows server 2003. 
The database is SQL SERVER 2005  and  java version is jdk_1.5.0_12.
 
Currently the maximum and minimum heap size(-Xms256m -Xmx256m) has been 
configured as 256MB.
 
 Very frequently (almost every 10 days)  I am getting Out of memory errors. 
100 user are using JSP/servlet application.
 
 Please let me know whether maximum and minimum heap size can be configured to 
512MB.  What is the upper limit? I am using RAM 3.5GB.
 
Thanks  Regards
-Abdul Razack 
 


  

RE: Tomcat - Xms and Xmx size

2009-11-16 Thread Caldarale, Charles R
 From: abdul razack [mailto:sh_abd...@yahoo.com]
 Subject: Tomcat - Xms and Xmx size
 
  Please let me know whether maximum and minimum heap size can be
 configured to 512MB.  What is the upper limit? I am using RAM 3.5GB.

The amount of RAM is largely irrelevant.  On a 32-bit Windows system, heap size 
is limited to around 1.5G when using 2GB process space, a bit more with 3GB 
process space.  However, raising the heap size will only postpone the 
inevitable - you need to fix your memory leak.  Use a profiler to find out 
what's consuming the heap space, and then fix it.  Even the free profilers 
included in the JDK will help.

 - 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 - Xms and Xmx size

2009-11-16 Thread Neil Aggarwal
Abdul:

  Please let me know whether maximum and minimum heap size can 
 be configured to 512MB.  What is the upper limit? I am using 
 RAM 3.5GB.

You can set the heap size to whatever you want.
There is no restriction from Tomcat.

If you have 3.5 GB RAM in the machine, I would set
the heap no larger than 3 GB.  Considering you
are at 256 MB now, set the max to 1 GB and it should
be plenty large for you.  If you stil run out of
RAM, you probably have a memory leak in your
application.

Neil

--
Neil Aggarwal, (281)846-8957, http://UnmeteredVPS.net
Host your tomcat app on a CentOS VPS for only $25/month!
Unmetered bandwidth, 7 day no risk trial, Google Checkout


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



RE: Tomcat - Xms and Xmx size

2009-11-16 Thread Caldarale, Charles R
 From: Neil Aggarwal [mailto:n...@jammconsulting.com]
 Subject: RE: Tomcat - Xms and Xmx size
 
 You can set the heap size to whatever you want.
 There is no restriction from Tomcat.

Not quite true; a 32-bit Windows environment normally has a 2 GB process space, 
and everything has to fit within that - Java heap, C heap, code, stacks, etc.

 If you have 3.5 GB RAM in the machine, I would set
 the heap no larger than 3 GB.

Not possible on a 32-bit Windows system.

 - 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: Java Out of Heap Issue

2009-11-16 Thread Caldarale, Charles R
 From: kulbir Saini [mailto:kulbir.sai...@gmail.com]
 Subject: Java Out of Heap Issue
 
 just a snapshot of jmap,

Try using jhat to actually see what's consuming the space in the heap.

 Heap Configuration:
MaxNewSize   = -65536 (-0.0625MB)

That looks suspicious...

 Heap Usage:
 PS Young Generation
 Eden Space:
44.77395311745898% used
 From Space:
56.0% used
 PS Old Generation
38.96393638004623% used
 PS Perm Generation
69.73343814711973% used

None of the above show full heap utilization, so the heap dump you have does 
not seem representative of the situation you describe.

 - 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 - Xms and Xmx size

2009-11-16 Thread Neil Aggarwal
Chuck:

 Not quite true; a 32-bit Windows environment normally has a 2 
 GB process space, and everything has to fit within that - 
 Java heap, C heap, code, stacks, etc.
 
  If you have 3.5 GB RAM in the machine, I would set
  the heap no larger than 3 GB.
 
 Not possible on a 32-bit Windows system.

You are correct.  

Everything I do is on 64 bit systems now so
I don't pay attention to those limits anymore.

Thanks for keeping me honest!

Neil

--
Neil Aggarwal, (281)846-8957, http://UnmeteredVPS.net
Host your tomcat app on a CentOS VPS for only $25/month!
Unmetered bandwidth, 7 day no risk trial, Google Checkout


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



Re: Tomcat DBCP Connection Pooling to MySQL limited number of connection issue in Spring2.5 + Hibernate3 + commons-DBCP1.2

2009-11-16 Thread Yagnesh Chawda

Hey,
 Thanks Chris, That was just a typo. Thanks for pointing it out. But in real
configuration was was not commented. It was some other config which I was
trying and forgot to uncomment it in posting.



Christopher Schultz-2 wrote:
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Yagnesh,
 
 On 11/16/2009 9:09 AM, Yagnesh Chawda wrote:
  My bean definition is as follows for DBCP:
 
 bean id=dataSource destroy-method=close
 class=org.apache.commons.dbcp.BasicDataSource
  !--property name=driverClassName
 value=com.mysql.jdbc.jdbc2.optional.MysqlDataSource/
  property name=url value=${db.url}/
  property name=username value=${db.user}/
  property name=password value=${db.pass}/
  property name=initialSize value=40/
  property name=minIdle value=35/
  property name=maxActive value=95/
  property name=maxWait value=2/ --
  /bean
 
 Your bean appears to be almost entirely commented-out. Is this your real
 configuration?
 
 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
 iEYEARECAAYFAksCE8cACgkQ9CaO5/Lv0PDaRQCfWQPncqd/ykRg9AD4M43ag8FJ
 UKkAn0sSdb3b/pUDp9RDDV9KJG1noqys
 =MAA7
 -END PGP SIGNATURE-
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Tomcat-DBCP-Connection-Pooling-to-MySQL-limited-number-of-connection-issue-in-Spring2.5-%2B-Hibernate3-%2B-commons-DBCP1.2-tp26372475p26384679.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



Cannot Start Apache Tomcat 6 service

2009-11-16 Thread Ron Halford
Running Windows 7  - 64 bit o/s

 

Installed the following:

 Jdk - 6u18-ea-bin-b04-windows-adm64

Jre-6u18-ea-bin-b04-windows-adm64

Apache HTTP Web Server 2.2.14

Tomcat 6.0.20

 

After completing Tomcat install - cannot start Tomcat 6 service.

 

Checked Tomcat log: Jakarta_service_20091116 and noted the following -

[174 javajni.c] [error] %1 is not a valid win32 application

[994 prunsrv.c] [error] failed creating java c:\program
files\\java\jre6\bin\server\jmv.dll

 

 

Any suggestions would be greatly appreciated. I am thinking it may have
something to do with the 64 bit o/s but not sure.

 

Ron

 



  1   2   >