Re: Keeping tomcat up-to-date on linux

2010-05-20 Thread Harry Metske
I agree with Hassan,

our reasons to use the tar.gz install method :

* in most serious Tomcat environments you need more control over the
installation and configuration than the distro managed version offers.
* most distro's (especially RHEL) are lagging behind, so you don't get the
latest stuff you need
* we also keep an eye on this list and the tomcat website for updates, and
for security patching we use some sort of subscription service from McAfee,
so that should tell us if there are any security patches that need to be
applied quickly.
* it is usable and the same for all platforms we use
* makes the separation of duty easier with our Linux administrators, at
least I am sure I don't get unsolicited updates to my tomcat installations
when they run an update on every package on every linux box
* we run multiple Tomcat instances on the same OS image, that is not what
the disto is facilitating
* better open source support

But the distro packaged version could be very usable for the masses and
non-pro use.

my two cents

regards,
Harry



2010/5/20 Dale Ogilvie dale.ogil...@trimble.co.nz

 Hi,

 The current release is 6.0.26, March 2010.

 RHEL5.x is running with Tomcat 5.5.

 Fedora 12 is on 6.0.20, June 2009 vintage.

 Ubuntu 10.04 is on 6.0.24 from Jan 2010.

 Ideally, the equivalent of a yum update would track tomcat releases so
 that soon after a tomcat release the tomcat6 package would move to the
 next minor release. Does this happen for any distro out there?

 What do people do to keep their tomcat patched up?

 Thanks

 Dale


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




Re: Classpath for JSP

2010-04-26 Thread Harry Metske
Reuven,

you say the error is it is not found by the compiler used by Tomcat6, but
that is not clear from the JSP compiler output.
It says The constructor DB_Connection() is undefined, so Kris's
suggestion is right.
You could split the statement in a declaration and an assignment to prove
it:

DB_Connection dbCon;
dbCon = new DB_Connection();

Also, do you get this error only if you declare the DB_Connection() in a
JSP, or also if you declare it in another Java class ?
(the JSP compiler uses a slightly different classpath than the webapp
classloader)

regards,
Harry


2010/4/26 Kris Schneider kschnei...@gmail.com

 On Mon, Apr 26, 2010 at 2:11 PM, Reuven Koblick groovyro...@gmail.com
 wrote:
  Sure Chris more specifically, from the localhost.*.log
 
  An error occurred at line: 21 in the jsp file:
  /admin/GenerateTriggersManually.jsp
  The constructor DB_Connection() is undefined

 Does DB_Connection actually have a no-arg constructor 'cause the
 compiler doesn't seem to think so...

  18: body
  19:
  20: %
  21: DB_Connection dbCon = new DB_Connection();
  22:
  23: int timeInterval = 1;
  24:
 
  Here is the JSP file from the webapps/${appname} directory
  less admin/GenerateTriggersManually.jsp
 
  !doctype html public -//W3C//DTD HTML 4.0 Transitional//EN
  %...@page contentType=text/html%
  %...@page pageEncoding=UTF-8%
  %...@page import=com.bestrictlypersonal.db.DB_Connection %
  %...@page import=com.bestrictlypersonal.trigger.* %
  %...@page import=com.bestrictlypersonal.info.Volunteer %
  %...@page
 
 import=com.bestrictlypersonal.db.getTrigger.DB_GetInterruptedSessionReportTrigger
  %
  %...@page import=com.bestrictlypersonal.error.ProcessError %
  %...@page import=com.bestrictlypersonal.email.Email%
  %...@page import=com.bestrictlypersonal.setup.* %
  %...@page import=com.bestrictlypersonal.util.* %
  %...@page import=com.bestrictlypersonal.info.Volunteer%
 
 
 
  html
 headtitleJSP Page/title/head
 body
 
  %
 DB_Connection dbCon = new DB_Connection();
 
 int timeInterval = 1;
 
  lastly, I go to
  webapps/${app-name}/WEB-INF/classes/com/bestrictlypersonal/db and the
 file
  DB_Connection.class is present and accounted for.
 
  Hope that is enough specific.
 
  Reuven
 
 
 
 
 
 
 
  On Mon, Apr 26, 2010 at 1:42 PM, Christopher Schultz 
  ch...@christopherschultz.net wrote:
 
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
  Reuven,
 
  On 4/26/2010 1:22 PM, Reuven Koblick wrote:
   I'm getting an error when code in a *.jsp file tries to instantiate a
  class
   [that] is not found by the compiler used by Tomcat6.
 
  [snip]
 
   I verified that the class that was not found is indeed in
  /WEB-INF/classes.
 
  Can you be specific? Where is the .class file for that class (including
  full path)?
 
   Also, classes in *.jar files in WEB-INF/lib are found. Does anyone
 have
  any
   thoughts or suggestions?
 
  Can you post the import lines from the JSP as well?
 
  Anything else that's relevant (symlinks, network file system, etc.)?
 
  - -chris
  -BEGIN PGP SIGNATURE-
  Version: GnuPG v1.4.10 (MingW32)
  Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
  iEYEARECAAYFAkvV0IcACgkQ9CaO5/Lv0PA+5ACguUaVhNrjTQS3c3r4fXxpIl/v
  mBQAoKLuW9++5QpV/tRcFKQV9QAHC8V+
  =uV0D
  -END PGP SIGNATURE-

 --
 Kris Schneider

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




Re: Multiple catalina bases and monitoring each instance

2010-04-23 Thread Harry Metske
It depends on what you mean with monitor.
We use nagios (http://www.nagios.org) to monitor multiple Tomcat instances.
You can do a plain check for an open socket, or call Tomcat's jmx proxy over
http(s) to query Tomcat's mbeans.

regards,
Harry

2010/4/23 Ziggy zigg...@gmail.com

 Hi guys,

 Is there a way to monitor multiple tomcat instances? I have managed to
 configure multiple tomcat instances using $CATALINA_BASE but i cant seem to
 be able to find a way to monitor the instances. I know about the tomcat
 manager, admin and the Tomcat Probe/lambda applications. These will all
 only
 monitor a single instance of a running tomcat.

 Is there a way i can monitor all running instances from one tomcat
 instance?

 Thanks



Re: Universal connection pooling Type Casting problem

2010-04-19 Thread Harry Metske
2010/4/19 SivaKumarl sivakum...@naradaproducts.com


 Hi Friends,
  I am using universal connection pooling for connecting database ,
 while configuring manually i able to connect to database,but while
 configuring in server.xml i am unable to cast the datasource i am getting
 the class cast exception, please find the below configuration and error
 details , correct me if i configured wrong .I am using Tomcat 6.0

 server.xml configurartion

  Context docBase=UCP path=/UCP reloadable=true
 source=org.eclipse.jst.jee.server:UCP
  Resource auth=Container description=DataSource Reference
 driverClassName=oracle.jdbc.OracleDriver
maxActive=4 maxIdle=2 maxWait=5000
 name=jdbc/oracleds factory=oracle.jdbc.pool.OracleDataSource


shouldn't that be something like
factory=oracle.jdbc.pool.OracleDataSourceFactory
or  factory=oracle.jdbc.connector.OracleManagedConnectionFactory


   username=branch password=branch
 type=oracle.ucp.jdbc.PoolDataSourceImpl
url=jdbc:oracle:thin:@//192.168.203.12:1521/ycs
 validationQuery=select 1 from dual/
  /Context

 Error Details
 javax.naming.NamingException: Could not create resource factory instance
 [Root exception is java.lang.ClassCastException:
 oracle.jdbc.pool.OracleDataSource cannot be cast to
 javax.naming.spi.ObjectFactory]
at

 org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:102)
at
 javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.apache.naming.NamingContext.lookup(NamingContext.java:793)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at TestServlet.doGet(TestServlet.java:37)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at

 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at

 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at

 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at

 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at

 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at

 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at

 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at

 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at
 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:619)
 Caused by: java.lang.ClassCastException: oracle.jdbc.pool.OracleDataSource
 cannot be cast to javax.naming.spi.ObjectFactory
at

 org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:98)
... 20 more


 Java code for retrieving connection

 Context initContext;
try {
initContext = new InitialContext();

Context envContext  =
 (Context)initContext.lookup(java:/comp/env);
DataSource ds =
 (DataSource)envContext.lookup(jdbc/oracleds);
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}



 Thanks in Advance
 Siva kumar

 --
 View this message in context:
 http://old.nabble.com/Universal-connection-pooling-Type-Casting-problem-tp28287054p28287054.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: Oracle Universal connection pooling type cast problem while configuring in server.xml

2010-04-19 Thread Harry Metske
this is an exact cut/paste from an earlier post, it won't help you repeating
the same questions.

regards,
Harry


2010/4/19 Thangavelu.V thangavel...@yalamanchili.co.in

 Hi Friends,
  I am using universal connection pooling for connecting database ,
 while configuring manually i able to connect to database,but while
 configuring in server.xml i am unable to cast the datasource i am getting
 the class cast exception, please find the below configuration and error
 details , correct me if i configured wrong , I am  using Tomcat 6.0

 server.xml configurartion

  Context docBase=UCP path=/UCP reloadable=true
 source=org.eclipse.jst.jee.server:UCP
  Resource auth=Container description=DataSource Reference
 driverClassName=oracle.jdbc.OracleDriver
maxActive=4 maxIdle=2 maxWait=5000
 name=jdbc/oracleds factory=oracle.jdbc.pool.OracleDataSource
username=branch password=branch
 type=oracle.ucp.jdbc.PoolDataSourceImpl
url=jdbc:oracle:thin:@//192.168.203.12:1521/ycs
 validationQuery=select 1 from dual/
  /Context

 Error Details
 javax.naming.NamingException: Could not create resource factory instance
 [Root exception is java.lang.ClassCastException:
 oracle.jdbc.pool.OracleDataSource cannot be cast to
 javax.naming.spi.ObjectFactory]
at

 org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.
 java:102)
at
 javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.apache.naming.NamingContext.lookup(NamingContext.java:793)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at TestServlet.doGet(TestServlet.java:37)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at

 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
 FilterChain.java:290)
at

 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
 ain.java:206)
at

 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
 va:233)
at

 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
 va:191)
at

 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128
 )
at

 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102
 )
at

 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
 :109)
at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at

 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http
 11Protocol.java:583)
at
 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:619)
 Caused by: java.lang.ClassCastException: oracle.jdbc.pool.OracleDataSource
 cannot be cast to javax.naming.spi.ObjectFactory
at

 org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.
 java:98)
... 20 more


 Java code for retrieving connection

 Context initContext;
try {
initContext = new InitialContext();

Context envContext  =
 (Context)initContext.lookup(java:/comp/env);
DataSource ds =
 (DataSource)envContext.lookup(jdbc/oracleds);
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}






 Thanks and Regards,

 V.Thangavelu

 Software Engineer

 This e-mail message may contain confidential, proprietary or legally
 privileged information. It should not be used by anyone who is not the
 original intended recipient. If you have erroneously received this message,
 please delete it immediately and notify the sender. The recipient
 acknowledges that YALAMANCHILI or its subsidiaries and associated
 companies,
 are unable to exercise control or ensure or guarantee the integrity of/over
 the contents of the information contained in e-mail transmissions and
 further acknowledges that any views expressed in this message are those of
 the individual sender and no binding nature of the message shall be implied
 or assumed unless the sender does so expressly with due authority of
 YALAMANCHILI Group.  Before opening any attachments please check them for
 viruses and defects.






Re: memory problems / time outs

2010-04-19 Thread Harry Metske
2010/4/19 Woude, Alexander van der alexander.vander.wo...@capgemini.com

 Sorry a small correction. The client times out, because the tomcat gives a
 Heap Space memory error.

 config in startup.sh :

 export JAVA_OPTS=-Xms128m -Xmx512m
 export CATALINA_OPTS=-Xms512m -XX:MaxPermSize=512m

 My apps are 7 war, that  each contain its own deps. Size of 1 war is 14 MB

 How do I check the memory the tomcat uses?


you can also enable JMX, see
http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html#Enabling
JMX Remote and use jconsole to monitor real time memory usage.



 Greetings
 Alex


 
 Van: Woude, Alexander van der [alexander.vander.wo...@capgemini.com]
 Verzonden: maandag 19 april 2010 13:49
 Aan: users@tomcat.apache.org
 Onderwerp: memory problems / time outs

 Hello All

 For a client I developed a few Data webservices. In total there are 7
 services.
 All are CXF based webservices that use hibernate.

 I keep having memory problems, so I increased both JAVA_OPTS as
 CATALINA_OPTS.
 Now I get timed out errors and tomcat blocks completely, I only can resolve
 things by restarting the tomcat server.

 I did profile my services and I did profile my hibernate DAO's and it seems
 fine.
 I have no clue where to look anymore for a solution, any idea is welcome.

 I use tomcat-6.0.18 on RedHat enterprise linux 5 , 64 bit version. With a
 OpenJDK java6 64 JVM.

 Thanks
 Alex






 This message contains information that may be privileged or confidential
 and is the property of the Capgemini Group. It is
 intended only for the person to whom it is addressed. If you are not the
 intended recipient, you are not authorized to
 read, print, retain, copy, disseminate, distribute, or use this message or
 any part thereof. If you receive this message
 in error, please notify the sender immediately and delete all copies of
 this message.


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







 This message contains information that may be privileged or confidential
 and is the property of the Capgemini Group. It is
 intended only for the person to whom it is addressed. If you are not the
 intended recipient, you are not authorized to
 read, print, retain, copy, disseminate, distribute, or use this message or
 any part thereof. If you receive this message
 in error, please notify the sender immediately and delete all copies of
 this message.


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




Re: memory problems / time outs

2010-04-19 Thread Harry Metske
if you specify java options in JAVA_OPTS it is both valid for startup and
shutdown, if you specify java options in CATALINA_OPTS it is only valid for
startup.
So my guess is that CATALINA_OPTS is the right place in your situation.

regards,
Harry

2010/4/19 Woude, Alexander van der alexander.vander.wo...@capgemini.com

 Thanks for the suggestions this far.
 I had an oversight with the tomcat monitoring, didnt notice it on the site.

 I will try that just as the suggestions about JStack etc.

 why 2 Xms settings?
 I thought to have understood that catalina en java opts were 2 seperate
 things but I was wrong?

 Thanks
 Alex
 
 Van: Harry Metske [harry.met...@gmail.com]
 Verzonden: maandag 19 april 2010 14:16
 Aan: Tomcat Users List
 Onderwerp: Re: memory problems / time outs

 2010/4/19 Woude, Alexander van der alexander.vander.wo...@capgemini.com

  Sorry a small correction. The client times out, because the tomcat gives
 a
  Heap Space memory error.
 
  config in startup.sh :
 
  export JAVA_OPTS=-Xms128m -Xmx512m
  export CATALINA_OPTS=-Xms512m -XX:MaxPermSize=512m
 
  My apps are 7 war, that  each contain its own deps. Size of 1 war is 14
 MB
 
  How do I check the memory the tomcat uses?
 

 you can also enable JMX, see
 http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html#Enabling
 JMX Remote and use jconsole to monitor real time memory usage.



  Greetings
  Alex
 
 
  
  Van: Woude, Alexander van der [alexander.vander.wo...@capgemini.com]
  Verzonden: maandag 19 april 2010 13:49
  Aan: users@tomcat.apache.org
  Onderwerp: memory problems / time outs
 
  Hello All
 
  For a client I developed a few Data webservices. In total there are 7
  services.
  All are CXF based webservices that use hibernate.
 
  I keep having memory problems, so I increased both JAVA_OPTS as
  CATALINA_OPTS.
  Now I get timed out errors and tomcat blocks completely, I only can
 resolve
  things by restarting the tomcat server.
 
  I did profile my services and I did profile my hibernate DAO's and it
 seems
  fine.
  I have no clue where to look anymore for a solution, any idea is welcome.
 
  I use tomcat-6.0.18 on RedHat enterprise linux 5 , 64 bit version. With a
  OpenJDK java6 64 JVM.
 
  Thanks
  Alex
 
 
 
 
 
 
  This message contains information that may be privileged or confidential
  and is the property of the Capgemini Group. It is
  intended only for the person to whom it is addressed. If you are not the
  intended recipient, you are not authorized to
  read, print, retain, copy, disseminate, distribute, or use this message
 or
  any part thereof. If you receive this message
  in error, please notify the sender immediately and delete all copies of
  this message.
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
 
 
 
 
  This message contains information that may be privileged or confidential
  and is the property of the Capgemini Group. It is
  intended only for the person to whom it is addressed. If you are not the
  intended recipient, you are not authorized to
  read, print, retain, copy, disseminate, distribute, or use this message
 or
  any part thereof. If you receive this message
  in error, please notify the sender immediately and delete all copies of
  this message.
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 






 This message contains information that may be privileged or confidential
 and is the property of the Capgemini Group. It is
 intended only for the person to whom it is addressed. If you are not the
 intended recipient, you are not authorized to
 read, print, retain, copy, disseminate, distribute, or use this message or
 any part thereof. If you receive this message
 in error, please notify the sender immediately and delete all copies of
 this message.


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




Re: common/endorsed - Tomcat 6.0

2010-04-18 Thread Harry Metske
2010/4/18 Christoph Kukulies k...@kukulies.org

 Harry Metske schrieb:

  2010/4/18 Christoph Kukulies k...@kukulies.org



 I'm experimenting with a wsdl enabled service deplyed to tomcat.
 The build.xml file has
 this section in it:

  condition property=lib.home value=${catalina.home}/shared/lib
 else=${as.home}
 /lib
  isset property=bld.for.tomcat/
  /condition

  condition property=lib.endorsed
 value=${catalina.home}/common/endorsed
  isset property=bld.for.tomcat/
  /condition

  condition property=lib.endorsed value=${as.home}/lib/endorsed
  and
  not
  isset property=bld.for.tomcat/
  /not
  available file=${as.home}/lib/endorsed type=dir/
  /and
  /condition

 Maybe this file is for Tomcat 5.5 or something, don't know. I chaned the
 shared/lib to /lib already but
 what should I do with common/endorsed?




 assuming you are now using tomcat 6:  remove it, it is no longer used


 em, er, excuse me, you are kidding. what is then the current version? Or
 should I go back to 5.5
 with all my other apps?


sorry, maybe I was not clear enough.
In your first email you did not mention what version of tomcat you are
using, you only mentioned that you had a build file that was probably for
tomcat 5.
The current version of tomcat is of course 6, and in version 6 there is no
longer a common/endorsed directory, in that case my suggestion was to remove
the common/endorsed from your build file too (and move all jars to lib).

regards,
Harry


 --
 Christoph





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




Re: loading properties file from WEB-INF instead of WEB-INF/classes

2010-04-18 Thread Harry Metske
2010/4/17 Thufir hawat.thu...@gmail.com

 getPropsFromWebINF works so long as the properties file is within the
 package of
 the class (/.  However, I'd like to put the properties file under WEB-INF:



public void getPropsFromWebINF() throws IOException {
Properties p = new Properties();
InputStream is;
is = getClass().getResourceAsStream(sqljdbc4.properties);
p.load(is);
log(p.toString());
}


Class.getResourceAsStream() will delegate to the classloader to find the
resource (searches the classpath) , see
http://java.sun.com/javase/6/docs/api/java/lang/Class.html#getResourceAsStream(java.lang.String)
The tomcat site has an excellent description of Tomcat's classloading :
http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html , this
should bring you to the conclusion that the above won't work.
You should put your sqljdbc4.properties file in WEB-INF/classes, or in
WEB-INF/lib if packaged in a jar file.
If you reference it from your application, make sure you prepend a / (or
it will search in your servlet's package) .



I've seen mention of using:

 System.getenv(APP_PROPERTIES);

 in conjunction with a context (context.xml under META-INF) along the lines
 of:

 ?xml version=1.0 encoding=UTF-8?
 Context antiJARLocking=true path=/A00720398sat
Environment name=APP_PROPERTIES
 description=The APP Properties File override=false
 type=java.lang.String
 value=/WEB-INF/app.properties /
 /Context


 however, I'm not able to get the environment, I just get a null value.


can you be a bit more specific where you get a null value (show some lines
of code)...
although the above won't bring you to the content of the property file, you
only have defined a key/value pair.


regards,
Harry


 What's the correct, and simple, idiom?  (Staying away from jndi and dbcp
 for
 now, and, oddly enough, servlets in this case.)



 Actually, I suppose in a sense it's in WEB-INF:

 dtc01l0376-06:~ a00720398$
 dtc01l0376-06:~ a00720398$ jar -tfv
 NetBeansProjects/A00720398sat/dist/A00720398sat.war | grep sql
   498 Sat Apr 17 14:36:14 PDT 2010
 WEB-INF/classes/controller/sqljdbc4.properties



 however, I'd like to move it from WEB-INF/classes up to just WEB-INF.



 thanks,

 Thufir


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




Re: Tomcat Shutdown suddenly / random

2010-04-16 Thread Harry Metske
Peter,

could it be that something is sending your tomcat process a TERM signal,
logfiles in /var/log might tell something ?
or one of your applications issues a System.exit() under certain
circumstances ?

regards,
Harry

2010/4/16 Peter Borkowski apocalyps...@gmx.de

 Hi folks,

 we are facing a serious problem with our tomcat which shuts itself down
 after some time of running. this problem first arises after we switched to
 our new server.
 we are using tomcat 6.0.26 (also tried different other 5.5.x, 6.0.x
 versions).
 the old server was a 32 bit red hat enterprise linux system.
 the new server is a 64 bit debian 5 (also tried debian 6).

 the log always gives us the following message, so as if the tomcat has been
 cleanly
 shutdown, which is really strange.

 16.04.2010 11:52:42 org.apache.coyote.http11.Http11Protocol pause
 INFO: Pausing Coyote HTTP/1.1 on http-8080
 16.04.2010 11:52:43 org.apache.catalina.core.StandardService stop
 INFO: Stopping service Catalina
 16.04.2010 11:52:43 org.apache.coyote.http11.Http11Protocol destroy
 INFO: Stopping Coyote HTTP/1.1 on http-8080

 we also tried to switch the shutdown-message and the shutdown-port, without
 effect.
 the tomcat process is started with a non-root-user. the server runs for 15
 minutes to 8 hours before it happens.

 any suggestions or help would be nice.

 cya, peter


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




Re: Tomcat on AIX 5.3

2010-04-14 Thread Harry Metske
Janos,

there are no clues that the delays are caused by tomcat, so maybe you should
look in general at other causes of delays.
There are a multiple components in the chain that can cause delays,
networking, IO, CPU.
You did not mention how much CPU you have at your disposal on your P6
machine, maybe you can have a look with IBM's nmon tool, contact your AIX
support colleagues.
And if your application has logging (maybe you can increase loglevels), that
is the first spot to look at, that should give you a clue where the delays
are.

regards,
Harry


2010/4/14 János Löbb janos.l...@yale.edu

 Filip,
 ,
 What tool  - java based or aix based -, can I use to see where does the
 time go ?  /I am not a Java programmer/
 I do not think it is the webapp, or tomcat, because the same configuration
 is fast on OSX server.
 DNS is working fine.

 Thanks ahead,

 János

 On Apr 14, 2010, at 11:28 AM, Filip Hanik - Dev Lists wrote:

  you'd have to figure out what takes the time. Could be anything, including
 a DNS timeout

 Filip

 On 04/14/2010 08:34 AM, János Löbb wrote:

 Hi,

 I installed Tomcat 6.0.26 in an IBM P6 LPAR .  The java version is
 1.5.0 that is equivalent to Java 5.  The LPAR has 12G memory and there are
 two databases on it, a Sybase and a MySql.  Sybase takes 3 G and mysql takes
 3 G, so there is still plenty for Tomcat.

 The idea to put Tomcat here, was, that the webapp is connecting to the
 Sybase database on this LPAR, so getting the data locally should be faster
 than getting it via the network from another machine running Tomcat.

 Interestingly it is not the case.  When the same webapp deployed on the
 LPAR and on the other machine - an OSX Server  10.5.8 -, the screens on a
 client machine are coming much faster from the OSX server compared to the
 AIX LPAR.

 Is there anything special configuring Tomcat on AIX than on OSX ?

 On both machines the memory settings are the same for tomcat :
 CATALINA_OPTS=-server -Xms512M -Xmx1024M

 and on AIX the option to use the IPv4 Stack is set in JAVA_OPTS.

 None of the .xml files were modified in the conf directory.

 Thanks ahead,

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




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



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




Re: Tomcat startup error

2010-04-09 Thread Harry Metske
Amit,

you should post the full stacktrace, but it looks like your embedding
package was compiled against an older version of Tomcat than the one you are
running.
The method signature
of org.apache.tomcat.util.IntrospectionUtils.setProperty has changed (return
type void = boolean) in revision  467222 (24-10-2006)

It should be recompiled with the current version.

regards,
Harry


2010/4/9 Amit Agarwal ami@gmail.com

 After upgrading to the  latest 6.0.26 ver from 6.0.13, I see the following
 error while starting embedded Tomcat.
 Any ideas how to get around this?

 WrapperSimpleApp: Encountered an error running main:
 java.lang.NoSuchMethodError:

 org.apache.tomcat.util.IntrospectionUtils.setProperty(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;)V

 java.lang.NoSuchMethodError:

 org.apache.tomcat.util.IntrospectionUtils.setProperty(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;)V

  at com.mypkg.packaging.EmbeddedTomcat.startTomcat(Unknown Source)


 Amit
 --
 Be Happy. Always.



Re: Tomcat startup error

2010-04-09 Thread Harry Metske
you are using some piece of software (com.mypkg.packaging.*) that is calling
tomcat code.
It expects to find a method in org.apache.tomcat.util.IntrospectionUtils
that is no longer there in 6.0.26, which causes the NoSuchMethodError.
Basically your embedder does not support this version of Tomcat, you should
contact the vendor, they should do the recompile .

regards,
Harry

2010/4/9 Amit Agarwal ami@gmail.com

 Hi Harry,
 Thanks for the tip. Here is the full stack trace.

 I am not sure what did you mean by compile with embedding package. Could
 you
 put some more light on it.


 WrapperSimpleApp: Encountered an error running main:
 java.lang.NoSuchMethodError:

 org.apache.tomcat.util.IntrospectionUtils.setProperty(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;)V

 java.lang.NoSuchMethodError:

 org.apache.tomcat.util.IntrospectionUtils.setProperty(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;)V

  at com.mypkg.packaging.EmbeddedTomcat.startTomcat(Unknown Source)

   at com.mypkg.packaging.HMMain.runMain(Unknown Source)

  at com.mypkg.packaging.HMMain.main(Unknown Source)

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

  at

 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

  at

 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

  at java.lang.reflect.Method.invoke(Method.java:597)

  at
 org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:292)

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

 On Fri, Apr 9, 2010 at 11:09 PM, Harry Metske harry.met...@gmail.com
 wrote:

  Amit,
 
  you should post the full stacktrace, but it looks like your embedding
  package was compiled against an older version of Tomcat than the one you
  are
  running.
  The method signature
  of org.apache.tomcat.util.IntrospectionUtils.setProperty has changed
  (return
  type void = boolean) in revision  467222 (24-10-2006)
 
  It should be recompiled with the current version.
 
  regards,
  Harry
 
 
  2010/4/9 Amit Agarwal ami@gmail.com
 
   After upgrading to the  latest 6.0.26 ver from 6.0.13, I see the
  following
   error while starting embedded Tomcat.
   Any ideas how to get around this?
  
   WrapperSimpleApp: Encountered an error running main:
   java.lang.NoSuchMethodError:
  
  
 
 org.apache.tomcat.util.IntrospectionUtils.setProperty(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;)V
  
   java.lang.NoSuchMethodError:
  
  
 
 org.apache.tomcat.util.IntrospectionUtils.setProperty(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;)V
  
at com.mypkg.packaging.EmbeddedTomcat.startTomcat(Unknown Source)
  
  
   Amit
   --
   Be Happy. Always.
  
 



 --
 Be Happy. Always.



Re: Fwd: How to install tomcat 6.0.X in IBM P series box running with RHEL 5

2010-03-30 Thread Harry Metske
Chuck, a bit off-topic, but since we might have to choose the next few
months which JVM to use on Intel/Linux, I am interested in why you think the
OpenJDK is pretty awful ?

regards,
Harry

2010/3/30 Caldarale, Charles R chuck.caldar...@unisys.com

  From: André Warnier [mailto:a...@ice-sa.com]
  Subject: Re: Fwd: How to install tomcat 6.0.X in IBM P series box
  running with RHEL 5
 
  (And you should anyway first install a reasonable Java JVM 1.6 before
  Tomcat; usually people here do not consider the OpenJDK JVM as
  reasonable for Tomcat).

 Actually, OpenJDK (which comes from what used be known as Sun) is probably
 ok; it's the GNU JVM that is pretty awful.

  - 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: BASIC Authentication : Not working

2010-03-28 Thread Harry Metske
I would think your url-pattern is not valid :

url-pattern/*corejspbean*/StringBean.jsp/url-pattern

I don't know the exact rules for the pattern, but could you try first with
/* and see if that works, and then tweak the url-pattern further to your
needs ?

regards,
Harry

2010/3/28 Binu Kuttikkattu Idicula binukuttikka...@googlemail.com

  Hi,
 I was trying a very basic example of authentication using HTTP Basic
  Authentication. However this seems not working in TOMCAT 6.0.20 for my
  application. Here is the web.xml which tells about login
 
 
  security-role
 
  role-nameapplication/role-name
 
  /security-role
 
  !-- SECURITY CONSTRAINT --
 
  security-constraint
 
  web-resource-collection
 
  web-resource-nameJSP/web-resource-name
 
  url-pattern/*corejspbean*/StringBean.jsp/url-pattern
 
  http-methodGET/http-method
 
  http-methodPOST/http-method
 
  /web-resource-collection
 
  auth-constraint
 
  role-nameapplication/role-name
 
  /auth-constraint
 
  user-data-constraint
 
  transport-guaranteeCONFIDENTIAL/transport-guarantee
 
  /user-data-constraint
 
  /security-constraint
 
  !-- LOGIN CONFIGURATION--
 
  login-config
 
  auth-methodBASIC/auth-method
 
  realm-nameapplication/realm-name
 
  /login-config
 
 
 
  I have also defined a role application and a user by name user for
 that
  role in tomcat-users file. What could be the problem?
 



Re: access to localhost:8080 fails

2010-03-28 Thread Harry Metske
I have seen similar issues on our corporate (XP and Vista) laptops, somebody
decided that the locally running firewall should also block access to
localhost. I think you should first verify if that's the case.
I'm not a Windows expert, so I don't know how to check if the above is the
case.
If you are allowed to give the netstat command, try the suggestion from
Charles (netstat -ano), if you see status SYN_SENT, it's for sure a firewall
issue.

regards,
Harry

2010/3/28 Krishanu Biswas biswas.krish...@googlemail.com

 Chuck:

 To verify the network issue, I installed Tomcat on my personal laptop. The
 browser is still unable to show up: http//localhost:8080.
 I'm connected to a router via a wireless network which in turn connects me
 to the internet. I have Mcafee antivirus, firewall and spyware installed.

 I will now look into the problem from this direction as well. Thank you.

 Krish

 On Sun, Mar 28, 2010 at 8:28 PM, Caldarale, Charles R 
 chuck.caldar...@unisys.com wrote:

   From: Krishanu Biswas [mailto:biswas.krish...@googlemail.com]
   Subject: access to localhost:8080 fails
  
   I've a 6.0.26 (latest) Tomcat installed on my laptop (windows vista
   ulltimate). When inside corporate network, it works. In home network,
   it doesn't.
 
  Sounds like whatever security agent you're using imposes different
 firewall
  rules depending on whether or not you're attached to the corporate
 network.
   (The one we use - SEP - certainly does.)  You'll have to figure out how
 to
  change the firewall config - if you're allowed to.
 
   - 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