Re: Connecting Tomcat to a database

2010-07-09 Thread Christian Bruckhoff

Hi.

Am 08.07.2010 23:36, schrieb Caldarale, Charles R:

From: Christian Bruckhoff [mailto:christian.bruckh...@gmx.de]
Subject: Re: Connecting Tomcat to a database

Sorry was in a haste, forgot much more than this. :-/
- Tomcat 7.0.0
- Java 1.6 Update 20
- Windows XP SP3
- Wanted to use DB for Apache ODE 2.0 Beta



That's how it was shown here: http://ode.apache.org/war-deployment.html


Most unfortunate that they're suggesting very, very out of date practices.  Put the 
MySQL JDBC driver in Tomcat's lib directory, not common/lib (that was changed quite 
some time ago).  Place the followingContext  element in 
webapps/ode/META-INF/context.xml:

Context reloadable=true crossContext=true
   Resource name=jdbc/ODEDB auth=Container type=javax.sql.DataSource
 maxActive=100 maxIdle=30 maxWait=1
 username=root password= driverClassName=com.mysql.jdbc.Driver
 url=jdbc:mysql://localhost:3306/ode?autoReconnect=true/
/Context


I did and modified it to my database:


?xml version=1.0 encoding=UTF-8?
Context reloadable=true crossContext=true
  Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource
maxActive=100 maxIdle=30 maxWait=1
username=test_dab password=moep 
driverClassName=com.mysql.jdbc.Driver


url=jdbc:mysql://mysqlhost.uni-koblenz.de:3306/TestDB?autoReconnect=true/
/Context


I also edited ode-axis2.properties to


ode-axis2.db.mode=EXTERNAL
ode-axis2.db.ext.dataSource=java:comp/env/jdbc/TestDB


after this, I get the this error log:


09.07.2010 08:59:04 org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.20.
09.07.2010 08:59:04 org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters 
[false], ra

ndom [true].
09.07.2010 08:59:05 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1235 ms
09.07.2010 08:59:05 org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
09.07.2010 08:59:05 org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.0
09.07.2010 08:59:05 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive ode.war
DEBUG - GeronimoLog.debug(66) | Loading properties
DEBUG - GeronimoLog.debug(66) | Initializing transaction manager
DEBUG - GeronimoLog.debug(66) | Initializing transaction manager using 
org.apach

e.ode.il.EmbeddedGeronimoFactory
DEBUG - GeronimoLog.debug(66) | Creating data source.
ERROR - GeronimoLog.error(108) | Failed to resolved external DataSource 
at java

:comp/env/jdbc/TestDB.
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:774)
at org.apache.naming.NamingContext.lookup(NamingContext.java:144)
at org.apache.naming.NamingContext.lookup(NamingContext.java:785)
at org.apache.naming.NamingContext.lookup(NamingContext.java:144)
at org.apache.naming.NamingContext.lookup(NamingContext.java:785)
at org.apache.naming.NamingContext.lookup(NamingContext.java:157)
at 
org.apache.naming.SelectorContext.lookup(SelectorContext.java:156)

at javax.naming.InitialContext.lookup(InitialContext.java:392)
at 
org.apache.ode.il.dbutil.Database.lookupInJndi(Database.java:244)
at 
org.apache.ode.il.dbutil.Database.initExternalDb(Database.java:159)
at 
org.apache.ode.il.dbutil.Database.initDataSource(Database.java:144)

at org.apache.ode.il.dbutil.Database.start(Database.java:99)
at 
org.apache.ode.axis2.ODEServer.initDataSource(ODEServer.java:218)

at org.apache.ode.axis2.ODEServer.init(ODEServer.java:157)
at org.apache.ode.axis2.ODEServer.init(ODEServer.java:116)
at 
org.apache.ode.axis2.hooks.ODEAxisServlet.init(ODEAxisServlet.java:53

)
at 
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.

java:1164)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.

java:1118)
at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:10

05)
at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex

t.java:4529)
at 
org.apache.catalina.core.StandardContext.startInternal(StandardContex

t.java:4800)
at 
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase

.java:785)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:76

3)
at 
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:558)


at 

Re: Tomcat crashed after servicing too many HTTPS connection

2010-07-09 Thread Pid
On 09/07/2010 03:26, Goo Sam Kong wrote:
 Hi Chuck,
 
 I do not have a choice on my server because I can not upgrade the Tomcat and
 JVM. The server is a proprietary security hardware, no way to upgrade except
 the hardware vendor release new patch for that.
 
 Thank you for your reply, :-).

It's a proprietary security hardware that hasn't been patched or
upgraded properly for years?  You should ask your vendor about that.


p


 On 6 July 2010 20:44, Caldarale, Charles R chuck.caldar...@unisys.comwrote:
 
 From: Goo Sam Kong [mailto:skgo...@gmail.com]
 Subject: Re: Tomcat crashed after servicing too many HTTPS connection

 I did the same test on Tomcat 5.5.16 with JDK 1.5.0
 update 7 on Windows XP

 Why are you mucking around with versions of Tomcat that are over four years
 old?  Many, many serious fixes - some critical - have gone in since then.
  Move up.

 You might want to upgrade your JVM as well - it's pretty ancient.

  - 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


 




signature.asc
Description: OpenPGP digital signature


problem while deploying

2010-07-09 Thread kalasagar reddy battepati
Hi i am using  tomcat 6.0.14
and my java_home is jdk1.6.0_20

i am deploying my web application in 8080 port

it's giving succesful deployment . but when i checked WEB-INF folder in
tomcat/webapps/myappln/

its not there

what may be the problem

please help me


Thanks in advance


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


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



problem while deploying

2010-07-09 Thread kalasagar reddy battepati

Hi i am using  tomcat 6.0.14
and my java_home is jdk1.6.0_20

i am deploying my web application in 8080 port

it's giving succesful deployment . but when i checked WEB-INF folder in
tomcat/webapps/myappln/

its not there

what may be the problem

please help me


Thanks in advance




kalasagar reddy battepati,
cdac knowledge park,
bangalore

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


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



Re: Connecting Tomcat to a database

2010-07-09 Thread Pid
On 09/07/2010 08:01, Christian Bruckhoff wrote:
 Hi.
 
 Am 08.07.2010 23:36, schrieb Caldarale, Charles R:
 From: Christian Bruckhoff [mailto:christian.bruckh...@gmx.de]
 Subject: Re: Connecting Tomcat to a database

 Sorry was in a haste, forgot much more than this. :-/
 - Tomcat 7.0.0
 - Java 1.6 Update 20
 - Windows XP SP3
 - Wanted to use DB for Apache ODE 2.0 Beta

 That's how it was shown here: http://ode.apache.org/war-deployment.html

 Most unfortunate that they're suggesting very, very out of date
 practices.  Put the MySQL JDBC driver in Tomcat's lib directory, not
 common/lib (that was changed quite some time ago).  Place the
 followingContext  element in webapps/ode/META-INF/context.xml:

For future ref:

 https://issues.apache.org/jira/browse/ODE-871


p

 Context reloadable=true crossContext=true
Resource name=jdbc/ODEDB auth=Container
 type=javax.sql.DataSource
  maxActive=100 maxIdle=30 maxWait=1
  username=root password=
 driverClassName=com.mysql.jdbc.Driver
  url=jdbc:mysql://localhost:3306/ode?autoReconnect=true/
 /Context
 
 I did and modified it to my database:
 
 
 ?xml version=1.0 encoding=UTF-8?
 Context reloadable=true crossContext=true
   Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource
 maxActive=100 maxIdle=30 maxWait=1
 username=test_dab password=moep
 driverClassName=com.mysql.jdbc.Driver
 
 url=jdbc:mysql://mysqlhost.uni-koblenz.de:3306/TestDB?autoReconnect=true/
 
 /Context
 
 
 I also edited ode-axis2.properties to
 
 
 ode-axis2.db.mode=EXTERNAL
 ode-axis2.db.ext.dataSource=java:comp/env/jdbc/TestDB
 
 
 after this, I get the this error log:
 
 
 09.07.2010 08:59:04 org.apache.catalina.core.AprLifecycleListener init
 INFO: Loaded APR based Apache Tomcat Native library 1.1.20.
 09.07.2010 08:59:04 org.apache.catalina.core.AprLifecycleListener init
 INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters
 [false], ra
 ndom [true].
 09.07.2010 08:59:05 org.apache.catalina.startup.Catalina load
 INFO: Initialization processed in 1235 ms
 09.07.2010 08:59:05 org.apache.catalina.core.StandardService startInternal
 INFO: Starting service Catalina
 09.07.2010 08:59:05 org.apache.catalina.core.StandardEngine startInternal
 INFO: Starting Servlet Engine: Apache Tomcat/7.0.0
 09.07.2010 08:59:05 org.apache.catalina.startup.HostConfig deployWAR
 INFO: Deploying web application archive ode.war
 DEBUG - GeronimoLog.debug(66) | Loading properties
 DEBUG - GeronimoLog.debug(66) | Initializing transaction manager
 DEBUG - GeronimoLog.debug(66) | Initializing transaction manager using
 org.apach
 e.ode.il.EmbeddedGeronimoFactory
 DEBUG - GeronimoLog.debug(66) | Creating data source.
 ERROR - GeronimoLog.error(108) | Failed to resolved external DataSource
 at java
 :comp/env/jdbc/TestDB.
 javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
 at org.apache.naming.NamingContext.lookup(NamingContext.java:774)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:144)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:785)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:144)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:785)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:157)
 at
 org.apache.naming.SelectorContext.lookup(SelectorContext.java:156)
 at javax.naming.InitialContext.lookup(InitialContext.java:392)
 at
 org.apache.ode.il.dbutil.Database.lookupInJndi(Database.java:244)
 at
 org.apache.ode.il.dbutil.Database.initExternalDb(Database.java:159)
 at
 org.apache.ode.il.dbutil.Database.initDataSource(Database.java:144)
 at org.apache.ode.il.dbutil.Database.start(Database.java:99)
 at
 org.apache.ode.axis2.ODEServer.initDataSource(ODEServer.java:218)
 at org.apache.ode.axis2.ODEServer.init(ODEServer.java:157)
 at org.apache.ode.axis2.ODEServer.init(ODEServer.java:116)
 at
 org.apache.ode.axis2.hooks.ODEAxisServlet.init(ODEAxisServlet.java:53
 )
 at
 org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.
 java:1164)
 at
 org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
 java:1118)
 at
 org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:10
 05)
 at
 org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
 t.java:4529)
 at
 org.apache.catalina.core.StandardContext.startInternal(StandardContex
 t.java:4800)
 at
 org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
 at
 org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
 .java:785)

Problems with parsing html with servlet

2010-07-09 Thread John Byrne
Hi

Please find listed below thesituation with tomcat installation.  I can
deploy html pages via the manager service or
http://localhost/comlinks/mypage

The requested resource (/ukjava1900) is not available.

I list below the changes I have made to sotware.  Thank you for your
help in preious thread

Software used

jdk-6u21-windows-x64
tomcat-6.0.26


This is the start up log



09-Jul-2010 07:50:34 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performanc
e in production environments was not found on the java.library.path: C:\tomcat 6
.0\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\PROGRAM FILES
\jdk1.6.0_21\BIN
09-Jul-2010 07:50:34 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-80
09-Jul-2010 07:50:34 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 997 ms
09-Jul-2010 07:50:34 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
09-Jul-2010 07:50:34 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.26
09-Jul-2010 07:50:34 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
09-Jul-2010 07:50:35 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
09-Jul-2010 07:50:35 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory comlinks
09-Jul-2010 07:50:36 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
09-Jul-2010 07:50:36 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
09-Jul-2010 07:50:36 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
09-Jul-2010 07:50:36 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-80
09-Jul-2010 07:50:36 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
09-Jul-2010 07:50:36 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31  config=null
09-Jul-2010 07:50:36 org.apache.catalina.startup.Catalina start
INFO: Server startup in 2007 ms





conf\context.xml

Context reloadable=true privileged=true

*

webapps\comlinks\web-inf\web.xml

web-app xmlns=http://java.sun.com/xml/ns/javaee;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
   version=2.5

  display-nameWelcome to Tomcat/display-name
  description
 Welcome to Tomcat
  /description

  servlet
servlet-nameUkJava1900/servlet-name
servlet-classformprocessors.UkJava1900/servlet-class
  /servlet



  servlet-mapping
servlet-nameUkJava1900/servlet-name
url-pattern/UkJava1900/url-pattern
  /servlet-mapping

/web-app


***
webapps/conf/web.xml

servlet
servlet-namedefault/servlet-name

servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class
init-param
param-namedebug/param-name
param-value0/param-value
/init-param
init-param
param-namelistings/param-name
param-valuetrue/param-value
/init-param
load-on-startup1/load-on-startup
/servlet

*

This is the first line in servlet uk1900java.java


package formprocessors;

*

This is the form action

FORM action=/ukjava1900

***


Kind Regards

John

-- 
Mult-i-tel better by design.

http://www.multitel.co.uk

tel: 44(0)151 548 8122
fax: 44(0)709 210 1464
skype jcbyrne

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



Tomcat windows service

2010-07-09 Thread Mikolaj Rydzewski

Hi,

I was trying to create izpack.org installer for Tomcat and my 
application. There was only one problem - how to install Tomcat as a 
Windows service.

Startup.bat and shutdown.bat were working, but I need service to be running.
Finally, after investigation, googling, etc, I have found a solution. At 
least it works on several Windows boxes I have access to.
I had to copy msvcrt*.dll file from JRE distribution to Tomcat's bin 
directory.


I do not have much Windows experience. Can anybody clarify this to me: 
tomcat distro lacks such file because of mistake, MS does not allow 
apache to distribute it, my windows system is old/unpatched?


--
Mikolaj Rydzewskim...@ceti.pl


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



Re: Problems with parsing html with servlet

2010-07-09 Thread Mark Thomas
On 09/07/2010 09:15, John Byrne wrote:
 webapps\comlinks\web-inf\web.xml

It is WEB-INF, not web-inf. Case matters.

Mark



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



Re: Problems with parsing html with servlet

2010-07-09 Thread André Warnier

I seem to recall that you have already been told this several times, but just 
to remind you :

/ukjava1900 is NOT equal to /UkJava1900

 like in

 FORM action=/ukjava1900
versus
 url-pattern/UkJava1900/url-pattern

In addition, you have also been told already that proper HTML requires that tag attribute 
values be quoted, like in


FORM action=/ukjava1900


John Byrne wrote:

Hi

Please find listed below thesituation with tomcat installation.  I can
deploy html pages via the manager service or
http://localhost/comlinks/mypage

The requested resource (/ukjava1900) is not available.

I list below the changes I have made to sotware.  Thank you for your
help in preious thread

Software used

jdk-6u21-windows-x64
tomcat-6.0.26


This is the start up log



09-Jul-2010 07:50:34 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performanc
e in production environments was not found on the java.library.path: C:\tomcat 6
.0\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\PROGRAM FILES
\jdk1.6.0_21\BIN
09-Jul-2010 07:50:34 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-80
09-Jul-2010 07:50:34 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 997 ms
09-Jul-2010 07:50:34 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
09-Jul-2010 07:50:34 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.26
09-Jul-2010 07:50:34 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
09-Jul-2010 07:50:35 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
09-Jul-2010 07:50:35 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory comlinks
09-Jul-2010 07:50:36 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
09-Jul-2010 07:50:36 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
09-Jul-2010 07:50:36 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
09-Jul-2010 07:50:36 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-80
09-Jul-2010 07:50:36 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
09-Jul-2010 07:50:36 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31  config=null
09-Jul-2010 07:50:36 org.apache.catalina.startup.Catalina start
INFO: Server startup in 2007 ms





conf\context.xml

Context reloadable=true privileged=true

*

webapps\comlinks\web-inf\web.xml

web-app xmlns=http://java.sun.com/xml/ns/javaee;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
   version=2.5

  display-nameWelcome to Tomcat/display-name
  description
 Welcome to Tomcat
  /description

  servlet
servlet-nameUkJava1900/servlet-name
servlet-classformprocessors.UkJava1900/servlet-class
  /servlet



  servlet-mapping
servlet-nameUkJava1900/servlet-name
url-pattern/UkJava1900/url-pattern
  /servlet-mapping

/web-app


***
webapps/conf/web.xml

servlet
servlet-namedefault/servlet-name

servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class
init-param
param-namedebug/param-name
param-value0/param-value
/init-param
init-param
param-namelistings/param-name
param-valuetrue/param-value
/init-param
load-on-startup1/load-on-startup
/servlet

*

This is the first line in servlet uk1900java.java


package formprocessors;

*

This is the form action

FORM action=/ukjava1900

***


Kind Regards

John




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



Re: Tomcat windows service

2010-07-09 Thread Mikolaj Rydzewski

On 07/09/2010 10:23 AM, Mikolaj Rydzewski wrote:
I was trying to create izpack.org installer for Tomcat and my 
application. There was only one problem - how to install Tomcat as a 
Windows service.


I tried various Tomcat versions, 6.0.18, 6.0.20, 6.0.26. I gave up with 
6.0.20. Installing service works (with msvcrt.dll being present) with 
such configuration.


--
Mikolaj Rydzewskim...@ceti.pl


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



Re: Problems with parsing html with servlet

2010-07-09 Thread John Byrne
Hi Mark

It is WEB-INF in my directory structure, apollogies.

John

On 9 July 2010 09:24, Mark Thomas ma...@apache.org wrote:
 On 09/07/2010 09:15, John Byrne wrote:
 webapps\comlinks\web-inf\web.xml

 It is WEB-INF, not web-inf. Case matters.

 Mark



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





-- 
Mult-i-tel better by design.

http://www.multitel.co.uk

tel: 44(0)151 548 8122
fax: 44(0)709 210 1464
skype jcbyrne

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



Re: Problems with parsing html with servlet

2010-07-09 Thread John Byrne
Hi Andre

The message did get through, apologies for the error.

John

On 9 July 2010 09:27, André Warnier a...@ice-sa.com wrote:



-- 
Mult-i-tel better by design.

http://www.multitel.co.uk

tel: 44(0)151 548 8122
fax: 44(0)709 210 1464
skype jcbyrne

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



Re: Tomcat windows service

2010-07-09 Thread Mladen Turk

On 07/09/2010 10:23 AM, Mikolaj Rydzewski wrote:

Hi,

I was trying to create izpack.org installer for Tomcat and my
application. There was only one problem - how to install Tomcat as a
Windows service.
Startup.bat and shutdown.bat were working, but I need service to be
running.
Finally, after investigation, googling, etc, I have found a solution. At
least it works on several Windows boxes I have access to.
I had to copy msvcrt*.dll file from JRE distribution to Tomcat's bin
directory.



You can copy that to any directory that is in the system path.
Also you can add JRE's bin dir as part of install process to the system path
(preferred solution to copying msvcrt*.dll)
The only problem would be service install itself where you would have to
set the installer path to include JRE/bin before calling tomcatX.exe service 
installer.


I do not have much Windows experience. Can anybody clarify this to me:
tomcat distro lacks such file because of mistake, MS does not allow
apache to distribute it, my windows system is old/unpatched?



This is Sun fault, and that msvcrt*.dll is jvm.dll dependency.
Unfortunately Sun refuses to install that redistribute at the
proper location but just keeps it as part of JVM/JRE installation


Regards
--
^TM

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



Re: Tomcat windows service

2010-07-09 Thread Mark Thomas
On 09/07/2010 09:34, Mikolaj Rydzewski wrote:
 On 07/09/2010 10:23 AM, Mikolaj Rydzewski wrote:
 I was trying to create izpack.org installer for Tomcat and my
 application. There was only one problem - how to install Tomcat as a
 Windows service.
 
 I tried various Tomcat versions, 6.0.18, 6.0.20, 6.0.26. I gave up with
 6.0.20. Installing service works (with msvcrt.dll being present) with
 such configuration.

It is a Java packaging bug. There is a bugzilla entry for Tomcat and a
Jira entry for commons daemon that discuss workarounds.

Mark



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



Re: Updating webapps classes

2010-07-09 Thread Gabriele Bulfon
Hello, thx for your answers.
I understand your points, but in a non cluster situation, updating the 
application is a pain,
because I'm forced to ask people to exit, update and restart.
It may be a possible option to do what I said, and would be my responsability 
to know
if an update may lead to problems because of possible concurrent usage of old 
and new version.
What do you think?
Gabriele.
Gabriele Bulfon - Sonicle S.r.l.
Tel +39 028246016 Int. 30 - Fax +39 028243880
Via Felice Cavallotti 16 - 20089, Rozzano - Milano - ITALY
http://www.sonicle.com
-= Mail sent through WebTop2 =-
--
Da: Christopher Schultz
A: Tomcat Users List
Data: 9 luglio 2010 3.01.37 CEST
Oggetto: Re: Updating webapps classes
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Gabriele,
On 7/7/2010 8:11 AM, Gabriele Bulfon wrote:
I get back to this discussion beacuse I was brainstorming again on it,
and found
that the already present class loader may actually be able to do this alone.
My thought was: if Tomcat is capable of managing different application
contexts under
its work folder, and have them run different applications with
different class versions
inside their classes/lib, probably it may implement automatic
application updates
by createing different application contexts behind the scene.
Uh, what?
I see this scenario:
- Tomcat is running my webapp
- People have sessions on it, and Tomcat has its application context on
my webapp
- I place new jar files/classes
- Tomcat detects, and instead of reloading and invalidating current
sessions, it will
keep current sessions on the old application context, until they reach 0
sessions
- Meanwhile it may create a new application context to run new sessions
That's not how it works.
How hard would it be to make this true in Tomcat?
Probably not too difficult, but the Tomcat team is unlikely to implement
this because the spec (at least as of 2.5) is silent on the subject of
auto-deployment (other than to mention that the container is free to
implement it).
Such a system would be quite chaotic in a clustered environment, because
some cluster members would update before others, and, depending upon the
configuration of the cluster, information sharing and/or member
selection could fail and the whole site could become unstable from a
user perspective.
I highly recommend performing deliberate application updates by bleeding
users off of one server and on to another.
Is there any other Java WebApp Container capable of doing this?
Dunno. You could probably search the web for something like that.
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkw2dPEACgkQ9CaO5/Lv0PBTXwCgpTZ9b5rEYImtsRV0cGfbKaN+
4AMAoIjrUIaVDlw+0Xu1c/BJHd5cAjvW
=eeFX
-END PGP SIGNATURE-
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

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

Tomcat 7.0.0 Beta1 - AsyncListener

2010-07-09 Thread spring
Hello,

I have a AsyncListener registered for an AsyncContext. Everytime I call
AsyncContext#complete fist onError gets called (throwable is null) and then
onComplete().

Is this a known Bug or did I made something wrong?

Here is the relevant Code:

member vars:

private final QueueAsyncContext queue = new
ConcurrentLinkedQueueAsyncContext();
private ScheduledExecutorService s =
Executors.newScheduledThreadPool(2);

in doGet:

final AsyncContext ac = req.startAsync();
ac.setTimeout(1 * 60 * 1000);
ac.addListener(new AsyncListener() {
public void onComplete(AsyncEvent event) throws
IOException {
queue.remove(ac);
}

public void onTimeout(AsyncEvent event) throws
IOException {
queue.remove(ac);
}

public void onError(AsyncEvent event) throws
IOException {
queue.remove(ac);
}

public void onStartAsync(AsyncEvent event) throws
IOException {
}
});
queue.add(ac);

in doPost I call notify(some message):

private void notify(final String cMessage) throws IOException {
s.schedule(new Runnable() {
@Override
public void run() {
for (AsyncContext ac : queue) {
try {
PrintWriter acWriter =
ac.getResponse().getWriter();
acWriter.println(cMessage);
acWriter.flush();
ac.complete()
} catch (IOException ex) {
System.out.println(ex);
queue.remove(ac);
}
}

}
}, 3, TimeUnit.SECONDS);

}

Thank you


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



Re: [ANN] Apache Tomcat 6.0.28 released

2010-07-09 Thread jean-frederic clere
The Apache Tomcat team announces the immediate availability of Apache
Tomcat 6.0.28 stable. This release includes bug-fixes over Apache
Tomcat 6.0.26.

Apache Tomcat 6.0 includes new features over Apache Tomcat 5.5,
including support for the new Servlet 2.5 and JSP 2.1 specifications, a
refactored clustering implementation, advanced IO features, and
improvements in memory usage.

Please refer to the change log for the list of changes:
http://tomcat.apache.org/tomcat-6.0-doc/changelog.html

Downloads:
http://tomcat.apache.org/download-60.cgi

Migration guide from Apache Tomcat 5.5.x:
http://tomcat.apache.org/migration.html

Thank you,

-- The Apache Tomcat Team

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



Error: Invalid or unreadable WAR file : error in opening zip file

2010-07-09 Thread Fernando Morgenstern
Hello,

I'm running the following version of tomcat:

Server version: Apache Tomcat/6.0-snapshot
Server built:   Nov 15 2009 11:02:53
Server number:  6.0.0.0
OS Name:Linux
OS Version: 2.6.24-9-pve
Architecture:   i386
JVM Version:1.6.0_12-b04
JVM Vendor: Sun Microsystems Inc.

And i have a shared mount between 4 tomcat servers. All of them run the same OS 
and tomcat version.

For some reason, one of the tomcat servers stopped working and i can't start it 
anymore. At catalina.out, i get this error:

INFO: Deploying web application archive Box.war
mmap failed for CEN and END part of zip file
Jul 9, 2010 2:42:27 PM org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Invalid or unreadable WAR file : error in 
opening zip file


I've verified and tomcat user does have read permissions to war file. Also, i 
don't think this is a problem with the war file ( actually, all of them ), 
since other tomcat servers can deploy applications normally.

Do you know what might be causing this issue?

Best Regards,
---

Fernando Marcelo
www.consultorpc.com
ferna...@consultorpc.com


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



Re: problem while deploying

2010-07-09 Thread Pid
On 09/07/2010 08:13, kalasagar reddy battepati wrote:
 
 Hi i am using  tomcat 6.0.14

Why not upgrade to the newly release 6.0.28?

 and my java_home is jdk1.6.0_20
 
 i am deploying my web application in 8080 port

What are you deploying, a .war file, perhaps?

How are you deploying it, using the manager application, perhaps?


p

 it's giving succesful deployment . but when i checked WEB-INF folder in
 tomcat/webapps/myappln/
 
 its not there
 
 what may be the problem
 
 please help me
 
 
 Thanks in advance
 
 
 
 
 kalasagar reddy battepati,
 cdac knowledge park,
 bangalore
 




signature.asc
Description: OpenPGP digital signature


RE: Connecting Tomcat to a database

2010-07-09 Thread Caldarale, Charles R
 From: Pid [mailto:p...@pidster.com]
 Subject: Re: Connecting Tomcat to a database
 
  Most unfortunate that they're suggesting very, very out of date
  practices.  Put the MySQL JDBC driver in Tomcat's lib directory, not
  common/lib (that was changed quite some time ago).  Place the
  followingContext  element in webapps/ode/META-INF/context.xml:
 
 For future ref:
 
  https://issues.apache.org/jira/browse/ODE-871

Should also mention the incorrect location for the JDBC driver jar.  (Or did I 
miss that in my quick scan of the bug report?)

 - 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: [ANN] Apache Tomcat 6.0.28 released

2010-07-09 Thread Electronjockey

I take it the change log for 28 will be up soon?

-Original Message-
From: jean-frederic clere jfcl...@gmail.com
To : Tomcat Developers List d...@tomcat.apache.org, 
annou...@apache.org, Tomcat Users List users@tomcat.apache.org, 
annou...@tomcat.apache.org

Sent: Fri Jul 09 8:42:16 2010
Subject: Re: [ANN] Apache Tomcat 6.0.28 released

The Apache Tomcat team announces the immediate availability of Apache
Tomcat 6.0.28 stable. This release includes bug-fixes over Apache
Tomcat 6.0.26.

Apache Tomcat 6.0 includes new features over Apache Tomcat 5.5,
including support for the new Servlet 2.5 and JSP 2.1 specifications, a
refactored clustering implementation, advanced IO features, and
improvements in memory usage.

Please refer to the change log for the list of changes:
http://tomcat.apache.org/tomcat-6.0-doc/changelog.html

Downloads:
http://tomcat.apache.org/download-60.cgi

Migration guide from Apache Tomcat 5.5.x:
http://tomcat.apache.org/migration.html

Thank you,

-- The Apache Tomcat Team

-
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: [ANN] Apache Tomcat 6.0.28 released

2010-07-09 Thread Mark Thomas
On 09/07/2010 14:32, Electronjockey wrote:
 I take it the change log for 28 will be up soon?

It takes ~1 hour for changes made on the system where the web site is
edited to replicate to the master EU and US servers. The change was made
about 10 mins ago so it should be up in the next hour.

Mark

 
 -Original Message-
 From: jean-frederic clere jfcl...@gmail.com
 To : Tomcat Developers List d...@tomcat.apache.org,
 annou...@apache.org, Tomcat Users List users@tomcat.apache.org,
 annou...@tomcat.apache.org
 Sent: Fri Jul 09 8:42:16 2010
 Subject: Re: [ANN] Apache Tomcat 6.0.28 released
 
 The Apache Tomcat team announces the immediate availability of Apache
 Tomcat 6.0.28 stable. This release includes bug-fixes over Apache
 Tomcat 6.0.26.
 
 Apache Tomcat 6.0 includes new features over Apache Tomcat 5.5,
 including support for the new Servlet 2.5 and JSP 2.1 specifications, a
 refactored clustering implementation, advanced IO features, and
 improvements in memory usage.
 
 Please refer to the change log for the list of changes:
 http://tomcat.apache.org/tomcat-6.0-doc/changelog.html
 
 Downloads:
 http://tomcat.apache.org/download-60.cgi
 
 Migration guide from Apache Tomcat 5.5.x:
 http://tomcat.apache.org/migration.html
 
 Thank you,
 
 -- The Apache Tomcat Team
 
 -
 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: Error: Invalid or unreadable WAR file : error in opening zip file

2010-07-09 Thread Dave Cherkassky

Fernando:

Just a wild guess -- whenever I've had problems with unreadable WAR/JAR files, 
it was because they were checked into CVS as text rather than binary.

So the first thing I'd do is verify the integrity of the WAR file -- did it get 
corrupted along the way?

Good luck...
--
Dave Cherkassky
  VP of Software Development
  DJiNN Software Inc.
  416.504.1354

On 09/07/2010 9:21 AM, Fernando Morgenstern wrote:

Hello,

I'm running the following version of tomcat:

Server version: Apache Tomcat/6.0-snapshot
Server built:   Nov 15 2009 11:02:53
Server number:  6.0.0.0
OS Name:Linux
OS Version: 2.6.24-9-pve
Architecture:   i386
JVM Version:1.6.0_12-b04
JVM Vendor: Sun Microsystems Inc.

And i have a shared mount between 4 tomcat servers. All of them run the same OS 
and tomcat version.

For some reason, one of the tomcat servers stopped working and i can't start it 
anymore. At catalina.out, i get this error:

INFO: Deploying web application archive Box.war
mmap failed for CEN and END part of zip file
Jul 9, 2010 2:42:27 PM org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Invalid or unreadable WAR file : error in 
opening zip file


I've verified and tomcat user does have read permissions to war file. Also, i 
don't think this is a problem with the war file ( actually, all of them ), 
since other tomcat servers can deploy applications normally.

Do you know what might be causing this issue?

Best Regards,
---

Fernando Marcelo
www.consultorpc.com
ferna...@consultorpc.com


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




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



RE: Error: Invalid or unreadable WAR file : error in opening zip file

2010-07-09 Thread Caldarale, Charles R
 From: Fernando Morgenstern [mailto:ferna...@consultorpc.com]
 Subject: Error: Invalid or unreadable WAR file : error in opening zip
 file
 
 I'm running the following version of tomcat:
 
 Server version: Apache Tomcat/6.0-snapshot
 Server built:   Nov 15 2009 11:02:53
 Server number:  6.0.0.0

That is not a good version number for Tomcat, being many, many years old.  That 
makes the rest of the report extremely suspect.

 And i have a shared mount between 4 tomcat servers.

Shared mount of what?  You must never, never share the appBase (webapps), work, 
temp, or logs directories across multiple Tomcat instances.

 - 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: Error: Invalid or unreadable WAR file : error in opening zip file

2010-07-09 Thread Mikolaj Rydzewski

On 07/09/2010 03:35 PM, Dave Cherkassky wrote:
Just a wild guess -- whenever I've had problems with unreadable 
WAR/JAR files, it was because they were checked into CVS as text 
rather than binary.


Or...
I used to FTP war files to server once. Doing that on local network was 
ok. But doing that to remote server caused similiar error to appear. 
Simply Tomcat discovered new war file before I finished my upload.


--
Mikolaj Rydzewskim...@ceti.pl


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



Re: Connecting Tomcat to a database

2010-07-09 Thread Pid
On 09/07/2010 14:27, Caldarale, Charles R wrote:
 From: Pid [mailto:p...@pidster.com]
 Subject: Re: Connecting Tomcat to a database

 Most unfortunate that they're suggesting very, very out of date
 practices.  Put the MySQL JDBC driver in Tomcat's lib directory, not
 common/lib (that was changed quite some time ago).  Place the
 followingContext  element in webapps/ode/META-INF/context.xml:

 For future ref:

  https://issues.apache.org/jira/browse/ODE-871
 
 Should also mention the incorrect location for the JDBC driver jar.  (Or did 
 I miss that in my quick scan of the bug report?)

Yep, I missed it.  Now fixed.


p

  - 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
 




signature.asc
Description: OpenPGP digital signature


RE: Error: Invalid or unreadable WAR file : error in opening zip file

2010-07-09 Thread Caldarale, Charles R
 From: Mikolaj Rydzewski [mailto:m...@ceti.pl]
 Subject: Re: Error: Invalid or unreadable WAR file : error in opening
 zip file
 
 I used to FTP war files to server once. Doing that on local network was
 ok. But doing that to remote server caused similiar error to appear.
 Simply Tomcat discovered new war file before I finished my upload.

One way around that is to FTP the file with a different extension than .war.  
Once the file is fully present on the target, rename it with the proper 
extension.

 - 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: Error: Invalid or unreadable WAR file : error in opening zip file

2010-07-09 Thread Tobias Crefeld
Am Fri, 9 Jul 2010 10:21:09 -0300
schrieb Fernando Morgenstern ferna...@consultorpc.com:

 SEVERE: Error starting static Resources
 java.lang.IllegalArgumentException: Invalid or unreadable WAR file :
 error in opening zip file
 
 
 I've verified and tomcat user does have read permissions to war file.
 Also, i don't think this is a problem with the war file ( actually,
 all of them ), since other tomcat servers can deploy applications
 normally.

Just guessing: Tomcat user (of this particular machine) has no write
permission on Tomcats directory webapps/ or webapps/Box/

Regards,
 Tobias.

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



Re: Error: Invalid or unreadable WAR file : error in opening zip file

2010-07-09 Thread Fernando Morgenstern
Hello,

Thanks for all replies!

Let me reply to some of them:

* Only webapps folder is shared between servers using glusterfs.

* Tomcat version is a bit old but it has been working for months without any 
issues. So i don't think it is a case of upgrading it.

* War files does not seem to be corrupted. Otherwise other servers wouldn't be 
able to deploy them, right?

* I can confirm that tomcat can write to webapps and webapps/Box/, just checked 
these permissions.

drwxrwsrwx 5 user tomcat 4.0K Jan 21 11:05 Box
-rw-r--r-- 1 user tomcat  27M Jan 21 11:04 Box.war



Regards,
---

Fernando Marcelo


Em 09/07/2010, às 10:47, Tobias Crefeld escreveu:

 Am Fri, 9 Jul 2010 10:21:09 -0300
 schrieb Fernando Morgenstern ferna...@consultorpc.com:
 
 SEVERE: Error starting static Resources
 java.lang.IllegalArgumentException: Invalid or unreadable WAR file :
 error in opening zip file
 
 
 I've verified and tomcat user does have read permissions to war file.
 Also, i don't think this is a problem with the war file ( actually,
 all of them ), since other tomcat servers can deploy applications
 normally.
 
 Just guessing: Tomcat user (of this particular machine) has no write
 permission on Tomcats directory webapps/ or webapps/Box/
 
 Regards,
 Tobias.
 
 -
 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: Invalid or unreadable WAR file : error in opening zip file

2010-07-09 Thread Mikolaj Rydzewski

On 07/09/2010 03:45 PM, Caldarale, Charles R wrote:

One way around that is to FTP the file with a different extension than 
.war. Once the file is fully present on the target, rename it with the 
proper extension.


I know that, Chuck :-) I made it once, then I used script to rsync and 
update war file properly.


--
Mikolaj Rydzewskim...@ceti.pl


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



RE: Error: Invalid or unreadable WAR file : error in opening zip file

2010-07-09 Thread Caldarale, Charles R
 From: Fernando Morgenstern [mailto:ferna...@consultorpc.com]
 Subject: Re: Error: Invalid or unreadable WAR file : error in opening
 zip file
 
 * Only webapps folder is shared between servers using glusterfs.

That's a problem.  Multiple Tomcats may try to expand .war files 
simultaneously, scribbling on each other.  You need to have a separate webapps 
directory for each instance.

 * Tomcat version is a bit old

But what is the version?  6.0.0 was not functional.  If you can't identify what 
you've got, I would certainly replace it with a known, current one.

 - 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: Error: Invalid or unreadable WAR file : error in opening zip file

2010-07-09 Thread Caldarale, Charles R
 From: Mikolaj Rydzewski [mailto:m...@ceti.pl]
 Subject: Re: Error: Invalid or unreadable WAR file : error in opening
 zip file
 
  Once the file is fully present on the target, rename it with
  the proper extension.
 
 I know that, Chuck :-)

Sorry, didn't mean to imply you weren't aware of the technique.  The comment 
was intended for others with less experience.

 - 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: Error: Invalid or unreadable WAR file : error in opening zip file

2010-07-09 Thread Rainer Jung

On 09.07.2010 15:21, Fernando Morgenstern wrote:

Hello,

I'm running the following version of tomcat:

Server version: Apache Tomcat/6.0-snapshot
Server built:   Nov 15 2009 11:02:53
Server number:  6.0.0.0
OS Name:Linux
OS Version: 2.6.24-9-pve
Architecture:   i386
JVM Version:1.6.0_12-b04
JVM Vendor: Sun Microsystems Inc.

And i have a shared mount between 4 tomcat servers. All of them run the same OS 
and tomcat version.

For some reason, one of the tomcat servers stopped working and i can't start it 
anymore. At catalina.out, i get this error:

INFO: Deploying web application archive Box.war
mmap failed for CEN and END part of zip file
Jul 9, 2010 2:42:27 PM org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Invalid or unreadable WAR file : error in 
opening zip file


I've verified and tomcat user does have read permissions to war file. Also, i 
don't think this is a problem with the war file ( actually, all of them ), 
since other tomcat servers can deploy applications normally.

Do you know what might be causing this issue?


This one?

http://scarybeastsecurity.blogspot.com/2008/08/ode-to-bug-that-almost-was.html

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

Or possibly glusterfs doesn't support mmap:

http://gluster.org/pipermail/gluster-users/2009-November/003458.html

The log message comes from JRE internal handling of zip resp. jar files 
which uses native mmap().


Regards,

Rainer

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



securing tomcat before public internet access

2010-07-09 Thread Johan Martinez
Hi,

I need to allow public internet access to my tomcat server / web
application. Although it would be restricted to set of trusted IPs
initially, later it may need to be open for public access. Is there any
guide for securing tomcat setup or steps needed before allowing public
access. Right now the only change I have made is changing default
tomcat-users.xml file used for authentication. Any other suggestions or
comments?

System: CentOS 5.4, Sun JDK 1.5, Tomcat 5.5.28 running on 8080 port, also
accessible through port 80 using AJP.

Thanks you,
jM.


Re: securing tomcat before public internet access

2010-07-09 Thread Mark Thomas
On 09/07/2010 15:38, Johan Martinez wrote:
 Hi,
 
 I need to allow public internet access to my tomcat server / web
 application. Although it would be restricted to set of trusted IPs
 initially, later it may need to be open for public access. Is there any
 guide for securing tomcat setup or steps needed before allowing public
 access. Right now the only change I have made is changing default
 tomcat-users.xml file used for authentication. Any other suggestions or
 comments?
 
 System: CentOS 5.4, Sun JDK 1.5, Tomcat 5.5.28 running on 8080 port, also
 accessible through port 80 using AJP.

Upgrade to 5.5.30.
Upgrade to a supported JDK.

From Tomcat 7 but most stuff translates:
http://tomcat.apache.org/tomcat-7.0-doc/security-howto.html

Mark



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



Re: Error: Invalid or unreadable WAR file : error in opening zip file

2010-07-09 Thread Markus Schönhaber
09.07.2010 15:38, Caldarale, Charles R:

 From: Fernando Morgenstern [mailto:ferna...@consultorpc.com]
 Subject: Error: Invalid or unreadable WAR file : error in opening zip
 file

 I'm running the following version of tomcat:

 Server version: Apache Tomcat/6.0-snapshot
 Server built:   Nov 15 2009 11:02:53
 Server number:  6.0.0.0
 
 That is not a good version number for Tomcat, being many, many years old.

Not necessarily that old - the Server built seems to indicate that
it's roughly 9 month.
To me, this looks like a Tomcat built from source. IIRC the
build.properties.default does set the various version.foo properties
like that (version.suffix is -dev not -snapshot nowadays, though).

 That makes the rest of the report extremely suspect.

Seconded. At least it should be tested if a recent official Tomcat
binary shows the same behaviour.

-- 
Regards
  mks

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



Re: Problems with parsing html with servlet

2010-07-09 Thread John Byrne
Hi Andre

Did not receive response to original post. Inability to evoke a
response for output from servlet located on tomcat after parseing a
html form? Details in original post.

On 9 July 2010 09:38, John Byrne jbmulti...@gmail.com wrote:
 Mult-i-tel better by design.

 http://www.multitel.co.uk

 tel: 44(0)151 548 8122
 fax: 44(0)709 210 1464
 skype jcbyrne




-- 
Mult-i-tel better by design.

http://www.multitel.co.uk

tel: 44(0)151 548 8122
fax: 44(0)709 210 1464
skype jcbyrne

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



Re: Error: Invalid or unreadable WAR file : error in opening zip file

2010-07-09 Thread Tobias Crefeld
Am Fri, 9 Jul 2010 11:01:00 -0300
schrieb Fernando Morgenstern ferna...@consultorpc.com:

 * Only webapps folder is shared between servers using glusterfs.

I don't think that it is a good idea if you put your webapps-directory
on a shared storage - especially if you use funny things like
setgid-flag. Tomcat expects an exclusive access to its
Tomcat-directory-structure.

We are using Tomcat-installations for the same application as well but
we use rsync to synchronize and avoid common storage. 

-- 
Mit freundlichen Grüßen,
 Tobias Crefeld.

+49 - 89 - 2190 964-15

Cataneo GmbH
Lilienstrasse 8, D-81669 Muenchen
Tel: +49 (0) 89-2190 964-0
Fax: +49 (0) 89-2190 964-48
Web: www.cataneo.de

Geschäftsführer: Michael Wölfle, Martin Gerull

HR: München HRB 144834



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



Re: Error: Invalid or unreadable WAR file : error in opening zip file

2010-07-09 Thread Fernando Morgenstern
Em 09/07/2010, às 11:05, Caldarale, Charles R escreveu:

 From: Fernando Morgenstern [mailto:ferna...@consultorpc.com]
 Subject: Re: Error: Invalid or unreadable WAR file : error in opening
 zip file
 
 * Only webapps folder is shared between servers using glusterfs.
 
 That's a problem.  Multiple Tomcats may try to expand .war files 
 simultaneously, scribbling on each other.  You need to have a separate 
 webapps directory for each instance.

Yes, we had this problem in the past. What we did was to change server.xml in a 
way that only one server have unpackWARS set to true, other servers have 
unpackWARS set to false  ( including the one that is having  problems ).
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Error: Invalid or unreadable WAR file : error in opening zip file

2010-07-09 Thread André Warnier

Fernando Morgenstern wrote:

Em 09/07/2010, às 11:05, Caldarale, Charles R escreveu:


From: Fernando Morgenstern [mailto:ferna...@consultorpc.com]
Subject: Re: Error: Invalid or unreadable WAR file : error in opening
zip file

* Only webapps folder is shared between servers using glusterfs.

That's a problem.  Multiple Tomcats may try to expand .war files 
simultaneously, scribbling on each other.  You need to have a separate webapps 
directory for each instance.


Yes, we had this problem in the past. What we did was to change server.xml in a 
way that only one server have unpackWARS set to true, other servers have 
unpackWARS set to false  ( including the one that is having  problems ).


And what about the autoDeploy flag ?


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



[SECURITY] CVE-2010-2227: Apache Tomcat Remote Denial Of Service and Information Disclosure Vulnerability

2010-07-09 Thread Mark Thomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

CVE-2010-2227: Apache Tomcat Remote Denial Of Service and Information
   Disclosure Vulnerability

Severity: Important

Vendor:
The Apache Software Foundation

Versions Affected:
Tomcat 5.5.0 to 5.5.29
Tomcat 6.0.0 to 6.0.27
Tomcat 7.0.0

Note: 7.0.0 is still beta.
Note: The unsupported Tomcat 3.x, 4.x and 5.0.x versions may also be
affected.

Description:
Several flaws in the handling of the 'Transfer-Encoding' header were
found that prevented the recycling of a buffer. A remote attacker could
trigger this flaw which would cause subsequent requests to fail and/or
information to leak between requests.

Mitigation:
- - Tomcat 5.5.x users should upgrade to 5.5.30 or apply this patch:
  http://svn.apache.org/viewvc?view=revisionrevision=959428
- - Tomcat 6.0.x users should upgrade to 6.0.28 or apply this patch:
  http://svn.apache.org/viewvc?view=revisionrevision=958977
- - Tomcat 7.0.x users should upgrade to 7.0.1 when released or apply this
patch:
  http://svn.apache.org/viewvc?view=revisionrevision=958911

- - All users may mitigate this flaw by running Tomcat behind a reverse
proxy (such as Apache httpd 2.2) that rejects invalid values for
Transfer-Encoding.

Credit:
This issue was discovered by Steve Jones

References:
http://tomcat.apache.org/security.html
http://tomcat.apache.org/security-7.html
http://tomcat.apache.org/security-6.html
http://tomcat.apache.org/security-5.html

The Apache Tomcat Security Team
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJMN07EAAoJEBDAHFovYFnn8U4P/2wJuP+JYoqeIpPJwK7stqfd
jKO01S999v9lnYpIfPXEaFgGXTedo7BYo4X+OTuR7OLiAR6DVa1PhVzDd4bzoeW3
sY9zbOiXEvM6Ps5eVPJuR9P4YVs8O6qeLA8UKWV28KIFX/N4hZ5KAAJTSdlP0DuB
2dLB8cWtldTJrYmLVXbG//1j4S/k/PfHU/+MpZRIs8GWUPOpCxrWyvg+rTQN2zWP
iKsUzEEfXyoeHJmD/KM7OTbxfmL0HsUgeHPUBi4A6zPZt6e8614MZcr9FuwK4BBt
+8lCrZhP9XgxbTqp2qMRtF49ObK2gWVav3o2uruaK6NDvGLrAjgvV+mCxKVx6yjl
i9kL1K8S1FIO2eqTdVrQulega2NatYJxyG2ofDsb92+6mio/vLYKBxtI4bworQli
Vf/EWmYCuueKrZzde6k+HWhy9cR8JFdws/EGZ5UUaMiVB5Rvk5jPHwBgJDUdnSqC
75HEQBTsowsVKLGuHSnIjkg4B0IiAT6COsOsTfXsUSUn8f95a40GTynE70xvL0Ii
17wr2aK3fC8z9XG3Grbx1s4KiIW41iPBDSh9I7WWSQ+hhq+VHsBKJoubQsWW4qVb
sRuMx6kHTRq1DqEiTtAQFdMiE1oyDNB1ro99j44LH4azJvi5hS5S5R5QOyt9PshE
x6KDdVdqZF3+d64YwjtE
=KHN9
-END PGP SIGNATURE-



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



Re: Problems with parsing html with servlet

2010-07-09 Thread Pid
On 09/07/2010 09:15, John Byrne wrote:
 Hi
 
 Please find listed below thesituation with tomcat installation.  I can
 deploy html pages via the manager service or
 http://localhost/comlinks/mypage
 
 The requested resource (/ukjava1900) is not available.
 
 I list below the changes I have made to sotware.  Thank you for your
 help in preious thread
 
 Software used
 
 jdk-6u21-windows-x64
 tomcat-6.0.26
 
 
 This is the start up log
 
 
 
 09-Jul-2010 07:50:34 org.apache.catalina.core.AprLifecycleListener init
 INFO: The APR based Apache Tomcat Native library which allows optimal 
 performanc
 e in production environments was not found on the java.library.path: 
 C:\tomcat 6
 .0\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\PROGRAM 
 FILES
 \jdk1.6.0_21\BIN
 09-Jul-2010 07:50:34 org.apache.coyote.http11.Http11Protocol init
 INFO: Initializing Coyote HTTP/1.1 on http-80
 09-Jul-2010 07:50:34 org.apache.catalina.startup.Catalina load
 INFO: Initialization processed in 997 ms
 09-Jul-2010 07:50:34 org.apache.catalina.core.StandardService start
 INFO: Starting service Catalina
 09-Jul-2010 07:50:34 org.apache.catalina.core.StandardEngine start
 INFO: Starting Servlet Engine: Apache Tomcat/6.0.26
 09-Jul-2010 07:50:34 org.apache.catalina.startup.HostConfig deployDescriptor
 INFO: Deploying configuration descriptor host-manager.xml
 09-Jul-2010 07:50:35 org.apache.catalina.startup.HostConfig deployDescriptor
 INFO: Deploying configuration descriptor manager.xml
 09-Jul-2010 07:50:35 org.apache.catalina.startup.HostConfig deployDirectory
 INFO: Deploying web application directory comlinks
 09-Jul-2010 07:50:36 org.apache.catalina.startup.HostConfig deployDirectory
 INFO: Deploying web application directory docs
 09-Jul-2010 07:50:36 org.apache.catalina.startup.HostConfig deployDirectory
 INFO: Deploying web application directory examples
 09-Jul-2010 07:50:36 org.apache.catalina.startup.HostConfig deployDirectory
 INFO: Deploying web application directory ROOT
 09-Jul-2010 07:50:36 org.apache.coyote.http11.Http11Protocol start
 INFO: Starting Coyote HTTP/1.1 on http-80
 09-Jul-2010 07:50:36 org.apache.jk.common.ChannelSocket init
 INFO: JK: ajp13 listening on /0.0.0.0:8009
 09-Jul-2010 07:50:36 org.apache.jk.server.JkMain start
 INFO: Jk running ID=0 time=0/31  config=null
 09-Jul-2010 07:50:36 org.apache.catalina.startup.Catalina start
 INFO: Server startup in 2007 ms
 
 
 
 
 
 conf\context.xml
 
 Context reloadable=true privileged=true
 
 *
 
 webapps\comlinks\web-inf\web.xml
 
 web-app xmlns=http://java.sun.com/xml/ns/javaee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
 http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
version=2.5
 
   display-nameWelcome to Tomcat/display-name
   description
  Welcome to Tomcat
   /description
 
   servlet
 servlet-nameUkJava1900/servlet-name
 servlet-classformprocessors.UkJava1900/servlet-class
   /servlet
 
 
 
   servlet-mapping
 servlet-nameUkJava1900/servlet-name
 url-pattern/UkJava1900/url-pattern
   /servlet-mapping
 
 /web-app
 
 
 ***
 webapps/conf/web.xml
 
 servlet
 servlet-namedefault/servlet-name
 
 servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class
 init-param
 param-namedebug/param-name
 param-value0/param-value
 /init-param
 init-param
 param-namelistings/param-name
 param-valuetrue/param-value
 /init-param
 load-on-startup1/load-on-startup
 /servlet
 
 *
 
 This is the first line in servlet uk1900java.java
 
 
 package formprocessors;

And what about the next few lines up to and including  ... extends
HttpServlet {?


 *
 
 This is the form action
 
 FORM action=/ukjava1900

I'll repeat what André and others have said, just in case it wasn't
clear.  The form action MUST match the url-pattern element of the
Servlet you've defined in web.xml.

In web.xml:

  url-pattern/UkJava1900/url-pattern

In your HTML page:
 form action=/UkJava1900 method=... etc

   ^^^
   |||

(I've even aligned them so you can see it clearly)


p


(N.B. Your HTML style is archaic, would be a good idea to improve it).





 ***
 
 
 Kind Regards
 
 John
 




signature.asc
Description: OpenPGP digital signature


RE: Connecting Tomcat to a database

2010-07-09 Thread Propes, Barry L
 Not totally sure if this matters, maybe it doesn't, but I notice this line on 
the error:

Failed to resolved external DataSource at java :comp/env/jdbc/TestDB.

I have a similar reference, while using Oracle, but reference as

Context envCtx = (Context) initCtx.lookup(java:comp/env);   
no space.yours has a space.

Maybe the space would cause an error?



-Original Message-
From: Christian Bruckhoff [mailto:christian.bruckh...@gmx.de]
Sent: Friday, July 09, 2010 2:02 AM
To: Tomcat Users List
Subject: Re: Connecting Tomcat to a database

Hi.

Am 08.07.2010 23:36, schrieb Caldarale, Charles R:
 From: Christian Bruckhoff [mailto:christian.bruckh...@gmx.de]
 Subject: Re: Connecting Tomcat to a database

 Sorry was in a haste, forgot much more than this. :-/
 - Tomcat 7.0.0
 - Java 1.6 Update 20
 - Windows XP SP3
 - Wanted to use DB for Apache ODE 2.0 Beta

 That's how it was shown here:
 http://ode.apache.org/war-deployment.html

 Most unfortunate that they're suggesting very, very out of date practices.  
 Put the MySQL JDBC driver in Tomcat's lib directory, not common/lib (that was 
 changed quite some time ago).  Place the followingContext  element in 
 webapps/ode/META-INF/context.xml:

 Context reloadable=true crossContext=true
Resource name=jdbc/ODEDB auth=Container type=javax.sql.DataSource
  maxActive=100 maxIdle=30 maxWait=1
  username=root password= 
 driverClassName=com.mysql.jdbc.Driver

 url=jdbc:mysql://localhost:3306/ode?autoReconnect=true/
 /Context

I did and modified it to my database:


?xml version=1.0 encoding=UTF-8?
Context reloadable=true crossContext=true
   Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource
 maxActive=100 maxIdle=30 maxWait=1
 username=test_dab password=moep
driverClassName=com.mysql.jdbc.Driver

url=jdbc:mysql://mysqlhost.uni-koblenz.de:3306/TestDB?autoReconnect=true/
/Context


I also edited ode-axis2.properties to


ode-axis2.db.mode=EXTERNAL
ode-axis2.db.ext.dataSource=java:comp/env/jdbc/TestDB


after this, I get the this error log:


09.07.2010 08:59:04 org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.20.
09.07.2010 08:59:04 org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], 
ra ndom [true].
09.07.2010 08:59:05 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1235 ms 09.07.2010 08:59:05 
org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
09.07.2010 08:59:05 org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.0 09.07.2010 08:59:05 
org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive ode.war DEBUG - GeronimoLog.debug(66) | 
Loading properties DEBUG - GeronimoLog.debug(66) | Initializing transaction 
manager DEBUG - GeronimoLog.debug(66) | Initializing transaction manager using 
org.apach e.ode.il.EmbeddedGeronimoFactory DEBUG - GeronimoLog.debug(66) | 
Creating data source.
ERROR - GeronimoLog.error(108) | Failed to resolved external DataSource at 
java :comp/env/jdbc/TestDB.
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
 at org.apache.naming.NamingContext.lookup(NamingContext.java:774)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:144)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:785)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:144)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:785)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:157)
 at
org.apache.naming.SelectorContext.lookup(SelectorContext.java:156)
 at javax.naming.InitialContext.lookup(InitialContext.java:392)
 at
org.apache.ode.il.dbutil.Database.lookupInJndi(Database.java:244)
 at
org.apache.ode.il.dbutil.Database.initExternalDb(Database.java:159)
 at
org.apache.ode.il.dbutil.Database.initDataSource(Database.java:144)
 at org.apache.ode.il.dbutil.Database.start(Database.java:99)
 at
org.apache.ode.axis2.ODEServer.initDataSource(ODEServer.java:218)
 at org.apache.ode.axis2.ODEServer.init(ODEServer.java:157)
 at org.apache.ode.axis2.ODEServer.init(ODEServer.java:116)
 at
org.apache.ode.axis2.hooks.ODEAxisServlet.init(ODEAxisServlet.java:53
)
 at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.
java:1164)
 at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
java:1118)
 at

tomcat datasource, find active connections

2010-07-09 Thread Ashish Kulkarni
Hi
I have following in context.xml, and it works fine.
But i would like to find how many active connections are there in data
source or how many total connections are there?
1 is it possible to do so?

2 Can i change type javax.sql.DataSource
to com.ibm.as400.access.AS400JDBCDataSource, as this has methods to find
active connections etc?

Resource name=jdbc/mydev  auth=Container
 type=javax.sql.DataSource
  maxActive=2
  maxIdle=2
  maxWait=3000
  username=user
  password=pass
  driverClassName=com.ibm.as400.access.AS400JDBCDriver
  url=jdbc:as400://1mysystem;date format=iso;time
format=iso;errors=basic;trace=false;
  validationQuery=select * from   mytable /


-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


Re: Connecting Tomcat to a database

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

Barry,

On 7/9/2010 12:47 PM, Propes, Barry L wrote:
 Not totally sure if this matters, maybe it doesn't, but I notice
 this line on the error:
 
 Failed to resolved external DataSource at java
 :comp/env/jdbc/TestDB.
 
 I have a similar reference, while using Oracle, but reference as

 Context envCtx = (Context) initCtx.lookup(java:comp/env);  
  no space.yours has a space.
 
 Maybe the space would cause an error?

I would imagine that would definitely cause an error. The OP should
re-check the code

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

iEYEARECAAYFAkw3dKIACgkQ9CaO5/Lv0PCLpgCgoSZy3PtiVXHjpOwk4+4RX0aI
/EAAnRYagtnZDZ4VDPvyZRkDGycuYMR1
=pSRH
-END PGP SIGNATURE-

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



Re: Problems with parsing html with servlet

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

John,

On 7/9/2010 4:15 AM, John Byrne wrote:
 The requested resource (/ukjava1900) is not available.

[snip]

   servlet-mapping
 servlet-nameUkJava1900/servlet-name
 url-pattern/UkJava1900/url-pattern
   /servlet-mapping

As others have pointed out, your URL mapping and form action action
URL are of mismatched case. I believe this situation was also pointed
out the last time you were asking roughly the same question(s).

 This is the first line in servlet uk1900java.java
 
 package formprocessors;

If your file is called uk1900java.java, the class should be
formprocessors.uk1900java, not formprocessors.Uk1900Java. Perhaps if you
are on Windows, the case of the filename is not important. As long as
the following file exists, you ought to be okay:

[yourwebapp]/WEB-INF/classes/formprocessors/Uk1900Java.class

 FORM action=/ukjava1900

It seems the only problem you have in your setup is the case mismatch of
the form action and the URL mapping for your servlet. Pick the one you
like the best (with or without caps) and change the other. Another
option would be to map both the upper-case and lower-case versions to
the same servlet, though that seems a bit lazy.

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

iEYEARECAAYFAkw3dmIACgkQ9CaO5/Lv0PDGYgCgm1tDb2tNuTyBIHdRLmFXvymR
BZcAn3K0SwHZHjvkG+mIdg3Yg9Vw/MVY
=n1Zb
-END PGP SIGNATURE-

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



Re: Problems with parsing html with servlet

2010-07-09 Thread John Byrne
Hi Mark, Andre et al

Sincere thanks for your expert help.  Pass on my help to your
colleague who also helped.


Kind Regards

John

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



Re: Problems with parsing html with servlet

2010-07-09 Thread André Warnier

John Byrne wrote:

Hi Mark, Andre et al

Sincere thanks for your expert help.  Pass on my help to your
colleague who also helped.


You are welcome, and we all read this list, so we don't need to copy eachother.
Now, did you do as told and is it now working, or what ?


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



Tomcat 7.0, logging configuration

2010-07-09 Thread André Warnier

Hi.

I notice in the online doc of Tomcat 7.0, page
http://tomcat.apache.org/tomcat-7.0-doc/logging.html
at the end of the first big box on the page, this paragraph :

# For example, set the com.xyz.foo logger to only log SEVERE
# messages:
#org.apache.catalina.startup.ContextConfig.level = FINE
#org.apache.catalina.startup.HostConfig.level = FINE
#org.apache.catalina.session.ManagerBase.level = FINE

I am far from an expert in Tomcat logging (*), but it seems to me that this section is 
rather nonsensical.  I believe the same section is also part of the logging.properties 
file distributed with Tomcat.
..and has been distributed with Tomcat since at least version 5.0, in the same apparently 
nonsensical way.


Might not this 7.0 release be the perfect occasion to make it more sensical, or 
retire it ?


(*) which is why I was perusing that page, in the forlorn hope of getting more 
enlightened

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



Re: tomcat datasource, find active connections

2010-07-09 Thread Pid
On 09/07/2010 20:03, Ashish Kulkarni wrote:
 Hi
 I have following in context.xml, and it works fine.
 But i would like to find how many active connections are there in data
 source or how many total connections are there?
 1 is it possible to do so?
 
 2 Can i change type javax.sql.DataSource
 to com.ibm.as400.access.AS400JDBCDataSource, as this has methods to find
 active connections etc?

Nope.

If you use an appropriate DataSourceFactory that creates a
AS400JDBCDataSource then you can cast the DataSource that results from
the calls to JNDI to the one you want.

Or you can use JMX to examine the running Tomcat.


p

 Resource name=jdbc/mydev  auth=Container
  type=javax.sql.DataSource
   maxActive=2
   maxIdle=2
   maxWait=3000
   username=user
   password=pass
   driverClassName=com.ibm.as400.access.AS400JDBCDriver
   url=jdbc:as400://1mysystem;date format=iso;time
 format=iso;errors=basic;trace=false;
   validationQuery=select * from   mytable /
 
 




signature.asc
Description: OpenPGP digital signature


Re: Tomcat 7.0, logging configuration

2010-07-09 Thread Pid
On 09/07/2010 22:32, André Warnier wrote:
 Hi.
 
 I notice in the online doc of Tomcat 7.0, page
 http://tomcat.apache.org/tomcat-7.0-doc/logging.html
 at the end of the first big box on the page, this paragraph :
 
 # For example, set the com.xyz.foo logger to only log SEVERE
 # messages:
 #org.apache.catalina.startup.ContextConfig.level = FINE
 #org.apache.catalina.startup.HostConfig.level = FINE
 #org.apache.catalina.session.ManagerBase.level = FINE
 
 I am far from an expert in Tomcat logging (*), but it seems to me that
 this section is rather nonsensical.  I believe the same section is also
 part of the logging.properties file distributed with Tomcat.
 ..and has been distributed with Tomcat since at least version 5.0, in
 the same apparently nonsensical way.
 
 Might not this 7.0 release be the perfect occasion to make it more
 sensical, or retire it ?

You know the refrain now, don't you?
Patches are welcome.

;)


p

 (*) which is why I was perusing that page, in the forlorn hope of
 getting more enlightened
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 




signature.asc
Description: OpenPGP digital signature


[ANN] Apache Tomcat 5.5.30 released

2010-07-09 Thread Jim Jagielski
The Apache Tomcat Team announces the immediate availability of Apache
Tomcat 5.5.30 stable.

Apache Tomcat 5.5.30 is primarily a security and bug fix
release. All users of older versions of the Tomcat 5.5
family should upgrade to 5.5.30.

Please refer to the change log for the list of changes:

http://tomcat.apache.org/tomcat-5.5-doc/changelog.html

Please refer to the Tomcat 5 security page for the list of security
fixes in this release:

http://tomcat.apache.org/security-5.html

Downloads:

http://tomcat.apache.org/download-55.cgi


Thank you,
The Apache Tomcat Team



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



RE: Connecting Tomcat to a database

2010-07-09 Thread Caldarale, Charles R
 From: Christian Bruckhoff [mailto:christian.bruckh...@gmx.de]
 Subject: Re: Connecting Tomcat to a database
 
 ERROR - GeronimoLog.error(108) | Failed to resolved external 
 DataSource at java:comp/env/jdbc/TestDB.
 javax.naming.NameNotFoundException: Name jdbc is not bound
 in this Context

 Any idea, what's wrong?

I downloaded and installed ODE on Tomcat 7, configured it for MySQL, and was 
able to reproduce the above error.  (Contrary to popular belief, there is no 
space in the error message - that was just a figment of whatever transposition 
mechanism the OP used.  The grammar in the message is flawed, though.)

Luckily, there's an easy fix (or at least a workaround): get rid of the 
original .war file.  Once Tomcat has expanded ode.war into the ode directory, 
the .war file is no longer needed, and in fact is somehow interfering with the 
use of the directory.  Deleting the .war (or changing the extension) lets the 
META-INF/context.xml file get processed, thus defining the JNDI data source.  
The same effect can be achieved by placing the Context element in 
conf/Catalina/[host]/ode.xml, which will override any in META-INF/context.xml 
(in either the .war file or the directory).

I have no idea if things are supposed to work this way, or if this is a bug in 
Tomcat 7 (haven't tried ODE on any other version).  Perhaps the lack of a 
context.xml file inside META-INF of the .war causes Tomcat to ignore the one in 
the expanded directory.

As a side note, I found two problems with the ODE 2.0 beta:

1) It doesn't shut down properly.  You can't use Tomcat's shutdown.bat (or .sh) 
script to stop Tomcat, since ODE starts extra threads and fails to terminate 
them when the webapp is being stopped.  You can use a signal (CTRL-c on 
Windows) to get the JVM to shutdown cleanly.

2) The ODE instructions specify the wrong name for the SQL script to initialize 
the database; it should be sql/mysql.sql, not ode_openjpa_mysql-1.3.2.sql (the 
latter appears to be some ancient name).

 - 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 7.0, logging configuration

2010-07-09 Thread Caldarale, Charles R
 From: Pid [mailto:p...@pidster.com]
 Subject: Re: Tomcat 7.0, logging configuration
 
 On 09/07/2010 22:32, André Warnier wrote:
 
  I believe the same section is also part of the 
  logging.properties file distributed with Tomcat.
 
  Might not this 7.0 release be the perfect occasion 
  to make it more sensical, or retire it ?
 
 You know the refrain now, don't you?
 Patches are welcome.

Actually, it has been fixed.  The 7.0.0 logging.properties file now has this at 
the end:

# For example, set the org.apache.catalina.util.LifecycleBase logger to log
# each component that extends LifecycleBase changing state:
#org.apache.catalina.util.LifecycleBase.level = FINE

The docs haven't caught up yet.

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



when memory leak, tomcat can't accept requests?

2010-07-09 Thread jikai
Hi all:

Out web site use Nginx infront of tomcat6.0.28, nio connector, in heavy
load running about 24 hours, tomcat can't accept request, we must restart
tomcat .

check nginx error log, there are lots of Connection timed out, print
tomcat jstack, found most tomcat threads is TIMED_WAITING, like this:

 

http-10.132.23.74-8090-exec-54 daemon prio=10 tid=0x2aab36ecec00
nid=0x3175 waiting on condition [0x498c..0x498c0e20]

   java.lang.Thread.State: TIMED_WAITING (parking)

at sun.misc.Unsafe.park(Native Method)

- parking to wait for  0x2aaaba3cf768 (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)

at
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)

at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitN
anos(AbstractQueuedSynchronizer.java:1963)

at
java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:395)

at
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:944)

at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:9
06)

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

 

print jmap, we found we have lots of memory leak:

 

num #instances #bytes  class name

--

   1:   7772927  336536416  [C

   2:   7774657  310986280  java.lang.String

   3:398536  162602688  com.manu.dynasty.base.domain.User

   4:   3460146  138405840  java.sql.Timestamp

   5:   2334971  112078608  java.util.HashMap$Entry

   6:792095  101388160  com.manu.dynasty.function.domain.Friend

.

108:   437  80408  java.net.SocksSocketImpl

 

Objects num in memory like com.manu.dynasty.base.domain.User,
com.manu.dynasty.function.domain.Friend is too big than normal situation,

And the num of java.net.SocksSocketImpl is too small.

 

So my question is the memory leak cause tomcat can't create Socket to accept
nginx's request?

Our app is running in product envionment now , and every day we have to
restart tomcat, so any help is very appreciated