Log4j issues upgrading from 5.5.9 to 5.5.12

2005-10-27 Thread Rick
After upgrading from 5.5.9 to 5.5.12, all the same log4j.properties files, I
now have some web-app level classes that I can not catch in my web-app log4j
logger.  I ended up having to put loggers in my
common/classes/log4j.properties file to deal with them.
Again, this worked normally in 5.5.9 with the same configuration.

One example, handling OSCache log entries..
--
log4j.logger.org.jgroups=INFO, CACHE
log4j.logger.com.opensymphony=WARN, CACHE

log4j.appender.CACHE=org.apache.log4j.RollingFileAppender
log4j.appender.CACHE.File=${catalina.home}/logs/cache.log
...
---
The Jars for JGroups and OSCache are both in my web-app's lib folder, not in
common/lib.

Anyone else have a similar issue and find a fix?

Thanks,
Rick


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat 5.5.9 basic config

2005-11-14 Thread Rick
>But, that doesn't answer the question, how do I get it so when someone
browses to my 
>webapp root they get the default page, say index.jsp, instead of a
directory listing. 
>I don't want user's to go to a directory. 

To change you're "default" page so that you don't show a directory listing..
You need to setup your welcome file list in your webapp's web.xml file.
Located in...  /webapps//WEB-INF/web.xml

-

index.jsp 
 
-

-Rick

-Original Message-
From: michael chaplin [mailto:[EMAIL PROTECTED] 
Posted At: Saturday, November 12, 2005 5:17 PM
Posted To: Tomcat Dev
Conversation: tomcat 5.5.9 basic config
Subject: Re: tomcat 5.5.9 basic config


Thanks for the advice about moving the context tag. I moved it as you
suggested and it works the same.

But, that doesn't answer the question, how do I get it so when someone
browses to my webapp root they get the default page, say index.jsp, instead
of a directory listing. I don't want user's to go to a directory. 

The reason I ask is none of my pages that use relative urls are displaying
correctly (a helloworld.jsp works fine), my suspiscion is this extra
directory level is throwing the relative urls off (see
http://gus.csbc.vcu.edu:8080/crypto/)







On Sat, 2005-11-12 at 18:33, Hassan Schroeder wrote:

> Michael Chaplin wrote:
> > I'm stumped on a simple issue. I have only one webapp in my
> > tomcat5/webapps directory called "crypto"
> > 
> > my context tags within the host tag of my server.xml is:
> > 
> >  >   docBase="/usr/share/tomcat5/webapps"
> >   debug="9" reloadable="true"
> >   privileged="true" allowLinking="true" >
> > 
> >>   docBase="/usr/share/tomcat5/webapps"
> >   debug="9" reloadable="true"
> >   privileged="true" allowLinking="true" >
> > 
> > 
> > I would expect that browsing to http://gus.csbc.vcu.edu:8080/crypto/ (or
> > http://gus.csbc.vcu.edu:8080) would bring up my default page, instead I
> > get a directory listing of one directory, crypto, which when I click on
> > it, then I get my default page! What's wrong, or is this normal?
> 
> It's doing exactly what you're telling it to, looking for your app's
> pages in '/usr/share/tomcat5/webapps' :-)
> 
> However, putting Context elements in server.xml is discouraged.
> 
> You should create a file named (assuming a vanilla install):
> 
>   $CATALINA_HOME/conf/Catalina/localhost/ROOT.xml
> 
> :: containing:
> 
>docBase="/usr/share/tomcat5/webapps/crypto"
>   debug="9" reloadable="true"
>   privileged="true" allowLinking="true" >
> 
> 
> :: which will make it your default webapp, accessed directly using
> "http://gus.csbc.vcu.edu:8080/";...
> 
> HTH,


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Log4j issues upgrading from 5.5.9 to 5.5.12

2005-11-14 Thread Rick
REPOST: Just wondering if anyone else has seen this issue.

After upgrading from 5.5.9 to 5.5.12, all the same log4j.properties files, I
now have some web-app level classes that I can not catch in my web-app log4j
logger.  I ended up having to put loggers in my
common/classes/log4j.properties file to deal with them.
Again, this worked normally in 5.5.9 with the same configuration.

One example, handling OSCache log entries..
--
log4j.logger.org.jgroups=INFO, CACHE
log4j.logger.com.opensymphony=WARN, CACHE

log4j.appender.CACHE=org.apache.log4j.RollingFileAppender
log4j.appender.CACHE.File=${catalina.home}/logs/cache.log
...
---
The Jars for JGroups and OSCache are both in my web-app's lib folder, not in
common/lib.
But I'm forced to create loggers in common/lib to catch the log entries.  My
webapp level loggers do not see any log entries from the above mentioned
classes.

Anyone else have a similar issue and find a fix?

Thanks,
Rick


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Log4j issues upgrading from 5.5.9 to 5.5.12

2005-11-14 Thread Rick
Allistair,
Well, great . Thanks for confirming I'm not crazy.  Were you able to
find anything in the changelog between 5.5.9 and .12 that would have caused
this?  I have not had any luck yet.

-Rick 

-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
Posted At: Monday, November 14, 2005 7:50 AM
Posted To: Tomcat Dev
Conversation: Log4j issues upgrading from 5.5.9 to 5.5.12
Subject: RE: Log4j issues upgrading from 5.5.9 to 5.5.12


Hi

Yes, I've had a similar problem in that with 5.5.12 various
framework-related APIs such Spring and OSCache which *were* configured using
a WEB-INF/classes/log4j.properties config in 5.5.9 and less no longer
logged.

I kind of linked the problem to the fact that these APIs had related
ContextListeners in action, and so the logging configuration needed to be
available at the time the webapp was started by Tomcat.

To fix it, I had to create a separate log4j.properties in common/classes
like yourself which is not ideal from my POV.

I reported this to the list and to BugZilla, but it was dismissed as being
my imagination by Remy.

Cheers, Allistair

-Original Message-----
From: Rick [mailto:[EMAIL PROTECTED]
Sent: 14 November 2005 15:36
To: 'Tomcat Users List'
Subject: Log4j issues upgrading from 5.5.9 to 5.5.12

REPOST: Just wondering if anyone else has seen this issue.

After upgrading from 5.5.9 to 5.5.12, all the same log4j.properties files, I
now have some web-app level classes that I can not catch in my web-app log4j
logger.  I ended up having to put loggers in my
common/classes/log4j.properties file to deal with them.
Again, this worked normally in 5.5.9 with the same configuration.

One example, handling OSCache log entries..
--
log4j.logger.org.jgroups=INFO, CACHE
log4j.logger.com.opensymphony=WARN, CACHE

log4j.appender.CACHE=org.apache.log4j.RollingFileAppender
log4j.appender.CACHE.File=${catalina.home}/logs/cache.log
...
---
The Jars for JGroups and OSCache are both in my web-app's lib folder, not in
common/lib.
But I'm forced to create loggers in common/lib to catch the log entries.
My webapp level loggers do not see any log entries from the above mentioned
classes.

Anyone else have a similar issue and find a fix?

Thanks,
Rick


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
 
Disclaimer:  The information contained within this e-mail is confidential
and may be privileged. This email is intended solely for the named recipient
only; if you are not authorised you must not disclose, copy, distribute, or
retain this message or any part of it. If you have received this message in
error please contact the sender at once so that we may take the appropriate
action and avoid troubling you further.  Any views expressed in this message
are those of the individual sender.  QAS Limited has the right lawfully to
record, monitor and inspect messages between its employees and any third
party.  Your messages shall be subject to such lawful supervision as QAS
Limited deems to be necessary in order to protect its information, its
interests and its reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS
Limited cannot guarantee that attachments are virus free or compatible with
your systems and does not accept any liability in respect of viruses or
computer problems experienced.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



jakartaee-migration-1.0.7 migration tool failure

2024-02-08 Thread Rick Noel
Our application uses classes in this jar xmlrpc-server3.1.3.jar .(it is the 
latest version)

We are trying to migrate to Tomcat 10 but that  jar uses the   javax.server. 
package classes instead of the needed  jakarta.server. pacakage.


I have tried running this jar trough the latest Tomcat 10 migration tool 
(jakartaee-migration-1.0.7) which is suppose to alter the jar to make all 
classes use  jakarta.server.  classes

but the tool is not fully converting all the classes,  since I still get 
compile errors at run time.


I think in addition to not using  javax.server.  the jar should use this class

java.net.URI  instead of   java.net.URL


anyone have ideas on how to make xmlrpc-server3.1.3.jar  tomcat 10 compliant?

BTW the jar in question has classes in this package
org.apache.xmlrpc.

Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com



RE: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure

2024-02-08 Thread Rick Noel
My class is RVXmlRpcServlet and below is the compile error that happens when I 
use the xmlrpc-server3.1.3.jar after that jar has been run through  the 
migration tool jakartaee-migration-1.0.7

That same class throws NO compile error on Tomcat 9 using xmlrpc-server3.1.3.jar

Here is the compile error

06-Feb-2024 15:48:53.044 SEVERE [http-nio-8588-exec-1] 
org.apache.catalina.core.StandardWrapperValve.invoke Allocate exception for 
servlet [XmlRpcServlet]
java.lang.ClassCastException: class 
com.radiovoodoo.xmlrpc.RVXmlRpcServlet cannot be cast to class 
jakarta.servlet.Servlet (com.radiovoodoo.xmlrpc.RVXmlRpcServlet is in unnamed 
module of loader org.apache.catalina.loader.ParallelWebappClassLoader 
@568750b7; jakarta.servlet.Servlet is in unnamed module of loader 
java.net.URLClassLoader @18769467)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:865)
at 
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:649)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:115)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at 
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:673)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:340)
at 
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391)
at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896)
at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1744)
at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at 
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at 
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:833)


Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Mark Thomas  
Sent: Thursday, February 8, 2024 8:54 AM
To: users@tomcat.apache.org
Subject: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure

[You don't often get email from ma...@apache.org. Learn why this is important 
at https://aka.ms/LearnAboutSenderIdentification ]

On 08/02/2024 13:45, Rick Noel wrote:
> Our application uses classes in this jar xmlrpc-server3.1.3.jar .(it is 
> the latest version)
>
> We are trying to migrate to Tomcat 10 but that  jar uses the   javax.server. 
> package classes instead of the needed  jakarta.server. pacakage.
>
>
> I have tried running this jar trough the latest Tomcat 10 migration 
> tool (jakartaee-migration-1.0.7) which is suppose to alter the jar to 
> make all classes use  jakarta.server.  classes
>
> but the tool is not fully converting all the classes,  since I still get 
> compile errors at run time.

Please provide details of the compilation errors that you see.

> I think in addition to not using  javax.server.  the jar should use 
> this class
>
> java.net.URI  instead of   java.net.URL

That seems ... unlikely.

> anyone have ideas on how to make xmlrpc-server3.1.3.jar  tomcat 10 compliant?

I'd be surprised if the migration tool didn't process a JAR that old correctly.

Mark


> BTW the jar in question has classes in this package
> org.apache.xmlrpc.
>
> Rick Noel
> Systems Programmer | Westwood One
> rn...@westwoodone.com
>
>

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

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you know the sender and you are sure the 
content is safe. Please report the message using the Report Message feature in 
your email client if you believe the email is suspicious.


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



RE: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure

2024-02-08 Thread Rick Noel
My code uses no javax.server  code other that what is in the third party jar.
Is it not the third part jar that needs to stop using javax.server ? 

Where in my code does it use javax.server, other than from classes in package 
org.apache.xmlrpc?

package com.radiovoodoo.xmlrpc;

import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;

import org.apache.xmlrpc.XmlRpcException;
import org.apache.xmlrpc.XmlRpcRequest;
import 
org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.AuthenticationHandler;
import org.apache.xmlrpc.server.XmlRpcHandlerMapping;
import org.apache.xmlrpc.server.PropertyHandlerMapping;
import org.apache.xmlrpc.webserver.XmlRpcServlet;

import com.radiovoodoo.util.Log;

/**
 * @(#)RVXmlRpcServlet.java
 *
 * new XmlRpcServlet, which extends the default Apache XmlRpcServlet
 *
 * @author  Hank Zill 
 * @version 1.0
 *
 * Copyright(c) 2005 RadioVoodoo, Inc. All Rights Reserved.
 */

public class RVXmlRpcServlet
   extends XmlRpcServlet
{
   /**
*  this init parameter defines the path to the property file from
*  which to load the XML RPC handler mappings.
*
*  the path is relative to the CLASSPATH  
*/
   public static final String RESOURCE_PATH = "property-file-path";

   protected XmlRpcHandlerMapping newXmlRpcHandlerMapping() 
  throws XmlRpcException
   {
  PropertyHandlerMapping mapping = null;

  /* String resourcePath = getInitParameter( RESOURCE_PATH );
  
  if ( resourcePath == null )
  {
 throw new XmlRpcException( "No property file defined.  This servlet 
must have the init-param " + RESOURCE_PATH + " set." );
  } */
  String resourcePath = "/WEB-INF/somefile";

  URL url = null;
  try {
url = getServletContext().getResource( resourcePath );
  } catch (MalformedURLException e1) {
throw new XmlRpcException( resourcePath + " " + e1 );
  }

  if (url == null) 
  {
 throw new XmlRpcException("Failed to locate resource " + resourcePath 
);
  }
  try 
  {
 mapping = newPropertyHandlerMapping(url);
  } 
  catch (IOException e) 
  {
 throw new XmlRpcException("Failed to load resource " + url + ": " + 
e.getMessage(), e);
  }

  if ( mapping == null )
 Log.debug( "HandlerMapping is null" );
  else
  {
 String[] methods = mapping.getListMethods();

 for ( int x = 0; x < methods.length; x++ )
 {
Log.debug( "method: " + methods[x] );
     }
  }
  
  mapping.setAuthenticationHandler(new AuthenticationHandler() {
//rick removed override annotaion so this class will compile on java 1.5
//@Override
public boolean isAuthorized(XmlRpcRequest arg0) throws 
XmlRpcException {
return true;
}
  });

  return mapping;
   }
}
Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Mark Thomas  
Sent: Thursday, February 8, 2024 9:27 AM
To: users@tomcat.apache.org
Subject: Re: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure

[You don't often get email from ma...@apache.org. Learn why this is important 
at https://aka.ms/LearnAboutSenderIdentification ]

On 08/02/2024 14:17, Rick Noel wrote:
> My class is RVXmlRpcServlet and below is the compile error that 
> happens when I use the xmlrpc-server3.1.3.jar after that jar has been 
> run through  the migration tool jakartaee-migration-1.0.7
>
> That same class throws NO compile error on Tomcat 9 using 
> xmlrpc-server3.1.3.jar
>
> Here is the compile error

The bug is your code. You need up update RVXmlRpcServlet to use 
jakarta.servlet.Servlet rather than javax.servlet.Servlet

Ditto for any other Java EE classes you have referenced in your code.

If you want your application to work with Tomcat 9 and Tomcat 10 I suggest you:

- write it for Tomcat 9
- package it as a WAR file
- process the entire WAR file with the migration tool
- use original WAR file with Tomcat 9 and the migrated WAR file with
   Tomcat 10+

Mark

>
> 06-Feb-2024 15:48:53.044 SEVERE [http-nio-8588-exec-1] 
> org.apache.catalina.core.StandardWrapperValve.invoke Allocate exception for 
> servlet [XmlRpcServlet]
>   java.lang.ClassCastException: class 
> com.radiovoodoo.xmlrpc.RVXmlRpcServlet cannot be cast to class 
> jakarta.servlet.Servlet (com.radiovoodoo.xmlrpc.RVXmlRpcServlet is in unnamed 
> module of loader org.apache.catalina.loader.ParallelWebappClassLoader 
> @568750b7; jakarta.servlet.Servlet is in unnamed module of loader 
> java.net.URLClassLoader @18769467)
>   at 
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:865)
>

RE: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure

2024-02-08 Thread Rick Noel
I built  my app in Eclipse  and the build path is set to use the migrated jar.
It compiles without error on Eclipse and using the migrated jar.  I have that 
same migrated jar in the Tomcat lib
But when tomcat 10 compiles it does not compile

I have also used the migration tool on my .war that runs in Tomcat 9 and that 
war still fails with same compile error.

So to summarize. the migration tool fails to convert third party jar 
xmlrpc-server3.1.3.jar
And it also fails when I use it on my .war ran through the migration tool.


Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Mark Thomas  
Sent: Thursday, February 8, 2024 9:48 AM
To: users@tomcat.apache.org
Subject: Re: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure

[You don't often get email from ma...@apache.org. Learn why this is important 
at https://aka.ms/LearnAboutSenderIdentification ]

On 08/02/2024 14:38, Rick Noel wrote:
> My code uses no javax.server  code other that what is in the third party jar.

Then you need to fix your build system that is compiling your code against the 
original xmlrpc-server3.1.3.jar rather than the migrated version.

> Is it not the third part jar that needs to stop using javax.server ?

No. It is the compiled form of your code that has the issue.

When you compile your class it retains a reference to the version of 
org.apache.xmlrpc.webserver.XmlRpcServlet that it was compiled against.
You can't just swap the xmlrpc-server3.1.3.jar at runtime. You have to use the 
migrated JAR at compile time as well.

Mark


>
> Where in my code does it use javax.server, other than from classes in package 
> org.apache.xmlrpc?
>
> package com.radiovoodoo.xmlrpc;
>
> import java.io.IOException;
> import java.net.MalformedURLException; import java.net.URL;
>
> import org.apache.xmlrpc.XmlRpcException;
> import org.apache.xmlrpc.XmlRpcRequest; import 
> org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.Authenticati
> onHandler; import org.apache.xmlrpc.server.XmlRpcHandlerMapping;
> import org.apache.xmlrpc.server.PropertyHandlerMapping;
> import org.apache.xmlrpc.webserver.XmlRpcServlet;
>
> import com.radiovoodoo.util.Log;
>
> /**
>   * @(#)RVXmlRpcServlet.java
>   *
>   * new XmlRpcServlet, which extends the default Apache XmlRpcServlet
>   *
>   * @author  Hank Zill 
>   * @version 1.0
>   *
>   * Copyright(c) 2005 RadioVoodoo, Inc. All Rights Reserved.
>   */
>
> public class RVXmlRpcServlet
> extends XmlRpcServlet
> {
> /**
>  *  this init parameter defines the path to the property file from
>  *  which to load the XML RPC handler mappings.
>  *
>  *  the path is relative to the CLASSPATH
>  */
> public static final String RESOURCE_PATH = "property-file-path";
>
> protected XmlRpcHandlerMapping newXmlRpcHandlerMapping()
>throws XmlRpcException
> {
>PropertyHandlerMapping mapping = null;
>
>/* String resourcePath = getInitParameter( RESOURCE_PATH );
>
>if ( resourcePath == null )
>{
>   throw new XmlRpcException( "No property file defined.  This servlet 
> must have the init-param " + RESOURCE_PATH + " set." );
>} */
>String resourcePath = "/WEB-INF/somefile";
>
>URL url = null;
> try {
>   url = getServletContext().getResource( resourcePath );
> } catch (MalformedURLException e1) {
>   throw new XmlRpcException( resourcePath + " " + e1 );
> }
>
>if (url == null)
>{
>   throw new XmlRpcException("Failed to locate resource " + 
> resourcePath );
>}
>try
>{
>   mapping = newPropertyHandlerMapping(url);
>}
>catch (IOException e)
>{
>   throw new XmlRpcException("Failed to load resource " + url + ": " + 
> e.getMessage(), e);
>}
>
>if ( mapping == null )
>   Log.debug( "HandlerMapping is null" );
>else
>{
>   String[] methods = mapping.getListMethods();
>
>   for ( int x = 0; x < methods.length; x++ )
>   {
>  Log.debug( "method: " + methods[x] );
>   }
>}
>
>    mapping.setAuthenticationHandler(new AuthenticationHandler() {
>  //rick removed override annotaion so this class will compile on java 
> 1.5
>   //@Override
>   public boolean isAuthorized(XmlRpcRequest arg0) throws 
> XmlRpcException {
>   return true;
>   }
>});
&

RE: [EXT]Re: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure

2024-02-08 Thread Rick Noel
No I cannot compile from command line.

But I do not really care how eclipse compiles my class anyway.
All I know is that eclipse compiles the class without errors. Using the jars I 
tell it to. (all the jars run through the migration tool)
But Tomcat 10 can not compile the class using those same migrated jar files.

And my class has no use of javax.server  classes in it.
All the javax.server classes are only in the third part jar files which are 
supposed to have been converted to use  jakarta.server classes

Is this not a bug with Tomcat migration tool?

Again here is my class that does not compile on Tomcat 10...
It has no reference to  javax.server


package com.radiovoodoo.xmlrpc;

import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;

import org.apache.xmlrpc.XmlRpcException;
import org.apache.xmlrpc.XmlRpcRequest;
import 
org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.AuthenticationHandler;
import org.apache.xmlrpc.server.XmlRpcHandlerMapping;
import org.apache.xmlrpc.server.PropertyHandlerMapping;
import org.apache.xmlrpc.webserver.XmlRpcServlet;

import com.radiovoodoo.util.Log;

/**
 * @(#)RVXmlRpcServlet.java
 *
 * new XmlRpcServlet, which extends the default Apache XmlRpcServlet
 *
 * @author  Hank Zill 
 * @version 1.0
 *
 * Copyright(c) 2005 RadioVoodoo, Inc. All Rights Reserved.
 */

public class RVXmlRpcServlet
   extends XmlRpcServlet
{
   /**
*  this init parameter defines the path to the property file from
*  which to load the XML RPC handler mappings.
*
*  the path is relative to the CLASSPATH  
*/
   public static final String RESOURCE_PATH = "property-file-path";

   protected XmlRpcHandlerMapping newXmlRpcHandlerMapping() 
  throws XmlRpcException
   {
  PropertyHandlerMapping mapping = null;

  /* String resourcePath = getInitParameter( RESOURCE_PATH );
  
  if ( resourcePath == null )
  {
 throw new XmlRpcException( "No property file defined.  This servlet 
must have the init-param " + RESOURCE_PATH + " set." );
  } */
  String resourcePath = "somefile.properties";

  URL url = null;
  try {
url = getServletContext().getResource( resourcePath );
  } catch (MalformedURLException e1) {
throw new XmlRpcException( resourcePath + " " + e1 );
  }

  if (url == null) 
  {
 throw new XmlRpcException("Failed to locate resource " + resourcePath 
);
  }
  try 
  {
 mapping = newPropertyHandlerMapping(url);
  } 
  catch (IOException e) 
  {
 throw new XmlRpcException("Failed to load resource " + url + ": " + 
e.getMessage(), e);
  }

  if ( mapping == null )
 Log.debug( "HandlerMapping is null" );
  else
  {
 String[] methods = mapping.getListMethods();

 for ( int x = 0; x < methods.length; x++ )
 {
Log.debug( "method: " + methods[x] );
     }
  }
  
  mapping.setAuthenticationHandler(new AuthenticationHandler() {
//rick removed override annotaion so this class will compile on java 1.5
//@Override
public boolean isAuthorized(XmlRpcRequest arg0) throws 
XmlRpcException {
    return true;
}
  });

  return mapping;
   }
}





Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Rob Sargent  
Sent: Thursday, February 8, 2024 1:54 PM
To: Tomcat Users List 
Subject: [EXT]Re: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure

[You don't often get email from rsarg...@xmission.com. Learn why this is 
important at https://aka.ms/LearnAboutSenderIdentification ]

> On Feb 8, 2024, at 9:04 AM, Rick Noel  wrote:
>
> I built  my app in Eclipse  and the build path is set to use the migrated 
> jar.
> It compiles without error on Eclipse and using the migrated jar.  I 
> have that same migrated jar in the Tomcat lib But when tomcat 10 
> compiles it does not compile
>
> I have also used the migration tool on my .war that runs in Tomcat 9 and that 
> war still fails with same compile error.
>
> So to summarize. the migration tool fails to convert third 
> party jar xmlrpc-server3.1.3.jar And it also fails when I use it on my .war 
> ran through the migration tool.
>
>
> Rick Noel
> Systems Programmer | Westwood One
> rn...@westwoodone.com
>

Can you build from the command  line?  Who knows what eclipse does under the 
covers
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

CAUTION: This email originated from outside of the organization. Do not click 
link

RE: [EXT]Re: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure

2024-02-09 Thread Rick Noel
Thank you so much Mark for working with me on this issue!
I am taking your recommendation to create a   webapps-javaee directory and 
place my Tomcat 9 running war file into
that dir so that Tomcat does the compile correctly.

Only problem is that now I cannot figure out what is the correct URL path to my 
servlet!

When I place the .war, the old way with the .war  being in  
webapps/transaction,my tomcat cat log says...

Deploying web application directory [C:\apache-tomcat-9.0.73\webapps\transaction
And I see my application at 
C:\apache-tomcat-9.0.73\webapps\transaction\ROOT##0001

And I can hit my servlet via...

http://localhost:8588/XmlRpc

BUT when I place my .war in webapps-javaee\transaction the tomcat cat log 
says..

Deploying web application directory 
[C:\apache-tomcat-10.1.18\webapps-javaee\transaction\transaction

And I cannot hit either..

http://localhost:8588/XmlRpc 
or
http://localhost:8588/transaction/XmlRpc


The creation of the 
C:\apache-tomcat-10.1.18\webapps-javaee\transaction\transaction  directory is 
baffling me
See attached file

I expect only to see the creation of a 
C:\apache-tomcat-10.1.18\webapps-javaee\transaction\ROOT##0001 directory.
That is where I believe my application to be

Here is how I have my context defined in server.xml..



Is my server.xml wrong?
When I place my .war in   webapps-javaee\transaction   dir?




-Original Message-
From: Mark Thomas  
Sent: Thursday, February 8, 2024 5:45 PM
To: users@tomcat.apache.org
Subject: Re: [EXT]Re: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure

[You don't often get email from ma...@apache.org. Learn why this is important 
at https://aka.ms/LearnAboutSenderIdentification ]

Confirmed this is user error. There is no bug in the migration tool.

Steps to demonstrate this:

- Create new, blank Eclipse dynamic web project
- Add provided servlet code
- Add required libraries
- Remove referenced to internal logging code
- Add web.xml with basic mapping to "/test"
- Export WAR file
- Deploy to Tomcat
- Start Tomcat
- Request servlet

Servlet loads and then reports an exception during init. That is fine.
It proves that the servlet was loaded which is all we care about at this point.

- Use migration tool to migrate WAR
- Deploy migrated WAR to Tomcat 10.1.x
- Start Tomcat
- Request servlet

Servlet loads and then reports an exception during init. Again, this is fine as 
it proves that the Servlet has been converted correctly and can be loaded by 
Tomcat 10.1.x.

Best guess, the Eclipse project isn't configured correctly to compile the web 
application for Tomcat 10.1.x.

At this point the simplest solution is likely to be:

- take the WAR file that works on Tomcat 9
- drop in webapps-javaee in Tomcat 10 and let Tomcat convert it
   automatically

Mark


On 08/02/2024 20:28, Rick Noel wrote:
> No I cannot compile from command line.
>
> But I do not really care how eclipse compiles my class anyway.
> All I know is that eclipse compiles the class without errors. Using 
> the jars I tell it to. (all the jars run through the migration tool) But 
> Tomcat 10 can not compile the class using those same migrated jar files.
>
> And my class has no use of javax.server  classes in it.
> All the javax.server classes are only in the third part jar files 
> which are supposed to have been converted to use  jakarta.server 
> classes
>
> Is this not a bug with Tomcat migration tool?
>
> Again here is my class that does not compile on Tomcat 10...
> It has no reference to  javax.server
>
>
> package com.radiovoodoo.xmlrpc;
>
> import java.io.IOException;
> import java.net.MalformedURLException; import java.net.URL;
>
> import org.apache.xmlrpc.XmlRpcException;
> import org.apache.xmlrpc.XmlRpcRequest; import 
> org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.Authenticati
> onHandler; import org.apache.xmlrpc.server.XmlRpcHandlerMapping;
> import org.apache.xmlrpc.server.PropertyHandlerMapping;
> import org.apache.xmlrpc.webserver.XmlRpcServlet;
>
> import com.radiovoodoo.util.Log;
>
> /**
>   * @(#)RVXmlRpcServlet.java
>   *
>   * new XmlRpcServlet, which extends the default Apache XmlRpcServlet
>   *
>   * @author  Hank Zill 
>   * @version 1.0
>   *
>   * Copyright(c) 2005 RadioVoodoo, Inc. All Rights Reserved.
>   */
>
> public class RVXmlRpcServlet
> extends XmlRpcServlet
> {
> /**
>  *  this init parameter defines the path to the property file from
>  *  which to load the XML RPC handler mappings.
>  *
>  *  the path is relative to the CLASSPATH
>  */
> public static final String RESOURCE_PATH = "property-file-path";
>
> protected XmlRpcHandlerMapping newXmlRpcHandlerMapping()
>throws XmlRpcException
> {
>PropertyHandlerMapping mapp

404 for j_security_check

2024-03-14 Thread Rick Noel
After moving from tomcat 9 to tomcat 10after a user successfully logs in 
and then hits a restricted page,  the login page is hit again but on  this 
second login hit I get 404 page not found

How do I set the correct path in my  login jsp so that   j_security_check is 
found?

BTW  I actually am wondering why a  successful logged on user would even be 
sent to the log in page again?


My login page  is ->   /membership/login.jsp

Here is how I set the path to  j_security_check in above login.jsp



My restricted  web.xml snippet




External
/external/*


radiovoodoo


NONE




Auth
/auth/*


radiovoodoo


NONE



FORM

/membership/login.jsp
/membership/error.jsp











Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com



RE: [EXT]Re: 404 for j_security_check

2024-03-15 Thread Rick Noel


I really only want auth once

All hits to jsp pages after a successful login do not trigger the Auth process 
again.

But hits to java action class servlets do trigger the Auth process

Its  like session data is being lost for some pages but not for others

I was thinking maybe this is reason..


The Expires header specifies when content will expire, or how long content is 
"fresh."
After this time, the Portal Server will always check back with the remote 
server to see if the content has changed.
Most Web servers allow setting an absolute time to expire, a time based on the 
last time that the client saw the object (last access time),
or a time based on the last time the document changed on your server (last 
modification time).

In JSP, we can set caching to forever using the Expires header like so.

response.setDateHeader("Expires",Long.MAX_VALUE)

BUT I do not want to change my application code, I just want to tell Tomcat 10 
to stop
Expiring cache so that session log in data is not lost

My main question is  
I want to know how to configure Tomcat 10 to not loose session data that tells 
the user has successfully logged in




Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Christopher Schultz  
Sent: Friday, March 15, 2024 12:19 PM
To: users@tomcat.apache.org
Subject: [EXT]Re: 404 for j_security_check

[You don't often get email from ch...@christopherschultz.net. Learn why this is 
important at https://aka.ms/LearnAboutSenderIdentification ]

Rick,

On 3/14/24 15:37, Rick Noel wrote:
> After moving from tomcat 9 to tomcat 10 after a user successfully logs 
> in and then hits a restricted page, the login page is hit again but on 
> this second login hit I get 404 page not found
This is actually expected, since j_security_check is only supposed to be used 
when the container (Tomcat) interrupts a user workflow to request 
authentication.

> How do I set the correct path in my  login jsp so that 
> j_security_check is found?
>
> BTW  I actually am wondering why a  successful logged on user would 
> even be sent to the log in page again?
That's more of a question for your application than anything else.

> My login page  is ->   /membership/login.jsp
>
> Here is how I set the path to  j_security_check in above login.jsp
>
> 
>
> My restricted  web.xml snippet

Are you doing what I call a "direct login" where you have a "login page"
that most users hit first. Like from example.com/app/ where there is no initial 
request for a protected resource? Or are your users always (1) requesting a 
protected resource then (2) Tomcat requests authentication then (3) the user is 
forwarded to the resource originally requested in (1)?

> 
> 
> External
> /external/*
> 
> 
> radiovoodoo
> 
> 
> NONE
> 
> 
> 
> 
> Auth
> /auth/*
> 
> 
> radiovoodoo
> 
> 
> NONE
> 
> 
> 
> FORM
> 
> /membership/login.jsp
> /membership/error.jsp
> 
> 

Those NONE lines look weird to me. 
Why are you explicitly specifying those? What part of your configuration 
actually requests authentication and authorization?

-chris

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

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you know the sender and you are sure the 
content is safe. Please report the message using the Report Message feature in 
your email client if you believe the email is suspicious.


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



RE: [EXT]Re: 404 for j_security_check

2024-03-19 Thread Rick Noel
Chris,

Thanks for the help, I agree with all your statements.

I now see the  JSESSIONID cookies.

I found a bug in my code. My issue was nothing to do with Tomcat behavior.

Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Christopher Schultz  
Sent: Sunday, March 17, 2024 10:57 AM
To: users@tomcat.apache.org
Subject: Re: [EXT]Re: 404 for j_security_check

[You don't often get email from ch...@christopherschultz.net. Learn why this is 
important at https://aka.ms/LearnAboutSenderIdentification ]

Rick,

On 3/15/24 13:49, Rick Noel wrote:
>
> I really only want auth once
>
> All hits to jsp pages after a successful login do not trigger the Auth 
> process again.
>
> But hits to java action class servlets do trigger the Auth process
>
> Its  like session data is being lost for some pages but not for others

Can you watch the HTTP headers for your interaction to see what's happening? 
The browser should be sending JSESSIONID cookies with each request. If the 
server isn't sending any Set-Cookie header, the browser should leave things as 
they are.

Please note that Tomcat will send Set-Cookie when a session is created (by 
default, every JSP will create a session IIRC if you declare it to use 
sessions), plus Tomcat will rotate the session identifier as part of the 
authentication process. If you have code on the client that is storing the 
session and using it later, if your session id is being updated during 
authentication you need to make sure it gets updated everywhere the client is 
using it.

> I was thinking maybe this is reason..
>
> The Expires header specifies when content will expire, or how long content is 
> "fresh."
> After this time, the Portal Server will always check back with the remote 
> server to see if the content has changed.
> Most Web servers allow setting an absolute time to expire, a time 
> based on the last time that the client saw the object (last access time), or 
> a time based on the last time the document changed on your server (last 
> modification time).
>
> In JSP, we can set caching to forever using the Expires header like 
> so.
>
> response.setDateHeader("Expires",Long.MAX_VALUE)
>
> BUT I do not want to change my application code, I just want to tell 
> Tomcat 10 to stop Expiring cache so that session log in data is not 
> lost

No, the cache here refers to the client's resource (e.g. page, image,
etc.) cache. It has nothing to do with what's happening on the server.

> My main question is
> I want to know how to configure Tomcat 10 to not loose session data 
> that tells the user has successfully logged in

Are you properly encoding your URLs in your page like with 
HttpServletResponse.encodeURL()? If you are using cookie-based session-tracking 
it probably won't matter, but it's best practice to always do that to ensure 
your URLs are generated properly.

-chris

> -Original Message-
> From: Christopher Schultz 
> Sent: Friday, March 15, 2024 12:19 PM
> To: users@tomcat.apache.org
> Subject: [EXT]Re: 404 for j_security_check
>
> [You don't often get email from ch...@christopherschultz.net. Learn 
> why this is important at https://aka.ms/LearnAboutSenderIdentification 
> ]
>
> Rick,
>
> On 3/14/24 15:37, Rick Noel wrote:
>> After moving from tomcat 9 to tomcat 10 after a user successfully 
>> logs in and then hits a restricted page, the login page is hit again 
>> but on this second login hit I get 404 page not found
> This is actually expected, since j_security_check is only supposed to be used 
> when the container (Tomcat) interrupts a user workflow to request 
> authentication.
>
>> How do I set the correct path in my  login jsp so that 
>> j_security_check is found?
>>
>> BTW  I actually am wondering why a  successful logged on user would 
>> even be sent to the log in page again?
> That's more of a question for your application than anything else.
>
>> My login page  is ->   /membership/login.jsp
>>
>> Here is how I set the path to  j_security_check in above login.jsp
>>
>> 
>>
>> My restricted  web.xml snippet
>
> Are you doing what I call a "direct login" where you have a "login page"
> that most users hit first. Like from example.com/app/ where there is no 
> initial request for a protected resource? Or are your users always (1) 
> requesting a protected resource then (2) Tomcat requests authentication then 
> (3) the user is forwarded to the resource originally requested in (1)?
>
>> 
>> 
>> External
>> /external/*
>> 
>> 
>> radiovoodoo
>> 
>> 
>> NONE
>&g

Tomcat 10 waning that expireSessionsOnShutdown is not set

2024-03-21 Thread Rick Noel
Hello,

Could someone tell me why I would get the below waning about 
expireSessionsOnShutdown not being set

WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match 
[Server/Service/Engine/Host/Cluster/Manager] failed to set property 
[expireSessionsOnShutdown] to [false]

I am using Tomcat 10.1.19 and trying to get clusting set up so session data is 
not lost because of web app being deployed on two servers and service by a load 
balancer

Here is my server.xml  snippet...




   


  

   

   
 
 

 
   
 
 
 
 
   

   



   



And in my application web.xml I have. the needed





Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com



RE: [EXT]Re: Tomcat 10 waning that expireSessionsOnShutdown is not set

2024-03-21 Thread Rick Noel
Thank you Chuck

Do you have a  feel if DeltaManager is better than BackupManager?



Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Chuck Caldarale 
Sent: Thursday, March 21, 2024 3:37 PM
To: Tomcat Users List 
Subject: [EXT]Re: Tomcat 10 waning that expireSessionsOnShutdown is not set

[You don't often get email from n82...@gmail.com. Learn why this is important 
at https://aka.ms/LearnAboutSenderIdentification ]

> On Mar 21, 2024, at 14:23, Rick Noel  wrote:
>
> Could someone tell me why I would get the below waning about 
> expireSessionsOnShutdown not being set
>
> WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match 
> [Server/Service/Engine/Host/Cluster/Manager] failed to set property 
> [expireSessionsOnShutdown] to [false]
>
> I am using Tomcat 10.1.19 and trying to get clusting set up so session data 
> is not lost because of web app being deployed on two servers and service by a 
> load balancer
>
> Here is my server.xml  snippet...
>
>
> channelSendOptions="6">
>
>className="org.apache.catalina.ha.session.BackupManager"
>
> expireSessionsOnShutdown="false"
>
> notifyListenersOnReplication="true"
>
> mapSendOptions="6"/>


The expireSessionsOnShutdown attribute is only available for the DeltaManager, 
not the BackupManager. See:
https://tomcat.apache.org/tomcat-10.1-doc/config/cluster-manager.html

  - Chuck

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you know the sender and you are sure the 
content is safe. Please report the message using the Report Message feature in 
your email client if you believe the email is suspicious.


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



RE: [EXT]Re: [EXT]Re: Tomcat 10 waning that expireSessionsOnShutdown is not set

2024-03-22 Thread Rick Noel
Thanks Chuck  great link to lots of good stuff

Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Chuck Caldarale 
Sent: Thursday, March 21, 2024 4:00 PM
To: Tomcat Users List 
Subject: [EXT]Re: [EXT]Re: Tomcat 10 waning that expireSessionsOnShutdown is 
not set

[You don't often get email from n82...@gmail.com. Learn why this is important 
at https://aka.ms/LearnAboutSenderIdentification ]

> On Mar 21, 2024, at 14:50, Rick Noel  wrote:
>
> Do you have a  feel if DeltaManager is better than BackupManager?


Depends on what your needs are. There are some presentations on the subject 
that you might want to look at:
https://tomcat.apache.org/presentations.html

ApacheCon 2018 NA: Deep dive into Tomcat Clustering, Keiichi Fujino

TomcatCon London 2017: Reverse Proxies, Load-Balancing & Clustering, Mark Thomas

  - Chuck

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you know the sender and you are sure the 
content is safe. Please report the message using the Report Message feature in 
your email client if you believe the email is suspicious.


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



Tomcat session replication issue - java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute :

2024-03-22 Thread Rick Noel
Is there a way to configure DeltaManager or the Cluster element so it does not 
cause my application to throw this error.

22-Mar-2024 10:56:34.382 SEVERE [http-nio-8586-exec-5] 
org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for 
servlet [jsp] in context with path [##0001] threw exception [An exception 
occurred processing [/services/include/properties.jsp] at line [196]

193:
194:session.setAttribute( "format", stationFormat );
195:session.setAttribute( "employee_id", employeeId );
196:session.setAttribute( "customer", customer );
197:session.setAttribute( "customer_id", customerId );
198:session.setAttribute( "nonidentifier_call_letters", 
nonIdentifierCallLetters );
199:session.setAttribute( "call_letters", callLetters );


Stacktrace:] with root cause
   java.lang.IllegalArgumentException: setAttribute: 
Non-serializable attribute [customer]


I know why the error, it is because the  customer object was never written to 
be serialiazable.
The old application I am working on has a lot of such non serialized objects 
and I do not want to search out change them all to implement serialiazable

I am hoping there is a way to configure Tomcat to just not try and replication 
sessions all object which are not serialiazable

Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com



RE: [EXT]Re: Tomcat session replication issue - java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute :

2024-03-22 Thread Rick Noel
Mark,

So if my customer object is failing to get set in the session replication,
I could add this to the config snippet?

sessionAttributeNameFilter="customer"

so like this?...




  

  




  




  

  


  
 





Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Mark Thomas 
Sent: Friday, March 22, 2024 11:32 AM
To: users@tomcat.apache.org
Subject: [EXT]Re: Tomcat session replication issue - 
java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute :

On 22/03/2024 15:15, Rick Noel wrote:
> Is there a way to configure DeltaManager or the Cluster element so it does 
> not cause my application to throw this error.
>
> 22-Mar-2024 10:56:34.382 SEVERE [http-nio-8586-exec-5] 
> org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for 
> servlet [jsp] in context with path [##0001] threw exception [An exception 
> occurred processing [/services/include/properties.jsp] at line [196]
>
> 193:
> 194:session.setAttribute( "format", stationFormat );
> 195:session.setAttribute( "employee_id", employeeId );
> 196:session.setAttribute( "customer", customer );
> 197:session.setAttribute( "customer_id", customerId );
> 198:session.setAttribute( "nonidentifier_call_letters", 
> nonIdentifierCallLetters );
> 199:session.setAttribute( "call_letters", callLetters );
>
>
> Stacktrace:] with root cause
> java.lang.IllegalArgumentException: setAttribute: 
> Non-serializable attribute [customer]
>
>
> I know why the error, it is because the  customer object was never written to 
> be serialiazable.
> The old application I am working on has a lot of such non serialized objects 
> and I do not want to search out change them all to implement serialiazable
>
> I am hoping there is a way to configure Tomcat to just not try and 
> replication sessions all object which are not serialiazable

https://tomcat.apache.org/tomcat-10.1-doc/config/manager.html

Search for sessionAttributeNameFilter

Mark

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

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you know the sender and you are sure the 
content is safe. Please report the message using the Report Message feature in 
your email client if you believe the email is suspicious.


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



RE: [EXT]Re: Tomcat session replication issue - java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute :

2024-03-22 Thread Rick Noel
So setting...   
sessionAttributeNameFilter="customer"
does not work,
 still getting the error  java.lang.IllegalArgumentException: setAttribute: 
Non-serializable attribute : customer

Do I need to set this also?

sessionAttributeValueClassNameFilter= 
"java\\.lang\\.(?:Boolean|Integer|Long|Number|String)|com.radiovoodoo.customer.Customer"

I am thinking no config setting can stop this error.

I am thinking  I must alter my Customer code and make that class implement 
java.io.Serializable.
And that is  what I was hoping not to do. (alter the application code itself)

Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Rick Noel
Sent: Friday, March 22, 2024 11:43 AM
To: Tomcat Users List 
Subject: RE: [EXT]Re: Tomcat session replication issue - 
java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute :

Mark,

So if my customer object is failing to get set in the session replication, I 
could add this to the config snippet?

sessionAttributeNameFilter="customer"

so like this?...




  

  




  




  

  


  
 





Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Mark Thomas 
Sent: Friday, March 22, 2024 11:32 AM
To: users@tomcat.apache.org
Subject: [EXT]Re: Tomcat session replication issue - 
java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute :

On 22/03/2024 15:15, Rick Noel wrote:
> Is there a way to configure DeltaManager or the Cluster element so it does 
> not cause my application to throw this error.
>
> 22-Mar-2024 10:56:34.382 SEVERE [http-nio-8586-exec-5]
> org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service()
> for servlet [jsp] in context with path [##0001] threw exception [An
> exception occurred processing [/services/include/properties.jsp] at
> line [196]
>
> 193:
> 194:session.setAttribute( "format", stationFormat );
> 195:session.setAttribute( "employee_id", employeeId );
> 196:session.setAttribute( "customer", customer );
> 197:session.setAttribute( "customer_id", customerId );
> 198:session.setAttribute( "nonidentifier_call_letters", 
> nonIdentifierCallLetters );
> 199:session.setAttribute( "call_letters", callLetters );
>
>
> Stacktrace:] with root cause
> java.lang.IllegalArgumentException: setAttribute:
> Non-serializable attribute [customer]
>
>
> I know why the error, it is because the  customer object was never written to 
> be serialiazable.
> The old application I am working on has a lot of such non serialized
> objects and I do not want to search out change them all to implement
> serialiazable
>
> I am hoping there is a way to configure Tomcat to just not try and
> replication sessions all object which are not serialiazable

https://tomcat.apache.org/tomcat-10.1-doc/config/manager.html

Search for sessionAttributeNameFilter

Mark

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

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you know the sender and you are sure the 
content is safe. Please report the message using the Report Message feature in 
your email client if you believe the email is suspicious.


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



RE: [EXT]Re: Tomcat session replication issue - java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute :

2024-03-22 Thread Rick Noel
I do not want to replicate customer because that class does not implement  
serializable

I was looking for someway that the Manager would NOT try to replicate it 

Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Mark Thomas  
Sent: Friday, March 22, 2024 1:27 PM
To: users@tomcat.apache.org
Subject: Re: [EXT]Re: Tomcat session replication issue - 
java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute :

On 22/03/2024 15:43, Rick Noel wrote:
> Mark,
> 
> So if my customer object is failing to get set in the session 
> replication, I could add this to the config snippet?
> 
> sessionAttributeNameFilter="customer"

You set that to the attributes you DO want to replicate, not the ones you don't.

Mark

> 
> so like this?...
> 
> 
>channelSendOptions="6">
> 
> className="org.apache.catalina.ha.session.DeltaManager"
> expireSessionsOnShutdown="false"
> 
> notifyListenersOnReplication="true"
> maxActiveSessions="8192"
>
> sessionAttributeNameFilter="customer"
> />
> 
> className="org.apache.catalina.tribes.group.GroupChannel">
>   className="org.apache.catalina.tribes.membership.McastService"
>  address="228.0.0.4"
>  port="45564"
>  frequency="500"
>  dropTime="3000"/>
>   className="org.apache.catalina.tribes.transport.nio.NioReceiver"
>address="auto"
>port="5000"
>selectorTimeout="100"
>maxThreads="6"/>
> 
>   className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
> className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
>  
>   className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
>   className="org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor"/>
>   className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
>
> 
> className="org.apache.catalina.ha.tcp.ReplicationValve"
>   
> filter=".*\.gif|.*\.js|.*\.jpeg|.*\.jpg|.*\.png|.*\.htm|.*\.html|.*\.c
> ss|.*\.txt"/>
> 
> 
> className="org.apache.catalina.ha.session.ClusterSessionListener"/>
>   
> 
> 
> 
> 
> 
> Rick Noel
> Systems Programmer | Westwood One
> rn...@westwoodone.com
> 
> -Original Message-
> From: Mark Thomas 
> Sent: Friday, March 22, 2024 11:32 AM
> To: users@tomcat.apache.org
> Subject: [EXT]Re: Tomcat session replication issue - 
> java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute :
> 
> On 22/03/2024 15:15, Rick Noel wrote:
>> Is there a way to configure DeltaManager or the Cluster element so it does 
>> not cause my application to throw this error.
>>
>> 22-Mar-2024 10:56:34.382 SEVERE [http-nio-8586-exec-5] 
>> org.apache.catalina.core.StandardWrapperValve.invoke 
>> Servlet.service() for servlet [jsp] in context with path [##0001] 
>> threw exception [An exception occurred processing 
>> [/services/include/properties.jsp] at line [196]
>>
>> 193:
>> 194:session.setAttribute( "format", stationFormat );
>> 195:session.setAttribute( "employee_id", employeeId );
>> 196:session.setAttribute( "customer", customer );
>> 197:session.setAttribute( "customer_id", customerId );
>> 198:

RE: [EXT]Re: Tomcat session replication issue - java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute :

2024-03-22 Thread Rick Noel
Thank you very much Chris 
The classes my app uses should be serialize anyway so I just go that route.
But thanks for that code snippet too

Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Christopher Schultz  
Sent: Friday, March 22, 2024 2:36 PM
To: Tomcat Users List ; Rick Noel 

Subject: Re: [EXT]Re: Tomcat session replication issue - 
java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute :

Rick,

On 3/22/24 13:33, Rick Noel wrote:
> I do not want to replicate customer because that class does not 
> implement  serializable
> 
> I was looking for someway that the Manager would NOT try to replicate 
> it
This is an allow-list which is much more secure than a deny-list.

It's a regular expression, so you can feel free to get super-creative with the 
expression if you want to effectively create a deny-list with one item.

Honestly, this is probably some technical dept worth paying off at this point.

Another option would be to store the object in a wrapper in the session that 
*is* serializable but it doesn't actually try to serialize the object it wraps.

I did one of these ages ago for similar reasons: I didn't want to go change all 
those classes to be Serializable. Here it is:

public class TransientObjectWrapper
 implements Serializable
{
 private static final long serialVersionUID = -4694896879363833304L;

 private transient final T _o;

 public TransientObjectWrapper(T o) { _o = o; }

 public T getWrappedObject() { return _o; } }

Using this plus a craftily-written Filter, HttpServletRequestWrapper, and 
HttpSession implementation would allow you to do this kind of thing without any 
failures.

Or you could just configure Tomcat's already flexible allow-list for session 
attribute names.

-chris

> -Original Message-
> From: Mark Thomas 
> Sent: Friday, March 22, 2024 1:27 PM
> To: users@tomcat.apache.org
> Subject: Re: [EXT]Re: Tomcat session replication issue - 
> java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute :
> 
> On 22/03/2024 15:43, Rick Noel wrote:
>> Mark,
>>
>> So if my customer object is failing to get set in the session 
>> replication, I could add this to the config snippet?
>>
>> sessionAttributeNameFilter="customer"
> 
> You set that to the attributes you DO want to replicate, not the ones you 
> don't.
> 
> Mark
> 
>>
>> so like this?...
>>
>>
>> >channelSendOptions="6">
>>
>> > className="org.apache.catalina.ha.session.DeltaManager"
>>  expireSessionsOnShutdown="false"
>>  
>> notifyListenersOnReplication="true"
>>  maxActiveSessions="8192"
>> 
>> sessionAttributeNameFilter="customer"
>>  />
>>
>> > className="org.apache.catalina.tribes.group.GroupChannel">
>>   > className="org.apache.catalina.tribes.membership.McastService"
>>   address="228.0.0.4"
>>   port="45564"
>>   frequency="500"
>>   dropTime="3000"/>
>>   > className="org.apache.catalina.tribes.transport.nio.NioReceiver"
>> address="auto"
>> port="5000"
>> selectorTimeout="100"
>> maxThreads="6"/>
>>
>>   > className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
>> > className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
>>   
>>   > className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
>>   > className="org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor&qu

performance tunning of Tomcat 10

2024-03-27 Thread Rick Noel
Hello,

I was wondering if the apache foundation has any tools we can use to fine tune 
Tomcat 10.
Tools to deteming how to set the best heap size for Tomcat startup and the best 
connection attributes of minSpareThreads and MaxThreads.

I know my application at times will reach 100 concurrent connections and some 
times goes has high as 500 connections.
Should I boost minSpareThreads and maxThread values of what I plan to use below?

Or why would we not just set very high minSpareThreads and maxThread values
like minSpareThreads =300  and maxThread=1000

This is a snippet of my server.xml



  
   

 

Also, am I good with setting  
protocol="org.apache.coyote.http11.Http11NioProtocol"
And then setting 

That will tell Tomcat to do HTTP2 Correct?

Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com



RE: [EXT]Re: performance tunning of Tomcat 10

2024-03-27 Thread Rick Noel


Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Christopher Schultz  
Sent: Wednesday, March 27, 2024 8:24 AM
To: Tomcat Users List ; Rick Noel 

Cc: Voodoo nmulcahy gmail ; David Jung 

Subject: [EXT]Re: performance tunning of Tomcat 10

Rick,

On 3/27/24 07:53, Rick Noel wrote:
> I was wondering if the apache foundation has any tools we can use to 
> fine tune Tomcat 10. Tools to deteming how to set the best heap size 
> for Tomcat startup and the best connection attributes of 
> minSpareThreads and MaxThreads.
What is your goal?
Our application is a sip phone call handling application.(A voice response xml 
application)
The goal is to not have  call bottleneck at peak call volume.
Sometimes too many folks call at one time hit our app and calls are not handle 
correctly.

> I know my application at times will reach 100 concurrent connections
 > and some times goes has high as 500 connections.

Okay.
Well I do not have actual traffic info down to the sec,
But from the application logs I know that that points in the day more than 300 
calls can come in

> Should I boost minSpareThreads and maxThread values of what I plan to 
> use below? > Or why would we not just set very high minSpareThreads 
> and maxThread values like minSpareThreads =300  and maxThread=1000
>
> This is a snippet of my server.xml
>
>   minSpareThreads="50"
>maxThreads="300"/>
>
>   executor="tomcatPhoneAppThreadPool"
>   compression="on"
>   compressionMinSize="2048"
>   
> compressableMimeType="text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/xml"
>   protocol="org.apache.coyote.http11.Http11NioProtocol"
> redirectPort="8443">
>  className="org.apache.coyote.http2.Http2Protocol" />
>
>   
>
> Also, am I good with setting  
> protocol="org.apache.coyote.http11.Http11NioProtocol"
> And then setting  className="org.apache.coyote.http2.Http2Protocol" />
>
> That will tell Tomcat to do HTTP2 Correct?

That's the only way to enable h2. Well... you could use Http11Nio2Protocol, 
too. NIO is the default protocol so you don't even need to add that 
specifically if you don't want to.

Back to threads.

Each thread (unless you go virtual, but that's not really production-ready IMHO 
at this point unless you have very strict circumstances where it will work 
great for you) takes up a bunch of memory, so you can't just set maxThreads=1M. 
Threads take "time" to start, but it's not really that much. If starting and 
stopping threads is what is making your application slow, than you have a very 
high-performance application and environment indeed.

Your question as stated is unanswerable.

You say you are sometimes hitting 500 connections. The default maximum number 
of connections is 1 and you are only using 500. That means you aren't being 
flooded, which is a Good Thing. (BTW: How are you measuring "how many 
connections" you have? Make sure you are measuring the right thing...

I am estimating the actual connections just based on application call logs.

Is your *current* maxThreads set to 500? If so, then your thread pool maximum 
is set to your high-water mark which seems like it should be fine. If you set 
your maxThreads to 1000 you won't get any benefit because only 500 requests are 
ever being sent at once, right?

What else does your application do?
Our application is a sip phone call handling application.(A voice response xml 
application)

For example, if you have a thread-pool max-threads of 1000 and your application 
uses an RDBMS for every request but your db connection pool size is more like 
10, then many threads waiting on a small number of connections gets you 
absolutely no benefit. You'd have to make changes elsewhere in your application 
in order to make use of those extra threads.

Similarly, if you have a big thread pool and a big db connection pool, but your 
database performs slowly, then having all that power on the application server 
doesn't really help you.

Yes our app is using a database  (we use Postres)
And yes I assume that is our bottleneck
Our tomcat context.xml defines that database maxConnction to be only 
maxTotal="20"
We have other apps  and that hit this same database, so we define low maxTotal  
on each  server so each server can have only limit connection access to the 
database
I am thinkingit would be best to try and NOT optimize  minSpareThreads and 
maxThreads but in

RE: [EXT]Re: [EXT]Re: performance tunning of Tomcat 10

2024-03-28 Thread Rick Noel
Chris,
 my bottleneck (app slowness to respond is the at the database connection max), 
I am not even going to try and adjust minThreads and maxThreads.
When I tried to increase maxConnection to our database from and existing 
connection max of 20, to a new connectionMax of 50, I got errors, see attached 
snapshot.

I was able to raise the maxConnection to database up to 30 with no errors, so I 
am just going to deploy at that level until we upgrade our Postgess database
We are using a really old Postgres and plan in the near to future to upgrade 
that database.

BTW,
I did find and use the Apache Benchmark tool and was able to see how our app 
responses with a test requests of 1 and concurrent requests of 40 and those 
results look good to me with worst response time of only  1000 miliseconds.

Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Christopher Schultz 
Sent: Thursday, March 28, 2024 3:09 PM
To: users@tomcat.apache.org
Subject: [EXT]Re: [EXT]Re: performance tunning of Tomcat 10

Rick,

On 3/27/24 09:22, Rick Noel wrote:
> -Original Message-
> From: Christopher Schultz 
> Sent: Wednesday, March 27, 2024 8:24 AM
> To: Tomcat Users List ; Rick Noel
> 
> Cc: Voodoo nmulcahy gmail ; David Jung
> 
> Subject: [EXT]Re: performance tunning of Tomcat 10
>
> Rick,
>
> On 3/27/24 07:53, Rick Noel wrote:
>> I was wondering if the apache foundation has any tools we can use to
>> fine tune Tomcat 10. Tools to deteming how to set the best heap size
>> for Tomcat startup and the best connection attributes of
>> minSpareThreads and MaxThreads.
> What is your goal?
> Our application is a sip phone call handling application.(A voice
> response xml application) The goal is to not have  call bottleneck at peak 
> call volume.
> Sometimes too many folks call at one time hit our app and calls are not 
> handle correctly.
>
>> I know my application at times will reach 100 concurrent connections
>   > and some times goes has high as 500 connections.
>
> Okay.
> Well I do not have actual traffic info down to the sec, But from the
> application logs I know that that points in the day more than 300
> calls can come in

Okay, you need to get better information. Check out this presentation on Tomcat 
monitoring:

https://tomcat.apache.org/presentations.html#latest-monitoring-with-jmx

There is a lot in there, but I do talk about checking on the request processor 
to see how many requests are in-flight at once. You can do the same with your 
database pool.

You'll want to grab samples of those things at regular intervals to see how 
they correlate. I suspect you know when your peak times are, so schedule the 
samples to be taken during that timeframe. You could even sample once per 
second if you wanted to -- the calls are pretty inexpensive.

>> Should I boost minSpareThreads and maxThread values of what I plan to
>> use below? > Or why would we not just set very high minSpareThreads
>> and maxThread values like minSpareThreads =300  and maxThread=1000
>>
>> This is a snippet of my server.xml
>>
>> >   minSpareThreads="50"
>> maxThreads="300"/>
>>
>> >executor="tomcatPhoneAppThreadPool"
>>compression="on"
>>compressionMinSize="2048"
>>
>> compressableMimeType="text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/xml"
>>protocol="org.apache.coyote.http11.Http11NioProtocol"
>>  redirectPort="8443">
>>  > className="org.apache.coyote.http2.Http2Protocol" />
>>
>>
>>
>> Also, am I good with setting  
>> protocol="org.apache.coyote.http11.Http11NioProtocol"
>> And then setting > className="org.apache.coyote.http2.Http2Protocol" />
>>
>> That will tell Tomcat to do HTTP2 Correct?
>
> That's the only way to enable h2. Well... you could use Http11Nio2Protocol, 
> too. NIO is the default protocol so you don't even need to add that 
> specifically if you don't want to.
>
> Back to threads.
>
> Each thread (unless you go virtual, but that's not really production-ready 
> IMHO at this point unless you have very strict circumstances where it will 
> work great for you) takes up a bunch of memory, so you can't just set 
> maxThreads=1M. Threads take "time" to start, but it's not really that much. 
> I

how to define database resource in just context.xml or server.xml

2024-03-29 Thread Rick Noel
Hello,

Can someone tell me why I need to have my database source defined in both my 
context.xml and server.xml?
I thought we are suppose to define it in only one location?

I can only log into my app if I have it defined in both my context.xml and 
server.xml


Below  is my database resource   as defined in server.xml..

I have xxx out postgres URL for security reasons





 


  



Below is my database resource   as defined in context.xml








   




Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com



RE: [EXT]Re: how to define database resource in just context.xml or server.xml

2024-03-29 Thread Rick Noel
If have the resource defined in
CATALINA_BASE/conf/context.xml
And 
CATALINA_BASE/conf/server.xml

Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Christopher Schultz  
Sent: Friday, March 29, 2024 11:47 AM
To: users@tomcat.apache.org
Subject: [EXT]Re: how to define database resource in just context.xml or 
server.xml

Rick,

On 3/29/24 09:48, Rick Noel wrote:
> Can someone tell me why I need to have my database source defined in 
> both my context.xml and server.xml? I thought we are suppose to define 
> it in only one location?
It's definitely not a requirement to specify it in both places.

> I can only log into my app if I have it defined in both my context.xml 
> and server.xml
>
> Below  is my database resource   as defined in server.xml..
>
> I have xxx out postgres URL for security reasons
>
> 
>
>
>
>   type="javax.sql.DataSource"  
> driverClassName="org.postgresql.Driver"
>url="jdbc:postgresql://xxx"
>username="postgres" 
> password="postgres4now"
>maxTotal="30"  maxIdle="30" 
> maxWaitMillis="-1"
>removeAbandonedOnBorrow="true" 
> removeAbandonedTimeout="90"
>testOnBorrow="true"  
> validationQuery="select 1" validationQueryTimeout="3"
>testWhileIdle="true"  
> timeBetweenEvictionRunsMillis="6"
>testOnReturn="true"
> />
>
>
>
>
>
>
> Below is my database resource   as defined in context.xml
>
>
> 
>
>  
>
>
>
>type="javax.sql.DataSource"  
> driverClassName="org.postgresql.Driver"
>   url="jdbc:postgresql://xx
>   username="postgres" password="postgres4now"
>   maxTotal="30"  maxIdle="30" maxWaitMillis="-1"
>   removeAbandonedOnBorrow="true" 
> removeAbandonedTimeout="90"
> testOnBorrow="true"  validationQuery="select 1" 
> validationQueryTimeout="3"
> testWhileIdle="true"  
> timeBetweenEvictionRunsMillis="6"
> testOnReturn="true"
> />

Which context.xml are you talking about? The one in CATALINA_BASE/context.xml 
or the one in your application's META-INF/context.xml?

Have you defined your  in CATALINA_BASE/conf/server.xml, or are you 
using only META-INF/context.xml?

-chris

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

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you know the sender and you are sure the 
content is safe. Please report the message using the Report Message feature in 
your email client if you believe the email is suspicious.



FW: [EXT]Re: how to define database resource in just context.xml or server.xml

2024-03-29 Thread Rick Noel
Chris,

I found I could use a ResourceLink element and put it in my context.xml file.
The name in that ResourceLink is the name of resource that I have fully defined 
in my server.xml.
Sot the context.xml points to the fully define resource which is in my 
server.xml

So snippet from my context.xml file is.





  
   
   


And snippet from my server.xml is.


  

  
 


Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Rick Noel 
Sent: Friday, March 29, 2024 11:57 AM
To: Tomcat Users List 
Subject: RE: [EXT]Re: how to define database resource in just context.xml or 
server.xml

If have the resource defined in
CATALINA_BASE/conf/context.xml
And
CATALINA_BASE/conf/server.xml

Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Christopher Schultz 
Sent: Friday, March 29, 2024 11:47 AM
To: users@tomcat.apache.org
Subject: [EXT]Re: how to define database resource in just context.xml or 
server.xml

Rick,

On 3/29/24 09:48, Rick Noel wrote:
> Can someone tell me why I need to have my database source defined in 
> both my context.xml and server.xml? I thought we are suppose to define 
> it in only one location?
It's definitely not a requirement to specify it in both places.

> I can only log into my app if I have it defined in both my context.xml 
> and server.xml
>
> Below  is my database resource   as defined in server.xml..
>
> I have xxx out postgres URL for security reasons
>
> 
>
>
>
>   type="javax.sql.DataSource"  
> driverClassName="org.postgresql.Driver"
>url="jdbc:postgresql://xxx"
>username="postgres" 
> password="postgres4now"
>maxTotal="30"  maxIdle="30" 
> maxWaitMillis="-1"
>removeAbandonedOnBorrow="true" 
> removeAbandonedTimeout="90"
>testOnBorrow="true"  
> validationQuery="select 1" validationQueryTimeout="3"
>testWhileIdle="true"  
> timeBetweenEvictionRunsMillis="6"
>testOnReturn="true"
> />
>
>
>
>
>
>
> Below is my database resource   as defined in context.xml
>
>
> 
>
>  
>
>
>
>type="javax.sql.DataSource"  
> driverClassName="org.postgresql.Driver"
>   url="jdbc:postgresql://xx
>   username="postgres" password="postgres4now"
>   maxTotal="30"  maxIdle="30" maxWaitMillis="-1"
>   removeAbandonedOnBorrow="true" 
> removeAbandonedTimeout="90"
> testOnBorrow="true"  validationQuery="select 1" 
> validationQueryTimeout="3"
> testWhileIdle="true"  
> timeBetweenEvictionRunsMillis="6"
> testOnReturn="true"
> />

Which context.xml are you talking about? The one in CATALINA_BASE/context.xml 
or the one in your application's META-INF/context.xml?

Have you defined your  in CATALINA_BASE/conf/server.xml, or are you 
using only META-INF/context.xml?

-chris

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

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you know the sender and you are sure the 
content is safe. Please report the message using the Report Message feature in 
your email client if you believe the email is suspicious.



RE: [EXT]Re: how to define database resource in just context.xml or server.xml

2024-03-29 Thread Rick Noel
Chris,
Our application is really a suite of 5applications.  And the server.xml  I am 
talking about is on our dev machine, where we want to run all 5 apps on the one 
web server. 

The context.xml has global enviroiment variables (like mail server related 
vars) that all the dev applications use.
All the different dev applications also use the same database.

So that is why we define resources in the context.xml  file

Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Christopher Schultz  
Sent: Friday, March 29, 2024 2:21 PM
To: Tomcat Users List ; Rick Noel 

Subject: Re: [EXT]Re: how to define database resource in just context.xml or 
server.xml

Rick,

On 3/29/24 11:56, Rick Noel wrote:
> If have the resource defined in
> CATALINA_BASE/conf/context.xml
> And
> CATALINA_BASE/conf/server.xml

You really shouldn't have anything custom in CATALINA_BASE/conf/context.xml. 
That will affect every application deployed on the server. Perhaps you only 
have a single application deployed, but things can get really confusing when 
you edit that file. 
It also makes upgrades more difficult.

I would recommend taking your  from CATALINA_BASE/conf/context.xml 
and putting it into the proper place: 
your application's META-INF/context.xml file. You will need to surround it with 
 ...  since that file defines the context.

If you have  in your CATALINA_BASE/conf/server.xml file, you should 
remove it. If you want to disable auto-deploy, then you can always copy your 
application's META-INF/context.xml file into 
CATALINA_BASE/conf/[engine]/[host]/[contextpath].xml.

Finally, you should be able to delete your  from your 
CATALINA_BASE/conf/server.xml file entirely.

Do you have anything in your web.xml that is related? For example:

   
 jdbc/foo
 javax.sql.DataSource
 Container
   

I have one of those in my web.xml, but it's not clear to be whether or not I 
actually need it. I have *one* of them but my application uses two different 
JDBC resources. Both are declared in META-INF/context.xml and both are 
available to the application.

I think you need to use  in web.xml when you define "global 
naming resources" in server.xml. But if you put them into META-INF/context.xml 
it's obvious that (a) they aren't global and (b) the application expects them.

So I would remove any global naming resources you may have in server.xml and 
also remove anything you don't need in web.xml.

Doing all this will make upgrading Tomcat much easier.

-chris

> -Original Message-
> From: Christopher Schultz 
> Sent: Friday, March 29, 2024 11:47 AM
> To: users@tomcat.apache.org
> Subject: [EXT]Re: how to define database resource in just context.xml 
> or server.xml
> 
> Rick,
> 
> On 3/29/24 09:48, Rick Noel wrote:
>> Can someone tell me why I need to have my database source defined in 
>> both my context.xml and server.xml? I thought we are suppose to 
>> define it in only one location?
> It's definitely not a requirement to specify it in both places.
> 
>> I can only log into my app if I have it defined in both my 
>> context.xml and server.xml
>>
>> Below  is my database resource   as defined in server.xml..
>>
>> I have xxx out postgres URL for security reasons
>>
>> 
>>
>>
>>
>>> type="javax.sql.DataSource"  
>> driverClassName="org.postgresql.Driver"
>> url="jdbc:postgresql://xxx"
>> username="postgres" 
>> password="postgres4now"
>> maxTotal="30"  maxIdle="30" 
>> maxWaitMillis="-1"
>> removeAbandonedOnBorrow="true" 
>> removeAbandonedTimeout="90"
>> testOnBorrow="true"  
>> validationQuery="select 1" validationQueryTimeout="3"
>> testWhileIdle="true"  
>> timeBetweenEvictionRunsMillis="6"
>> testOnReturn="true"
>>  />
>>
>>
>> 
>>
>>
>>
>> Below is my database resource   as defined in context.xml
>>
>>
>> 
>>
>>   
>>
>>
>>
>>  >type="javax.sql.DataSource"  
>> driverClassName="org.postgresql.Driver"
>>url="jdbc:postgresql://xx
>>

RE: FW: [EXT]Re: how to define database resource in just context.xml or server.xml

2024-03-29 Thread Rick Noel
Yeah I like the idea of using the Resourcelink  in the context.xml and then 
keep the defining of that datasource in the server.xml

Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Christopher Schultz  
Sent: Friday, March 29, 2024 2:23 PM
To: users@tomcat.apache.org
Subject: Re: FW: [EXT]Re: how to define database resource in just context.xml 
or server.xml

Rick,

On 3/29/24 14:05, Rick Noel wrote:
> Chris,
> 
> I found I could use a ResourceLink element and put it in my context.xml file.
> The name in that ResourceLink is the name of resource that I have fully 
> defined in my server.xml.
> Sot the context.xml points to the fully define resource which is in my 
> server.xml

That's definitely a possibility as well.

I work on a small team and so separating the JDBC definition from the link 
doesn't make much sense so we don't do it. We also don't like polluting our 
server.xml file so everything goes into META-INF/context.xml.

You really should never change CATALINA_BASE/conf/context.xml, though.

-chris

> So snippet from my context.xml file is.
> 
> 
> 
>  
>  
>
> 
>  name="jdbc/app-pool"
> global="jdbc/app-pool"
>type="javax.sql.DataSource"   />
> 
> 
> And snippet from my server.xml is.
> 
> 
>
> 
>type="javax.sql.DataSource"  
> driverClassName="org.postgresql.Driver"
>  url="jdbc:postgresql://x"
>  username="x" password="xx"
>  maxTotal="30"  maxIdle="30" maxWaitMillis="-1"
>  removeAbandonedOnBorrow="true" 
> removeAbandonedTimeout="90"
>  testOnBorrow="true"  validationQuery="select 1" 
> validationQueryTimeout="3"
>  testWhileIdle="true"  
> timeBetweenEvictionRunsMillis="6"
>  testOnReturn="true"  />  
>   
> 
> 
> Rick Noel
> Systems Programmer | Westwood One
> rn...@westwoodone.com
> 
> -Original Message-
> From: Rick Noel
> Sent: Friday, March 29, 2024 11:57 AM
> To: Tomcat Users List 
> Subject: RE: [EXT]Re: how to define database resource in just 
> context.xml or server.xml
> 
> If have the resource defined in
> CATALINA_BASE/conf/context.xml
> And
> CATALINA_BASE/conf/server.xml
> 
> Rick Noel
> Systems Programmer | Westwood One
> rn...@westwoodone.com
> 
> -Original Message-
> From: Christopher Schultz 
> Sent: Friday, March 29, 2024 11:47 AM
> To: users@tomcat.apache.org
> Subject: [EXT]Re: how to define database resource in just context.xml 
> or server.xml
> 
> Rick,
> 
> On 3/29/24 09:48, Rick Noel wrote:
>> Can someone tell me why I need to have my database source defined in 
>> both my context.xml and server.xml? I thought we are suppose to 
>> define it in only one location?
> It's definitely not a requirement to specify it in both places.
> 
>> I can only log into my app if I have it defined in both my 
>> context.xml and server.xml
>>
>> Below  is my database resource   as defined in server.xml..
>>
>> I have xxx out postgres URL for security reasons
>>
>> 
>>
>>
>>
>>> type="javax.sql.DataSource"  
>> driverClassName="org.postgresql.Driver"
>> url="jdbc:postgresql://xxx"
>> username="postgres" 
>> password="postgres4now"
>> maxTotal="30"  maxIdle="30" 
>> maxWaitMillis="-1"
>> removeAbandonedOnBorrow="true" 
>> removeAbandonedTimeout="90"
>> testOnBorrow="true"  
>> validationQuery="select 1" validationQueryTimeout="3"
>> testWhileIdle="true"  
>> timeBetweenEvictionRunsMillis="6"
>> testOnReturn="true"
>>  />
>>
>>
>> 
>>
>>
>>
>> Below is my database resource   as defined in context.xml
>>
>>
>> 
>>
>>   

RE: [EXT]Re: how to define database resource in just context.xml or server.xml

2024-04-01 Thread Rick Noel
Yes and that is just what we are trying to do.  On our dev servers all five 
different applications share the same database.
So it would seem best to have the resource link in the context.xml and not 
complicate things up by putting the database link in each web application's 
web.xml.

The idea being that a developer working on one application would think if he 
changed the web.xml for his application, hey maybe I should change the other 
application's web.xml also

Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Mark Thomas  
Sent: Sunday, March 31, 2024 1:55 PM
To: users@tomcat.apache.org
Subject: Re: [EXT]Re: how to define database resource in just context.xml or 
server.xml

On 29/03/2024 21:58, Christopher Schultz wrote:
> Rick,
> 
> On 3/29/24 14:33, Rick Noel wrote:
>> Our application is really a suite of 5applications.  And the 
>> server.xml  I am talking about is on our dev machine, where we want 
>> to run all 5 apps on the one web server.
>>
>> The context.xml has global enviroiment variables (like mail server 
>> related vars) that all the dev applications use. All the different 
>> dev applications also use the same database.
>>
>> So that is why we define resources in the context.xml  file
> It sounds like you really *do* want to define the JDBC/JNDI resource 
> in server.xml and the link it to your applications.
> 
> I think the correct way to do that is by defining it in server.xml and 
> then linking it through your applications' WEB-INF/web.xml files.
> 
> You should not have to touch CATALINA_BASE/conf/context.xml.

The only reason you might want to touch context.xml is if you want to provide 
the same resource link to all web applications rather than have to specify it 
in each web application.

Mark

> 
> -chris
> 
>> -Original Message-
>> From: Christopher Schultz 
>> Sent: Friday, March 29, 2024 2:21 PM
>> To: Tomcat Users List ; Rick Noel 
>> 
>> Subject: Re: [EXT]Re: how to define database resource in just 
>> context.xml or server.xml
>>
>> Rick,
>>
>> On 3/29/24 11:56, Rick Noel wrote:
>>> If have the resource defined in
>>> CATALINA_BASE/conf/context.xml
>>> And
>>> CATALINA_BASE/conf/server.xml
>>
>> You really shouldn't have anything custom in 
>> CATALINA_BASE/conf/context.xml. That will affect every application 
>> deployed on the server. Perhaps you only have a single application 
>> deployed, but things can get really confusing when you edit that file.
>> It also makes upgrades more difficult.
>>
>> I would recommend taking your  from 
>> CATALINA_BASE/conf/context.xml and putting it into the proper place:
>> your application's META-INF/context.xml file. You will need to 
>> surround it with  ...  since that file defines the 
>> context.
>>
>> If you have  in your CATALINA_BASE/conf/server.xml file, you 
>> should remove it. If you want to disable auto-deploy, then you can 
>> always copy your application's META-INF/context.xml file into 
>> CATALINA_BASE/conf/[engine]/[host]/[contextpath].xml.
>>
>> Finally, you should be able to delete your  from your 
>> CATALINA_BASE/conf/server.xml file entirely.
>>
>> Do you have anything in your web.xml that is related? For example:
>>
>>     
>>   jdbc/foo
>>   javax.sql.DataSource
>>   Container
>>     
>>
>> I have one of those in my web.xml, but it's not clear to be whether 
>> or not I actually need it. I have *one* of them but my application 
>> uses two different JDBC resources. Both are declared in 
>> META-INF/context.xml and both are available to the application.
>>
>> I think you need to use  in web.xml when you define 
>> "global naming resources" in server.xml. But if you put them into 
>> META-INF/context.xml it's obvious that (a) they aren't global and (b) 
>> the application expects them.
>>
>> So I would remove any global naming resources you may have in 
>> server.xml and also remove anything you don't need in web.xml.
>>
>> Doing all this will make upgrading Tomcat much easier.
>>
>> -chris
>>
>>> -Original Message-
>>> From: Christopher Schultz 
>>> Sent: Friday, March 29, 2024 11:47 AM
>>> To: users@tomcat.apache.org
>>> Subject: [EXT]Re: how to define database resource in just 
>>> context.xml or server.xml
>>>
>>> Rick,
>>>
>>> On 3/29/24 09:48, Rick Noel wrote:
>>>> Can someone tell me

unable to set compression, compressionMinSize and compressableMinemType attributes in UpgradeProtocol element

2024-04-02 Thread Rick Noel
Hello,

What am I missing here?
I get warnings that the compression related attributes of compression, 
compressionMinSize and compressableMinemType are not being set.




02-Apr-2024 09:36:24.876 WARNING [main] 
org.apache.tomcat.util.digester.SetPropertiesRule.begin Match 
[Server/Service/Connector/UpgradeProtocol] failed to set property [compression] 
to [on]
02-Apr-2024 09:36:24.880 WARNING [main] 
org.apache.tomcat.util.digester.SetPropertiesRule.begin Match 
[Server/Service/Connector/UpgradeProtocol] failed to set property 
[compressionMinSize] to [2048]
02-Apr-2024 09:36:24.880 WARNING [main] 
org.apache.tomcat.util.digester.SetPropertiesRule.begin Match 
[Server/Service/Connector/UpgradeProtocol] failed to set property 
[compressableMimeType] to 
[text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/xml]



The warnings above came with this server.xml  defined.
I have also tried moving of compression, compressionMinSize and 
compressableMinemType to the Connector element with same results





  
  
  
   

BTW, I am supposed to get improved speed by using the  UpgradeProtcol  
Correct?





Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com



RE: [EXT]Re: unable to set compression, compressionMinSize and compressableMinemType attributes in UpgradeProtocol element

2024-04-02 Thread Rick Noel
Mark you were correct. I, needed to move those attributes to the Connection 
element.
Plus on top of that I had this misspelled attribute  compressableMinemType
should be compressibleMimeType

In your opinion, should we use the Upgrade UpgradeProtcol protocol?
I mean does not the semantics of its name imply it is better?


Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Mark Thomas 
Sent: Tuesday, April 2, 2024 10:05 AM
To: users@tomcat.apache.org
Subject: [EXT]Re: unable to set compression, compressionMinSize and 
compressableMinemType attributes in UpgradeProtocol element

On 02/04/2024 14:53, Rick Noel wrote:
> Hello,
>
> What am I missing here?

You haven't provided information on the Tomcat version you are using.
I'm assuming 10.1.x.

https://tomcat.apache.org/tomcat-10.1-doc/config/http2.html

Search for compressionMinSize.

> I get warnings that the compression related attributes of compression, 
> compressionMinSize and compressableMinemType are not being set.



> I have also tried moving of compression, compressionMinSize and
> compressableMinemType to the Connector element with same results

That seems ... unlikely. Please provide the Connector configuration and the 
error message.

> BTW, I am supposed to get improved speed by using the  UpgradeProtcol  
> Correct?

It depends. YMMV.

Mark

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

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you know the sender and you are sure the 
content is safe. Please report the message using the Report Message feature in 
your email client if you believe the email is suspicious.


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



Tomcat 10 session replication fails

2024-04-11 Thread Rick Noel
Hi,

We have our app running on Tomcat10 and doing clustering,but are getting the 
following errors seen int the Catalina log...

Apr 11, 2024 8:14:43 AM org.apache.catalina.ha.session.DeltaManager 
waitForSendAllSessions
SEVERE: Manager [##0001]: No session state sent at [4/11/24, 8:13 AM] received, 
timing out after [60,068] ms.
Apr 11, 2024 8:14:43 AM org.apache.catalina.ha.session.DeltaManager 
getAllClusterSessions
WARNING: Manager [##0001]: Drop message [SESSION-GET-ALL] inside 
GET_ALL_SESSIONS sync phase start date [4/11/24, 8:13 AM] message date 
[4/11/24, 8:13 AM]
11-Apr-2024 08:14:43.456

The error, to me, indicates that the session data is not being sent out.

We are running this app in our dev environment, and in this dev environment the 
app runs on only one machine.
In our live environment the app runs on two machines and traffic goes through a 
load balancer.
This may be a dumb question but are we getting these errors because we are 
running the app on only one machine, and clustering cannot be done on one 
machine?
We need to better understand these errors before we can move to tomcat 10 
clustering into our live   2 machine environment

This is how we have clustering defined in the server.xml...





  

  

  



  


 


 

   

   


   

 

   

   

   

   

 


 



 





 



  





Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com



RE: [EXT]Re: Tomcat 10 session replication fails

2024-04-11 Thread Rick Noel
Thanks Chuck,

We are getting closer
Changing ports from the 5000 range to the 4000 range stopped two errors 
But now I get this..

INFO: Manager [##0001]: skipping state transfer. No members active in cluster 
group

How to I make the member machine in the cluster active?


Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Chuck Caldarale  
Sent: Thursday, April 11, 2024 9:14 AM
To: Tomcat Users List 
Subject: [EXT]Re: Tomcat 10 session replication fails

[You don't often get email from n82...@gmail.com. Learn why this is important 
at https://aka.ms/LearnAboutSenderIdentification ]

> On Apr 11, 2024, at 07:56, Rick Noel  wrote:
>
> We have our app running on Tomcat10 and doing clustering,but are getting the 
> following errors seen int the Catalina log...
>
> Apr 11, 2024 8:14:43 AM org.apache.catalina.ha.session.DeltaManager 
> waitForSendAllSessions
> SEVERE: Manager [##0001]: No session state sent at [4/11/24, 8:13 AM] 
> received, timing out after [60,068] ms.
> Apr 11, 2024 8:14:43 AM org.apache.catalina.ha.session.DeltaManager 
> getAllClusterSessions
> WARNING: Manager [##0001]: Drop message [SESSION-GET-ALL] inside 
> GET_ALL_SESSIONS sync phase start date [4/11/24, 8:13 AM] message date 
> [4/11/24, 8:13 AM]
> 11-Apr-2024 08:14:43.456
>
> The error, to me, indicates that the session data is not being sent out.
>
> We are running this app in our dev environment, and in this dev environment 
> the app runs on only one machine.
> In our live environment the app runs on two machines and traffic goes through 
> a load balancer.
> This may be a dumb question but are we getting these errors because we are 
> running the app on only one machine, and clustering cannot be done on one 
> machine?


Likely. From the Tomcat clustering doc:

If your Tomcat instances are running on the same machine, make sure the 
Receiver.port attribute is unique for each instance, in most cases Tomcat is 
smart enough to resolve this on it's own by autodetecting available ports in 
the range 4000-4100

You appear to have configured 5001 as the receiver port on both.


>   
>  className="org.apache.catalina.tribes.membership.McastService"
>   
> address="228.0.0.4"
>   
> port="45565"
>   
> frequency="500"
>   
> dropTime="3000"/>
>   
>  className="org.apache.catalina.tribes.transport.nio.NioReceiver"
>   
>   address="auto"
>   
>   port="5001"
>   
>   selectorTimeout="100"
>   
>   maxThreads="6"/>


  - Chuck

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you know the sender and you are sure the 
content is safe. Please report the message using the Report Message feature in 
your email client if you believe the email is suspicious.


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



RE: [EXT]Re: [EXT]Re: Tomcat 10 session replication fails

2024-04-15 Thread Rick Noel
Hi Chuck,
Your suggestion did not work.

I defined Membership as suggested...


and still getting this in the logs

org.apache.catalina.ha.session.DeltaManager.startInternal Starting clustering 
manager at [##0001]
15-Apr-2024 07:55:36.744 INFO [main] 
org.apache.catalina.ha.session.DeltaManager.getAllClusterSessions Manager 
[##0001]: skipping state transfer. No members active in cluster group

Do you think the transfer is not happening because the application is only on 
one machine?
Our Production environment will have  our application on two machines but in 
our dev environment we have only one machine in the "cluster". So we really do 
not have a "cluster" environment.
Again, we would like to know is going on before we introduce clustering in our 
live environment.

We are using Java 17 and Tomcat 10


Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Chuck Caldarale  
Sent: Saturday, April 13, 2024 4:00 PM
To: Tomcat Users List 
Subject: [EXT]Re: [EXT]Re: Tomcat 10 session replication fails


> On Apr 11, 2024, at 09:07, Rick Noel  wrote:
>
> We are getting closer
> Changing ports from the 5000 range to the 4000 range stopped two 
> errors But now I get this..
>
> INFO: Manager [##0001]: skipping state transfer. No members active in 
> cluster group
>
> How to I make the member machine in the cluster active?


There’s a cluster configuration option that may be coming into play here: 
localLoopbackDisabled. Once upon a time, the JDK method:
MulticastSocket.setLoopbackMode(boolean disable) did the opposite of 
what one might think from just the method name - passing in true disabled local 
receipt of multicast packets. That method has since been deprecated, and Tomcat 
currently uses this method:
 DatagramSocket.setOption​(SocketOption name, T value) which, at 
least in Java 21, operates as you might expect from the name - specifying true 
enables multicast loopback.

However, there’s some interesting logic in Tomcat's handling of 
localLoopbackDisabled that can inverts the config value based on the Java 
level, along with this comment:
Java < 14, a value of true means loopback is disabled. Java 14+ a value 
of true means loopback is enabled.

Having not dug into the JRE source code for the various Java versions, I’m not 
yet convinced the version checking logic is correct. You might try setting 
localLoopbackDisabled to true in your  config to see if that 
has an effect on your dev system.

Also, let us know what Java version you’re using.

  - Chuck


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

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you know the sender and you are sure the 
content is safe. Please report the message using the Report Message feature in 
your email client if you believe the email is suspicious.


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



.intermittent InvocationTargetException errors

2024-04-15 Thread Rick Noel
Hello,

I am using Tomcat 10 with java 17.

I am getting itermitant jsp compile errors below.

Some times the page compiles correctly but sometimes the page hits result in 
below errors

java.lang.reflect.InvocationTargetException
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at com.radiovoodoo.display.EvalExpr.evalIdentifier(EvalExpr.java:317)
at com.radiovoodoo.display.EvalExpr.eval(EvalExpr.java:57)

I found this explanation for possible cause..
Normally "java.lang.reflect.InvocationTargetException" occurs when java 
compiler finds 2 different classes with same name in 2 different packages.
When you are importing both classes at a time and when you are trying to create 
object of that class it throws "java.lang.reflect.InvocationTargetException" 
exception .
The solution is that when you are creating the object of the class use package 
name also along with class name so that compiler knows what class it has to use.

I looked at my code in the jsp and the code in question could be mistaking for 
two different classes.
My code is meant to use  java.util.Timezone but my code also has a  
com.radiovoodoo.customer.Timezone class
So I thought ah ah will specifical declare the class the I want, so I changed
From
private TimeZone customerTimeZone;
to
private java.util.TimeZone customerTimeZone;

so that the compiler will not think to use com.radiovoodoo.customer.Timezone 
but instead always use java.util.TimeZone
But this had no effect.

I still get intermittent java.lang.reflect.InvocationTargetException
Could this be a possible bug in   the class tomcat 10 uses to compile jsp   ->  
org.apache.jasper.servlet.JspServlet

Is there a different JspServlet class I could use to test that theory out?


Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com



RE: [EXT]Re: .intermittent InvocationTargetException errors

2024-04-15 Thread Rick Noel
; is null
at 
com.radiovoodoo.action.station.ContestManager.getCustomerTimeZoneDisplayName(ContestManager.java:1195)
... 51 more
Apr 15, 2024 11:26:51 AM com.radiovoodoo.util.Log log
SEVERE:
Exception:  java.lang.NullPointerException: Cannot invoke 
"java.util.TimeZone.getDisplayName()" because "this.customerTimeZone" is null
Stack Trace follows:
java.lang.NullPointerException: Cannot invoke 
"java.util.TimeZone.getDisplayName()" because "this.customerTimeZone" is null
at 
com.radiovoodoo.action.station.ContestManager.getCustomerTimeZoneDisplayName(ContestManager.java:1195)
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at com.radiovoodoo.display.EvalExpr.evalIdentifier(EvalExpr.java:317)
at com.radiovoodoo.display.EvalExpr.eval(EvalExpr.java:57)
at com.radiovoodoo.display.EvalExpr.eval(EvalExpr.java:30)
at com.radiovoodoo.display.Expr.evaluate(Expr.java:370)
at com.radiovoodoo.display.PropertyTag.evaluate(PropertyTag.java:102)
at com.radiovoodoo.display.PropertyTag.doStartTag(PropertyTag.java:55)
at 
org.apache.jsp.services.system.contesting.contest_005fschedule_005fedit_jsp._jspx_meth_ww_005fproperty_005f5(contest_005fschedule_005fedit_jsp.java:6193)
at 
org.apache.jsp.services.system.contesting.contest_005fschedule_005fedit_jsp._jspService(contest_005fschedule_005fedit_jsp.java:1299)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:456)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:380)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:328)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150)
at 
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:175)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:653)
at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:419)
at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:340)
at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:277)
at 
com.radiovoodoo.action.ServletDispatcher.service(ServletDispatcher.java:177)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150)
at 
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:175)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at 
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:673)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
at 
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391)
at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896)


Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Christoph

Tomcat 10 clustering is not replicating session data

2024-04-16 Thread Rick Noel
Hello,

I am running Tomcat 10.1.20 with Java 17

But our session data is being lost.

Here is snippet of the clustering I have defined..





 


 

   

   


   

 

   

   

   

   

 


 



 


Notice in sessionAttributeNameFilter that one of the session attributes I want 
replicated is   -> logged_in_user
We have to include the session data we want replicated here Correct?
logged_in_user is one we want replicated, its value is a String

When I run my app this code runs ->

public class Utils {
   public static String getUserName( HttpServletRequest request )
   {

  return (String) 
request.getSession().getAttribute("logged_in_user");
   }
}

That code returns a null value, indicating that the session value is not found.

Does anyone see something wrong with how I defined the clustering?

This below comes from the Catalina.out log and indicates there is an issue with 
clustering...

SEVERE: Manager [##0001]: No session state sent at [4/16/24, 12:48 PM] 
received, timing out after [60,074] ms.
Apr 16, 2024 12:49:54 PM org.apache.catalina.ha.session.DeltaManager 
getAllClusterSessions
WARNING: Manager [##0001]: Drop message [SESSION-GET-ALL] inside 
GET_ALL_SESSIONS sync phase start date [4/16/24, 12:48 PM] message date 
[4/16/24, 12:48 PM]


Our live environment has two app server machines being fed by one loadbalancer.

In our dev environment, that has just one machine, this same session data can 
be extracted.
But not on the live 2 machine environment



Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com



clustering logging erors Tomcat10 with Java 17

2024-04-18 Thread Rick Noel
Hello,

Can someone try to explain what this Catalina.log snippet is saying in regards 
to clustering status?

It looks like to me, this machine successfully sent a session data state msg to 
the other machine in the cluster, but 60 sec later the other machine did not 
respond with with its session data state

*


INFO: Starting clustering manager at [##0001]
Apr 18, 2024 9:42:21 AM org.apache.catalina.ha.session.DeltaManager 
getAllClusterSessions
INFO: Manager [##0001], requesting session state from 
[org.apache.catalina.tribes.membership.MemberImpl[tcp://{127, 0, 0, 
1}:4001,{127, 0, 0, 1},4001, alive=2087779, securePort=-1, UDP Port=-1, id={-96 
81 2 46 1 32 64 76 -97 -53 -48 3 -22 122 -8 28 }, payload={}, command={}, 
domain={}]]. This operation will timeout if no session state has been received 
within [60] seconds.
18-Apr-2024 09:42:21.062 INFO 
[MessageDispatchInterceptor.MessageDispatchThread[station-Channel]1] 
org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor.report 
ThroughputInterceptor Report[
   Tx Msg:1 messages
   Sent:0.00 MiB (total)
   Sent:0.00 MiB (application)
   Time:0.00 seconds
   Tx Speed:0.15 MiB/s (total)
   Tx Speed:0.15 MiB/s (application)
   Error Msg:0
   Rx Msg:3 messages
   Rx Speed:0.00 MiB/s (since 1st msg)
   Received:0.00 MiB]
Apr 18, 2024 9:43:21 AM org.apache.catalina.ha.session.DeltaManager 
waitForSendAllSessions
SEVERE: Manager [##0001]: No session state sent at [4/18/24, 9:42 AM] received, 
timing out after [60,076] ms.
Apr 18, 2024 9:43:21 AM org.apache.catalina.ha.session.DeltaManager 
getAllClusterSessions
WARNING: Manager [##0001]: Drop message [SESSION-GET-ALL] inside 
GET_ALL_SESSIONS sync phase start date [4/18/24, 9:42 AM] message date 
[4/18/24, 9:42 AM]


*
Any ideas why clustering is not working?

Here is how I have clustering defined in server.xml




 


 

   

   


   

 

   

   

   

   

 


 



 






Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com



Tomcat 10 skipping state transfer. No members active in cluster group

2024-04-22 Thread Rick Noel
Hello,

Could someone please explain why I am getting the error

skipping state transfer. No members active in cluster group

On one sever the reciever  is bound  to  127.0.0.1:4002
And on the other server the receiver is bound to   127.0.0.1:4001

But both servers report -> no active members in cluster group


22-Apr-2024 10:19:06.726 INFO [main] 
org.apache.catalina.core.StandardService.startInternal Starting service 
[Station]
22-Apr-2024 10:19:06.727 INFO [main] 
org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: 
[Apache Tomcat/10.1.20]
22-Apr-2024 10:19:06.736 INFO [main] 
org.apache.catalina.ha.tcp.SimpleTcpCluster.startInternal Cluster is about to 
start
22-Apr-2024 10:19:06.750 INFO [main] 
org.apache.catalina.tribes.transport.ReceiverBase.bind Receiver Server Socket 
bound to:[/127.0.0.1:4002]
22-Apr-2024 10:19:06.762 INFO [main] 
org.apache.catalina.tribes.membership.McastServiceImpl.setupSocket Setting 
cluster mcast soTimeout to [500]
22-Apr-2024 10:19:06.771 INFO [main] 
org.apache.catalina.tribes.membership.McastServiceImpl.waitForMembers Sleeping 
for [1000] milliseconds to establish cluster membership, start level:[4]
22-Apr-2024 10:19:07.771 INFO [main] 
org.apache.catalina.tribes.membership.McastServiceImpl.waitForMembers Done 
sleeping, membership established, start level:[4]
22-Apr-2024 10:19:07.773 INFO [main] 
org.apache.catalina.tribes.membership.McastServiceImpl.waitForMembers Sleeping 
for [1000] milliseconds to establish cluster membership, start level:[8]
22-Apr-2024 10:19:08.774 INFO [main] 
org.apache.catalina.tribes.membership.McastServiceImpl.waitForMembers Done 
sleeping, membership established, start level:[8]
22-Apr-2024 10:19:08.790 INFO [main] 
org.apache.catalina.ha.session.JvmRouteBinderValve.startInternal 
JvmRouteBinderValve started
22-Apr-2024 10:19:08.803 INFO [main] 
org.apache.catalina.startup.HostConfig.deployWAR Deploying web application 
archive [/home/web/servers/apache-tomcat-10.1.20/station/ROOT##0001.war]
Apr 22, 2024 10:20:01 AM org.apache.catalina.util.SessionIdGeneratorBase 
createSecureRandom
WARNING: Creation of SecureRandom instance for session ID generation using 
[SHA1PRNG] took [51,791] milliseconds.
Apr 22, 2024 10:20:01 AM org.apache.catalina.ha.session.DeltaManager 
startInternal
INFO: Register manager [##0001] to cluster element [Host] with name [station]
Apr 22, 2024 10:20:01 AM org.apache.catalina.ha.session.DeltaManager 
startInternal
INFO: Starting clustering manager at [##0001]
Apr 22, 2024 10:20:01 AM org.apache.catalina.ha.session.DeltaManager 
getAllClusterSessions
INFO: Manager [##0001]: skipping state transfer. No members active in cluster 
group.


Here is how I have clustering set up on server one



   

  

 

 

  

  

  
  
  

  


On the other server I just changed  the member ship  to a different port   
port="45564"
And reciver port to   a different port also 
   port="4002"


In my application level web.xml on both servers I have included the needed tag


What am I missing here?


Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com



RE: [EXT]Re: Tomcat 10 skipping state transfer. No members active in cluster group

2024-04-22 Thread Rick Noel


Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Chuck Caldarale  
Sent: Monday, April 22, 2024 4:41 PM
To: Tomcat Users List 
Subject: [EXT]Re: Tomcat 10 skipping state transfer. No members active in 
cluster group


> On Apr 22, 2024, at 09:54, Rick Noel  wrote:
>
> Could someone please explain why I am getting the error
>
> skipping state transfer. No members active in cluster group


Need a bit more information.


> On one sever the reciever  is bound  to  
> 127.0.0.1:4002
> And on the other server the receiver is bound to   127.0.0.1:4001


Are both Tomcat instances running on the same system (VM or real)?

Tomcats are two different VMs


> But both servers report -> no active members in cluster group


Indicates they can’t see each other, so they could be on different systems or 
in separate VMs (containers).


> Apr 22, 2024 10:20:01 AM org.apache.catalina.util.SessionIdGeneratorBase 
> createSecureRandom
> WARNING: Creation of SecureRandom instance for session ID generation using 
> [SHA1PRNG] took [51,791] milliseconds.


This long random ID generation is typical for a low-entropy VM or container 
rather than a real system. If the two Tomcats are in separate containers, 
you’ll have to configure clustering to use each container’s published IP 
address rather than assuming they can share the same loopback network.

What do you mean each containers published IP

  - Chuck


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

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you know the sender and you are sure the 
content is safe. Please report the message using the Report Message feature in 
your email client if you believe the email is suspicious.


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



RE: [EXT]Re: [EXT]Re: Tomcat 10 skipping state transfer. No members active in cluster group

2024-04-22 Thread Rick Noel
Chuck,

So you mean we use the VM's  IP as the address value below
Instead or using the value of   auto  ?






Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Chuck Caldarale  
Sent: Monday, April 22, 2024 6:20 PM
To: Tomcat Users List 
Subject: [EXT]Re: [EXT]Re: Tomcat 10 skipping state transfer. No members active 
in cluster group


> On Apr 22, 2024, at 16:33, Rick Noel  wrote:
>
> Tomcats are two different VMs


Which explains why they can’t talk to each other over 127.0.0.1.


> What do you mean each containers published IP


Each VM or container will have an assigned, individual IP address so it can 
communicate with networks outside of the VM (eg, the host machine or real 
world). You must use each VM’s assigned IP address - not 127.0.0.1 - in the 
clustering configuration to allow the two VMs to communicate with each other.

  - Chuck

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you know the sender and you are sure the 
content is safe. Please report the message using the Report Message feature in 
your email client if you believe the email is suspicious.


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



RE: [EXT]Re: [EXT]Re: [EXT]Re: Tomcat 10 skipping state transfer. No members active in cluster group

2024-04-23 Thread Rick Noel
Your suggestion worked Chuck, Thank you!

I now see this in cat log..
23-Apr-2024 08:30:10.969 INFO [Catalina-utility-1] 
org.apache.catalina.ha.tcp.SimpleTcpCluster.memberAdded Replication member 
added:[org.apache.catalina.tribes.membership.MemberImpl[tcp://{192, 168, 47, 
157}:4001,{192, 168, 47, 157},4001, alive=304632, securePort=-1, UDP Port=-1, 
id={-32 -57 -12 119 64 42 67 56 -69 51 -113 -64 -68 -78 -99 74 }, payload={}, 
command={}, domain={}]]


INFO: Starting clustering manager at [##0001]
Apr 23, 2024 8:30:46 AM org.apache.catalina.ha.session.DeltaManager 
getAllClusterSessions
INFO: Manager [##0001], requesting session state from 
[org.apache.catalina.tribes.membership.MemberImpl[tcp://{192, 168, 47, 
157}:4001,{192, 168, 47, 157},4001, alive=340143, securePort=-1, UDP Port=-1, 
id={-32 -57 -12 119 64 42 67 56 -69 51 -113 -64 -68 -78 -99 74 }, payload={}, 
command={}, domain={}]]. This operation will timeout if no session state has 
been received within [60] seconds.
23-Apr-2024 08:30:46.492 INFO 
[MessageDispatchInterceptor.MessageDispatchThread[station-Channel]1] 
org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor.report 
ThroughputInterceptor Report[
Tx Msg:1 messages
Sent:0.00 MiB (total)
Sent:0.00 MiB (application)
Time:0.00 seconds
Tx Speed:0.15 MiB/s (total)
Tx Speed:0.15 MiB/s (application)
Error Msg:0
Rx Msg:10 messages
Rx Speed:0.00 MiB/s (since 1st msg)
Received:0.01 MiB]

Apr 23, 2024 8:30:46 AM org.apache.catalina.ha.session.DeltaManager 
waitForSendAllSessions
INFO: Manager [##0001]; session state sent at [4/23/24, 8:30 AM] received in 
[104] ms.


But  could you now explain why I get these new warnings

3-Apr-2024 08:30:22.970 WARNING [Tribes-Task-Receiver[station-Channel]-1] 
org.apache.catalina.ha.session.ClusterSessionListener.messageReceived Context 
manager doesn't exist:[##0001]
23-Apr-2024 08:30:22.972 WARNING [Tribes-Task-Receiver[station-Channel]-2] 
org.apache.catalina.ha.session.ClusterSessionListener.messageReceived Context 
manager doesn't exist:[##0001]
23-Apr-2024 08:30:32.978 WARNING [Tribes-Task-Receiver[station-Channel]-4] 
org.apache.catalina.ha.session.ClusterSessionListener.messageReceived Context 
manager doesn't exist:[##0001]
23-Apr-2024 08:30:32.980 WARNING [Tribes-Task-Receiver[station-Channel]-3] 
org.apache.catalina.ha.session.ClusterSessionListener.messageReceived Context 
manager doesn't exist:[##0001]
23-Apr-2024 08:30:42.988 WARNING [Tribes-Task-Receiver[station-Channel]-5] 
org.apache.catalina.ha.session.ClusterSessionListener.messageReceived Context 
manager doesn't exist:[##0001]
23-Apr-2024 08:30:42.990 WARNING [Tribes-Task-Receiver[station-Channel]-6] 
org.apache.catalina.ha.session.ClusterSessionListener.messageReceived Context 
manager doesn't exist:[##0001]
Apr 23, 2024 8:30:46 AM org.apache.catalina.util.SessionIdGeneratorBase 
createSecureRandom
WARNING: Creation of SecureRandom instance for session ID generation using 
[SHA1PRNG] took [32,646] milliseconds.






Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Chuck Caldarale 
Sent: Monday, April 22, 2024 10:08 PM
To: Tomcat Users List 
Subject: [EXT]Re: [EXT]Re: [EXT]Re: Tomcat 10 skipping state transfer. No 
members active in cluster group


> On Apr 22, 2024, at 18:48, Rick Noel  wrote:
>
> So you mean we use the VM's  IP as the address value below
> Instead or using the value of   auto  ?
>
> address="auto"
>port="4001"
>   autoBind="100"
>   selectorTimeout="5000"
>   maxThreads="6"/>


Correct. To quote from the Tomcat doc:

The IP broadcasted is java.net.InetAddress.getLocalHost().getHostAddress() 
(make sure you don't broadcast 127.0.0.1, this is a common error)

Unless the two JVMs are deployed on the same VM, you cannot use 127.0.0.1 and 
expect them to be able to communicate with each other.

Here's an old e-mail describing the issue and one way of addressing it:

https://marc.info/?l=tomcat-user&m=118764351104059&w=2

The gist of it is this:

1. check what name the command `hostname` spits out 2. make sure that 
/etc/hosts contains that hostname and IP address

This must be done on each VM, of course.

Returning localhost is typical for systems that use DHCP to obtain their IP 
addresses, such as my MacBook:

jshell> java.net.InetAddress.getLocalHost().getHostAddress();
$1 ==> "127.0.0.1"

  - Chuck

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you know the sender and you are sure the 
content is safe. Please report the message using the Report Message feature in 

RE: [EXT]Re: [EXT]Re: [EXT]Re: Tomcat 10 skipping state transfer. No members active in cluster group

2024-04-23 Thread Rick Noel
Chuck, to get rid of the warnings...

3-Apr-2024 08:30:22.970 WARNING [Tribes-Task-Receiver[station-Channel]-1] 
org.apache.catalina.ha.session.ClusterSessionListener.messageReceived Context 
manager doesn't exist:[##0001]

I moved my  Manager element form the server.xml to the context.xml

 

That got rid of those warnings
But Now cat log shows these new warnings

23-Apr-2024 09:19:16.288 WARNING [Tribes-Task-Receiver[station-Channel]-5] 
org.apache.catalina.ha.session.DeltaManager.deserializeSessions overload 
existing session [729421EC1DD658816E953C9A0DE4267A]

Do I need to configure something different?  Some how allow more 
deserializeSessions?




23-Apr-2024 09:19:16.243 INFO [main] 
org.apache.catalina.ha.session.DeltaManager.startInternal Starting clustering 
manager at [##0001]
23-Apr-2024 09:19:16.246 INFO [main] 
org.apache.catalina.ha.session.DeltaManager.getAllClusterSessions Manager 
[##0001], requesting session state from 
[org.apache.catalina.tribes.membership.MemberImpl[tcp://{192, 168, 47, 
157}:4001,{192, 168, 47, 157},4001, alive=3249463, securePort=-1, UDP Port=-1, 
id={-32 -57 -12 119 64 42 67 56 -69 51 -113 -64 -68 -78 -99 74 }, payload={}, 
command={}, domain={}]]. This operation will timeout if no session state has 
been received within [60] seconds.
23-Apr-2024 09:19:16.250 INFO 
[MessageDispatchInterceptor.MessageDispatchThread[station-Channel]1] 
org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor.report 
ThroughputInterceptor Report[
Tx Msg:1 messages
Sent:0.00 MiB (total)
Sent:0.00 MiB (application)
Time:0.00 seconds
Tx Speed:0.15 MiB/s (total)
Tx Speed:0.15 MiB/s (application)
Error Msg:0
Rx Msg:10 messages
Rx Speed:0.00 MiB/s (since 1st msg)
Received:0.01 MiB]

23-Apr-2024 09:19:16.288 WARNING [Tribes-Task-Receiver[station-Channel]-5] 
org.apache.catalina.ha.session.DeltaManager.deserializeSessions overload 
existing session [729421EC1DD658816E953C9A0DE4267A]
23-Apr-2024 09:19:16.289 WARNING [Tribes-Task-Receiver[station-Channel]-5] 
org.apache.catalina.ha.session.DeltaManager.deserializeSessions overload 
existing session [A2196B2A82F1D0873769053130EA3E7A]
23-Apr-2024 09:19:16.290 WARNING [Tribes-Task-Receiver[station-Channel]-5] 
org.apache.catalina.ha.session.DeltaManager.deserializeSessions overload 
existing session [EDC2F576615781AD8CC138E8D8029EB9]
23-Apr-2024 09:19:16.296 WARNING [Tribes-Task-Receiver[station-Channel]-5] 
org.apache.catalina.ha.session.DeltaManager.deserializeSessions overload 
existing session [12A38E4D987184560911DC3C43A50410]
23-Apr-2024 09:19:16.354 INFO [main] 
org.apache.catalina.ha.session.DeltaManager.waitForSendAllSessions Manager 
[##0001]; session state sent at [4/23/24, 9:19 AM] received in [104] ms.

Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-Original Message-
From: Rick Noel
Sent: Tuesday, April 23, 2024 8:56 AM
To: Tomcat Users List 
Cc: Voodoo nmulcahy gmail ; Rob Kowald 

Subject: RE: [EXT]Re: [EXT]Re: [EXT]Re: Tomcat 10 skipping state transfer. No 
members active in cluster group

Your suggestion worked Chuck, Thank you!

I now see this in cat log..
23-Apr-2024 08:30:10.969 INFO [Catalina-utility-1] 
org.apache.catalina.ha.tcp.SimpleTcpCluster.memberAdded Replication member 
added:[org.apache.catalina.tribes.membership.MemberImpl[tcp://{192, 168, 47, 
157}:4001,{192, 168, 47, 157},4001, alive=304632, securePort=-1, UDP Port=-1, 
id={-32 -57 -12 119 64 42 67 56 -69 51 -113 -64 -68 -78 -99 74 }, payload={}, 
command={}, domain={}]]


INFO: Starting clustering manager at [##0001] Apr 23, 2024 8:30:46 AM 
org.apache.catalina.ha.session.DeltaManager getAllClusterSessions
INFO: Manager [##0001], requesting session state from 
[org.apache.catalina.tribes.membership.MemberImpl[tcp://{192, 168, 47, 
157}:4001,{192, 168, 47, 157},4001, alive=340143, securePort=-1, UDP Port=-1, 
id={-32 -57 -12 119 64 42 67 56 -69 51 -113 -64 -68 -78 -99 74 }, payload={}, 
command={}, domain={}]]. This operation will timeout if no session state has 
been received within [60] seconds.
23-Apr-2024 08:30:46.492 INFO 
[MessageDispatchInterceptor.MessageDispatchThread[station-Channel]1] 
org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor.report 
ThroughputInterceptor Report[
Tx Msg:1 messages
Sent:0.00 MiB (total)
Sent:0.00 MiB (application)
Time:0.00 seconds
Tx Speed:0.15 MiB/s (total)
Tx Speed:0.15 MiB/s (application)
Error Msg:0
Rx Msg:10 messages
Rx Speed:0.00 MiB/s (since 1st msg)
Received:0.01 MiB]

Apr 23, 2024 8:30:46 AM org.apache.catalina.ha.session.DeltaManager 
waitForSendAllSessions
INFO: Manager [##0001]; session state sent at [4/23/24, 8:30 AM] received in 
[104] ms.


But  could you now explain why I get these new warnings

3-Apr-2024 08:30:22.970 WARNING [Tribes-Task-Receiver[station-Chann

Tomcat java processes eat processor.

2006-06-15 Thread Rick Cockerham

Hello all,

I've been using tomcat and apache for years, but haven't had a problem 
like this before.


I'm running: Gentoo Linux 1.4, ibm-jdk-1.4.1, postgresql, tomcat4 and 
apache2


I've been running the same application for about five years now.  The 
usage has grown to the point where I get around a thousand page views a 
day inside the four applications I run.


Here's the problem.  When I do a 'top' and look at the java threads I 
have a few threads a day that never stop and eat the system.  They crank 
my load average up to 5-6.  The only way to kill them is killall -9 java.


So, I need help debugging this.  With a thousand views a day, I can't 
even narrow down what page the users are hitting that causes these 
processes to runaway like that.  So, how can I find the page request 
that spawned the thread?  Or, how can I see what's going on in that 
thread?  I do not have console access to the machine, so it has to be 
done through ssh.  I can't duplicate this behavior myself.  I've been 
all over the application and can't break it.  But with millions of 
records, it could be a corrupted record somewhere that is breaking my code.


I can't have any downtime.  The thirty seconds it takes to restart 
tomcat a couple times a day causes many phone calls.  Of course the 
incredibly slow machine also causes phone calls. 


Please help!

Thanks,
Rick


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat java processes eat processor.

2006-06-16 Thread Rick Cockerham


Didn't work.  -3 doesn't kill it.  I tried for several minutes.  Then I 
tried -6.  That killed it, but I didn't get the core.  Where do you 
think it put it?  I did this: 'kill -6 2393 2> error'  error was empty.


Thanks,
Rick

Peter Crowther wrote:
From: Rick Cockerham [mailto:[EMAIL PROTECTED] 
When I do a 'top' and look at the java threads I 
have a few threads a day that never stop and eat the system.  


[...]
  

how can I see what's going on in that thread?
I do not have console access to the machine, so it has to be 
done through ssh.



Kill -3 on the head Java process.  This should generate a textual thread
dump to stderr, even on the IBM JVM.  The dump includes a stack trace
for each thread.  That should get you started as to what the busy
threads are doing.

You may have to redirect stderr somewhere useful before doing this,
depending on your current logging settings.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  


--

Rick Cockerham
Pocket Knife Software, Inc.
http://www.pocketknifesoftware.com 
512-249-0467



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat java processes eat processor.

2006-06-19 Thread Rick Cockerham


OK.  I finally got a file dumped out from this kill.  But, it doesn't 
look interesting to me.  Any idea what this means to me?


Any other debug ideas?

Thanks,
Rick

Unexpected Signal : 3 occurred at PC=0x45C6D876
Function=(null)+0x45C6D876
Library=/opt/blackdown-jdk-1.4.2.01/jre/lib/i386/server/libjvm.so

NOTE: We are unable to locate the function name symbol for the error
 just occurred. Please refer to release documentation for possible
 reason and solutions.

Dynamic libraries:
08048000-08057000 r-xp  08:03 815431 
/opt/blackdown-jdk-1.4.2.01/bin/java

...
...etc.

Heap at VM Abort:
Heap
PSYoungGen  total 102400K, used 84863K [0x4a17, 0x5377, 
0x5377)

 eden [0x4a17,0x4d1702f8,0x4d37)
 from [0x4d37,0x4f64fc38,0x5057)
 to   [0x5057,0x5057,0x5377)
PSOldGentotal 256000K, used 215274K [0x5377, 0x6317, 
0x6317)

 object [0x5377,0x609aa8c0,0x6317)
PSPermGen   total 16384K, used 16250K [0x6317, 0x6417, 
0x6717)

 object [0x6317,0x6414e9f0,0x6417)

Local Time = Mon Jun 19 09:27:56 2006


Peter Crowther wrote:
From: Rick Cockerham [mailto:[EMAIL PROTECTED] 
Didn't work.  -3 doesn't kill it.



No.  It produces a thread dump, and the process carries on going.  Given
that you were complaining about not wanting to restart Tomcat twice
daily, I thought you'd appreciate a non-fatal solution :-).

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  


--

Rick Cockerham
Pocket Knife Software, Inc.
http://www.pocketknifesoftware.com 
512-249-0467



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat java processes eat processor.

2006-06-19 Thread Rick Cockerham


I wish it would give me a stack trace.  That would be wonderful.  The 
part I left out was just a list of all the loaded libraries.


I can't risk a switch in software.  I realize this is a tough one.  I 
have very little flexibility to help me debug.  That's why I'm asking 
you guys!


Thanks,
Rick



Leon Rosenberg wrote:

On 6/19/06, Rick Cockerham <[EMAIL PROTECTED]> wrote:


OK.  I finally got a file dumped out from this kill.  But, it doesn't
look interesting to me.  Any idea what this means to me?

Any other debug ideas?


a) paste complete stack trace
b) try a regular vm (suns for example)

regards
Leon


Thanks,
Rick

Unexpected Signal : 3 occurred at PC=0x45C6D876
Function=(null)+0x45C6D876
Library=/opt/blackdown-jdk-1.4.2.01/jre/lib/i386/server/libjvm.so

NOTE: We are unable to locate the function name symbol for the error
  just occurred. Please refer to release documentation for possible
  reason and solutions.

Dynamic libraries:
08048000-08057000 r-xp  08:03 815431
/opt/blackdown-jdk-1.4.2.01/bin/java
...
...etc.

Heap at VM Abort:
Heap
 PSYoungGen  total 102400K, used 84863K [0x4a17, 0x5377,
0x5377)
  eden [0x4a17,0x4d1702f8,0x4d37)
  from [0x4d37,0x4f64fc38,0x5057)
  to   [0x5057,0x5057,0x5377)
 PSOldGentotal 256000K, used 215274K [0x5377, 0x6317,
0x6317)
  object [0x5377,0x609aa8c0,0x6317)
 PSPermGen   total 16384K, used 16250K [0x6317, 0x6417,
0x6717)
  object [0x6317,0x6414e9f0,0x6417)

Local Time = Mon Jun 19 09:27:56 2006


Peter Crowther wrote:
>> From: Rick Cockerham [mailto:[EMAIL PROTECTED]
>> Didn't work.  -3 doesn't kill it.
>>
>
> No.  It produces a thread dump, and the process carries on going.  
Given

> that you were complaining about not wanting to restart Tomcat twice
> daily, I thought you'd appreciate a non-fatal solution :-).
>
>   - Peter
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

--

Rick Cockerham
Pocket Knife Software, Inc.
http://www.pocketknifesoftware.com
512-249-0467


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--

Rick Cockerham
Pocket Knife Software, Inc.
http://www.pocketknifesoftware.com 
512-249-0467



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat java processes eat processor.

2006-06-20 Thread Rick Cockerham


Not sure what you mean.  I can recompile and deploy the code with no 
problems.  So, probably...




Leon Rosenberg wrote:

On 6/19/06, Rick Cockerham <[EMAIL PROTECTED]> wrote:


I wish it would give me a stack trace.  That would be wonderful.  The
part I left out was just a list of all the loaded libraries.

I can't risk a switch in software.  I realize this is a tough one.  I
have very little flexibility to help me debug.  That's why I'm asking
you guys!


Are you allowed to add a new filter?
If yes I have a solution for you :-)



Thanks,
Rick



Leon Rosenberg wrote:
> On 6/19/06, Rick Cockerham <[EMAIL PROTECTED]> wrote:
>>
>> OK.  I finally got a file dumped out from this kill.  But, it doesn't
>> look interesting to me.  Any idea what this means to me?
>>
>> Any other debug ideas?
>
> a) paste complete stack trace
> b) try a regular vm (suns for example)
>
> regards
> Leon
>>
>> Thanks,
>> Rick
>>
>> Unexpected Signal : 3 occurred at PC=0x45C6D876
>> Function=(null)+0x45C6D876
>> Library=/opt/blackdown-jdk-1.4.2.01/jre/lib/i386/server/libjvm.so
>>
>> NOTE: We are unable to locate the function name symbol for the error
>>   just occurred. Please refer to release documentation for 
possible

>>   reason and solutions.
>>
>> Dynamic libraries:
>> 08048000-08057000 r-xp  08:03 815431
>> /opt/blackdown-jdk-1.4.2.01/bin/java
>> ...
>> ...etc.
>>
>> Heap at VM Abort:
>> Heap
>>  PSYoungGen  total 102400K, used 84863K [0x4a17, 0x5377,
>> 0x5377)
>>   eden [0x4a17,0x4d1702f8,0x4d37)
>>   from [0x4d37,0x4f64fc38,0x5057)
>>   to   [0x5057,0x5057,0x5377)
>>  PSOldGentotal 256000K, used 215274K [0x5377, 0x6317,
>> 0x6317)
>>   object [0x53770000,0x609aa8c0,0x6317)
>>  PSPermGen   total 16384K, used 16250K [0x6317, 0x6417,
>> 0x6717)
>>   object [0x6317,0x6414e9f0,0x6417)
>>
>> Local Time = Mon Jun 19 09:27:56 2006
>>
>>
>> Peter Crowther wrote:
>> >> From: Rick Cockerham [mailto:[EMAIL PROTECTED]
>> >> Didn't work.  -3 doesn't kill it.
>> >>
>> >
>> > No.  It produces a thread dump, and the process carries on going.
>> Given
>> > that you were complaining about not wanting to restart Tomcat twice
>> > daily, I thought you'd appreciate a non-fatal solution :-).
>> >
>> >   - Peter
>> >
>> > 
-

>> > To start a new topic, e-mail: users@tomcat.apache.org
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>>
>> --
>>
>> Rick Cockerham
>> Pocket Knife Software, Inc.
>> http://www.pocketknifesoftware.com
>> 512-249-0467
>>
>>
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

--

Rick Cockerham
Pocket Knife Software, Inc.
http://www.pocketknifesoftware.com
512-249-0467


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--

Rick Cockerham
Pocket Knife Software, Inc.
http://www.pocketknifesoftware.com 
512-249-0467



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat java processes eat processor.

2006-06-21 Thread Rick Cockerham


This looks perfect.  It's what I need.  However...
I've been all over the website below.  I don't see how to install this 
through web.xml.  I see how to extend a servlet.  I'm using JSP.  So, 
that's a little more difficult.


Thanks,
Rick

Leon Rosenberg wrote:

look at this:

http://moskito.anotheria.net/moskitodemo/mui/mskShowAllProducers

RequestURIFilter is probably what you want

you can install this monitoring application by simply adding a filter
entry to your web.xml. This way you'll see which requests are
currently executed and which uris lasting how long. It might give you
a hint what's hanging.

Leon

On 6/20/06, Rick Cockerham <[EMAIL PROTECTED]> wrote:


Not sure what you mean.  I can recompile and deploy the code with no
problems.  So, probably...



Leon Rosenberg wrote:
> On 6/19/06, Rick Cockerham <[EMAIL PROTECTED]> wrote:
>>
>> I wish it would give me a stack trace.  That would be wonderful.  The
>> part I left out was just a list of all the loaded libraries.
>>
>> I can't risk a switch in software.  I realize this is a tough one.  I
>> have very little flexibility to help me debug.  That's why I'm asking
>> you guys!
>
> Are you allowed to add a new filter?
> If yes I have a solution for you :-)
>
>>
>> Thanks,
>> Rick
>>
>>
>>
>> Leon Rosenberg wrote:
>> > On 6/19/06, Rick Cockerham <[EMAIL PROTECTED]> wrote:
>> >>
>> >> OK.  I finally got a file dumped out from this kill.  But, it 
doesn't

>> >> look interesting to me.  Any idea what this means to me?
>> >>
>> >> Any other debug ideas?
>> >
>> > a) paste complete stack trace
>> > b) try a regular vm (suns for example)
>> >
>> > regards
>> > Leon
>> >>
>> >> Thanks,
>> >> Rick
>> >>
>> >> Unexpected Signal : 3 occurred at PC=0x45C6D876
>> >> Function=(null)+0x45C6D876
>> >> Library=/opt/blackdown-jdk-1.4.2.01/jre/lib/i386/server/libjvm.so
>> >>
>> >> NOTE: We are unable to locate the function name symbol for the 
error

>> >>   just occurred. Please refer to release documentation for
>> possible
>> >>   reason and solutions.
>> >>
>> >> Dynamic libraries:
>> >> 08048000-08057000 r-xp  08:03 815431
>> >> /opt/blackdown-jdk-1.4.2.01/bin/java
>> >> ...
>> >> ...etc.
>> >>
>> >> Heap at VM Abort:
>> >> Heap
>> >>  PSYoungGen  total 102400K, used 84863K [0x4a17, 
0x5377,

>> >> 0x5377)
>> >>   eden [0x4a17,0x4d1702f8,0x4d37)
>> >>   from [0x4d37,0x4f64fc38,0x5057)
>> >>   to   [0x5057,0x5057,0x5377)
>> >>  PSOldGentotal 256000K, used 215274K [0x5377, 
0x6317,

>> >> 0x6317)
>> >>   object [0x5377,0x609aa8c0,0x6317)
>> >>  PSPermGen   total 16384K, used 16250K [0x6317, 
0x6417,

>> >> 0x6717)
>> >>   object [0x6317,0x6414e9f0,0x6417)
>> >>
>> >> Local Time = Mon Jun 19 09:27:56 2006
>> >>
>> >>
>> >> Peter Crowther wrote:
>> >> >> From: Rick Cockerham [mailto:[EMAIL PROTECTED]
>> >> >> Didn't work.  -3 doesn't kill it.
>> >> >>
>> >> >
>> >> > No.  It produces a thread dump, and the process carries on 
going.

>> >> Given
>> >> > that you were complaining about not wanting to restart Tomcat 
twice

>> >> > daily, I thought you'd appreciate a non-fatal solution :-).
>> >> >
>> >> >   - Peter
>> >> >
>> >> >
>> -
>> >> > To start a new topic, e-mail: users@tomcat.apache.org
>> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >> >
>> >> >
>> >>
>> >> --
>> >>
>> >> Rick Cockerham
>> >> Pocket Knife Software, Inc.
>> >> http://www.pocketknifesoftware.com
>> >> 512-249-0467
>> >>
>> >>
>> >> 
-

>> >> To start a new topic, e-mail: users@tomcat.apache.org
>>

Possible to send 503 status over JK?

2006-07-25 Thread Rick G
Hi All,
  I saw a similar question asked a while back about using a custom 503
errorpage, but never saw an answer.  I'm looking to, if a page is requested
for a webapp that has been stopped, instead of returning the canned Tomcat
503 Error page, to have it return a 503 status code instead so that you can
have Apache handle it and show a custom (pretty) error page.  

  It seems like on a 503, Tomcat generates its own 503 page and returns
status 200 so Apache doesn't know it needs to do something.  Some one please
correct me if I'm wrong and/or there is an easy solution to this.
Otherwise, anyone familiar or have a link with the standard processing
pipeline in tomcat 5.5.x and know the order of valve/filter execution that
can point me in the right direction?

Thanks for any help,
Rick G





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Problems with IE6, AJP1.3, Apache httpd and tomcat

2006-07-25 Thread Rick G
Hi Robert,
  I just wanted to say that I have been using the XMLHTTP object for about 7
years now (since IE 5x), and over the years have  used various versions of
tomcat, 4.x-5.0.x-5.5.12, with Apache 2.0.x using mod_jk for the connector
and do not recall every seeing the issues you are talking about, at least
not enough to be noticeable, but I'll have a look to see if I can see
anything of the sort.  As a note, currently using Tomcat 5.5.12, Apache
2.0.46, mod_jk 1.2.15.

-Rick

-Original Message-
From: Robert [mailto:[EMAIL PROTECTED] 
Posted At: Tuesday, July 25, 2006 8:57 AM
Posted To: Tomcat Dev
Conversation: Problems with IE6, AJP1.3, Apache httpd and tomcat
Subject: Problems with IE6, AJP1.3, Apache httpd and tomcat


Hello,

I am having some big difficulties using AJP.
Configuration:
(running on linux)
Apache HTTP Server 2.2.0
Jakarta Tomcat 5.5.7
mod_jk 1.2.14.1

I use AJP1.3 to forward requests from the HTTP Server to Tomcat using
standard settings.
Sometimes when using Internet Explorer 6 the requests seem to get stuck
somewhere. The requests arrive in the HTTP Server, but arrive at the Tomcat
server minutes later. And the body seems to have been stripped away when it
arrives in the servlet in Tomcat.
This only happens with Internet Explorer 6, and not in Mozilla Firefox. 
It also seems to happen when not sending requests for several minutes from
the browser. After one request has "failed" the next ones seem to work
again. Maybe it is relevant to note that the browser uses the XMLHTTP
component to send requests (ajax web application).

Using google I found a message in a mail archive. Not sure if it basically
is the same problem, but it sounded similar.

http://mail-archives.apache.org/mod_mbox/tomcat-users/200301.mbox/%3C3E1F1EB
[EMAIL PROTECTED]

Does someone has some suggestions? Is it a bug in IE6 or mod_jk? How can I
fix it?
Any help is appreciated.

Robert.



-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Possible to send 503 status over JK?

2006-07-25 Thread Rick G
Hi Martin, doesn't the example you listed involve the webapp actually
running to return a 503 in a particular circumstance?  I'm trying to handle
a 503 when the webapp is actually stopped, by the manager app/JMX.  So
nothing code/config wise in the webapp would fix the problem that I can
think of, it would have to be a code/config change for tomcat itself.  This
is why I was looking for the default request handling pipeline order.

In my initial browsing of the code...
org.apache.ajp.RequstHandler::decodeRequest(Ajp13 ch, Ajp13Packet msg,
BaseRequest req) int
The comments for the return value say...
"@return 200 in case of a successful decoduing, 500 in case of error."
But I'm still reading

Again if anyone has any info that can point me in the right direction, I
would appreciate it.

-Rick




-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Posted At: Tuesday, July 25, 2006 9:01 AM
Posted To: Tomcat Dev
Conversation: Possible to send 503 status over JK?
Subject: Re: Possible to send 503 status over JK?


If you dont mind handling this programmatically..check out this Filter for
503 errors http://java.sun.com/developer/JDCTechTips/2001/tt0626.html
M-
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message -
From: "Rick G" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" 
Sent: Tuesday, July 25, 2006 11:21 AM
Subject: Possible to send 503 status over JK?


> Hi All,
>  I saw a similar question asked a while back about using a custom 503
> errorpage, but never saw an answer.  I'm looking to, if a page is
requested
> for a webapp that has been stopped, instead of returning the canned Tomcat
> 503 Error page, to have it return a 503 status code instead so that you
can
> have Apache handle it and show a custom (pretty) error page.  
> 
>  It seems like on a 503, Tomcat generates its own 503 page and returns
> status 200 so Apache doesn't know it needs to do something.  Some one
please
> correct me if I'm wrong and/or there is an easy solution to this.
> Otherwise, anyone familiar or have a link with the standard processing
> pipeline in tomcat 5.5.x and know the order of valve/filter execution that
> can point me in the right direction?
> 
> Thanks for any help,
> Rick G
> 
> 
> 
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat Connectors versioning

2006-07-25 Thread Rick G
Doing a directory list, puts them in alphabetical order, which isn't the
real order, just look at the dates..  Think of .5-.9 as .05 - .09. jk-1.2.15
is the latest.

Jk-1.2.05 
Jk-1.2.06
Jk-1.2.07
Jk-1.2.08
Jk-1.2.09
Jk-1.2.10 
Jk-1.2.11
etc

-Original Message-
From: Garthfield Carter [mailto:[EMAIL PROTECTED] 
Posted At: Tuesday, July 25, 2006 9:51 AM
Posted To: Tomcat Dev
Conversation: Tomcat Connectors versioning
Subject: Tomcat Connectors versioning


Hello,

Can someone explain the versioning system please. Here's the directory
lisitng from
http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/source/. The
latest stable build is jk-1.2.15 but what are the jk-1.2.5 -> jk-1.2.9
aren't these a greater build number than jk-1.2.15 or am I understanding the
versioning incorrectly?

Garthfield

[DIR] jk-1.2.10/30-Mar-2005 
07:38-  
[DIR] jk-1.2.11/28-Apr-2005 
19:21-  
[DIR] jk-1.2.12/07-May-2005 
12:14-  
[DIR] jk-1.2.13/16-May-2005 
08:07-  
[DIR] jk-1.2.14/11-Jul-2005 
17:17-  
[DIR] jk-1.2.15/23-Sep-2005 
13:33-  
[DIR] jk-1.2.5/ 26-Jul-2004 
11:41-  
[DIR] jk-1.2.6/ 30-Nov-2004 
14:47-  
[DIR] jk-1.2.8/ 13-Apr-2005 
14:03-  
[DIR] jk-1.2.9/ 29-Mar-2005 
07:40-  

-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Possible to send 503 status over JK?

2006-07-25 Thread Rick G
Martin,
 As for proxy servers, no I have not looked into that. But I don't think I
would want to add another layer to the mix just to have to parse all
requests for the off chance that the webapp is stopped.  Especially when
Tomcat knows that the webapp is unavailable, there should be a simple option
to set if Tomcat generates its own status pages or returns the proper http
status code so that said errors can be handled by apache instead.  It does
already properly return on a 500 application error.  Tomcat gives you its on
503 error page if the webapp is down, so it shouldn't be that big of a
stretch to have it just return a 503 status code so that apache can catch
it.  Again, I may be missing something, but I'm reading through the code now
to see if I can get it to return the 503 status code when applicable.  It
seems to me like this would be the correct behavior, at least when using a
front end web server.

-Rick 

-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED] Posted At: Tuesday, July
25, 2006 10:30 AM Posted To: Tomcat Dev
Conversation: Possible to send 503 status over JK?
Subject: Re: Possible to send 503 status over JK?


Rick-

Have you looked at proxy servers?
http://www.experts-exchange.com/Networking/Q_21679699.html

M-
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message -----
From: "Rick G" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" ; "'Martin Gainty'"
<[EMAIL PROTECTED]>
Sent: Tuesday, July 25, 2006 12:37 PM
Subject: RE: Possible to send 503 status over JK?


> Hi Martin, doesn't the example you listed involve the webapp actually
> running to return a 503 in a particular circumstance?  I'm trying to
handle
> a 503 when the webapp is actually stopped, by the manager app/JMX.  So
> nothing code/config wise in the webapp would fix the problem that I can
> think of, it would have to be a code/config change for tomcat itself.
This
> is why I was looking for the default request handling pipeline order.
> 
> In my initial browsing of the code...
> org.apache.ajp.RequstHandler::decodeRequest(Ajp13 ch, Ajp13Packet msg,
> BaseRequest req) int
> The comments for the return value say...
> "@return 200 in case of a successful decoduing, 500 in case of error."
> But I'm still reading
> 
> Again if anyone has any info that can point me in the right direction, I
> would appreciate it.
> 
> -Rick
> 
> 
> 
> 
> -Original Message-
> From: Martin Gainty [mailto:[EMAIL PROTECTED] 
> Posted At: Tuesday, July 25, 2006 9:01 AM
> Posted To: Tomcat Dev
> Conversation: Possible to send 503 status over JK?
> Subject: Re: Possible to send 503 status over JK?
> 
> 
> If you dont mind handling this programmatically..check out this Filter for
> 503 errors http://java.sun.com/developer/JDCTechTips/2001/tt0626.html
> M-
> *
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please
notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
> 
> 
> 
> - Original Message -
> From: "Rick G" <[EMAIL PROTECTED]>
> To: "'Tomcat Users List'" 
> Sent: Tuesday, July 25, 2006 11:21 AM
> Subject: Possible to send 503 status over JK?
> 
> 
>> Hi All,
>>  I saw a similar question asked a while back about using a custom 503
>> errorpage, but never saw an answer.  I'm looking to, if a page is
> requested
>> for a webapp that has been stopped, instead of returning the canned
Tomcat
>> 503 Error page, to have it return a 503 status code instead so that you
> can
>> have Apache handle it and show a custom (pretty) error page.  
>> 
>>  It seems like on a 503, Tomcat generates its own 503 page and returns
>> status 200 so Apache doesn't know it needs to do something.  Some one
> please
>> correct me if I'm wrong and/or there is an easy solution to this.
>> Otherwise, anyone familiar or have a link with the standard processing
>> pipeline in tomcat 5.5.x and know the order of valve/filter execution
that
>> can point me in the right direction?
>> 
&g

RE: Possible to send 503 status over JK?

2006-07-25 Thread Rick G
My reasoning was that Apache doesn't catch the 503, but it does catch a
500.. 

/etc/httpd/conf/httpd.conf

...
ErrorDocument   500 /notice.html
ErrorDocument   503 /notice.html
...


The 500 is caught correctly, but I always end up seeing the tomcat generated
error page for a 503.
I guess this could be a mod_jk or apache issue if you are saying that tomcat
is sending the right status code.

Questions:
 what version of tomcat you running?
 What version of apache?
 What connector? (jk/jk2/jk_proxy)

Thanks for your input,

-Rick

-Original Message-
From: Hassan Schroeder [mailto:[EMAIL PROTECTED] 
Posted At: Tuesday, July 25, 2006 3:55 PM
Posted To: Tomcat Dev
Conversation: Possible to send 503 status over JK?
Subject: Re: Possible to send 503 status over JK?


On 7/25/06, Rick G <[EMAIL PROTECTED]> wrote:

>   It seems like on a 503, Tomcat generates its own 503 page and 
> returns status 200

What makes you think this? I just stopped a webapp with the manager, tried
to load a page, and got (using LiveHttpHeaders) the Tomcat 503 page with the
expected status 503 header.

So there wouldn't seem to be a problem, eh?
--
Hassan Schroeder  [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Possible to send 503 status over JK?

2006-07-25 Thread Rick G
Hi Len,
   On your comments, I totally understand that you can't override the tomcat
503 error page in a standalone Tomcat set up, especially from a webapp that
isn't running. However, can you explain ...

> As long as Tomcat is running, the situation is the same as above. 
> JK and Apache pass Tomcat's error pages and status codes back 
> unchanged.  ErrorDocument declarations do not override Tomcat's 
> error pages.

I don't understand why Apache can't override it if it has the right status
code, isn't that the whole point of having a status code handler in
httpd.conf?  Just seems that if Apache can handle the 503 with Tomcat down,
that it shouldn't work any different with Tomcat running but with a webapp
down, as long as if its returning the same status code.

Thank you much for your feedback, 

Rick

-Original Message-
From: Len Popp [mailto:[EMAIL PROTECTED] 
Posted At: Tuesday, July 25, 2006 6:26 PM
Posted To: Tomcat Dev
Conversation: Possible to send 503 status over JK?
Subject: Re: Possible to send 503 status over JK?


The recent messages on this topic have confused me, so I've spent part of my
evening running some tests.
=
First, with Tomcat standalone:

Tomcat's default error pages can be overridden by an error-page declaration
in the webapp's web.xml. If there is no error-page declared, Tomcat uses its
default error page; it does *not* fall back to a "global" error page
declared in the ROOT webapp.

When a webapp is stopped, its error pages are not executed (obviously), so
Tomcat's default error pages are used.

Therefore it is not possible to override the 503 page when the webapp is
stopped. Tomcat always uses its default page.

In any case, the correct HTTP status code is returned to the browser.
=
With Tomcat behind Apache and mod_jk:

As long as Tomcat is running, the situation is the same as above. JK and
Apache pass Tomcat's error pages and status codes back unchanged.
ErrorDocument declarations do not override Tomcat's error pages.

When Tomcat is down (not just one webapp stopped, but Tomcat not running at
all), you obviously don't get a Tomcat error page. Apache generates the 503
error and uses its own error page. This page can be overridden by
ErrorDocument.

Again, the correct HTTP status codes are returned to the browser.

So, you can use a custom ErrorDocument to return a "Site Down" message if
Tomcat is down completely, but not if a webapp inside Tomcat is stopped.

These tests were done with Tomcat 5.5.17, Apache 2.0.55, JK 1.2.15.
--
Len

On 7/25/06, Hassan Schroeder <[EMAIL PROTECTED]> wrote:
> On 7/25/06, Rick G <[EMAIL PROTECTED]> wrote:
>
> > The 500 is caught correctly, but I always end up seeing the tomcat 
> > generated error page for a 503.
> > I guess this could be a mod_jk or apache issue if you are saying 
> > that tomcat is sending the right status code.
> >
> > Questions:
> >  what version of tomcat you running?
>
> that quick test was on 5.5.17 standalone just to confirm the correct 
> http header was being sent.
>
> --
> Hassan Schroeder  [EMAIL PROTECTED]
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, 
> e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Possible to send 503 status over JK?

2006-07-26 Thread Rick G
I'll do some looking when I have a chance to see if I can figure out what is
different between tomcats 503 and mod_jk's. Off the top of my head, the
Tomcat 503 is returning content (the generated error page), where I'm
guessing when tomcat is down and mod_jk returns the 503, there most likely
is no content returned.   Maybe I'll try recompiling tomcat to not generate
the error page content just to see if the behavior changes.

Thanks again for your input Len,

-Rick 

-Original Message-
From: Len Popp [mailto:[EMAIL PROTECTED] 
Posted At: Wednesday, July 26, 2006 6:21 AM
Subject: Re: Possible to send 503 status over JK?

I'm not sure why it works that way. I guess the idea is that if Tomcat has
generated an error page, Apache shouldn't mess with it.

When Tomcat is down the situation is different - the error comes from Apache
(mod_jk), not Tomcat, so Apache is reponsible for the status code and error
page.
--
Len

On 7/26/06, Rick G <[EMAIL PROTECTED]> wrote:
> Hi Len,
>On your comments, I totally understand that you can't override the 
> tomcat
> 503 error page in a standalone Tomcat set up, especially from a webapp 
> that isn't running. However, can you explain ...
>
> > As long as Tomcat is running, the situation is the same as above.
> > JK and Apache pass Tomcat's error pages and status codes back 
> > unchanged.  ErrorDocument declarations do not override Tomcat's 
> > error pages.
>
> I don't understand why Apache can't override it if it has the right 
> status code, isn't that the whole point of having a status code 
> handler in httpd.conf?  Just seems that if Apache can handle the 503 
> with Tomcat down, that it shouldn't work any different with Tomcat 
> running but with a webapp down, as long as if its returning the same
status code.
>
> Thank you much for your feedback,
>
> Rick
>
> -Original Message-
> From: Len Popp [mailto:[EMAIL PROTECTED] Posted At: Tuesday, July 
> 25, 2006 6:26 PM Posted To: Tomcat Dev
> Conversation: Possible to send 503 status over JK?
> Subject: Re: Possible to send 503 status over JK?
>
>
> The recent messages on this topic have confused me, so I've spent part 
> of my evening running some tests.
> =
> First, with Tomcat standalone:
>
> Tomcat's default error pages can be overridden by an error-page 
> declaration in the webapp's web.xml. If there is no error-page 
> declared, Tomcat uses its default error page; it does *not* fall back 
> to a "global" error page declared in the ROOT webapp.
>
> When a webapp is stopped, its error pages are not executed 
> (obviously), so Tomcat's default error pages are used.
>
> Therefore it is not possible to override the 503 page when the webapp 
> is stopped. Tomcat always uses its default page.
>
> In any case, the correct HTTP status code is returned to the browser.
> =
> With Tomcat behind Apache and mod_jk:
>
> As long as Tomcat is running, the situation is the same as above. JK 
> and Apache pass Tomcat's error pages and status codes back unchanged.
> ErrorDocument declarations do not override Tomcat's error pages.
>
> When Tomcat is down (not just one webapp stopped, but Tomcat not 
> running at all), you obviously don't get a Tomcat error page. Apache 
> generates the 503 error and uses its own error page. This page can be 
> overridden by ErrorDocument.
>
> Again, the correct HTTP status codes are returned to the browser.
>
> So, you can use a custom ErrorDocument to return a "Site Down" message 
> if Tomcat is down completely, but not if a webapp inside Tomcat is
stopped.
>
> These tests were done with Tomcat 5.5.17, Apache 2.0.55, JK 1.2.15.
> --
> Len
>
> On 7/25/06, Hassan Schroeder <[EMAIL PROTECTED]> wrote:
> > On 7/25/06, Rick G <[EMAIL PROTECTED]> wrote:
> >
> > > The 500 is caught correctly, but I always end up seeing the tomcat 
> > > generated error page for a 503.
> > > I guess this could be a mod_jk or apache issue if you are saying 
> > > that tomcat is sending the right status code.
> > >
> > > Questions:
> > >  what version of tomcat you running?
> >
> > that quick test was on 5.5.17 standalone just to confirm the correct 
> > http header was being sent.
> >
> > --
> > Hassan Schroeder  [EMAIL PROTECTED]
> >
> > 
> > - To start a new topic, e-mail: users@tomcat.apache.org To 
> > unsubscribe,
> > e-mail: [EMAIL PROTECTED]
> > For additiona

RE: Problems with IE6, AJP1.3, Apache httpd and tomcat

2006-07-26 Thread Rick G
Robert,
 Do you have some sample script/servlet that you can reliably reproduce the
issue that I could try?
If not, could you let me know a bit more about the operation, frequency of
the occurrence?

-Rick 

-Original Message-
From: Robert [mailto:[EMAIL PROTECTED] 
Posted At: Tuesday, July 25, 2006 2:29 PM
Subject: Re: Problems with IE6, AJP1.3, Apache httpd and tomcat


Rick G wrote:
> Hi Robert,
>   I just wanted to say that I have been using the XMLHTTP object for 
> about 7 years now (since IE 5x),
Strangely enough the problems do not occur when using IE7.



-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Solution] mod_jk: Could not find a worker for worker name=worker1

2006-09-27 Thread Rick Fisk
I was having a bit of trouble with mod_jk1.2.19 and virtual host
configuration in apache 2. 

 

I hope I can shed some light on what I discovered and put this question
to rest. The error message in the subject can be found all over the net
with no helpful responses.I know, I was having this problem and every
post about this problem led to a dead end. In re-stating the problem and
attempting to provide more clues, I found a solution but have no insight
into why this "fixes" the problem.

 

The goal is to hook up apache with tomcat via mod_jk such that I can
have separate domains pointing at distinct deployments in the webapps
directory. 

 

Thus pounding on http://it7.blah.com   would
connect via mod_jk to the tomcat app in ${tomcat.home}/webapps/it7 and
http://it8.blah.com   to
${tomcat.home}/webapps/it8

 

I had successfully configured Tomcat (5.5.16) and mod_jk as evidenced by
my working apps and the mod_jk.conf file that is generated under
${tomcat.home}/conf/auto/

 

The problem arose when configuring apache. My worker.properties file is
located in /etc/httpd/conf/worker.properties and tomcat references it
and apparently understands it well enough to create a mod_jk.conf file
which has a (visually) correct virtual host for every container app in
tomcat. This isn't exactly what I want however, so I am not using it
other than as evidence that parts of this configuration are working
properly.

 

With my configuration( See below), after restarting apache, the
following appears in the mod_jk.log file.

 

[Wed Sep 27 16:01:18 2006] [2867:63648] [debug]
jk_map_resolve_references::jk_map.c (638): Checking for references with
prefix worker. with wildcard (recursion1)

[Wed Sep 27 16:01:18 2006] [2867:63648] [debug]
build_worker_map::jk_worker.c (236): creating worker worker1

[Wed Sep 27 16:01:18 2006] [2867:63648] [debug]
wc_create_worker::jk_worker.c (141): about to create instance worker1 of
ajp13

 

[..]

 

[Wed Sep 27 16:01:18 2006] [2867:63648] [debug]
build_worker_map::jk_worker.c (236): creating worker inprocess

[Wed Sep 27 16:01:18 2006] [2867:63648] [error]
wc_create_worker::jk_worker.c (134): Unknown worker type jni for worker
inprocess --- Huh?

[Wed Sep 27 16:01:18 2006] [2867:63648] [error]
build_worker_map::jk_worker.c (256): failed to create worker inprocess

[Wed Sep 27 16:01:18 2006] [2867:63648] [debug]
close_workers::jk_worker.c (212): close_workers will destroy worker
worker1  <--- my worker is getting destroyed

[Wed Sep 27 16:01:18 2006] [2867:63648] [debug]
ajp_destroy::jk_ajp_common.c (2131): up to 10 endpoints to close

[Wed Sep 27 16:01:19 2006] [3052:63648] [debug] do_shm_open::jk_shm.c
(252): Shared memory is already open

 

[]

 

[Wed Sep 27 16:01:19 2006] [3052:63648] [debug] jk_handler::mod_jk.c
(1920): Into handler jakarta-servlet worker=worker1 r->proxyreq=0

[Wed Sep 27 16:01:19 2006] [3052:63648] [debug]
wc_get_worker_for_name::jk_worker.c (111): did not find a worker worker1

[Wed Sep 27 16:01:19 2006] [3052:63648] [info]  jk_handler::mod_jk.c
(2071): Could not find a worker for worker name=worker1

 

This message was originally to be a plea for help and in reviewing the
data and configuration, I discovered that the inprocess worker is in the
worker.properties sample file by default. 

 

worker.list=worker1,inprocess 

 

worker1 is ajp13 in the sample. The problem appears to be that
"inprocess" shouldn't be in the worker.list. When I remove the inprocess
worker from the list, I get the results I was after. It all appears to
work properly now.

 

 

 

Specific (broken) configuration is below. 

 




>From httpd.conf:

 

JkWorkersFile /etc/httpd/conf/workers.properties

# Where to put the JK logs

JkLogFile /var/log/httpd/mod_jk.log

# jk log level

JkLogLevel debug

# select the log format

JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

# JkOptions indicate to send SSL KEY SIZE,

JkOptions +ForwardKeySize +ForwardURICompat +ForwardDirectories

# JkRequestLogFormat set the request format

JkRequestLogFormat "%w %V %T"

 

 

In the Virtualhost container:

 



 

 alias / "/usr/local/tomcat/webapps/it7/"

 



   Options Indexes FollowSymLinks

   DirectoryIndex index.jsp



 



AllowOverride None

deny from all



 



AllowOverride None

deny from all



 

JkMount /*.jsp worker1

JkMount /*.action worker1

JkMount /*.vm worker1

JkMount /service/* worker1

 

 



 

worker.list=worker1,inprocess

 

worker.worker1.port=8009

worker.worker1.host=qe-app1.itn.hire.com

worker.worker1.type=ajp13

worker.worker1.lbfactor=1

worker.worker1.connection_pool_size=10

worker.worker1.connection_pool_timeout=600

worker.worker1.socket_keepalive=1

 

worker.loadbalancer.type=lb

worker.loa

RE: Tomcat logging problem

2006-10-03 Thread Rick Fisk
I tried your script both ways and it worked flawlessly on a CentOS 3.6
box.

I would take a look under which user the jvm is running after you start
your script. (ps -ef | grep java) If it is running as root then that
might indicate that something about the su command isn't working as
expected.

It also might be that you once ran the jvm as root and it isn't your
startup script at all but the fact that the log files were once created
with root ownership. Thus, subsequent tomcat invocations fail to write
to existing logs due to invalid permissions.

Have you tried removing the logs and running your startup script again?

Also, in my experience it would be better to add more checking to see
that the java vm has truly stopped in the restart logic. Java has to
unload everything at stop time and 10 seconds is not always enough. The
default shutdown.sh script will exit with a normal return code even if
the jvm is still running.

So, a good number of times, the listening ports will still be in use
when the start command is executed throwing lots of nasty exceptions. 

You could modify startup.sh so that it doesn't exit until the jvm is
stopped, or modify your 'sleep' statement such that it has process
checking logic that waits for some period of time for the jvm to exit
and if it fails kill it. 

The latter is more desirable since you will probably upgrade tomcat at
some point and do not want to risk losing your changes or having to
adapt them as the startup and shutdown scripts change over time.



-Original Message-
From: Tejas Dhedia [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 03, 2006 6:00 PM
To: users@tomcat.apache.org
Subject: Tomcat logging problem

Hi,
I am running tomcat 5.5.17 under opensuse 10.1 and my JVM version is
1.5.0_06. I am running my tomcat as a seperate tomcat user and starting
it
at boot time using the following script in /etc/init.d.

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

JAVA_HOME=/usr/lib/jvm/java
export JAVA_HOME
start_tomcat=/home/tomcat/apache-tomcat-5.5.17/bin/startup.sh
stop_tomcat=/home/tomcat/apache-tomcat-5.5.17/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



 I get following error output in my catalina.out file

java.util.logging.ErrorManager: 4
java.io.FileNotFoundException: /home/tomcat/apache-tomcat-5.5.17
/logs/localhost.2006-10-02.log (Permission denied)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.(FileOutputStream.java:177)
at java.io.FileOutputStream.(FileOutputStream.java:102)
at java.io.FileWriter.(FileWriter.java:61)
at org.apache.juli.FileHandler.open(FileHandler.java:256)
at org.apache.juli.FileHandler.(FileHandler.java:50)



java.util.logging.ErrorManager: 4
java.io.FileNotFoundException: /home/tomcat/apache-tomcat-5.5.17
/logs/admin.2006-10-02.log (Permission denied)
at java.io.FileOutputStream.openAppend(Native Method)
 .


java.util.logging.ErrorManager: 4
java.io.FileNotFoundException:
/home/tomcat/apache-tomcat-5.5.17/logs/host-
manager.2006-10-02.log (Permission denied)
at java.io.FileOutputStream.openAppend(Native Method)



As a result nothing is being logged.
On checking I found that the log files were being created with owner as
root
instead of tomcat.
Can someone please help me find where am i going wrong.

Thanks
Tejas

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat not serving pages

2006-10-08 Thread Rick Fisk
Tomcat doesn't run on port 80 by default, Mike. Try
http://localhost:8080/

-Original Message-
From: mike dorian [mailto:[EMAIL PROTECTED] 
Sent: Saturday, October 07, 2006 11:19 AM
To: users@tomcat.apache.org
Subject: Tomcat not serving pages

Hi,

Having a bit of a problem on running Tomcat on my Windows XP Home.
If I startup Apache server, and type http://localhost it will display
the 
webpage in /htdocs.
However, if I startup Tomcat server, and type http://localhost it
doesn't 
display /webapps/Hello.html

Would someone be kind enough to explain what I may have missed?

Thanks

_
Learn English via Shopping Game, FREE! 
http://www.linguaphonenet.com/BannerTrack.asp?EMSCode=MSN06-03ETFJ-0211E


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



can't access Tomcat 5 default home page from Windows PC's

2005-11-14 Thread Rick LOpez
HI,
 
I have installed Tomcat 5.5.12 on a Redhat Enterprise server 3 server and I can 
view the  default Tomcat home page, manager and admin at port 8080 when I view 
it from my server. The problem is I can't access this from any Windows PC's on 
the local network. However I can access the pages from other Linux or Apple 
PC's on the same network but no Windows PC's. This is a local network with no 
security issues to deal with.
 
Thanks for any insight into this problem.
 
Rick

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: can't access Tomcat 5 default home page from Windows PC's

2005-11-14 Thread Rick LOpez
Had done all the basic checks with no problems found. Tried changing the port 
to 80 in the server.xml file but I then couldn't access the home page from the 
server either so changed it back to 8080. On further testing found that I could 
use Firefox or Netscape browsers from the same WIndows PC's and could access 
the Tomcat pages successfully. XP firewall isn't enabled. Looking at IE 
settings now but changing security settings hasn't had any affects so far.
 
Thanks,
Rick

Hassan Schroeder <[EMAIL PROTECTED]> wrote:
Rick LOpez wrote:

> I have installed Tomcat 5.5.12 on a Redhat Enterprise server 3 server
> and I can view the default Tomcat home page, manager and admin at port
> 8080 when I view it from my server. The problem is I can't access this
> from any Windows PC's on the local network. However I can access the
> pages from other Linux or Apple PC's on the same network but no Windows
> PC's. 

So obviously not a Tomcat problem :-)

Have you done any basic network connectivity checks? Run ping, telnet,
telnet-to-server-port-8080 from a Windows box? Looked at the access
log on the server to see if any requests are showing up? Run Ethereal
or snoop or comparable to watch the network traffic?

Your Windows boxes probably have some sort of firewall in place that
intercepts requests to "non-standard" ports, like 8080; perhaps the
firewall software generates a log of rejected requests? Or maybe you
could just change the Connector to port 80 and see if that changes
the symptom...

FWIW, and good luck,
-- 
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com

dream. code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
 Yahoo! FareChase - Search multiple travel sites in one click.  

Re: can't access Tomcat 5 default home page from Windows PC's

2005-11-14 Thread Rick LOpez
OK it was something easy as I thought but overlooked. Had to type in http:// 
when using IE in order to get it to load. :-)

Rick LOpez <[EMAIL PROTECTED]> wrote:Had done all the basic checks with no 
problems found. Tried changing the port to 80 in the server.xml file but I then 
couldn't access the home page from the server either so changed it back to 
8080. On further testing found that I could use Firefox or Netscape browsers 
from the same WIndows PC's and could access the Tomcat pages successfully. XP 
firewall isn't enabled. Looking at IE settings now but changing security 
settings hasn't had any affects so far.

Thanks,
Rick

Hassan Schroeder wrote:
Rick LOpez wrote:

> I have installed Tomcat 5.5.12 on a Redhat Enterprise server 3 server
> and I can view the default Tomcat home page, manager and admin at port
> 8080 when I view it from my server. The problem is I can't access this
> from any Windows PC's on the local network. However I can access the
> pages from other Linux or Apple PC's on the same network but no Windows
> PC's. 

So obviously not a Tomcat problem :-)

Have you done any basic network connectivity checks? Run ping, telnet,
telnet-to-server-port-8080 from a Windows box? Looked at the access
log on the server to see if any requests are showing up? Run Ethereal
or snoop or comparable to watch the network traffic?

Your Windows boxes probably have some sort of firewall in place that
intercepts requests to "non-standard" ports, like 8080; perhaps the
firewall software generates a log of rejected requests? Or maybe you
could just change the Connector to port 80 and see if that changes
the symptom...

FWIW, and good luck,
-- 
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com

dream. code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
Yahoo! FareChase - Search multiple travel sites in one click. 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

How to use dbcp connection pool with different driver versions

2006-01-02 Thread Rick Uks
Hi

Is it possible to configure two datasources using different versions of same
driver.
I have to communicate with Postgres 8 and also with Postgres 7.2.*.

driverClassName="org.postgresql.Driver" will use JDBC driver first visible
to classloader, can i do something about it other then writing my own
classloader?


Max


how to use datasource in a non-tomcat project?

2006-02-02 Thread Rick Col
Hi, guys:

I am stuck here with this problem. I created a Java
project on
Eclipse, the reason is I have to use my own framework
that won't
fit into a Tomcat project. But we are using Tomcat to
run our application. Now I have to create datasource
for Hibernate to use. If this is a tomcat project, I
can set up DB2 datasource in Tomcat's server.xml. But
it seems I cannot access this datasource set up in
server.xml and web.xml using Hibernate code or JDBC
code. I am wondering if there is a workaround for
this?

regards,

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to use datasource in a non-tomcat project?

2006-02-02 Thread Rick Col
Thanks, Mark:

Basic datasource is a good resource. This is really
pointing me to the right direction. 

--- Mark Shifman <[EMAIL PROTECTED]> wrote:

> You can use jakarta commons dbcp
> http://jakarta.apache.org/commons/dbcp/.
> There is a basic datasource and examples on how to
> create it.
> mas
> 
> Rick Col wrote:
> 
> >Hi, guys:
> >
> >I am stuck here with this problem. I created a Java
> >project on
> >Eclipse, the reason is I have to use my own
> framework
> >that won't
> >fit into a Tomcat project. But we are using Tomcat
> to
> >run our application. Now I have to create
> datasource
> >for Hibernate to use. If this is a tomcat project,
> I
> >can set up DB2 datasource in Tomcat's server.xml.
> But
> >it seems I cannot access this datasource set up in
> >server.xml and web.xml using Hibernate code or JDBC
> >code. I am wondering if there is a workaround for
> >this?
> >
> >regards,
> >
> >__
> >Do You Yahoo!?
> >Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> >http://mail.yahoo.com 
> >
>
>-
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >  
> >
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



duplicate WEB-INF folder created under base directory

2006-02-05 Thread Rick Col
Hi,

I am using Tomcat 4.1, and TomcatPlugin3.1 for Eclipse3.1.1. I created a Tomcat 
project, evert time I run tomcat, a duplicate folder created under base 
directory, and war file is not automatically unpacked. Another thing is: when I 
try to run my application, it was told all struts tld files cannot be found 
under WEB_INF. I am wondering if this is the compatibility problem? Even I use 
Tomcat 5.0.28, I got the same thing. Aan anyone give some pointers about this 
strange problem?

regards,


-
 Yahoo! Mail - Helps protect you from nasty viruses.

Re: duplicate WEB-INF folder created under base directory

2006-02-05 Thread Rick Col
Thanks for the reply, Mark.

Actually, WEB-INF folder name is correct, here I
copied 
the build location used for build target from
build.xml:


and build task works perfectly fine. 

And the following is part of unpacked war file
directory:
.
WEB-INF/
WEB-INF/classes/

WEB-INF/lib/log4j-1.2.6.jar
WEB-INF/lib/servlet.jar
WEB-INF/lib/struts.jar
WEB-INF/struts-bean.tld
WEB-INF/struts-config.xml
WEB-INF/struts-html.tld
WEB-INF/struts-logic.tld
index.jsp
WEB-INF/web.xml
..

Everything looks fine to me. 

When Tomcat 5.0.28 is used, it complains something
like this: web.xml in web application is missing. So I
switched to Tomcat 4.1, now I got this error:
org.apache.jasper.JasperException: File
"/WEB-INF/c.tld" not found
at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:105)


--- Mark Thomas <[EMAIL PROTECTED]> wrote:

> 1. Check your folder is called WEB-INF, not WEB_INF
> 2. Check the case inside the .war file is correct.
> It must be
> "WEB-INF", all in upper case.
> 
> HTH,
> 
> Mark
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: IE 20 session cookies limitation

2006-04-14 Thread Rick Wong
It's been a while since my last posting of this topic.  I have a 
work-around that perhaps someone may find it useful.


I worked around the issue by implementing a Tomcat Valve, and screen out 
for the jsessionsso cookie on every request.  If I find it, I reinsert 
it back into the response within the valve to touch the timestamp of the 
jssessionsso cookie.  This way, when IE wants to throw away a cookie, 
jsessionsso would be the last one it picks.  It's not a perfect solution 
but there is nothing I can do about IE's deficiency (how often do you 
see Microsoft rigidly conforms to a spec?)



Thanks,
--
Rick

Rick Wong wrote:

Hi,

I am using Tomcat 5.0.26.  I have 20+ web applications hooked up with 
single-sign-on.  Each web application generates a JESSIONID session 
cookie with a different path, and shares a single JSESSIONIDSSO.


When testing my suite of applications, I notice that IE consistently 
drops my login after accessing the 20th web application within a 
session.  I did some research and learned about RFC 2109 where HTTP 
agents should support a minimum of 20 session cookies per domain.  
That appears to be just what IE does.  The following Microsoft 
knowledgebase article explains that: 
http://support.microsoft.com/default.aspx?scid=kb;EN-US;306070.  I 
suspect JSESSIONIDSSO was the oldest cookie, and was the first to get 
dropped by IE when reaching over 20 session cookies.  Firefox does not 
have this problem.


Knowing that I cannot easily refactor the application suite to make 
less number of web application (< 19), I am wondering if anyone else 
has this problem, and if and how I might work around this IE limitation.


Thanks,
--
Rick

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: IE 20 session cookies limitation

2006-04-21 Thread Rick Wong

This is neat.  Thanks!
--
Rick

Peter Rossbach wrote:

Option is



Then all webapps share the same session id.

Cheers
Peter



Am 16.04.2006 um 15:12 schrieb Tim Funk:

Check the docs - there is an option that will allow tomcat to use the 
same jsessionid for all webapps.


-Tim

Rick Wong wrote:

It's been a while since my last posting of this topic.  I have a 
work-around that perhaps someone may find it useful.
I worked around the issue by implementing a Tomcat Valve, and screen 
out for the jsessionsso cookie on every request.  If I find it, I 
reinsert it back into the response within the valve to touch the 
timestamp of the jssessionsso cookie.  This way, when IE wants to 
throw away a cookie, jsessionsso would be the last one it picks.  
It's not a perfect solution but there is nothing I can do about IE's 
deficiency (how often do you see Microsoft rigidly conforms to a spec?)

Thanks,
--Rick
Rick Wong wrote:

Hi,

I am using Tomcat 5.0.26.  I have 20+ web applications hooked up 
with single-sign-on.  Each web application generates a JESSIONID 
session cookie with a different path, and shares a single 
JSESSIONIDSSO.


When testing my suite of applications, I notice that IE 
consistently drops my login after accessing the 20th web 
application within a session.  I did some research and learned 
about RFC 2109 where HTTP agents should support a minimum of 20 
session cookies per domain.  That appears to be just what IE does.  
The following Microsoft knowledgebase article explains that: 
http://support.microsoft.com/default.aspx?scid=kb;EN-US;306070.  I 
suspect JSESSIONIDSSO was the oldest cookie, and was the first to 
get dropped by IE when reaching over 20 session cookies.  Firefox 
does not have this problem.


Knowing that I cannot easily refactor the application suite to make 
less number of web application (< 19), I am wondering if anyone 
else has this problem, and if and how I might work around this IE 
limitation.


Thanks,
--Rick

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Custom HTTP 503 Error Page Not Working - Tomcat 5.5.15

2006-05-12 Thread Rick G
 Just wondering if anyone has solved this, I have been having the same
issue.  I basically just need Tomcat to send the 503 message through the JK
connector so Apache can handle it instead of Tomcat returning its own 503
message.  The intended goal is to have apache display a static "maintenance"
page if the web-app is stopped, instead of tomcat returning its own
generated 503 response.

Thanks for any info,

-Rick

-Original Message-
From: Yue Mu [mailto:[EMAIL PROTECTED] 
Posted At: Saturday, February 04, 2006 11:59 PM
Posted To: Tomcat Dev
Conversation: Custom HTTP 503 Error Page Not Working - Tomcat 5.5.15
Subject: RE: Custom HTTP 503 Error Page Not Working - Tomcat 5.5.15


Thanks, Chuck.
   
  In my case, the default servlet/container DID send the HTTP 503 error
back, displaying the error with the Tomcat default 503 error page, instead
of the custom error page.

  I also did a small experiment by removing the web application all
together. In this case, the container returns the custom 404 error page
which is correct since the web app is permanently unavailable.
   
  So I think Tomcat does the right thing for the most part, with the
exception that it fails to pick up the custom error page, unless I missed
something with configuration.
   
  Thanks,
  ym
  
"Caldarale, Charles R" <[EMAIL PROTECTED]> wrote:
  > From: Yue Mu [mailto:[EMAIL PROTECTED] 
> Subject: RE: Custom HTTP 503 Error Page Not Working - Tomcat 5.5.15
> 
> If the sendError method is called on the response,

I think the above clause lets the container off the hook, since the app code
could not have used the sendError method (since the app was disabled). It
would seem a bit risky for the container to be looking at any configuration
data or other resources of a disabled app, since that information may well
be in a state of flux.

- 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Brings words and photos together (easily) with  PhotoMail  - it's free and
works with Yahoo! Mail.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: You must specify a valid --with-apxs path

2006-05-15 Thread Rick G
Well, did you verify apxs is in the folder you have specified, apxs is
installed with the  httpd-devel package/rpm. 

-Original Message-
From: MOURANI Gerhard [mailto:[EMAIL PROTECTED] 
Posted At: Monday, May 15, 2006 8:10 AM
Posted To: Tomcat Dev
Conversation: You must specify a valid --with-apxs path
Subject: You must specify a valid --with-apxs path


Dear All,
 
I'm trying to install jakarta-tomcat-connectors version 1.2.15 on RH
Enterprise Linux 4 where my apxs is located under ->
/home/svc_web/webserver/bin/apxs and I'me getting the following error
message durring compile time:
 
need to check for Perl first, apxs depends on it...
checking for perl... /usr/bin/perl
could not find /home/svc_web/webserver/bin/apxs
configure: error: You must specify a valid --with-apxs path
 
Here my configure option -> ./configure
--with-apxs=/home/svc_web/webserver/bin/apxs
 
Someone know why this happen and how to fix it for the compilation to
success?
 
Gerhard,


This electronic mail transmission is confidential and may contain privileged
information. It is intended only for the person to whom it is addressed. Any
unauthorized dissemination, distribution or copying is strictly prohibited.
If you have received this transmission in error, please delete it
immediately and notify us by return e-mail at the above address.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



TC 5.5.12 w/ APR 1.2.2 , APR Not Found

2006-06-07 Thread Rick G
Hi All,
  After upgrading to TC 5.5.15 with APR 1.2.7 (tcnative 1.1.1) we started
having some various issues that don't seem to be fixed in 5.5.17, so we
decided to go back to 5.5.12 for the time being.  However, we now have an
issue getting 5.5.12 to see APR.  With a clean install of tomcat 5.5.12 and
a fresh compile of APR 1.2.2 and a fresh compile of tcnative 1.1.0, we get
the following when starting tomcat...

"The Apache Portable Runtime which allows optimal performance in production
environments was not found on the java.library.path: /usr/local/apr/lib"

/usr/local/apr/lib contains the following files (all of which were just
created by the new compiles)...
apr.exp
libapr-1.a
libapr-1.la
libapr-1.so -> libapr-1.so.0.2.2
libapr-1.so.0 -> libapr-1.so.0.2.2
libapr-1.so.0.2.2
libtcnative-1.a
libtcnative-1.la
libtcnative-1.so -> libtcnative-1.so.0.2.2 libtcnative-1.so.0 ->
libtcnative-1.so.0.2.2
libtcnative-1.so.0.2.2
pkgconfig

Anyone know what the issue could be since the APR and tcnative files ARE in
the right folder?  Did upgrading to 1.2.7 (1.1.1) change some other files
outside of the /usr/local/apr folder that need to be reverted back tot the
1.2.2 version?

The server is running RedHat Enterprise 3 ES

Thanks for any help,

Rick



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5.5 Regular Expression as servlet-mapping url-pattern

2006-10-27 Thread Rick Fisk
Have you tried using getServletContext()?
(http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletC
ontext.html)


We use this as a means to find and match our properties (stored in a
common property container directory by context) since we deploy multiple
instances of the same app for different customers. This allows us to
deploy for a new customer merely by adding a properties directory for
the customer and re-naming the war file to match this. At startup, we
ask for our context, look up our properties and then assume that all url
mapping will direct to //

Is this even relevant to your question? :-)

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
ben short
Sent: Friday, October 27, 2006 8:35 AM
To: Tomcat Users List
Subject: Tomcat 5.5 Regular Expression as servlet-mapping url-pattern

Hi is it possible to use a regular expression as a servlet-mappings
url-pattern?

Ben

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Very basic web server hosting question

2006-10-30 Thread Rick Fisk
The point is, whether you were using Apache, IIS, or Tomcat, the problem
you are trying to resolve is generic and not related to tomcat itself.
Thus, this probably isn't the proper forum to direct your question.

-Original Message-
From: CANADAFAST INC. [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 30, 2006 1:11 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: Very basic web server hosting question

I don't care if anyone finds this question interesting or not. I just
want a solution, if it were in the linksys manual then I would not have
posted the question, I tried solving the problem by calling the linksys
tech support, also  had a chat session with them, but they don't
understand the problem itself.
  

Pid <[EMAIL PROTECTED]> wrote:
  The reason no-one is finding this an interesting question is that it's
not really anything to do with Tomcat.

Your LinkSys router probably has a manual, or at least some basic
instructions for how to map external ports to the internal server.




CANADAFAST INC. wrote:
> Hello!
> 
> 
> I am a new tomcat 5.5 user. I have created some JSPs and they run
perfectly in my PC using tomcat.
> 
> I want to make my PC a webserver, so that ppl from outside can access
my JSPs through tomcat 5.5 running on my system.
> 
> My PC is connected to a router and my router is connected to a cable
modem which has a static ip address from my cable ISP.
> 
> But after that I don't know what to do further. How should I configure
my tomcat, so that ppl from outside can access my JSP website.
> 
> hOW SHOULD i access my pc from outside through my linksys router from
port 8080 in which tomcat is running on my pc.
> 
> 
> Thank you
> 
> 
> -
> Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 
-
We have the perfect Group for you. Check out the handy changes to Yahoo!
Groups.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Autodeploy fails

2006-11-15 Thread Rick Dettwyler
I have tomcat 5.5 working on both linux and Windows. I am using the
default configuration. When I copy a WAR file to webapps/, it will be 
autodeployed successfully but only the first time. If I "touch" that
same WAR file, the autodeploy will fail, as it leaves the 
webapps/[appname]/[appname].log file, which it cannot remove, and won't
deploy, as the target directory already exists. I have to 
stop tomcat, remove that file, then restart tomcat, touch the WAR file
again and only then will it autodeploy. What am I doing wrong? Thanks.

 

RDettwyler

 



RE: Autodeploy fails

2006-11-15 Thread Rick Dettwyler
Perhaps I did not explain well.

This is production. The file is jq.war. I copy jq.war to
{catalina_home}/webapps and autodeploy tries to remove the jq directory,
before it explodes the jq.war. It fails to do that and leaves behind
webapps/jq/jq.log. I have to stop tomcat, remove that log file, restart
tomcat. I thought that autodeploy would take care of that, but I guess
not.

Thanks,
Rick



-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 15, 2006 1:35 PM
To: Tomcat Users List
Subject: RE: Autodeploy fails

> From: Rick Dettwyler [mailto:[EMAIL PROTECTED] 
> Subject: Autodeploy fails
> 
> If I "touch" that same WAR file, the autodeploy will fail,
> as it leaves the webapps/[appname]/[appname].log file

Is your webapp writing to its own deployment directory?  If so, that's
really a bad idea.  What would happen if the .war were not expanded?

In any event, you could put in a listener for your webapp, and have it
close and remove the extra file you created.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Autodeploy fails

2006-11-15 Thread Rick Dettwyler
The log is created by tomcat and is not within the WAR file.

I will stop Tomcat, remove the directory and restart Tomcat, which will
deploy the WAR file, as autoDeploy doesn't seem to be able to do that
with Tomcat already running.

Thanks again,
Rick


-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 15, 2006 2:20 PM
To: Tomcat Users List
Subject: RE: Autodeploy fails

> From: Rick Dettwyler [mailto:[EMAIL PROTECTED] 
> Subject: RE: Autodeploy fails
> 
> Perhaps I did not explain well.

Your original description was fine.  Does the webapp create or update
the jq.log file?  (I assumed so, based on the the name.)  If so, that's
against the intent of the servlet spec, which expects webapps to be
independent of any file system and even runnable without a file system.

If you are in fact creating this file from within your webapp, then it's
your responsibility to remove it as part of stopping the webapp.  This
is why I suggested a listener to do the necessary cleanup.  See section
10 of the servlet spec if you're not familiar with them.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Autodeploy fails

2006-11-15 Thread Rick Dettwyler
I will look for that, which would help immensely.

Thanks again.

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 15, 2006 2:57 PM
To: Tomcat Users List
Subject: RE: Autodeploy fails

> From: Rick Dettwyler [mailto:[EMAIL PROTECTED] 
> Subject: RE: Autodeploy fails
> 
> The log is created by tomcat and is not within the WAR file.

Tomcat will not create files within deployment directories at its whim.
Sounds like you have a logging configuration *in your webapp* that's
causing the file to be created where it is.  That configuration should
be changed to put the log outside of the deployment directory; these
usually go in the$TOMCAT_HOME/logs directory.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Applet -> Servlet Communication Losing Session ID Crossing Firewall

2006-11-17 Thread Rick Strong

RE Tomcat 5, applet, servlet, firewall, other security.

Hi All,

Somewhat new to Applet/Servlet work, and in need of some assistance.

My app has an applet front end and a servlet back end. The user first 
contacts the servlet, which writes an HTTP response back including an 
APPLET tag, passing the JSESSIONID gotten from the session as a PARAM 
tag for the applet. In the applet, I rewrite the server's URL and append 
";jsessionid=[the session id]" before using the URL to communicate via a 
URLConnection, so that the server knows that this is still the same 
session.


This works fine as long as everyone is on one side or the other of the 
firewall, but when I put the server behind the firewall, trying to talk 
to it from outside the firewall fails (HTTP error 500) Upon debugging 
this setup, I noticed that the requestedSessionID is consistently null, 
where it normally picks up the session id I supply in the APPLET tag.


My network keepers assure me that the firewall is not blocking cookies, 
there are no proxies or NATs or anything in the way, but I'm losing the 
requested session id and as a result the server thinks that the reply 
from the applet is a request for a new session...which kills the app. Argh.


Any ideas as to how I can figure out what is mangling my applet's 
requests across the firewall? Any information very much appreciated!


Rick Strong


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Version question

2006-11-29 Thread rick . edwards
Hi Everyone

I have a version of nsapi_redirector.so which I'm using to pass requests 
from my iPlanet webserver on to a tomcat appserver.  I have no idea what 
version of connector this is and I'd really like to know.  It's working 
fine, so I have no complaints.  The resource who introduced this to our 
environment has since left the company and left little documentation as to 
what he did.  Is there a way to find the version of my 
nsapi_redirector.so?

TIA
Rick





NOTICE:  This confidential e-mail message is only for the intended 
recipient(s). If you are not the intended recipient, be advised that 
disclosing, copying, distributing, or any other use of this message, is 
strictly prohibited. In such case, please destroy this message and notify 
the sender.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Differences When Starting Tomcat (5.5) as a Windows Service vs User Pgm?

2007-03-15 Thread Rick Strong

Greetings,

I have a servlet running happily in Tomcat 5.5 on a Windows 2003 Server 
when Tomcat is started as a user program. However, when I start it as a 
Windows service it seems to miss values from a properties file I keep in 
Tomcat/bin, and the servlet dies the death of a thousand 
NullPointerExceptions. Does the default directory change when running as 
a service? Anything else I should know? Any FAQs on this?


Thanks,

Rick Strong

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: changing the name of tomcat homedir - impact?

2007-04-18 Thread Rick Fisk
You can name it anything you want. I have never once installed tomcat
under its default directory name and have never had any problems arise
from the practice.

-Original Message-
From: Christoph P. Kukulies [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 18, 2007 5:38 AM
To: [EMAIL PROTECTED]
Subject: changing the name of tomcat homedir - impact?

I have TOMCAT_HOME=C:\Programme\Apache_Group\Tomcat 6.0

You see the crux? Blank in Tomcat 6.0.
Some applications, like mvnForum (www.mvnForum.com) claim in the 
README or INSTALL instructions that a blank character in the PATH should
be
avoided (Windows) because of possible unexpected or erroneous behaviour
resulting from that.

Now, after I had in stalled OpenCMS, Tomcat, MySQL and such and
everything 
is working, I'm asking myself if it would just be sufficient to
rename that directory node, change the evironment variable, and done
with it.

Or would I have to expect surprises from elsewhere?
--
Chris Christoph P. U. Kukulies kuku_at_kukulies.org

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tip: SSL & upgrading to Tomcat 6.0

2007-11-13 Thread Rick Archibald
We decided to upgrade from Tomcat 5.0 to 6.0.  I copied the pertinent
pieces in the server.xml file, but I couldn't get the SSL to work
properly.  After tweaking it a bit, I realized that there were
additional parameters in the SSL connector.  After adding
protocol="HTTP/1.1" and SSLEnabled="true", the SSL started working
correctly.  

 

HTH,

 

Rick Archibald



tomcat5_security problem

2008-01-22 Thread Rick Knight

Hello list,

I have a problem with Tomcat5 running on Kubuntu 7.04. The default 
configuration with "tomcat5_security=yes" does work, but I need to set 
"tomcat5_security=no" for a particular application, Ilient SysAid. When 
I set "tomcat5_security=no" tomcat will not start. Can someone suggest a 
solution for this?


Thanks,
Rick

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat hangs on SATA Linux server

2008-03-19 Thread Rick Fincher

Hi All,

We have a web app running on Tomcat that accesses Oracle via JDBC on a 
Linux server (Centos 4.5) .  The web app runs fine on one server but but 
locks up or hangs for 20-30 second periods on a Dell sever running with 
SATA storage.


I only mention SATA because that is the only significant difference 
between the two servers.


Anyone have a clue what is causing this?


Thanks!

Rick



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Refreshing Tomcat After Replacing Webapp Classes

2008-03-21 Thread Rick Strong
Setup: Tomcat 5.5, server OS is Red Hat; development/client environment 
is Eclipse on Mac OS X 10.4.11.


I've been noting that when I make changes to my webapp code and export 
the classes to the server, changes take quite a while to take effect. 
The amount of refreshing I have to do is more than I would have 
expected, and I wonder if I'm missing something. The context is defined 
as reloadable=true. Changing servlet code (or any classes it depends on) 
doesn't automatically refresh the app. Turning the server off and on 
again may or may not work. I have better (but not great) results 
deleting the classes to be modified, then starting/stopping, then adding 
the modified classes, then starting again. In Eclipse, remote debugging 
gets out of sync  - I can see the debugger tracing through phantom lines 
of code that were current before the last editing session.


This is making development very slow and frustrating - the steps I have 
to go through seem excessive, and I get the feeling that I'm missing 
something.


Thanks for any information!

Rick Strong


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



error message, can you tell me where I went wrong

2008-05-22 Thread Rick Simpson
I am new to Tomcat and I am trying to setup a new 2003 server to replace
an existing 2k server. I have downloaded the Tomcat 5.5 and installed.
When I get it installed it says it is stopped and when trying to start
just goes back to stopped. I have tried to look at all the faq and tried
to compare old server to new. I am sure it is someting that I am
missing. I have created an environamental variable called JAVA_HOME with
a path pointing to the JDK folder. I have also uninstalled and
reinstalled Tomcat 4.1 with same results. The log in Jakarta for both
versions says [174 javajni.c] [error] the specified module could not be
found. [986 prunsrv.c] [error] failed creating java c:\program
Files\java\jre1.6.0_06\bin\client\jvm.dll. This file does exist in this
location. As an additional note when I load version 4.1 I can start
Tomcat using the startup.bat file, and get to the tomcat default page on
server, but taskbar icon still shows Tomcat stopped.
Thanks for any help you can provide.
 

Rick Simpson
Insl-x
308 Old County Road
Edgewater, FL 32132
T/386-428-6461, x164
F/386-427-7130
Email:  [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>  

 

 

===
This e-mail is intended only for the use of the addressees.  Any copying, 
forwarding, printing or 
other use of this e-mail by persons other than the addressees is not 
authorized.  
This e-mail may contain information that is privileged, confidential and exempt 
from disclosure.  
If you are not the intended recipient, please notify us immediately by return 
e-mail 
(including the original message in your reply) and then delete and discard all 
copies of the e-mail.  




RE: error message, can you tell me where I went wrong

2008-05-22 Thread Rick Simpson
Thanks everyone for the responses. I added the msvcr71.dll to the Tomcat
bin file and it fixed my problems. THANKS 

-Original Message-
From: Chris Stewart [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 22, 2008 11:23 AM
To: Tomcat Users List
Subject: Re: error message, can you tell me where I went wrong

Chuck,

Randomly throwing around versions of DLLs is not the answer to this
problem.  I had the exact issue as the original poster described and
what I posted solved my issue. What fixes the issue is putting the
msvcr71.dll file in the system32 directory on the machine.  Of course
this isn't a wise choice when simply adding the Java bin directory to
your PATH will work just fine.

Chris Stewart
[EMAIL PROTECTED]



On May 22, 2008, at 11:13 AM, Caldarale, Charles R wrote:

>> From: Chris Stewart [mailto:[EMAIL PROTECTED]
>> Subject: Re: error message, can you tell me where I went wrong
>>
>> The JAVA_HOME\bin directory needs to be added to the PATH variable on

>> your machine.
>
> The above is useless - Tomcat is being run as a service, so there is 
> no PATH in effect.
>
>>> I have created an environamental variable called JAVA_HOME with a 
>>> path pointing to the JDK folder.
>
> Also a waste of time when running Tomcat as a service.
>
>>> The log in Jakarta for both versions says
>>> [174 javajni.c] [error] the specified module could not be found.
>
> You may well be missing a .dll file that the service launcher needs; 
> find a copy of msvcr71.dll and put it in Tomcat's bin directory and 
> see if that fixes the problem.
>
>>> java\jre1.6.0_06\bin\client\jvm.dll
>
> You probably want to use the server version of the JVM.  Use the 
> tomcat5w.exe program to change that.
>
> - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, 
> e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


===
This e-mail is intended only for the use of the addressees.  Any copying, 
forwarding, printing or 
other use of this e-mail by persons other than the addressees is not 
authorized.  
This e-mail may contain information that is privileged, confidential and exempt 
from disclosure.  
If you are not the intended recipient, please notify us immediately by return 
e-mail 
(including the original message in your reply) and then delete and discard all 
copies of the e-mail.  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Moving a site

2008-05-22 Thread Rick Simpson
Another question, that I am sure I am just over looking something
simple. I need to move a folder from old server to new server for a
sales website. I know I am missing something obvious but I have tried
serveral ways and none seem to work. Is there some magic. I have copied
the folder into the Tomcat web application manager, under the root. I
can see the file on the manager page but when I try to click on it I get
an error The requested source is not available. I started with little
hair and this is taking the rest. Thanks
 

Rick Simpson
Insl-x
308 Old County Road
Edgewater, FL 32132
T/386-428-6461, x164
F/386-427-7130
Email:  [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>  

 

 

===
This e-mail is intended only for the use of the addressees.  Any copying, 
forwarding, printing or 
other use of this e-mail by persons other than the addressees is not 
authorized.  
This e-mail may contain information that is privileged, confidential and exempt 
from disclosure.  
If you are not the intended recipient, please notify us immediately by return 
e-mail 
(including the original message in your reply) and then delete and discard all 
copies of the e-mail.  




RE: Moving a site

2008-05-22 Thread Rick Simpson
All 3 remaining hairs will thank you. 

Tomcat 5.5 Java JDK 1.6.0 Sever 2003

May 22, 2008 11:53:05 AM org.apache.catalina.core.StandardContext stop
INFO: Container
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/SalesPor
tal] has not been started
May 22, 2008 11:53:12 AM org.apache.catalina.core.StandardContext stop
INFO: Container
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/SalesPor
tal] has not been started
May 22, 2008 11:54:45 AM org.apache.catalina.core.StandardContext stop
INFO: Container
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/SalesPor
tal] has not been started
May 22, 2008 11:54:45 AM org.apache.catalina.startup.HostConfig
checkResources
INFO: Undeploying context [/SalesPortal]
May 22, 2008 11:55:24 AM org.apache.catalina.core.StandardContext
resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Program
Files\Apache Software Foundation\Tomcat 5.5\webapps\SalesPortal does not
exist or is not a readable directory 

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 22, 2008 2:36 PM
To: Tomcat Users List
Subject: Re: Moving a site

So you decided to take our hair as well .. :-)

Specifics please:

Tomcat version:
Java version:
OS:


Any relevant excerpts from the logs:

--David


===
This e-mail is intended only for the use of the addressees.  Any copying, 
forwarding, printing or 
other use of this e-mail by persons other than the addressees is not 
authorized.  
This e-mail may contain information that is privileged, confidential and exempt 
from disclosure.  
If you are not the intended recipient, please notify us immediately by return 
e-mail 
(including the original message in your reply) and then delete and discard all 
copies of the e-mail.  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Moving a site

2008-05-22 Thread Rick Simpson
David

I am sorry to sound like I don't know what I am doing but I don't. I can
open the rest of the folders in webapp folder from the manager just not
mine. The file I am moving came from version 4.1 of Tomcat, not sure if
that matters or not. 

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 22, 2008 3:02 PM
To: Tomcat Users List
Subject: Re: Moving a site

>
>
>SEVERE: Error starting static Resources
>java.lang.IllegalArgumentException: Document base C:\Program 
>Files\Apache Software Foundation\Tomcat 5.5\webapps\SalesPortal does 
>not exist or is not a readable directory
>


Can you post more of this ... like say a root cause?  Also can you
verify the existence of the webapp folder and check to be sure the
tomcat service has permission to read it?

--David


===
This e-mail is intended only for the use of the addressees.  Any copying, 
forwarding, printing or 
other use of this e-mail by persons other than the addressees is not 
authorized.  
This e-mail may contain information that is privileged, confidential and exempt 
from disclosure.  
If you are not the intended recipient, please notify us immediately by return 
e-mail 
(including the original message in your reply) and then delete and discard all 
copies of the e-mail.  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Moving a site

2008-05-22 Thread Rick Simpson
First
It is a 20 meg folder not a shortcut
Second
Local system has read permissions
Third
C:\Program Files\Apache Software Foundation\Tomcat
5.5\webapps\SalesPortal
Fourth sorry its so long but complete log

ay 22, 2008 11:50:43 AM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance
in production environments was not found on the java.library.path:
C:\Program Files\Apache Software Foundation\Tomcat
5.5\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WIND
OWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
May 22, 2008 11:50:44 AM org.apache.coyote.http11.Http11BaseProtocol
init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 22, 2008 11:50:44 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 547 ms
May 22, 2008 11:50:44 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 22, 2008 11:50:44 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.26
May 22, 2008 11:50:44 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
May 22, 2008 11:50:44 AM org.apache.coyote.http11.Http11BaseProtocol
start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 22, 2008 11:50:44 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
May 22, 2008 11:50:44 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/15  config=null
May 22, 2008 11:50:44 AM org.apache.catalina.storeconfig.StoreLoader
load
INFO: Find registry server-registry.xml at classpath resource
May 22, 2008 11:50:44 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 843 ms
May 22, 2008 11:53:05 AM org.apache.catalina.core.StandardContext stop
INFO: Container
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/SalesPor
tal] has not been started
May 22, 2008 11:53:12 AM org.apache.catalina.core.StandardContext stop
INFO: Container
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/SalesPor
tal] has not been started
May 22, 2008 11:54:45 AM org.apache.catalina.core.StandardContext stop
INFO: Container
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/SalesPor
tal] has not been started
May 22, 2008 11:54:45 AM org.apache.catalina.startup.HostConfig
checkResources
INFO: Undeploying context [/SalesPortal]
May 22, 2008 11:55:24 AM org.apache.catalina.core.StandardContext
resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Program
Files\Apache Software Foundation\Tomcat 5.5\webapps\SalesPortal does not
exist or is not a readable directory
at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.jav
a:141)
at
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.
java:3855)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4024
)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
va:760)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:9
26)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:519)
at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1231)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:458
)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown
Source)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
at
org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:139
4)
at
org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:81
2)
at
org.apache.catalina.manager.HTMLManagerServlet.deployInternal(HTMLManage
rServlet.java:252)
at
org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.
java:96)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:174)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
B

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



Trouble installing Tomcat.

2010-01-13 Thread Rick Bragg
Hi,

I have installed Tomcat, and I get the "It Works" page perfect, however,
when I try to go to the manager webapp I get the unauthorized 401 error.

I have the following in my conf/tomcat-users.xml file:




I am using Tomcat6 on Ubuntu.  Installed with apt-get.

What am I doing wrong?
Is there a log file somewhere I can look at?

Thanks
Rick




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



trouble connecting with mod_jk to my Tomcat "missing uri map for 127.0.0.1:"

2010-01-14 Thread Rick Hightower
leName .htaccess



Order allow,deny
Deny from all


DefaultType text/plain


HostnameLookups Off


ErrorLog /var/log/apache2/error.log

LogLevel debug


Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf

# Include all the user configurations:
Include /etc/apache2/httpd.conf

# Include ports listing
Include /etc/apache2/ports.conf


LogFormat "%v:%p %h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent


CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined


# Include generic snippets of statements
Include /etc/apache2/conf.d/

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/

-- 
Rick Hightower
http://www.google.com/profiles/RichardHightower


Re: Trouble installing Tomcat.

2010-01-14 Thread Rick Bragg
On Wed, 2010-01-13 at 22:49 +, Mark Thomas wrote:
> On 13/01/2010 22:48, Rick Bragg wrote:
> > Hi,
> > 
> > I have installed Tomcat, and I get the "It Works" page perfect, however,
> > when I try to go to the manager webapp I get the unauthorized 401 error.
> > 
> > I have the following in my conf/tomcat-users.xml file:
> > 
> > 
> > 
> 
> Might those elements be commented out?
> 
> Mark
> 


Thanks, it was just commented out...
rick




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



Re: trouble connecting with mod_jk to my Tomcat "missing uri map for 127.0.0.1:"

2010-01-14 Thread Rick Hightower
I had worker.worker1.host=127.0.0.0 when I meant to do
worker.worker1.host=127.0.0.1
My buddy Ed pointed it out.

I changed that, and I still get the same error.

I can access /hello context directly from Tomcat using localhost:8080/hello
or 127.0.0.1/hello <http://127.0.0.0/hello>. I'd like to be able to access
it through Apache2 from localhost/hello or
127.0.0.1/hello<http://127.0.0.0/hello>,
but I get a 404 and then the above trace message instead.


On Thu, Jan 14, 2010 at 2:52 PM, Rick Hightower
wrote:

> I am having some trouble connecting with mod_jk to my Tomcat instance. The
> requests seem to be processed by mod_jk but are never forwarded to Tomcat. I
> keep getting this trace message from mod_jk.log file "missing uri map for
> 127.0.0.1:/hello".
>
> (see formatted config listings at
> http://www.jroller.com/RickHigh/entry/problem_configuring_mod_jk_apache)
>
>
> I can access /hello context directly from Tomcat using localhost:8080/hello
> or 127.0.0.0/hello. I'd like to be able to access it through Apache2 from
> localhost/hello or 127.0.0.0/hello, but I get a 404 and then the above
> trace message instead.
>
> I get no errors in the Apache error.log or Tomcat logs or mod_jk.log. I
> just get a 404 and when I turn on tracing, I get the above message which
> indicates that mod_jk is alive and communicating with Apache, but not
> recognizing the URI I mapped for my worker.
>
> Here are the versions:
>
> Tomcat 6.0.20, mod_jk 1.2.28, Apache HTTPD 2.2.11, Ubuntu 9.0.9, java
> version "1.6.0_16"
>
>
> mod_jk.log log shown as follows:
>
> csmad...@csm-dev:/etc/apache2$ tail -n 5 -f  /var/log/apache2/mod_jk.log
> [Thu Jan 14 12:03:47 2010] [27585:3066162064] [debug]
> jk_map_to_storage::mod_jk.c (3579): missing uri map for 127.0.0.1:
> /examples
> [Thu Jan 14 14:15:19 2010] [27584:3066162064] [debug]
> jk_translate::mod_jk.c (3419): missing uri map for 127.0.0.1:/hello
> [Thu Jan 14 14:15:19 2010] [27584:3066162064] [debug]
> jk_map_to_storage::mod_jk.c (3579): missing uri map for 127.0.0.1:/hello
> [Thu Jan 14 14:15:19 2010] [27584:3066162064] [debug]
> jk_translate::mod_jk.c (3419): missing uri map for 127.0.0.1:/favicon.ico
> [Thu Jan 14 14:15:19 2010] [27584:3066162064] [debug]
> jk_map_to_storage::mod_jk.c (3579): missing uri map for 127.0.0.1:
> /favicon.ico
> __
>
>
> Included below is server.xml for tomcat, httpd.conf for Apache2,
> mod_jk.conf for Apache2, workers.properties for mod_jk,
> uriworkermap.properties.
>
> (I tried this with and without uriworkermap.properties.)
>
>
> Here is my server.xml setup for tomcat:
>
> csmad...@csm-dev:~/tools/tomcat/apache-tomcat-6.0.20/conf$ cat server.xml
>
> 
> 
>
>SSLEngine="on" />
>   
>/>
>className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
>
>
>   
>type="org.apache.catalina.UserDatabase"
>   description="User database that can be updated and saved"
>   factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
>   pathname="conf/tomcat-users.xml" />
>   
>
>
>   
>
> connectionTimeout="2"
>redirectPort="8443" />
>
>
> port="8443" minSpareThreads="5" maxSpareThreads="75"
>enableLookups="true" disableUploadTimeout="true"
>acceptCount="100"  maxThreads="200"
>scheme="https" secure="true" SSLEnabled="true"
>
> keystoreFile="/home/csmadmin/tools/tomcat/apache-tomcat-6.0.20/conf/certs/key.cert"
>keystorePass="corventis"
>clientAuth="false" sslProtocol="TLS"/>
>
>
> 
>
>
> 
>
>
> resourceName="UserDatabase"/>
>
>unpackWARs="true" autoDeploy="true"
> xmlValidation="false" xmlNamespaceAware="false">
>   
>modJk="/usr/lib/apache2/modules/mod_jk.so" />
> 
>   
> 
> Please notice that I have the Connector setup to 8009
>
> 
> Please also noticed that I have the listener configured.
>
>   modJk="/usr/lib/apache2/modules/mod_jk.so" />
>
>
> 
>
>
> Apache setup for mod_jk is as follows:
>
> httpd.conf
>
> csmad...@

  1   2   >