Re: Monitor Tomcat

2009-01-21 Thread Gregor Schneider
http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html
http://docs.hp.com/en/5992-4861/ar01s10.html

HTH

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

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



Re: Monitor Tomcat

2009-01-21 Thread Leon Rosenberg
well,

monitoring tomcat itself:

lambdaprobe
java-monitor

monitoring the webapp in tomcat

moskito
jamon

regards
Leon

On Wed, Jan 21, 2009 at 5:02 AM, Zaki Akhmad zakiakh...@gmail.com wrote:
 Hello,

 I am deploying my web application on Tomcat. How do I monitor the
 tomcat performance?
 1. If I am using GNU/Linux environment
 2. If I am using Windows XP environment

 What F/OSS package/software I should install?

 --
 Zaki Akhmad

 -
 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



mod_jk - load balancing

2009-01-21 Thread Andrew Hole
Hi Guys!

What is the behavior of mod_jk if one of the workers stops?
Mod_jk stops to send requests to that worker? Or it retries at each request
and only after determine that the worker is down , it sends the request to
the fine worker ?


# --
# Load Balancer worker
# --
worker.appbalancer.type= lb
worker.appbalancer.balanced_workers= wk1,wk2

# 
# First worker
# 
worker.wk1.port= 7001
worker.wk1.host= 10.250.14.43
worker.wk1.type= ajp13
worker.wk1.cache_timeout=600
worker.wk1.socket_timeout=5

# 
# Second worker
# 
worker.wk2.port= 7001
worker.wk2.host= 10.250.14.44
worker.wk2.type= ajp13
worker.wk2.cache_timeout=600
worker.wk2.socket_timeout=5

Thanks


RE: mod_jk - load balancing

2009-01-21 Thread Gerhardus.Geldenhuis
Hi Andrew,
It will mark a worker as down and only send requests to working
workers. There is a separate thread that checks the availability of all
workers in an configurable time period which will mark the worker as
available/functioning again when it becomes available, where after it
will receive requests again. This is new functionality in the latest
version of modjk(.27)

I am not sure whether the request that determined the unavailability
of the worker will be retried though, I don't think so. There has been a
previous thread in the list that discussed retrying requests and the
caching of request. I believe the conclusion was that it would be
possible to implement but not necessarily simple.

Regards

 -Original Message-
 From: Andrew Hole [mailto:andremailingl...@gmail.com]
 Sent: 21 January 2009 11:14
 To: Tomcat Users List
 Subject: mod_jk - load balancing
 
 Hi Guys!
 
 What is the behavior of mod_jk if one of the workers stops?
 Mod_jk stops to send requests to that worker? Or it retries at each
 request
 and only after determine that the worker is down , it sends the
request
 to
 the fine worker ?
 
 
 # --
 # Load Balancer worker
 # --
 worker.appbalancer.type= lb
 worker.appbalancer.balanced_workers= wk1,wk2
 
 # 
 # First worker
 # 
 worker.wk1.port= 7001
 worker.wk1.host= 10.250.14.43
 worker.wk1.type= ajp13
 worker.wk1.cache_timeout=600
 worker.wk1.socket_timeout=5
 
 # 
 # Second worker
 # 
 worker.wk2.port= 7001
 worker.wk2.host= 10.250.14.44
 worker.wk2.type= ajp13
 worker.wk2.cache_timeout=600
 worker.wk2.socket_timeout=5
 
 Thanks

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

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



JMX Controlpanel Application

2009-01-21 Thread Gerhardus.Geldenhuis
Hi
I was just wondering if anyone can recommend a open source that one can
use to build control panels based on jmx properties published by the
jvm or your own application.

We have monitoring software that can alert us when some jmx values
exceeds a threshold but I would like to see a tool where I can easily
collate different servers and be able to connect a button to a jmx
action. (apologies if I don't use the correct jmx terminology).

I was thinking something like JMX RAD(Rapid Application Development) 

Regards

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

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



Service Unavailable - zero size object

2009-01-21 Thread Andrew Hole
Hi!

We are using Apache + Mod_jk + Tomcat and randomly we are getting the
following error (http 503)
Service Unavailable - *zero* *size* *object*
The server is temporarily unable to service your request. Please try again
later.

Do you have any idea about why happens this error?

Thanks a lot
A.H


Re: Service Unavailable - zero size object

2009-01-21 Thread Piller Sébastien

Hi,

you will most likely find more informations on the log files 
(catalina.out or smt like that)


could you have a look and report the stacktrace here?

Andrew Hole a écrit :

Hi!

We are using Apache + Mod_jk + Tomcat and randomly we are getting the
following error (http 503)
Service Unavailable - *zero* *size* *object*
The server is temporarily unable to service your request. Please try again
later.

Do you have any idea about why happens this error?

Thanks a lot
A.H

  



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



Re: Service Unavailable - zero size object

2009-01-21 Thread Andrew Hole
The strange thing is that i cannot find any log file with this error! Its
very strange!

Thanks

On Wed, Jan 21, 2009 at 12:23 PM, Piller Sébastien pi...@hmcrecord.chwrote:

 Hi,

 you will most likely find more informations on the log files (catalina.out
 or smt like that)

 could you have a look and report the stacktrace here?

 Andrew Hole a écrit :

  Hi!

 We are using Apache + Mod_jk + Tomcat and randomly we are getting the
 following error (http 503)
 Service Unavailable - *zero* *size* *object*
 The server is temporarily unable to service your request. Please try again
 later.

 Do you have any idea about why happens this error?

 Thanks a lot
 A.H





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




Re: JMX Controlpanel Application

2009-01-21 Thread Kees Jan Koster
Dear Gerardus,

 I was just wondering if anyone can recommend a open source that one can
 use to build control panels based on jmx properties published by the
 jvm or your own application.

 We have monitoring software that can alert us when some jmx values
 exceeds a threshold but I would like to see a tool where I can easily
 collate different servers and be able to connect a button to a jmx
 action. (apologies if I don't use the correct jmx terminology).


JMX is pretty easy to use from your own code. I wrote some JSP's in
the past that would do simple management operations on MBeans in a
Tomcat server. Here is some code that I wrote to restart a Tomcat
connector using JMX.

Otherwise, there are some command line tools that alloy you to make
JMX calls and use JMX operations.

--
Kees Jan

http://java-monitor.com/forum/
kjkos...@kjkoster.org
06-51838192

The secret of success lies in the stability of the goal. -- Benjamin Disraeli

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



Re: jsvc error with tomcat and java 1.6 on os x

2009-01-21 Thread Adam Dajka

On 20 Jan 2009, at 06:26, m zyzy wrote:

If this is a jsvc issue, are there any ways to use tomcat without  
jsvc?


try using the core binary download , extract  it and run the startup  
script

inside the /bin folder of extracted folder , test it on the browser
http://localhost:8080 . to stop the server , use the shutdown  
script . Make

sure you have set the JAVA_HOME,PATH of java /bin/ , CLASSPATH , and
CATALINA_HOME in your /etc/profile .



port install tomcat6
/opt/local/share/java/tomcat6/bin/startup.sh
/opt/local/share/java/tomcat6/bin/shutdown.sh

Works fine.

Thank you!
Adam



Re: encodeRedirectURL URL rewrite not working

2009-01-21 Thread Flavio Crispim
Hi Greg

You may try this on App1:

RequestDispatcher rd;
rd = context.getContext(/App2).getRequestDispatcher(/LaunchServlet);
rd.forward(request, response);

Flavio

Greg Burrow gregbur...@gmail.com gravou em 20/01/2009 18:44:18:

 Hello,
 I have two web applications in different context, one servlet will
forward
 the request to a servlet in the other application using encodeRedirectURL
 and sendRedirect.  The receiving servlet creates a new session and
session
 attributes are lost.
 Running Tomcat 5.5.17.

 Here is the flow:

 GET /App1/RedirectServlet HTTP/1.1
 Cookie: JSESSIONID=7AFACD0318419C34938B6410BB9A1937

 RedirectServlet
 response.sendRedirect(response.encodeRedirectURL(/App2/LaunchServlet));

 HTTP/1.x 302 Moved Temporarily

 GET /App2/LaunchServlet HTTP/1.1
 (no cookie)

 HTTP/1.x 200 OK
 Set-Cookie: JSESSIONID=BE408BFD3480E29DF2A4278BCA3C1FC6; Path=/App2


 The same behavior occurs in Firefox and IE.  Cookies are enabled in both
 browsers and crossContext=true in context.xml.  Is this a bug in Tomcat
or
 a problem with my method of redirect?


 Thanks,

 Greg


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



Re: encodeRedirectURL URL rewrite not working

2009-01-21 Thread Konstantin Kolinko
2009/1/20 Greg Burrow gregbur...@gmail.com:
 Hello,
 I have two web applications in different context, one servlet will forward
 the request to a servlet in the other application using encodeRedirectURL
 and sendRedirect.  The receiving servlet creates a new session and session
 attributes are lost.
 Running Tomcat 5.5.17.

 Here is the flow:

 GET /App1/RedirectServlet HTTP/1.1
 Cookie: JSESSIONID=7AFACD0318419C34938B6410BB9A1937

 RedirectServlet
 response.sendRedirect(response.encodeRedirectURL(/App2/LaunchServlet));

 HTTP/1.x 302 Moved Temporarily

 GET /App2/LaunchServlet HTTP/1.1
 (no cookie)

 HTTP/1.x 200 OK
 Set-Cookie: JSESSIONID=BE408BFD3480E29DF2A4278BCA3C1FC6; Path=/App2


 The same behavior occurs in Firefox and IE.  Cookies are enabled in both
 browsers and crossContext=true in context.xml.  Is this a bug in Tomcat or
 a problem with my method of redirect?


I do not understand, what are you expecting?

Note, that according to the spec you cannot share a session between
different web applications. That is, session ID can be the same, but
the session object is different.

Best regards,
Konstantin Kolinko

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



Re: Random Connection Closed Exceptions - Question to the code example

2009-01-21 Thread Flavio Crispim
Hi Stefan

you´re right, I wrote this with your first example in mind.

Regards
Flavio

Stefan Riegel stefan.rie...@telig.de gravou em 21/01/2009 01:36:34:

 Hello Flavio,

 thank You for your answer but isn't Your code the same as my code below?
 I don't see any significant difference.

 Regards
 Stefan

 Flavio Crispim schrieb:
  Hi Stefan
 
  I would try this one:
 
Connection conn = null;
Statement stmt = null;  // Or PreparedStatement if needed
try {
  conn = ... get connection from connection pool ...
  stmt = conn.createStatement(select ...);
  ResultSet rs = stmt.executeQuery();
  ... iterate through the result set ...
} catch (SQLException e) {
  ... deal with errors ...
} finally {
  // Always make sure result sets and statements are closed,
  // and the connection is returned to the pool
  if (stmt != null) {
try { stmt.close(); } catch (SQLException e) { ; }
  }
  if (conn != null) {
try { conn.close(); } catch (SQLException e) { ; }
  }
}
 
  We don´t need to null conn and stmt variables because the sanity check
on
  finally block.
  The resultset will only exist if and only if you already have a
statement,
  and A ResultSet object is automatically closed when the Statement
object
  that generated it is closed, re-executed, or used to retrieve the next
  result from a sequence of multiple results. , thats why it is in a
more
  restrictive scope w/out close()
  http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSet.html
 
 
  On the race condition:
 
  javadoc on Connection.close() states Calling the method close on a
  Connection object that is already closed is a no-op. ,
  see:
http://java.sun.com/javase/6/docs/api/java/sql/Connection.html#close()
 
  This race condition should be threated as connection pool´s bug, IMHO.
 
  Flavio Crispim
  PS: English isn´t my mother language...
 
 
  Alan Chaney a...@compulsivecreative.com gravou em 19/01/2009
21:24:43:
 
  Hi Stefan
 
  I went and read the comments more carefully and it seems to me that
the
  proposed solution is an attempt to avoid a race condition between
  issuing the 'close' in
  one thread and then it being  closed again whilst its being used in
  another thread.
 
  If the problem is closing it twice then I can't see why its not just
  closed in the 'finally' block, once for each thread.
 
  If it is a concurrency problem then I suspect that the proposed
solution
  in the docs isn't the right one anyway. I'd suspect that the problem
is
  more to do with threads not seeing each others memory state properly.
  Isn't this is a case of a variable (in this case 'conn') actually
being
  a reference to an object which is shared between threads?
  Because of the JVM memory model it is possible for two threads not to
be
  properly synchronized - see Doug Lea et.al and 'happens before' .
  Personally, I feel that the correct solution is to synchronize  access
  to the connection object when it is retrieved and closed.
 
  I have to go out now and I don't have any more time to consider this
  today, but I'd be interested to hear other people's comments on this
  topic.
  Regards
 
  Alan Chaney
 
 
  Stefan Riegel wrote:
  Thanks Alan, just to make the thing really clear. You propose code
  like this:
 
  public void execute() {
  Connection conn = null;
  Statement stmt = null;
  ResultSet rs = null;
  Context envContext = null;
  try {
  Context initContext = new InitialContext();
  envContext = (Context)
  initContext.lookup(java:/comp/env);
  DataSource ds = (DataSource)
  envContext.lookup(jdbc/swex);
  conn = ds.getConnection();
  stmt = conn.createStatement();
  rs = stmt.executeQuery(some sql);
  // iterate through the result set ...
  } catch (SQLException e) {
  e.printStackTrace();
  } catch (NamingException e) {
  e.printStackTrace();
  } finally {
  if (rs != null) {
  try {
  rs.close();
  } catch (SQLException e) {
  e.printStackTrace();
  }
  }
  if (stmt != null) {
  try {
  stmt.close();
  } catch (SQLException e) {
  e.printStackTrace();
  }
  }
  if (conn != null) {
  try {
  conn.close();
  } catch (SQLException e) {
  e.printStackTrace();
  }
  }
  if (envContext != null) {
  try {
  envContext.close();
  } catch (NamingException e) {
 

Re: encodeRedirectURL URL rewrite not working

2009-01-21 Thread Greg Burrow
Flavio,
Thanks for the response.  Once LaunchServlet in App2 is called it will start
an applet.  The RequestDispatcher.forward() will not change the context to
App2 so the applet lookup will occur in App1 and fail.  I was able to work
around this by hard coding the codebase attribute in the applet to App2.

Thanks,

Greg


On Wed, Jan 21, 2009 at 6:56 AM, Flavio Crispim 
flavio.cris...@sulamerica.com.br wrote:

 Hi Greg

 You may try this on App1:

 RequestDispatcher rd;
 rd = context.getContext(/App2).getRequestDispatcher(/LaunchServlet);
 rd.forward(request, response);

 Flavio

 Greg Burrow gregbur...@gmail.com gravou em 20/01/2009 18:44:18:

  Hello,
  I have two web applications in different context, one servlet will
 forward
  the request to a servlet in the other application using encodeRedirectURL
  and sendRedirect.  The receiving servlet creates a new session and
 session
  attributes are lost.
  Running Tomcat 5.5.17.
 
  Here is the flow:
 
  GET /App1/RedirectServlet HTTP/1.1
  Cookie: JSESSIONID=7AFACD0318419C34938B6410BB9A1937
 
  RedirectServlet
  response.sendRedirect(response.encodeRedirectURL(/App2/LaunchServlet));
 
  HTTP/1.x 302 Moved Temporarily
 
  GET /App2/LaunchServlet HTTP/1.1
  (no cookie)
 
  HTTP/1.x 200 OK
  Set-Cookie: JSESSIONID=BE408BFD3480E29DF2A4278BCA3C1FC6; Path=/App2
 
 
  The same behavior occurs in Firefox and IE.  Cookies are enabled in both
  browsers and crossContext=true in context.xml.  Is this a bug in Tomcat
 or
  a problem with my method of redirect?
 
 
  Thanks,
 
  Greg


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




Re: encodeRedirectURL URL rewrite not working

2009-01-21 Thread Greg Burrow
Konstantin,

My expectation was that the same session would be used by App2 after
the redirect.  The javadoc for HttpServletResponse. encodeRedirectURL
looks clear that it should retain the session either by cookies or by
URL rewriting.

HttpServletResponse.encodeRedirectURL
Encodes the specified URL for use in the sendRedirect method or, if
encoding is not needed, returns the URL unchanged. The implementation
of this method includes the logic to determine whether the session ID
needs to be encoded in the URL. Because the rules for making this
determination can differ from those used to decide whether to encode a
normal link, this method is separated from the encodeURL method.

All URLs sent to the HttpServletResponse.sendRedirect method should be
run through this method. Otherwise, URL rewriting cannot be used with
browsers which do not support cookies.

I would expect the encodeRedirectURL to work as follows:
1 - Redirect to the same application context
A - Cookies supported  -  Do not rewrite the URL
B - Cookies not supported - Rewrite the URL to include session id
2 - Redirect to a different application context
Always rewite the URL to include the session id.


Thanks,

Greg


On Wed, Jan 21, 2009 at 7:55 AM, Konstantin Kolinko
knst.koli...@gmail.com wrote:

 2009/1/20 Greg Burrow gregbur...@gmail.com:
  Hello,
  I have two web applications in different context, one servlet will forward
  the request to a servlet in the other application using encodeRedirectURL
  and sendRedirect.  The receiving servlet creates a new session and session
  attributes are lost.
  Running Tomcat 5.5.17.
 
  Here is the flow:
 
  GET /App1/RedirectServlet HTTP/1.1
  Cookie: JSESSIONID=7AFACD0318419C34938B6410BB9A1937
 
  RedirectServlet
  response.sendRedirect(response.encodeRedirectURL(/App2/LaunchServlet));
 
  HTTP/1.x 302 Moved Temporarily
 
  GET /App2/LaunchServlet HTTP/1.1
  (no cookie)
 
  HTTP/1.x 200 OK
  Set-Cookie: JSESSIONID=BE408BFD3480E29DF2A4278BCA3C1FC6; Path=/App2
 
 
  The same behavior occurs in Firefox and IE.  Cookies are enabled in both
  browsers and crossContext=true in context.xml.  Is this a bug in Tomcat or
  a problem with my method of redirect?
 

 I do not understand, what are you expecting?

 Note, that according to the spec you cannot share a session between
 different web applications. That is, session ID can be the same, but
 the session object is different.

 Best regards,
 Konstantin Kolinko

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


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



run tomcat as tomcat user

2009-01-21 Thread Kaushal Shriyan
Hi

I am not able to start tomcat as tomcat user on ubutu 8.04 Linux,
Below is my start/stop script
Any ideas as what is going wrong ?


Thanks and Regards

Kaushal

###
#!/bin/sh
#
# Startup script for Tomcat

JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
export JAVA_HOME
CATALINA_OPTS=-Xms512m -Xmx1m
export CATALINA_OPTS
start_tomcat=/usr/local/apache-tomcat-5.5.27/bin/startup.sh
stop_tomcat=/usr/local/apache-tomcat-5.5.27/bin/shutdown.sh

start() {
echo -n Starting tomcat: 
su -c ${start_tomcat} tomcat
echo done.
}
stop() {
echo -n Shutting down tomcat: 
${stop_tomcat}
echo done.
}

# See how we were called
case $1 in
  start)
start
;;
  stop)
stop
;;
  restart)
stop
sleep 10
start
;;
  *)
echo Usage: $0 {start|stop|restart}
esac

###


Re: Monitor Tomcat

2009-01-21 Thread Brian Clark
I use Sun's Visual VM. 

https://visualvm.dev.java.net/

Brian





From: Zaki Akhmad zakiakh...@gmail.com
To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, January 20, 2009 10:02:51 PM
Subject: Monitor Tomcat

Hello,

I am deploying my web application on Tomcat. How do I monitor the
tomcat performance?
1. If I am using GNU/Linux environment
2. If I am using Windows XP environment

What F/OSS package/software I should install?

-- 
Zaki Akhmad

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


  

Re: encodeRedirectURL URL rewrite not working

2009-01-21 Thread Karl San Gabriel

Hi Greg,

HttpServletResponse.sendRedirect(String) basically just commands the 
web browser proceed to another URL.
It's like opening another browser window, typing the other URL in the 
Address bar, then hitting the Enter button.


The session object created in the second web application is a new and 
different session object and does not know

anything about the session object from the first web application.

Regards,
Karl


Greg Burrow wrote:

Hello,
I have two web applications in different context, one servlet will forward
the request to a servlet in the other application using encodeRedirectURL
and sendRedirect.  The receiving servlet creates a new session and session
attributes are lost.
Running Tomcat 5.5.17.

Here is the flow:

GET /App1/RedirectServlet HTTP/1.1
Cookie: JSESSIONID=7AFACD0318419C34938B6410BB9A1937

RedirectServlet
response.sendRedirect(response.encodeRedirectURL(/App2/LaunchServlet));

HTTP/1.x 302 Moved Temporarily

GET /App2/LaunchServlet HTTP/1.1
(no cookie)

HTTP/1.x 200 OK
Set-Cookie: JSESSIONID=BE408BFD3480E29DF2A4278BCA3C1FC6; Path=/App2


The same behavior occurs in Firefox and IE.  Cookies are enabled in both
browsers and crossContext=true in context.xml.  Is this a bug in Tomcat or
a problem with my method of redirect?


Thanks,

Greg

  



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



Windows Migration 5.5.23 to 6.0.18 - java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina

2009-01-21 Thread Dan
I am migrating from 5.5.23 on Windows to 6.0.18. I have installed the
Windows Service binary download and can start up the server fine with the
installation defaults.

I then point CATALINA_BASE to my actual tomcat base directory that I use for
my project with 5.5.23 and I get the following:

java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:215)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390)

What other changes should I make after installation? With 5.5.23 that was
all that was necessary, is there another step to use a custom catalina base
with 6.x? Are they not backwards-compatible in this sense?

Thanks,

Dan


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



Re: encodeRedirectURL URL rewrite not working

2009-01-21 Thread Konstantin Kolinko
2009/1/21 Greg Burrow gregbur...@gmail.com:

 My expectation was that the same session would be used by App2 after
 the redirect.  The javadoc for HttpServletResponse. encodeRedirectURL
 looks clear that it should retain the session either by cookies or by
 URL rewriting.


 I do not understand, what are you expecting?

 Note, that according to the spec you cannot share a session between
 different web applications. That is, session ID can be the same, but
 the session object is different.


You should read chapter SRV.7.3 of the Servlet specification.

Best regards,
Konstantin Kolinko

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



Re: Windows Migration 5.5.23 to 6.0.18 - java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina

2009-01-21 Thread Flavio Crispim
Hi Dan

You need to set CATALINA_HOME variable pointingo to your installation
directory.

Flavio
regards




Dan d...@tipjarawards.com gravou em 21/01/2009 14:27:27:

 I am migrating from 5.5.23 on Windows to 6.0.18. I have installed the
 Windows Service binary download and can start up the server fine with the
 installation defaults.

 I then point CATALINA_BASE to my actual tomcat base directory that I use
for
 my project with 5.5.23 and I get the following:

 java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
 at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
 at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:215)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390)

 What other changes should I make after installation? With 5.5.23 that was
 all that was necessary, is there another step to use a custom catalina
base
 with 6.x? Are they not backwards-compatible in this sense?

 Thanks,

 Dan


 -
 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: Windows Migration 5.5.23 to 6.0.18 - java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina

2009-01-21 Thread Dan
CATALINA_HOME is pointing there, that is the default from the installtion.
Here is the view of the tomcat service params:

-Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 6.0.18
-Dcatalina.base=c:\dev\tomcat
-Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat
6.0.18\endorsed
-Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat
6.0.18\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=C:\Program Files\Apache Software
Foundation\Tomcat 6.0.18\conf\logging.properties

Thanks,

Dan

-Original Message-
From: Flavio Crispim [mailto:flavio.cris...@sulamerica.com.br] 
Sent: January-21-09 11:46 AM
To: Tomcat Users List
Subject: Re: Windows Migration 5.5.23 to 6.0.18 -
java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina

Hi Dan

You need to set CATALINA_HOME variable pointingo to your installation
directory.

Flavio
regards




Dan d...@tipjarawards.com gravou em 21/01/2009 14:27:27:

 I am migrating from 5.5.23 on Windows to 6.0.18. I have installed the 
 Windows Service binary download and can start up the server fine with 
 the installation defaults.

 I then point CATALINA_BASE to my actual tomcat base directory that I 
 use
for
 my project with 5.5.23 and I get the following:

 java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
 at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
 at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:215)
 at 
 org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390)

 What other changes should I make after installation? With 5.5.23 that 
 was all that was necessary, is there another step to use a custom 
 catalina
base
 with 6.x? Are they not backwards-compatible in this sense?

 Thanks,

 Dan


 -
 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: Windows Migration 5.5.23 to 6.0.18 - java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina

2009-01-21 Thread Caldarale, Charles R
 From: Flavio Crispim [mailto:flavio.cris...@sulamerica.com.br]
 Subject: Re: Windows Migration 5.5.23 to 6.0.18 -
 java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina

 You need to set CATALINA_HOME variable pointingo to your installation
 directory.

That's not useful in any way.  The OP is running Tomcat as Windows service, so 
environment variables are ignored.  Any necessary settings (including location 
of the Tomcat code) must be done via the tomcat6w.exe program.

Note that once the service is installed, the location of the tomcat6.exe 
program *cannot* be changed, but catalina.home and catalina.base system 
properties can.  If you want to run tomcat6.exe from a different location, 
you'll need to download the .zip (not .exe) package, install it where you want, 
then use the service.bat script to create the service.

 - Chuck


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

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



RE: Windows Migration 5.5.23 to 6.0.18 - java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina

2009-01-21 Thread Caldarale, Charles R
 From: Dan [mailto:d...@tipjarawards.com]
 Subject: RE: Windows Migration 5.5.23 to 6.0.18 -
 java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina

 -Dcatalina.base=c:\dev\tomcat

And what's under c:\dev\tomcat?

 - Chuck


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

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



RE: Windows Migration 5.5.23 to 6.0.18 - java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina

2009-01-21 Thread Dan
I haven't changed anything from the default installation. I did the
following:

1. Installed 6.0.18 as windows service
2. Launch the service after a successful installation, no problems it
starts. Tried the tomcat6.exe directly, no problems.
3. Click the service tray icon to change the -Dcatalina.base directory to
c:\dev\tomcat
4. Restart the service, it fails with the classnotfound exception as noted,
same if I use tomcat6.exe.

The c:\dev\tomcat contains my webapps etc. so it has a
bin/conf/logs/shared/webapps/ directories.

I'm really stumped on this one as I've used tomcat for years with no
problems.

Is there a CLASSPATH environment variable that needs to exist?

Thanks,

Dan

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: January-21-09 12:16 PM
To: Tomcat Users List
Subject: RE: Windows Migration 5.5.23 to 6.0.18 -
java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina

 From: Dan [mailto:d...@tipjarawards.com]
 Subject: RE: Windows Migration 5.5.23 to 6.0.18 -
 java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina

 -Dcatalina.base=c:\dev\tomcat

And what's under c:\dev\tomcat?

 - Chuck


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

-
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: Windows Migration 5.5.23 to 6.0.18 - java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina

2009-01-21 Thread Konstantin Kolinko
2009/1/21 Dan d...@tipjarawards.com:
 I haven't changed anything from the default installation. I did the
 following:

 1. Installed 6.0.18 as windows service
 2. Launch the service after a successful installation, no problems it
 starts. Tried the tomcat6.exe directly, no problems.
 3. Click the service tray icon to change the -Dcatalina.base directory to
 c:\dev\tomcat
 4. Restart the service, it fails with the classnotfound exception as noted,
 same if I use tomcat6.exe.

 The c:\dev\tomcat contains my webapps etc. so it has a
 bin/conf/logs/shared/webapps/ directories.

 I'm really stumped on this one as I've used tomcat for years with no
 problems.

 Is there a CLASSPATH environment variable that needs to exist?


You cannot use pre-existing 5.5 configuration to run Tomcat 6.0. You
must copy the one from TC 6.0 installation and tune it accordingly.

Your specific problem is caused by the differences in
catalina.properties files (*.loader paths are different), but most of
other configuration files are also different between versions (though
similar).

CLASSPATH variable is not needed.

Best regards,
Konstantin Kolinko

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



RE: Windows Migration 5.5.23 to 6.0.18 - java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina

2009-01-21 Thread Caldarale, Charles R
 From: Dan [mailto:d...@tipjarawards.com]
 Subject: RE: Windows Migration 5.5.23 to 6.0.18 -
 java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina

 The c:\dev\tomcat contains my webapps etc. so it has a
 bin/conf/logs/shared/webapps/ directories.

The classloading hierarchy has changed in Tomcat 6; in particular, there is no 
shared directory anymore, but there is a lib directory (under catalina.home).  
If you're missing that, you'll get the exception you noted.

If you simply expect your 5.5 conf/server.xml and conf/*.properties files to 
work in Tomcat 6, you're sadly mistaken.

 I'm really stumped on this one as I've used tomcat for
 years with no problems.

Read the doc for the current level, not what you've used for years.  Things 
change.

 Is there a CLASSPATH environment variable that needs to exist?

NEVER, NEVER, NEVER set the CLASSPATH variable for Tomcat.  (Besides, services 
ignore environment variables.)

 - 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: Windows Migration 5.5.23 to 6.0.18 - java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina

2009-01-21 Thread Caldarale, Charles R
 From: Caldarale, Charles R
 Subject: RE: Windows Migration 5.5.23 to 6.0.18 -
 java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina

 If you simply expect your 5.5 conf/server.xml and
 conf/*.properties files to work in Tomcat 6, you're sadly mistaken.

You might want to read this:
http://tomcat.apache.org/migration.html

 - Chuck


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

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



RE: Windows Migration 5.5.23 to 6.0.18 - java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina

2009-01-21 Thread Dan
I did read that but it didn't explicitly mention the change in the
properties files etc. for classloader.

I did expect the server to at least boot up with errors or something.

Thanks for the help, will simply copy the installation default properties
files to my base and should be good.

Best,

Dan
 

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: January-21-09 1:24 PM
To: Caldarale, Charles R; Tomcat Users List
Subject: RE: Windows Migration 5.5.23 to 6.0.18 -
java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina

 From: Caldarale, Charles R
 Subject: RE: Windows Migration 5.5.23 to 6.0.18 -
 java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina

 If you simply expect your 5.5 conf/server.xml and conf/*.properties 
 files to work in Tomcat 6, you're sadly mistaken.

You might want to read this:
http://tomcat.apache.org/migration.html

 - Chuck


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

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


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



need an example of how to use the NIO connector

2009-01-21 Thread Dharma Lion
I'm now looking for an example of how to use the NIO connector
with Tomcat--I 
need this in order to use chat.  I've found the following
example of how to 
configure this on the Tomcat side:

Connector 
port=8443
protocol=org.apache.coyote.http11.Http11NioProtocol
maxThreads=150 
scheme=https secure=true
clientAuth=false sslProtocol=TLS 
SSLEnabled=true
keystoreFile=conf/keystore 
keystorePass=secrit/

But I can't seem to find any information on 
how to configure things
on the Apache side--in the httpd.conf file--so that 
requests to Apache
get successfully routed to Tomcat using the NIO 
connector.

Any thoughts on this??

Thanks in advance,
DL



  

Re: run tomcat as tomcat user

2009-01-21 Thread Rusty Wright

(Repeating a reply I sent a week or so ago.)

I made this by modifying one for a different service.

It's set up so that tomcat runs as the user tomcat.  In order to do that you'll 
need to tweak the ownership of the files in the tomcat directory.  I just made 
everything owned by tomcat except webapps, which I own, but which is group 
owned and writable by tomcat so it can explode the wars.

I'm on ubuntu (notice the two flavors of the functions file it sources).

You may not need the HUDSON_HOME stuff and I'm sure you won't need the 
Dwaitlistd.host=${HOST} so delete stuff as necessary.

If you want it to run as root I'm guessing that you'd need to delete the 
--chuid and --user lines.


#!/bin/sh

PATH=/bin:/usr/bin:/sbin:/usr/sbin
export PATH

export JAVA_OPTS=-server
export JAVA_HOME=/usr/java
export TOMCAT_DIR=/usr/local/tomcat

export HUDSON_HOME=/usr/local/hudson

TOMCAT_START=${TOMCAT_DIR}/bin/startup.sh
TOMCAT_STOP=${TOMCAT_DIR}/bin/shutdown.sh
TOMCAT_USER=tomcat

HOST=`/bin/hostname | sed -e 's/\..*//'`

export JAVA_OPTS=-server -Dwaitlistd.host=${HOST}

test -f ${TOMCAT_START} || exit 0

# redhat
# . /etc/init.d/functions

# debian
. /lib/lsb/init-functions

case $1 in
  'start')
  log_daemon_msg Starting tomcat tomcat

  cd /var/log

  # ${TOMCAT_START}
  eval /sbin/start-stop-daemon \
  --start \
  --quiet \
  --chuid ${TOMCAT_USER} \
  --user ${TOMCAT_USER} \
  --startas ${TOMCAT_START}


  log_end_msg $?
  ;;

  'stop')
  log_daemon_msg Stopping tomcat tomcat

  # ${TOMCAT_STOP}
  eval /sbin/start-stop-daemon \
  --stop \
  --quiet \
  --user ${TOMCAT_USER} \
  --startas ${TOMCAT_STOP}

  log_end_msg $?
  ;;

  'restart')
  ${0} stop

  log_action_msg sleeping for several seconds ...
  sleep 13

  ${0} start
  ;;

  *)
  log_action_msg Usage: ${0} {start|stop|restart}
  ;;
esac


Kaushal Shriyan wrote:

Hi

I am not able to start tomcat as tomcat user on ubutu 8.04 Linux,
Below is my start/stop script
Any ideas as what is going wrong ?


Thanks and Regards

Kaushal

###
#!/bin/sh
#
# Startup script for Tomcat

JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
export JAVA_HOME
CATALINA_OPTS=-Xms512m -Xmx1m
export CATALINA_OPTS
start_tomcat=/usr/local/apache-tomcat-5.5.27/bin/startup.sh
stop_tomcat=/usr/local/apache-tomcat-5.5.27/bin/shutdown.sh

start() {
echo -n Starting tomcat: 
su -c ${start_tomcat} tomcat
echo done.
}
stop() {
echo -n Shutting down tomcat: 
${stop_tomcat}
echo done.
}

# See how we were called
case $1 in
  start)
start
;;
  stop)
stop
;;
  restart)
stop
sleep 10
start
;;
  *)
echo Usage: $0 {start|stop|restart}
esac

###



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



Re: Service Unavailable - zero size object

2009-01-21 Thread Steve Ochani
Send reply to:  Tomcat Users List users@tomcat.apache.org
Date sent:  Wed, 21 Jan 2009 12:33:40 +
Subject:Re: Service Unavailable - zero size object
From:   Andrew Hole andremailingl...@gmail.com
To: Tomcat Users List users@tomcat.apache.org

 The strange thing is that i cannot find any log file with this error!
 Its very strange!


It is most likely an error from apache httpd so look in the httpd logs.

I found this via google:

http://www.unixadmintalk.com/apache-users/705409-service-unavailable-zero-size-
object.html


This may not be tomcat related at all.


-Steve O.



 Thanks

 On Wed, Jan 21, 2009 at 12:23 PM, Piller Sébastien
 pi...@hmcrecord.chwrote:

  Hi,
 
  you will most likely find more informations on the log files
  (catalina.out or smt like that)
 
  could you have a look and report the stacktrace here?
 
  Andrew Hole a écrit :
 
   Hi!
 
  We are using Apache + Mod_jk + Tomcat and randomly we are getting
  the following error (http 503) Service Unavailable - *zero* *size*
  *object* The server is temporarily unable to service your request.
  Please try again later.
 
  Do you have any idea about why happens this error?
 
  Thanks a lot
  A.H
 
 
 
 
 
  
  - 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: encodeRedirectURL URL rewrite not working

2009-01-21 Thread Greg Burrow
Konstantin,

The Servlet specification does make it clear, thanks for the
suggestion.  The HttpServletResponse.encodeRedirectURL javadoc on the
other hand seems to contradict the specification.

I now have a workaround for my application by using
RequestDispatcher.forward and setting a new codebase in the jsp:plugin
code.

Thanks,

Greg


On Wed, Jan 21, 2009 at 10:37 AM, Konstantin Kolinko
knst.koli...@gmail.com wrote:
 2009/1/21 Greg Burrow gregbur...@gmail.com:

 My expectation was that the same session would be used by App2 after
 the redirect.  The javadoc for HttpServletResponse. encodeRedirectURL
 looks clear that it should retain the session either by cookies or by
 URL rewriting.


 I do not understand, what are you expecting?

 Note, that according to the spec you cannot share a session between
 different web applications. That is, session ID can be the same, but
 the session object is different.


 You should read chapter SRV.7.3 of the Servlet specification.

 Best regards,
 Konstantin Kolinko

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



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



Re: PostgreSQL vs MySQL with Tomcat

2009-01-21 Thread Terence M. Bandoian
Chris-

My effort was to relate my experience with MySQL which, as I said, has
been very positive, to the original poster.  The JSP applications I've
developed using MySQL on Linux servers and Windows laptops, desktops and
servers have proven over time to be reliable and responsive.  And, as I
said, I've found it to be straightforward to install and administer.  If
that contradicts your experience, then so be it.  You're welcome to your
own opinion.

-Terence M. Bandoian

 Subject:
 Re: PostgreSQL vs MySQL with Tomcat
 From:
 Chris Wareham cware...@visitlondon.com
 Date:
 Tue, 20 Jan 2009 15:53:05 +
 To:
 Tomcat Users List users@tomcat.apache.org

 To:
 Tomcat Users List users@tomcat.apache.org


 Wow, this almost reads like a direct quote from MySQL marketing
 literature. Like marketing literature, it's not necessarily untruthful,
 but it does describe things selectively.

 Terence M. Bandoian wrote:
 I don't have a great deal of experience with Postgres but I have been
 using MySQL since the days of mSQL and have found it to be fast,
 reliable, easy to install on both Linux and Windows and straightforward
 to administer.

 Anecdotal, but no more so than anyone else's opinion. However, the
 actual behaviour of MySQL and benchmarks contradict you. It's only fast
 for queries using the MyISAM table type, and then only with few if any
 joins. MyISAM means no foreign key constraints (the syntax supports
 them, but they're ignored) and therefore no referential integrity. It's
 unreliable - indexes aren't recreated when a column type is changed
 (such as increasing the range of an integral type), whereas most other
 database engines recreate them automatically. It may be easy to install
 the binaries, but administering access and being sure you've locked it
 down is hard.

  It provides good support for the ANSI standard and the

 No it doesn't. By default ANSI SQL support is poor, and many gotchas
 exist (try Googling for MySQL Gotchas).

 documentation is good in identifying extensions to or deviations from

 The documentation is poorly organised, incomplete (try finding
 descriptions of all the InnoDB tuning parameters), and often misleading
 when describing features MySQL lacks. Note how dismissive the
 documentation on foreign key constraints and referential integrity was -
 saying it should be handled in application code - until MySQL added
 support for it ...

 the standard.  All of the basic tools, from query analysis to command
 line administration programs, are documented and function reliably.
 Statement syntax is very well documented.  Features include
 localization, various character sets (UTF-8 and Unicode), data
 encryption, client/server encryption, stored procedures, triggers,
 transactions, APIs for a number of programming languages and support for
 ODBC, JDBC and .NET.

 Localisation - full text indexes rely on a single stop list (with a
 slightly dubious one for English compiled in) so you can only support
 one language at a time without running into difficulty.

 Transactions - only for the InnoDB table type, rolling back from a
 transaction that has touched non-InnoDB tables will result in a warning,
 and screwed data.

  Configurability is provided mainly through some
 250+ system variables which may be set at startup (on the command line
 or in the options file) or dynamically with the SET statement.  I have
 been very pleased with its performance both administratively and as a
 programmer and you can't beat the price.


 Only some of those parameters can be changed dynamically, and not all of
 them are documented. For instance, changing the minimum length of
 words that are indexed in a full text index requires a restart. As
 mentioned above, the documentation on tuning is incomplete and
 unhelpful, little
 more than a couple of example mysql.conf files that contradict each
 other and have few if any comments to describe what each parameter does.

 -Terence M. Bandoian


 MySQL encourages bad habits, and commonly adds to the bugginess of PHP
 applications where MySQL is the de-facto standard for persistence. I'd
 strongly recommend you try another database engine such as PostgreSQL or
 Firebird, and compare MySQL for performace, scalability and standards
 conformance.

 Chris
 -- 

 Chris Wareham
 Senior Software Engineer
 Visit London Ltd
 6th floor,
 2 More London Riverside, London SE1 2RR

 Tel:  +44 (0)20 7234 5848
 Fax: +44 (0)20 7234 5753


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



Re: PostgreSQL vs MySQL with Tomcat

2009-01-21 Thread Joseph Millet
Hi all,

in my opinion MySql as previously said is a lot easier to administrate, and
more developer friendly than postgre - even if its process managements is
far from being good (some single query may bring it down - as far as I could
see so far using 5.1.22 and many previous versions... ). However one has to
think about the future of both these 2 DBMS and since Sun bought MySql
lately I'm pretty sure anything MySql lakes compared against postgre will
soon be caught up.

Joseph


On Wed, Jan 21, 2009 at 10:51 PM, Terence M. Bandoian tere...@tmbsw.comwrote:

 Chris-

 My effort was to relate my experience with MySQL which, as I said, has
 been very positive, to the original poster.  The JSP applications I've
 developed using MySQL on Linux servers and Windows laptops, desktops and
 servers have proven over time to be reliable and responsive.  And, as I
 said, I've found it to be straightforward to install and administer.  If
 that contradicts your experience, then so be it.  You're welcome to your
 own opinion.

 -Terence M. Bandoian
 
  Subject:
  Re: PostgreSQL vs MySQL with Tomcat
  From:
  Chris Wareham cware...@visitlondon.com
  Date:
  Tue, 20 Jan 2009 15:53:05 +
  To:
  Tomcat Users List users@tomcat.apache.org
 
  To:
  Tomcat Users List users@tomcat.apache.org
 
 
  Wow, this almost reads like a direct quote from MySQL marketing
  literature. Like marketing literature, it's not necessarily untruthful,
  but it does describe things selectively.
 
  Terence M. Bandoian wrote:
  I don't have a great deal of experience with Postgres but I have been
  using MySQL since the days of mSQL and have found it to be fast,
  reliable, easy to install on both Linux and Windows and straightforward
  to administer.
 
  Anecdotal, but no more so than anyone else's opinion. However, the
  actual behaviour of MySQL and benchmarks contradict you. It's only fast
  for queries using the MyISAM table type, and then only with few if any
  joins. MyISAM means no foreign key constraints (the syntax supports
  them, but they're ignored) and therefore no referential integrity. It's
  unreliable - indexes aren't recreated when a column type is changed
  (such as increasing the range of an integral type), whereas most other
  database engines recreate them automatically. It may be easy to install
  the binaries, but administering access and being sure you've locked it
  down is hard.
 
   It provides good support for the ANSI standard and the
 
  No it doesn't. By default ANSI SQL support is poor, and many gotchas
  exist (try Googling for MySQL Gotchas).
 
  documentation is good in identifying extensions to or deviations from
 
  The documentation is poorly organised, incomplete (try finding
  descriptions of all the InnoDB tuning parameters), and often misleading
  when describing features MySQL lacks. Note how dismissive the
  documentation on foreign key constraints and referential integrity was -
  saying it should be handled in application code - until MySQL added
  support for it ...
 
  the standard.  All of the basic tools, from query analysis to command
  line administration programs, are documented and function reliably.
  Statement syntax is very well documented.  Features include
  localization, various character sets (UTF-8 and Unicode), data
  encryption, client/server encryption, stored procedures, triggers,
  transactions, APIs for a number of programming languages and support for
  ODBC, JDBC and .NET.
 
  Localisation - full text indexes rely on a single stop list (with a
  slightly dubious one for English compiled in) so you can only support
  one language at a time without running into difficulty.
 
  Transactions - only for the InnoDB table type, rolling back from a
  transaction that has touched non-InnoDB tables will result in a warning,
  and screwed data.
 
   Configurability is provided mainly through some
  250+ system variables which may be set at startup (on the command line
  or in the options file) or dynamically with the SET statement.  I have
  been very pleased with its performance both administratively and as a
  programmer and you can't beat the price.
 
 
  Only some of those parameters can be changed dynamically, and not all of
  them are documented. For instance, changing the minimum length of
  words that are indexed in a full text index requires a restart. As
  mentioned above, the documentation on tuning is incomplete and
  unhelpful, little
  more than a couple of example mysql.conf files that contradict each
  other and have few if any comments to describe what each parameter does.
 
  -Terence M. Bandoian
 
 
  MySQL encourages bad habits, and commonly adds to the bugginess of PHP
  applications where MySQL is the de-facto standard for persistence. I'd
  strongly recommend you try another database engine such as PostgreSQL or
  Firebird, and compare MySQL for performace, scalability and standards
  conformance.
 
  Chris
  --
 
  Chris Wareham
  Senior Software Engineer
  

Re: UnsatisfiedLinkError in Windows Service (tomcat6w/5w.exe)

2009-01-21 Thread Michael Ludwig
Tommy Pham schrieb am 20.01.2009 um 21:45:17 (-0800):
 
 I don't know if this is relevant to your problem or not and you didn't
 mention whether you're x64 or x86 of XP version.

Yes, I forgot to say, this is a 32 bit system.

 Here's where you can get 64bit for tomcat5:
 http://svn.apache.org/viewvc/tomcat/connectors/trunk/procrun/bin/amd64/
 and this is for tomcat6:
 http://svn.apache.org/viewvc/tomcat/trunk/res/procrun/amd64/

That'll be useful in the future - thanks!

Regards,

Michael

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



Re: UnsatisfiedLinkError in Windows Service (tomcat6w/5w.exe)

2009-01-21 Thread Michael Ludwig
Caldarale, Charles R schrieb am 20.01.2009 um 21:11:21 (-0600):
 Environment variables are not used by services, so it doesn't really
 matter what's in PATH.

True, it only matters for the script version.

 Does the account the Tomcat service runs under have access to the
 directory of interest?

Tomcat logs on as the Local System account. Opening a command prompt
using an AT job to examine this (at 01:15 /interactive cmd.exe). When it
opens:

C:\WINDOWS\system32whoami
SYSTEM

C:\WINDOWS\system32cd \src\BerkeleyDbXml\dbxml-2.4.16\bin\debug

C:\src\BerkeleyDbXml\dbxml-2.4.16\bin\debugnotepad libdb_java46d.dll

This works, I can see the DLL in notepad. So the Local System account
can read the files.

 Try setting -verbose:jni in the Java tab of tomcat?w.exe and see if
 anything interesting is displayed.

Don't know exactly what to look for, but it tells mit is dynamic-linking
and registering a lot of native methods, all of which are in namespaces
under java, sun, com.sun, and org.apache.

I guess I would have been looking for some failure related to
com.sleepycat, but that is just a guess.

  And indeed, this works using bin\startup.cmd.
 
 We'll presume you meant bin\startup.bat.

You can safely do that. :-)

Michael Ludwig

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



Facing “Javax.servlet.servletException: cannot con nect to windows server”. error

2009-01-21 Thread prakash shanmugam
Hai all,

I am using jrxml for preparing the reports in excel files. It is
working fine in windows but if the same is implemented (server)MAC OS tomcat
I am facing  Javax.servlet.servletException: cannot connect to windows
server – not enough.

  I am using Tomcat 5.5.28 as server, MYsql as database and MAC(Tiger)
as OS. Please suggest to over come this issue.


-- 
with Regards
S.Prakash


RE: Facing “Javax.servlet.servletException: cannot con nect to windows server”. error

2009-01-21 Thread Martin Gainty

Prakash-

are your interfaces up and running?
ifconfig -a 

also make sure the ports are not already bound specifically 3306 for MySQL and 
8080 for TC

HTH
Martin
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 




 Date: Thu, 22 Jan 2009 06:28:42 +0530
 Subject: Facing “Javax.servlet.servletException: cannot connect to windows 
 server”. error
 From: prakash...@gmail.com
 To: users@tomcat.apache.org
 
 Hai all,
 
 I am using jrxml for preparing the reports in excel files. It is
 working fine in windows but if the same is implemented (server)MAC OS tomcat
 I am facing  Javax.servlet.servletException: cannot connect to windows
 server – not enough.
 
   I am using Tomcat 5.5.28 as server, MYsql as database and MAC(Tiger)
 as OS. Please suggest to over come this issue.
 
 
 -- 
 with Regards
 S.Prakash

_
Hotmail® goes where you go. On a PC, on the Web, on your phone. 
http://www.windowslive-hotmail.com/learnmore/versatility.aspx#mobile?ocid=TXT_TAGHM_WL_HM_versatility_121208
 

IIS6, Tomcat 6.0, ISAPI redirector 1.2.27 - no log on one server

2009-01-21 Thread Rick Larkin
I've searched all over the web and on the list to try and find an
answer to my question. We have a similar installation for a DEV, TEST,
STAGE and PROD environments, namely:

Windows 2003
Tomcat 6.0 (I don't remember the full version, but it isn't critical to
this post)
isapi_redirect.dll version 1.2.27
IIS6

I've set the system up on all of our boxes -- same configuration, and
it runs on all of them but one production server. On that machine, the
redirector shows in IIS with the green up arrow but no matter what I do
I cannot get any kind of log out of the redirector. IIS is not routing
any traffic to the redirector as far as I can tell from the IIS log.

I really could use some ideas on what to try at this point to
troubleshoot this problem. I've played around with permissions, changed
configuration settings (tried them in the registry as well as in the
properties file), etc. The exact same configuration is working on 5
other servers, so I know that the combination is good. I now that I am
missing something, probably simple, but I'm at my wits end.

Any advice on what to try to get a log out of the redirector would be
very welcome, as I've exhausted my ability to research it. Thank you!


  

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



Re: PostgreSQL vs MySQL with Tomcat

2009-01-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Rusty,

Rusty Wright wrote:
 I think the biggest gripe I've had with mysql is the problem where I was
 violating a unique constraint and it was giving me some generic
 (completely useless) error; HY001 I think.

I've always found the error messages themselves very informative. For
instance, if I attempt to insert a record into a table with an FK that
doesn't match, MySQL's command-line interface gives me this message:

ERROR 1452 (23000): Cannot add or update a child row: a foreign key
constraint fails (`database/target_table`, CONSTRAINT
`name_of_foreign_key_constraint` FOREIGN KEY (`column_name`) REFERENCES
`source_table` (`column_name`))

Perhaps Connector/J doesn't give quite such useful error messages, but I
seem to recall something nice like Foreign key constraint check failed.

I have found that every database has stupid error codes and you
basically have to code your app around tables of db-specific error codes
if you want to give your users (or log files) anything better than the
driver-supplied error messages.

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

iEYEARECAAYFAkl38NUACgkQ9CaO5/Lv0PCwAgCggKgAfu/ZZ+ClRAGtEuM4+xyK
e7EAn0R/4fyPgBfhxSB51um5ZW63jZzL
=xo6L
-END PGP SIGNATURE-

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



Re: UnsatisfiedLinkError in Windows Service (tomcat6w/5w.exe)

2009-01-21 Thread Konstantin Kolinko
2009/1/22 Michael Ludwig mil...@gmx.de:
 But I'm assured by the developers that:
   The Java API for DB XML begins by first trying to load the
   release versions of the libraries, and failing that then tries
   to load the debug versions. If it fails to find both versions
   then the UnsatisfiedLinkError is thrown listing the release
   library, even though it did look for the debug library.

Should be relatively easy to check: try to reproduce the error
with release versions of those libraries.


 C:\src\BerkeleyDbXml\dbxml-2.4.16\bin\debugnotepad libdb_java46d.dll

 This works, I can see the DLL in notepad. So the Local System account
 can read the files.


How about other DLLs that that DLL loads? Can you run a standalone
Java program that loads those libraries, or run startup.bat from that
command prompt window?

Also, though maybe not relevant for this very error, but for reference:
http://wiki.apache.org/tomcat/HowTo#head-a4b7185ee95d0cf14a48f92c08d1eb66b561139d

Best regards,
Konstantin Kolinko

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



Re: Apache/mod_jk serves random files from tomcat

2009-01-21 Thread yuvalperlov

Trying to revive this thread:

I am having the exact same symptoms with the latest versions of everything:
Fedora 10
Tomcat 6.0.18
Apache Apache/2.2.10
mod_jk-1.2.27 (and the same problem with the built-in mod_proxy_ajp).

It takes a day or so for the problem to start but once it does it happens
more frequently - resources get mixed up. Tomcat logs show that the right
resources are loaded in response to each call but on the browser end you can
see images loaded in the wrong place.
Restarting apache resets the problem for another day or so.

Has this been resolved for all who posted?

Regards,
Yuval Perlov
 



Rainer Jung-3 wrote:
 
 Jakob Ericsson schrieb:
 On Thu, Nov 13, 2008 at 8:17 PM, Rainer Jung rainer.j...@kippdata.de
 wrote:
 Jakob Ericsson schrieb:
 Upgrading to latest version of mod_jk solves the problem. As I said
 before, this on Windows 2003 Server running both httpd (2.0.59) and
 tomcat (6.0.13) on the same machine. We upgraded all production
 machines this morning.

 Problem is in mod_jk 1.2.22 and is at least and fixed in 1.2.27. We
 did not do any other fixes to the environment when upgrading mod_jk.

 Hopefully this will help other people experiencing the same problem.
 Thanks a lot for reporting back. Let us know, in case the problem shows
 up again (hopefully not).

 
 We had a peak yesterday on our machines and no problems reported.
 Looks very promising.
 Do you know (out of curiosity) know which bug in mod_jk that probably
 caused the problem?
 
 Unfortunately I have no idea. As already indicated, there wasn't any
 change I'm aware of, which should have fixed such a problem on Windows.
 
 Regards,
 
 Rainer
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Apache-mod_jk-serves-random-files-from-tomcat-tp18385568p21599110.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