Re: 'wan' application in 5.5.25

2007-10-29 Thread Pid
Ankit Dangi wrote:
 Hi all,
 
 I was earlier using Apache Tomcat 5.5.20, and now am using 5.5.25. In the
 'webapps' directory, I created an application with the name as 'wan'. It
 works fine with .20, and doesn't work with .25. When I changed the name of
 my application from 'wan' to something else, only then it works on .25. Why
 is this happening? Has the term 'wan' kept as reserved in .25 version?
 

what do the logs say?
is there an error message?

p

-
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: 'wan' application in 5.5.25

2007-10-29 Thread Ankit Dangi
No, I don't see any error message which resembles the problem I was facing.
Even changelog didn't show any changes from .20 to .25 on an incremental
basis.

On 10/29/07, Pid [EMAIL PROTECTED] wrote:

 Ankit Dangi wrote:
  Hi all,
 
  I was earlier using Apache Tomcat 5.5.20, and now am using 5.5.25. In
 the
  'webapps' directory, I created an application with the name as 'wan'. It
  works fine with .20, and doesn't work with .25. When I changed the name
 of
  my application from 'wan' to something else, only then it works on .25.
 Why
  is this happening? Has the term 'wan' kept as reserved in .25 version?
 

 what do the logs say?
 is there an error message?

 p

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




-- 
Ankit Dangi


Re: Fix to Tomcat Jasper slow .tag compilation problem.

2007-10-29 Thread Peng Tuck Kwok
Would pre-compiling your jsp files help you instead? AFAIK that works on the
tags so you probably don't need to touch jspc.

On 10/29/07, Berglas, Anthony [EMAIL PROTECTED] wrote:

 As described in a previous post, Jasper is *extremely* slow at compiling
 .tag files packaged in a .jar.  Tens of seconds every time you touch a
 new .jsp for the first time.  Almost unusable if you use .tags
 extensively, as I do.

 The following few lines is a hack to fix this.  The added code is marked
 between //  AJB markers.  It effectively turns off the timestamp
 checking on .jar files.

 This does NOT actually introduce a bug.  There is an existing bug in
 that .jsp files are not automatically recompiled if any .tags in .jars
 are changed.  So you need to purge work in either case.  A proper fix
 would be to check dependencies properly, at least to the .jar file
 itself.  But the current fix is *much* better that the existing
 behavior.

 COULD SOMEBODY PLEASE ARRANGE FOR THIS CODE TO BE ADDED TO THE CURRENT
 SUBVERSION REPOSITORY?

 Outstanding is to make the compilation of .tags themselves much faster,
 not tens of seconds.  To do that one needs to call the Java compiler
 once at the end for all the .tags, rather than once for each individual
 .tag which is *much* slower.

 I must admit that I got rather lost reading the Jasper source, with all
 the contexts etc.  Some better comments on the classes describing their
 relationships to each other would be most helpful.

 Thanks,

 Anthony



 // Tomcat 6.0.10 Src deployed version.

 public class JspCompilationContext {...

 public void compile() throws JasperException, FileNotFoundException
 {
 createCompiler();

 //  begin AJB
 // Hack to stop .tag files that are packaged in .jars being
 recompiled for every single .jsp that uses them.
 // The hack means that .tag files will not be automatically
 recompiled if they change -- you need to delete work area.
 // But that was actually an existing bug -- .jsps are not
 dependent on the .tag .jars so the work area needed deleting anyway.
 // (Outstanding is to compile multiple .tags in one pass and so
 make the process Much faster.)
 boolean outDated;
 if (isPackagedTagFile) outDated = ! new
 File(getClassFileName()).exists();
 else outDated = jspCompiler.isOutDated();
 //AjbLog.log(### Compiler.compile  + jspUri +  pkgTagFile  +
 isPackagedTagFile +  outDated  + outDated +   + getClassFileName());
 if (outDated) {
 // if (isPackagedTagFile || jspCompiler.isOutDated()) {
 //  end AJB
 try {
 jspCompiler.removeGeneratedFiles();
 jspLoader = null;
 jspCompiler.compile();
 jsw.setReload(true);
 jsw.setCompilationException(null);
 } catch (JasperException ex) {
 // Cache compilation exception
 jsw.setCompilationException(ex);
 throw ex;
 } catch (Exception ex) {
 JasperException je = new JasperException(

 Localizer.getMessage(jsp.error.unable.compile),
 ex);
 // Cache compilation exception
 jsw.setCompilationException(je);
 throw je;
 }
 }
 }

 --
 Dr Anthony Berglas
 Ph. +61 7 3227 4410
 Mob. +61 44 838 8874
 [EMAIL PROTECTED]; [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]




Fix to Tomcat Jasper slow .tag compilation problem.

2007-10-29 Thread Berglas, Anthony
As described in a previous post, Jasper is *extremely* slow at compiling
.tag files packaged in a .jar.  Tens of seconds every time you touch a
new .jsp for the first time.  Almost unusable if you use .tags
extensively, as I do.

The following few lines is a hack to fix this.  The added code is marked
between //  AJB markers.  It effectively turns off the timestamp
checking on .jar files.

This does NOT actually introduce a bug.  There is an existing bug in
that .jsp files are not automatically recompiled if any .tags in .jars
are changed.  So you need to purge work in either case.  A proper fix
would be to check dependencies properly, at least to the .jar file
itself.  But the current fix is *much* better that the existing
behavior.

COULD SOMEBODY PLEASE ARRANGE FOR THIS CODE TO BE ADDED TO THE CURRENT
SUBVERSION REPOSITORY? 

Outstanding is to make the compilation of .tags themselves much faster,
not tens of seconds.  To do that one needs to call the Java compiler
once at the end for all the .tags, rather than once for each individual
.tag which is *much* slower.

I must admit that I got rather lost reading the Jasper source, with all
the contexts etc.  Some better comments on the classes describing their
relationships to each other would be most helpful.

Thanks,

Anthony



// Tomcat 6.0.10 Src deployed version.

public class JspCompilationContext {...

public void compile() throws JasperException, FileNotFoundException
{
createCompiler();

//  begin AJB
// Hack to stop .tag files that are packaged in .jars being
recompiled for every single .jsp that uses them.
// The hack means that .tag files will not be automatically
recompiled if they change -- you need to delete work area.
// But that was actually an existing bug -- .jsps are not
dependent on the .tag .jars so the work area needed deleting anyway.
// (Outstanding is to compile multiple .tags in one pass and so
make the process Much faster.)
boolean outDated;
if (isPackagedTagFile) outDated = ! new
File(getClassFileName()).exists();
else outDated = jspCompiler.isOutDated();
//AjbLog.log(### Compiler.compile  + jspUri +  pkgTagFile  +
isPackagedTagFile +  outDated  + outDated +   + getClassFileName());
if (outDated) {
// if (isPackagedTagFile || jspCompiler.isOutDated()) {
//  end AJB
try {
jspCompiler.removeGeneratedFiles();
jspLoader = null;
jspCompiler.compile();
jsw.setReload(true);
jsw.setCompilationException(null);
} catch (JasperException ex) {
// Cache compilation exception
jsw.setCompilationException(ex);
throw ex;
} catch (Exception ex) {
JasperException je = new JasperException(
 
Localizer.getMessage(jsp.error.unable.compile),
ex);
// Cache compilation exception
jsw.setCompilationException(je);
throw je;
}
}
}

--
Dr Anthony Berglas 
Ph. +61 7 3227 4410
Mob. +61 44 838 8874
[EMAIL PROTECTED]; [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]



What's up with admin application for Tomcat 6?

2007-10-29 Thread Grzegorz Borkowski

Hi all,
I tried Tomcat 6.0.10 when it was out - it was already several months 
ago. But when I tried to run Admin application, I got message it is no 
longer included by default, please download it separately - the same 
thing as in 5.5. Ok - but on 5.5 page, in downloads section, i have 
admin application. In 6.0 - I don't.
So I decided to wait a bit, I thought it is a matter of time to get this 
application for Tomcat 6.0.
But several months passed, and nothing happened - there is still no way 
to download Admin app for Tomcat 6.0! The most strange thing is that I 
can't find anything about this in Tomcat documentation, on network, on 
forums etc - no information about Admin application for 6.0!
So what's wrong with Admin app? Is it going to be released or not? Very 
sad if not, it was quite useful piece of software. Anyway, almost any 
server has some admin console like this.

Regards,
Greg


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



Creating files dynamically and antiJarLocking

2007-10-29 Thread Milanez, Marcus
Hi all,
 
In my web project, I dynamically create JSP files in some ocasions.
These files are placed under my web application folder and only works
well if I don't use antiJarLocking='true' and
antiResourcesLocking='true'. In this case, my files are created
correctely, but I just can't reach them using their URLs. Tomcat returns
me a 404 error, just like if my pages weren't placed there. I know that
when we use antiJarLocking and antiResourcesLocking, all my war files
are unpacked under temp folder, and I suppose I should place my
dynamically created files there too right? Am I right? The only problem
is, Tomcat seems to create temp directories using a sequential number
preceding the folder name... Do I have acces to the most recent created
tempo directory?
 
thanks in advance,
 
Marcus Milanez


RE: 'wan' application in 5.5.25

2007-10-29 Thread Caldarale, Charles R
 From: Ankit Dangi [mailto:[EMAIL PROTECTED] 
 Subject: Re: 'wan' application in 5.5.25
 
 In the 'webapps' directory, I created an application 
 with the name as 'wan'. It works fine with .20, and
 doesn't work with .25.

I have no problem running a simple webapp named 'wan' on 5.5.25.

What do you mean by doesn't work?  You're not providing much
information (e.g., error message, stack trace).

Did you install 5.5.25 on top of 5.5.20?  If so, did you clean out the
temp and work directories before starting Tomcat?

 - Chuck


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

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



RE: Application state in ServletContext

2007-10-29 Thread Caldarale, Charles R
 From: lightbulb432 [mailto:[EMAIL PROTECTED] 
 Subject: Application state in ServletContext
 
 The code cannot directly touch the ServletContext class,
 but may do so through an interface (shown below).
 
 public class ApplicationState {
   private static MapString,Object stateValues;
   public static Object getStateValue(String key) {
 return stateValues.get(key);
 // return servletContext.getAttribute(key);
   }
 }

The above is not an 'interface' - it's a real class with a real
implementation.  Also, contrary to your preceding statement, it does not
access the ServletContext, since that line is commented out.  Due to the
inconsistencies in your message, I don't think your questions can be
answered.

You should be concerned about synchronization, since Map (which actually
is an interface) is not synchronized, although certain implementations
of it are (e.g., Hashtable).

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



Exception in thread HttpProcessor[8080][2] java.lang.NullPointerException

2007-10-29 Thread Janeve George

Hi,

We are frequently getting following exception while running the tomcat 
server.


Exception in thread HttpProcessor[8080][7] java.lang.NullPointerException
   at 
org.apache.catalina.connector.http.HttpResponseStream.checkHead(HttpResponseStream.java:253)
   at 
org.apache.catalina.connector.http.HttpResponseStream.init(HttpResponseStream.java:104)
   at 
org.apache.catalina.connector.http.HttpResponseImpl.createOutputStream(HttpResponseImpl.java:220)
   at 
org.apache.catalina.connector.ResponseBase.getOutputStream(ResponseBase.java:725)
   at 
org.apache.catalina.connector.ResponseBase.finishResponse(ResponseBase.java:469)
   at 
org.apache.catalina.connector.HttpResponseBase.finishResponse(HttpResponseBase.java:236)
   at 
org.apache.catalina.connector.http.HttpResponseImpl.finishResponse(HttpResponseImpl.java:288)
   at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1039)
   at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)

   at java.lang.Thread.run(Thread.java:595)
Exception in thread HttpProcessor[8080][8] java.lang.NullPointerException
   at 
org.apache.catalina.connector.http.HttpResponseStream.checkHead(HttpResponseStream.java:253)
   at 
org.apache.catalina.connector.http.HttpResponseStream.init(HttpResponseStream.java:104)
   at 
org.apache.catalina.connector.http.HttpResponseImpl.createOutputStream(HttpResponseImpl.java:220)
   at 
org.apache.catalina.connector.ResponseBase.getOutputStream(ResponseBase.java:725)
   at 
org.apache.catalina.connector.ResponseBase.finishResponse(ResponseBase.java:469)
   at 
org.apache.catalina.connector.HttpResponseBase.finishResponse(HttpResponseBase.java:236)
   at 
org.apache.catalina.connector.http.HttpResponseImpl.finishResponse(HttpResponseImpl.java:288)
   at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1039)
   at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)

   at java.lang.Thread.run(Thread.java:595)
Exception in thread HttpProcessor[8080][9] java.lang.NullPointerException
   at 
org.apache.catalina.connector.http.HttpResponseStream.checkHead(HttpResponseStream.java:253)
   at 
org.apache.catalina.connector.http.HttpResponseStream.init(HttpResponseStream.java:104)
   at 
org.apache.catalina.connector.http.HttpResponseImpl.createOutputStream(HttpResponseImpl.java:220)
   at 
org.apache.catalina.connector.ResponseBase.getOutputStream(ResponseBase.java:725)
   at 
org.apache.catalina.connector.ResponseBase.finishResponse(ResponseBase.java:469)
   at 
org.apache.catalina.connector.HttpResponseBase.finishResponse(HttpResponseBase.java:236)
   at 
org.apache.catalina.connector.http.HttpResponseImpl.finishResponse(HttpResponseImpl.java:288)
   at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1039)
   at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)

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

We are having no clue of why this exception is being frequently thrown.

Our server is frequently crashing due to this. It would be really 
appreciated if anybody could shed some light on resolving this issue???


Thanks in advance.

Warm regards,
Janeve George

-
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: Exception in thread HttpProcessor[8080][2] java.lang.NullPointerException

2007-10-29 Thread Caldarale, Charles R
 From: Janeve George [mailto:[EMAIL PROTECTED] 
 Subject: Exception in thread HttpProcessor[8080][2] 
 java.lang.NullPointerException
 
 We are having no clue of why this exception is being 
 frequently thrown.

Don't suppose you'd care to supply some useful information:

1) Tomcat version

2) JRE/JDK version and vendor

3) platform of interest

Blindly posting a stack trace doesn't help much without some context.

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



Re: Exception in thread HttpProcessor[8080][2] java.lang.NullPointerException

2007-10-29 Thread Janeve George

Hi Chuck,

Pardon me for any confusion created due to my previous post. Following 
are the details of the deployment.


Tomcat version: 4.0.3
JDK: Sun's jdk 1.5.0
Platform: Linux

Regards,
Janeve

Caldarale, Charles R wrote:

From: Janeve George [mailto:[EMAIL PROTECTED] 
Subject: Exception in thread HttpProcessor[8080][2] 
java.lang.NullPointerException


We are having no clue of why this exception is being 
frequently thrown.
   



Don't suppose you'd care to supply some useful information:

1) Tomcat version

2) JRE/JDK version and vendor

3) platform of interest

Blindly posting a stack trace doesn't help much without some context.

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

2007-10-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

BS,

BuildSmart wrote:
 jkMount /* myworker -- your example.
 
 It didn't work and only further proves that mod_jk lacks any real
 intelligence in functionality. 

You are not making any friends on this list. I need to fix your tone
right now before everyone lips your bozo bit and refuses to answer your
increasingly stupid posts.

Given that you are trying to hack-up a protocol to work in a way that ti
wasn't designed, I wouldn't start shooting my mouth off at the authors
of the code you're bastardizing.

 Well it sorta worked, it worked but only with localhost, none of my
 virtual hosts worked and I lost perl and php functionality so it really
 didn't work.

It totally did work. You mapped everything to Tomcat, so everything went
to Tomcat. Just because you wanted Apache to make the same decision you
would have .php goes to php runner, .jsp goes to Tomcat doesn't mean
that mod_jk is broken: it means that your understanding of how to
configure it is broken.

You obviously have not read the documentation clearly, or you wouldn't
be asking these questions.

As for only working on localhost, you need to check the rest of your
Apache httpd and Tomcat configurations: you probably don't have the
right virtual host config on either httpd or Tomcat or both. My guess is
both.

 No idea, why you claim that.
 
 Because it's true and I have seen no proof of the contrary, what I do
 get are well intentioned individuals offering advice however the advice
 must be incomplete because none of the offered suggestions work.

Dude, everyone uses JkMount /*.jsp workerX. It can't be just you. Or
can it? You've been monkeying around in the mod_jk code to create this
zombie mod_just_jsp thing and now you want to complain that it doesn't
work? Get bent. You probably broke it yourself.

 Concerning vhosts, I didn't understand, what you try to achieve.
 Please try the above JkMount first. As soon as that works for you, we
 can discuss further requirements.
 
 I did, it doesn't work and it kills python and php functionality.

No, you said that JkMount /* workerX kills Python and Php. Rainer is
asking you to use JkMount /*.jsp workerX.

 Note: Jkmount by default doesn't get inhertited between vhosts,
 because usually mounts are vhost specific. You need to put the JkMount
 into the vhost (or use JkMountCopy). See the docs.
 
 Putting anything into a specific vhost is a moronic concept if the
 webapp is to be shared by all virtualhosts.

You seriously need to check yourself. While the above may be true, your
frustration should not result in such poor manners.

 I have several hundred virtual hosts and to have to configure each
 one independently to access the webapp should not even be contemplated.

I think you're trying to do something that is just complex and a pain in
the ass. Php and Python are not application servers. Tomcat is an
application server and JSPs are designed to run in them. AJP is a
protocol that was designed to support this architecture. mod_jk is an
implementation of that protocol also designed to support that architecture.

Don't complain when mod_jk and AJP don't work on your Frankenstein
architecture.

 The advantages of serving the pages from the apache virtualhost
 DOCUMENT_ROOT's rather than from Tomcat's webapp docroot should have
 been a consideration and you can see why the concept has merrit
 but unfortunately it seems that they have limited vision and can't see
 past their own work.

Go talk to Sun.

 I'm left with no choice but to conclude that mod_jk was someone's failed
 attempt to achieve some kind of useful functionality that could be
 applied in a production virtualhost environment.
 
 Is there any other connector/module combination that has a different
 result than mod_jk?

Go use mod_jk2. It may be more your style. It's got a higher version
number, so it must be better, right?

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

iD8DBQFHJe3J9CaO5/Lv0PARAjQjAJ91hVxwIw5XtZ/6e+IRTMh0a5KzyACeLk0Q
7cjMq6oRkY3OJMB3mo1s4RY=
=lwj1
-END PGP SIGNATURE-

-
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 6 clustering without mulicast

2007-10-29 Thread SANCHEZ, Michel
Thanks Filip

I added the DisableMcastInterceptor in the cluster configuration wihtout 
success. 
The multicast heartbeat is stopped but there is no more member in the cluster.
DeltaManager::start() loggs Starting clustering manager at ...
but DeltaManager::getAllClusterSessions()loggs : skipping state transfer. No 
members active in cluster group.  
I carry on investigating 

Michel.

-Message d'origine-
De : Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
Envoyé : vendredi 26 octobre 2007 19:13
À : Tomcat Users List
Objet : Re: Tomcat 6 clustering without mulicast


it is absolutely possible, but now when you mention it, the ability to 
not start the multicasting piece has not been exposed. The rest has.

But there is a simple workaround for you, you can create an interceptor, 
that traps the start call, and removes the option to start multicasting

it could look like this

package org.apache.catalina.ha.tcp;

import org.apache.catalina.tribes.group.ChannelInterceptorBase;
import org.apache.catalina.tribes.ChannelException;
import org.apache.catalina.tribes.Channel;

public class DisableMcastInterceptor extends ChannelInterceptorBase {
public DisableMcastInterceptor() {
super();
}

public void start(int svc) throws ChannelException {
svc = (svc  (~Channel.MBR_TX_SEQ));
super.start(svc);
}
}

and then, you can have the static membership interceptor to hearbeats 
over TCP instead.

Filip

SANCHEZ, Michel wrote:
 Hi all

 I would like to know if it is possible to do tomcat 6 clustering  without 
 multicast IP.
 In other words by defining a full static cluster in which all the heartbeat 
 stuff is done by unicast.

 If yes please coluld you tel me how to configure it.
 I tried a SimpleTcpCluster without McastService declaration and with two 
 StaticMemberShipInterceptors but my nodes always sends multicast messages on 
 default address  228.0.0.4.45564

 Thanks for help.
 Michel



 This e-mail is intended only for the above addressee. It may contain 
 privileged information.
 If you are not the addressee you must not copy, distribute, disclose or use 
 any of the information in it. 
 If you have received it in error please delete it and immediately notify the 
 sender.
 Security Notice: all e-mail, sent to or from this address, may be accessed by 
 someone other than the recipient, for system management and security reasons. 
 This access is controlled under Regulation of security reasons.
 This access is controlled under Regulation of Investigatory Powers Act 2000, 
 Lawful Business Practises.



 -
 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 mail has originated outside your organization, either from an external 
partner or the Global Internet.
Keep this in mind if you answer this message.



This e-mail is intended only for the above addressee. It may contain privileged 
information.
If you are not the addressee you must not copy, distribute, disclose or use any 
of the information in it. 
If you have received it in error please delete it and immediately notify the 
sender.
Security Notice: all e-mail, sent to or from this address, may be accessed by 
someone other than the recipient, for system management and security reasons. 
This access is controlled under Regulation of security reasons.
This access is controlled under Regulation of Investigatory Powers Act 2000, 
Lawful Business Practises.



-
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: Class loading issue

2007-10-29 Thread Tony Fountain
Mark,

This sounds identical to my issue... Thanks for pointing me in that
direction.  Now I think I'm going to investigate on how to make the TC
parser load first and avoid this altogether.

Thanks,
Tony

-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 26, 2007 7:40 PM
To: Tomcat Users List
Subject: Re: Class loading issue

Tony Fountain wrote:
 Thanks for the response.  However, that does not clarify for me why it

 only happens when I attempt to set the load-on-startup element in 
 the webapps web.xml file but if I do not autoload the class, it works 
 just fine.

It might be related to
http://issues.apache.org/bugzilla/show_bug.cgi?id=29936

Mark

-
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 Email has been scanned for all viruses by PAETEC Email Scanning
Services, utilizing MessageLabs proprietary SkyScan infrastructure. For
more information on a proactive anti-virus service working around the
clock, around the globe, visit http://www.paetec.com.


-
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: Creating files dynamically and antiJarLocking

2007-10-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Marcus,

Milanez, Marcus wrote:
 In this case, my files are created
 correctely, but I just can't reach them using their URLs.

This is likely because Tomcat expects all the resources for a web app to
be available at deployment time, rather than randomly appearing during
the life of the deployed webapp.

I believe similar questions have been raised in the past, the the answer
has been don't do that. I'm not sure if there's a good way to achieve
what you're trying to do.

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

iD8DBQFHJfGH9CaO5/Lv0PARAuPxAJ0RUBs4e8Z7F921c8xCq2NTNCMsLQCgnp13
m3QuNzpZ8L7+wiU0p3bkebA=
=SkSm
-END PGP SIGNATURE-

-
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: Exception in thread HttpProcessor[8080][2] java.lang.NullPointerException

2007-10-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Janeve,

Also, is it possible to sniff the HTTP request that is causing this
exception? I'm wondering if you're dealing with a client that is sending
a broken HTTP request.

- -chris

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

iD8DBQFHJfHa9CaO5/Lv0PARAv+hAJ9DJNu1weYmaFX+W/jhAfEnamKPAwCgmbRG
L6Goqdpz2b2YVHv9H8/Vxm8=
=WVeX
-END PGP SIGNATURE-

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



2 tomcat beginer problems

2007-10-29 Thread loredana loredana
1. I have installed tomcat 6.0.14. Everytime I make a modification in a jsp 
page I either have to rename the file or delete the jsp from work directory in 
order to see the modifications. How can I make jsp reload automatically? So 
that if I make a modifications in my jsp, a simple refresh page will make me 
see the modifications? for now I modified web.xml and set keepgenerated to 
false but I don't think that's the best solution.

2. the ol' how to execute!! a servlet on tomcat startup. I need to execute a 
servlet on tomcat startup. I googled the problem but all I could find is how to 
load the servlet with load-on-startup. load on startup only calls the init 
method. but I would need to call the doGet method. I can't call the doGet 
method from init cause I need the parameters. So is there actually any way to 
execute a servlet on startup?

10x a lot!



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


-
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 6 clustering without mulicast

2007-10-29 Thread Filip Hanik - Dev Lists
yes, that's what you wanted. Then you have to add the static membership 
interceptors to add static members since you don't have multicast 
heartbeats anymore


Filip

SANCHEZ, Michel wrote:

Thanks Filip

I added the DisableMcastInterceptor in the cluster configuration wihtout success. 
The multicast heartbeat is stopped but there is no more member in the cluster.

DeltaManager::start() loggs Starting clustering manager at ...
but DeltaManager::getAllClusterSessions()loggs : skipping state transfer. No members active in cluster group.  
I carry on investigating 


Michel.

-Message d'origine-
De : Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
Envoyé : vendredi 26 octobre 2007 19:13
À : Tomcat Users List
Objet : Re: Tomcat 6 clustering without mulicast


it is absolutely possible, but now when you mention it, the ability to 
not start the multicasting piece has not been exposed. The rest has.


But there is a simple workaround for you, you can create an interceptor, 
that traps the start call, and removes the option to start multicasting


it could look like this

package org.apache.catalina.ha.tcp;

import org.apache.catalina.tribes.group.ChannelInterceptorBase;
import org.apache.catalina.tribes.ChannelException;
import org.apache.catalina.tribes.Channel;

public class DisableMcastInterceptor extends ChannelInterceptorBase {
public DisableMcastInterceptor() {
super();
}

public void start(int svc) throws ChannelException {
svc = (svc  (~Channel.MBR_TX_SEQ));
super.start(svc);
}
}

and then, you can have the static membership interceptor to hearbeats 
over TCP instead.


Filip

SANCHEZ, Michel wrote:
  

Hi all

I would like to know if it is possible to do tomcat 6 clustering  without 
multicast IP.
In other words by defining a full static cluster in which all the heartbeat 
stuff is done by unicast.

If yes please coluld you tel me how to configure it.
I tried a SimpleTcpCluster without McastService declaration and with two 
StaticMemberShipInterceptors but my nodes always sends multicast messages on 
default address  228.0.0.4.45564

Thanks for help.
Michel



This e-mail is intended only for the above addressee. It may contain privileged 
information.
If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. 
If you have received it in error please delete it and immediately notify the sender.

Security Notice: all e-mail, sent to or from this address, may be accessed by 
someone other than the recipient, for system management and security reasons. 
This access is controlled under Regulation of security reasons.
This access is controlled under Regulation of Investigatory Powers Act 2000, 
Lawful Business Practises.



-
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 mail has originated outside your organization, either from an external 
partner or the Global Internet.
Keep this in mind if you answer this message.



This e-mail is intended only for the above addressee. It may contain privileged 
information.
If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. 
If you have received it in error please delete it and immediately notify the sender.

Security Notice: all e-mail, sent to or from this address, may be accessed by 
someone other than the recipient, for system management and security reasons. 
This access is controlled under Regulation of security reasons.
This access is controlled under Regulation of Investigatory Powers Act 2000, 
Lawful Business Practises.



-
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: 2 tomcat beginer problems

2007-10-29 Thread Auke Noppe
You could initiate the request and response by hand and call de doGet method
and pass your own response and request. And of course set your params in the
request or response.


-Oorspronkelijk bericht-
Van: loredana loredana [mailto:[EMAIL PROTECTED] 
Verzonden: maandag 29 oktober 2007 16:23
Aan: users@tomcat.apache.org
Onderwerp: 2 tomcat beginer problems

1. I have installed tomcat 6.0.14. Everytime I make a modification in a jsp
page I either have to rename the file or delete the jsp from work directory
in order to see the modifications. How can I make jsp reload automatically?
So that if I make a modifications in my jsp, a simple refresh page will make
me see the modifications? for now I modified web.xml and set keepgenerated
to false but I don't think that's the best solution.

2. the ol' how to execute!! a servlet on tomcat startup. I need to execute
a servlet on tomcat startup. I googled the problem but all I could find is
how to load the servlet with load-on-startup. load on startup only calls the
init method. but I would need to call the doGet method. I can't call the
doGet method from init cause I need the parameters. So is there actually any
way to execute a servlet on startup?

10x a lot!



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


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

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.12/1097 - Release Date: 28-10-2007
13:58
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.12/1097 - Release Date: 28-10-2007
13:58
 


-
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: 2 tomcat beginer problems

2007-10-29 Thread Grzegorz Borkowski
Why do you want to call doGet on init? it looks like invalid approach. 
You hava init method for this, or application listeners; doGet is for 
handling HTTP requests, not for initializing servler...

G.

loredana loredana wrote:

1. I have installed tomcat 6.0.14. Everytime I make a modification in a jsp 
page I either have to rename the file or delete the jsp from work directory in 
order to see the modifications. How can I make jsp reload automatically? So 
that if I make a modifications in my jsp, a simple refresh page will make me 
see the modifications? for now I modified web.xml and set keepgenerated to 
false but I don't think that's the best solution.

2. the ol' how to execute!! a servlet on tomcat startup. I need to execute a 
servlet on tomcat startup. I googled the problem but all I could find is how to load the 
servlet with load-on-startup. load on startup only calls the init method. but I would 
need to call the doGet method. I can't call the doGet method from init cause I need the 
parameters. So is there actually any way to execute a servlet on startup?

10x a lot!



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



-
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 6 clustering without mulicast

2007-10-29 Thread SANCHEZ, Michel
I'am not shure that i understand well.

What i whould like to have is session replication on a two members cluster with 
unicast heartbeat.
With DisableMcastInterceptor i have no more multicast but no more session 
replication. It looks like cluster has no members
Here is my configuration :

Server I :
Cluster channelSendOptions=8

className=org.apache.catalina.ha.tcp.SimpleTcpCluster

Manager

className=org.apache.catalina.ha.session.DeltaManager

expireSessionsOnShutdown=false domainReplication=true

notifyListenersOnReplication=true /

Channel

className=org.apache.catalina.tribes.group.GroupChannel

Receiver address=auto 
autoBind=100

className=org.apache.catalina.tribes.transport.nio.NioReceiver
maxThreads=6 
port=4000 selectorTimeout=5000 /

Sender

className=org.apache.catalina.tribes.transport.ReplicationTransmitter
Transport

className=org.apache.catalina.tribes.transport.nio.PooledParallelSender /
/Sender
Interceptor

className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector /
Interceptor

className=org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor
Member

className=org.apache.catalina.tribes.membership.StaticMember
port=4001 
securePort=-1 host=localhost

domain=test-domain uniqueId={0,0,0,0,0,0,0,0,0,0} /

/Interceptor
Interceptor

className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor
 /

Interceptor

className=org.apache.catalina.ha.tcp.DisableMcastInterceptor /

/Channel

Valve

className=org.apache.catalina.ha.tcp.ReplicationValve filter= /
Valve

className=org.apache.catalina.ha.session.JvmRouteBinderValve /

Deployer

className=org.apache.catalina.ha.deploy.FarmWarDeployer
deployDir=/tmp/war-deploy/ 
tempDir=/tmp/war-temp/
watchDir=/tmp/war-listen/ 
watchEnabled=false /

ClusterListener

className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener /
ClusterListener

className=org.apache.catalina.ha.session.ClusterSessionListener /
/Cluster

Server II :
Cluster channelSendOptions=8

className=org.apache.catalina.ha.tcp.SimpleTcpCluster

Manager

className=org.apache.catalina.ha.session.DeltaManager

expireSessionsOnShutdown=false domainReplication=true

notifyListenersOnReplication=true /

Channel

className=org.apache.catalina.tribes.group.GroupChannel
Receiver address=auto 
autoBind=100


Re: Exception in thread HttpProcessor[8080][2] java.lang.NullPointerException

2007-10-29 Thread Konstantin Kolinko
1. Tomcat 4.0.3 is pretty old and unsupported. The last version in the
4.x series is 4.1.36.

2. Trying to google checkHead site:mail-archives.apache.org shows
some mentions of similar issues in the year 2002, e.g.

(note: The bugzilla server name has changed, but bug ids are the same)

http://issues.apache.org/bugzilla/show_bug.cgi?id=10331

Citing from there:
Your extra code does not matter -- your code is still violating the
servlet spec
restrictions on accessing the response object from one thread in another thread.
Your expectation that this is ever going to work is incorrect.

http://issues.apache.org/bugzilla/show_bug.cgi?id=8039

Citing from there:
This problem has already been fixed in 4.0.4 Beta.

It looks like nobody has observed this problem in the last 5 years,
thus it has been fixed.

You need to upgrade to get rid of the issue.

Good luck.

Best regards,
- Konstantin

2007/10/29, Christopher Schultz [EMAIL PROTECTED]:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Janeve,

 Also, is it possible to sniff the HTTP request that is causing this
 exception? I'm wondering if you're dealing with a client that is sending
 a broken HTTP request.

 - -chris

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

 iD8DBQFHJfHa9CaO5/Lv0PARAv+hAJ9DJNu1weYmaFX+W/jhAfEnamKPAwCgmbRG
 L6Goqdpz2b2YVHv9H8/Vxm8=
 =WVeX
 -END PGP SIGNATURE-

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



Problem installing tomcat 6

2007-10-29 Thread sunil chandran
Hi all,

 I have installed Tomcat 6 . but when i start the tomcat it gives the
following error:

Exception in thread main java.lang.UnsupportedClassVersionError:
org/apache/catalina/startup/Bootstrap (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java
:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)


Please help me forward to solve it

-- 
Sunil


mod_jk for OS X PPC

2007-10-29 Thread Richard Doust

Hi.
I'm a developer of a JBoss/Tomcat app. I work on a Mac. I upgraded my  
Mac's OS on Saturday to OS X 10.5 (Leopard). Prior to the upgrade I  
was using the version of Apache that came with 10.4, which I think was  
1.3. Apple is shipping 2.2.6 with 10.5. They don't include the mod_jk  
module built for the OS with the non-server version of the OS. (I  
guess they might with the server version, I'm not sure.) Anyway, I  
need mod_jk in order for Apache to talk to Tomcat, so I went to the  
Tomcat Connectors pages and found that mod_jk is only available in an  
x86 version as a binary. So I downloaded the source, installed the  
XCode tools so that I could try to compile it. I'm unable to find  
apxs2 on my hard drive, but I have a apxs file in my /usr/sbin  
directory, so I thought I would try to build using:

./configure --with-apxs=/usr/sbin/apxs
When I install the resultant mod_jk.so, Apache complains that it found  
mod_jk mach-o, but it is for the wrong architecture.

If anyone has already done this, I'd love to hear from you.
Thank you,
Richard

-
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: Installing Tomcat on Windows Server 2003 x64

2007-10-29 Thread Swapnil.Kale

I dont know if you are still looking for the answer!
If yes, i had the same problem and here is the thread for the same. I got it
running smoothly now.

http://www.nabble.com/Advice-about-Tomcat-on-x86_64-architecture..-tf4048957.html#a13279694
 


Regards,
Swapnil

Adrian Bell wrote:
 
 Hi,
  
 I need to advise someone on how to install Tomcat on a Windows Server 2003
 64-bit edition server with an AMD64 processor.
 Unfortunately I do not have this hardware/software setup myself so am
 unable
 to test.
  
 I see from a google search that others have encoutered problems with
 Win2k3
 64.
  
 Can anyone please advise:
 
 * the correct JRE from Sun that they should install? Release? 32bit or
 64bit?
 * the correct Tomcat version to install? Is there a 64bit compiliation
 available?
 
 Many thanks in advance.
 Regards
 Adrian
 
 

-- 
View this message in context: 
http://www.nabble.com/Installing-Tomcat-on-Windows-Server-2003-x64-tf3683240.html#a13471015
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
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: Problem installing tomcat 6

2007-10-29 Thread Mark Thomas
sunil chandran wrote:
 Hi all,
 
  I have installed Tomcat 6 . but when i start the tomcat it gives the
 following error:
 
 Exception in thread main java.lang.UnsupportedClassVersionError:
 org/apache/catalina/startup/Bootstrap (Unsupported major.minor version 49.0)

Install JDK 5.0+

Mark


-
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: What's up with admin application for Tomcat 6?

2007-10-29 Thread Mark Thomas
Grzegorz Borkowski wrote:
 So what's wrong with Admin app? Is it going to be released or not? Very
 sad if not, it was quite useful piece of software. Anyway, almost any
 server has some admin console like this.

No plans to release if for 6.0.x as no-one has been supporting it for
a while. Alternative options include:
- JMX
- lambdaprobe

Mark


-
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: Creating files dynamically and antiJarLocking

2007-10-29 Thread Konstantin Kolinko
 This is likely because Tomcat expects all the resources for a web app to
 be available at deployment time, rather than randomly appearing during
 the life of the deployed webapp.

Jsps are recompiled when modified, and are compiled on the first
access. Thus I do not see why they cannot appear randomly.

I do not remember whether it is a part of the standard, but it is a
feature, and it supposedly can be turned off by some options.


What Tomcat version is Marcus using?

As for the path to the temp folder:
what is the result of calling ServletContext.getRealPath(...)?


2007/10/29, Christopher Schultz [EMAIL PROTECTED]:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Marcus,

 Milanez, Marcus wrote:
  In this case, my files are created
  correctely, but I just can't reach them using their URLs.

 This is likely because Tomcat expects all the resources for a web app to
 be available at deployment time, rather than randomly appearing during
 the life of the deployed webapp.

 I believe similar questions have been raised in the past, the the answer
 has been don't do that. I'm not sure if there's a good way to achieve
 what you're trying to do.

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

 iD8DBQFHJfGH9CaO5/Lv0PARAuPxAJ0RUBs4e8Z7F921c8xCq2NTNCMsLQCgnp13
 m3QuNzpZ8L7+wiU0p3bkebA=
 =SkSm
 -END PGP SIGNATURE-

 -
 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: Creating files dynamically and antiJarLocking

2007-10-29 Thread Hassan Schroeder
On 10/29/07, Konstantin Kolinko [EMAIL PROTECTED] wrote:

 Jsps are recompiled when modified, and are compiled on the first
 access. Thus I do not see why they cannot appear randomly.

Absolutely. In my dev environment I'm constantly dropping new
JSPs in, and they show up fine. If that weren't true, I'd never get
/anything/ done :-)

 I do not remember whether it is a part of the standard, but it is a
 feature, and it supposedly can be turned off by some options.

But the default certainly allows it, or more people would be having
this same problem, I suspect...

Perhaps the OP can test with a simple JSP using a fresh install?

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



Tomcat instantiation of JAAS LoginModules

2007-10-29 Thread Andrew R Feller
Hello,

 

While writing a custom JAAS module, I wanted to know how Tomcat
instantiated these classes.  Does Tomcat instantiate a custom JAAS
module for each login request?  When does an instantiation of a custom
JAAS module get garbage collected?

 

Thanks,

 

Andrew R Feller, Analyst

Subversion Administrator

University Information Systems

Louisiana State University

[EMAIL PROTECTED]

(office) 225.578.3737

 



Re: org.apache.commons.dbcp.DbcpException: java.sql.SQLException

2007-10-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Swapnil,

Swapnil.Kale wrote:
 I'm getting org.apache.commons.dbcp.DbcpException: java.sql.SQLException
 Cannot get a connection, Connection pool exhausted. 

Sounds like you are running out of database connections.

 The database has multiple schemas running and the no. of processes are set
 to 300.

What do you mean, no. of processes?

 Here is the entry for the spring-servlet.
 
   property name=maxActive
 value3000/value
 /property

That's 3000, not 300. And it's a lot, if you ask me. How many
simultaneous HTTP connections do you support? It's foolish to have the
number of pooled connections exceed the number of HTTP connections you
are willing to accept: those extra connections are just taking up memory
and network resources.

 I don't have any other entry related to timeout/removeabondoned etc.

Given that you are running out of connections, I would recommend enabling:

removeAbandoned
removeAbaondonedTimeout
logAbandoned

 I've to restart the server frequently due to this exception (The frequency
 is once in every two days).
 
 Am i missing any important property?  I'm not able to figure out where to
 check the closing connections (A lot of Google threads talk about close
 connections as a major reason behind the failure.)

See above. Yes, the problem is usually sloppy resource management (or
none at all) in your application's code.

 Is there any relation in no. of processes (300) set on oracle and the
 maxActive (3000) in servlet xml?

Well, Oracle will probably veto 90% of the connections you try to make
to it if you actually start using all 3000 of those connections.

 Can anybody throw some light on this issue?

Enable the debugging settings listed above and run your server normally.
You should be able to see where connections are getting list (you'll get
a full stack trace dumped for where a connection was requested from the
pool, if, after removeAbandonedTimeout seconds, the connection is not
returned to the pool. That will tell you where the connection was
requested. Then, follow the code starting there to see what might have
gone wrong.

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

iD8DBQFHJkFl9CaO5/Lv0PARAsihAJ9WdoULOjgcfl+b2SVmls46V3uDJACgjA4J
xR9rAIfMFITeutPIQaFLVdw=
=UIpr
-END PGP SIGNATURE-

-
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: org.apache.commons.dbcp.DbcpException: java.sql.SQLException

2007-10-29 Thread Propes, Barry L
I think Oracle does have a set number of processes it will allow to run. 
This is aside from no. of connections. Like the DB handler, that rotates the 
listeners Oracle uses.

-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED]
Sent: Monday, October 29, 2007 3:24 PM
To: Tomcat Users List
Subject: Re: org.apache.commons.dbcp.DbcpException:
java.sql.SQLException


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Swapnil,

Swapnil.Kale wrote:
 I'm getting org.apache.commons.dbcp.DbcpException: java.sql.SQLException
 Cannot get a connection, Connection pool exhausted. 

Sounds like you are running out of database connections.

 The database has multiple schemas running and the no. of processes are set
 to 300.

What do you mean, no. of processes?

 Here is the entry for the spring-servlet.
 
   property name=maxActive
 value3000/value
 /property

That's 3000, not 300. And it's a lot, if you ask me. How many
simultaneous HTTP connections do you support? It's foolish to have the
number of pooled connections exceed the number of HTTP connections you
are willing to accept: those extra connections are just taking up memory
and network resources.

 I don't have any other entry related to timeout/removeabondoned etc.

Given that you are running out of connections, I would recommend enabling:

removeAbandoned
removeAbaondonedTimeout
logAbandoned

 I've to restart the server frequently due to this exception (The frequency
 is once in every two days).
 
 Am i missing any important property?  I'm not able to figure out where to
 check the closing connections (A lot of Google threads talk about close
 connections as a major reason behind the failure.)

See above. Yes, the problem is usually sloppy resource management (or
none at all) in your application's code.

 Is there any relation in no. of processes (300) set on oracle and the
 maxActive (3000) in servlet xml?

Well, Oracle will probably veto 90% of the connections you try to make
to it if you actually start using all 3000 of those connections.

 Can anybody throw some light on this issue?

Enable the debugging settings listed above and run your server normally.
You should be able to see where connections are getting list (you'll get
a full stack trace dumped for where a connection was requested from the
pool, if, after removeAbandonedTimeout seconds, the connection is not
returned to the pool. That will tell you where the connection was
requested. Then, follow the code starting there to see what might have
gone wrong.

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

iD8DBQFHJkFl9CaO5/Lv0PARAsihAJ9WdoULOjgcfl+b2SVmls46V3uDJACgjA4J
xR9rAIfMFITeutPIQaFLVdw=
=UIpr
-END PGP SIGNATURE-

-
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: org.apache.commons.dbcp.DbcpException: java.sql.SQLException

2007-10-29 Thread Propes, Barry L
can you ever connect with just a regular Oracle driver reference? As opposed to 
a conn. pool reference?

-Original Message-
From: Swapnil.Kale [mailto:[EMAIL PROTECTED]
Sent: Monday, October 29, 2007 3:10 PM
To: users@tomcat.apache.org
Subject: Re: org.apache.commons.dbcp.DbcpException:
java.sql.SQLException



Hi,
I couldnt get a better place to post my question.

I'm getting org.apache.commons.dbcp.DbcpException: java.sql.SQLException
Cannot get a connection, Connection pool exhausted. 
I'm using spring with Tomcat 6 to manage the Connection pooling. My
application is a 3 tier application (Swing + Tomcat 6/Spring/RMI + Database
Oracle 10g)
The database has multiple schemas running and the no. of processes are set
to 300.

Here is the entry for the spring-servlet.

  property name=maxActive
value3000/value
/property

property name=maxWait
value1/value !-- Wait for a connection from the pool
for 10 sec, then time out --
/property
/bean

I dont have any other entry related to timeout/removeabondoned etc.

I've to restart the server frequently due to this exception (The frequency
is once in every two days).

Am i missing any importnt property?  I'm not able to figure out where to
check the closing connections (A lot of Google threads talk about close
connections as a major reason behind the failure.)

Is there any relation in no. of processes (300) set on oracle and the
maxActive (3000) in servlet xml?

Can anybody throw some light on this issue?








ajay kumar wrote:
 
 Hi Everybody,
 
   This is Ajay Kumar.I implemented DBCP through tomcat
 container.Some times when i run the webpages it is giving the
 following Exception:
 
 org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Server
 connection failure during transaction. Attempted reconnect 3 times.
 Giving up
 
   I think it is the problem with the values which are
 mentioned in the server.xml for DBCP.Here are the details of
 server.xml
 
 parameter
namemaxActive/name
value100/value
 /parameter
 parameter
namemaxIdle/name
value20/value
 /parameter
 parameter
   namemaxWait/name
   value1/value
 /parameter
 parameter
nameremoveAbandoned/name
valuetrue/value
 /parameter
 parameter
nameremoveAbandonedTimeout/name
value300/value
 /parameter
 parameter
 namelogAbandoned/name
 valuetrue/value
 /parameter
 
  If any body know the solution please mail me the
 details.Thanks in advance...

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

-- 
View this message in context: 
http://www.nabble.com/org.apache.commons.dbcp.DbcpException%3A-java.sql.SQLException-tf69524.html#a13475886
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
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: mod_jk for OS X PPC

2007-10-29 Thread Richard Doust

Rainer,
Thanks for looking at my question.



In case that image doesn't get through, (and to make this text  
searchable) it says:
Cannot load /usr/libexec/apache2/mod_jk.so into server: dlopen(/usr/ 
libexec/apache2/mod_jk.so, 10): no suitable image found. Did find /usr/ 
libexec/apache2/mod_jk.so: mach-o, but wrong architecture.


That's what I get.
I tried using the mod_jk.so that I had working with the 1.3 version of  
Apache just for hahas and get the same error, so I'm not sure what's  
going on.
I was hoping some kind soul might have a working version of mod_jk.so  
for the PowerPC architecture.

Any light you can help shed on the subject would be appreciated.
Oh, the apxs file in /usr/sbin has a timestamp that leads me to  
believe it came with the new version of Apache.

Thanks again.
Richard

On Oct 29, 2007, at 4:59 PM, Rainer Jung wrote:

Sorry, I've no direct solution. If /usr/sbin/apxs belongs to your  
Apache 2.2.6, the way you are doing it seems right. What exactly is  
the error text, that you get from Apache during startup?


Regards,

Rainer

Richard Doust wrote:

Hi.
I'm a developer of a JBoss/Tomcat app. I work on a Mac. I upgraded  
my Mac's OS on Saturday to OS X 10.5 (Leopard). Prior to the  
upgrade I was using the version of Apache that came with 10.4,  
which I think was 1.3. Apple is shipping 2.2.6 with 10.5. They  
don't include the mod_jk module built for the OS with the non- 
server version of the OS. (I guess they might with the server  
version, I'm not sure.) Anyway, I need mod_jk in order for Apache  
to talk to Tomcat, so I went to the Tomcat Connectors pages and  
found that mod_jk is only available in an x86 version as a binary.  
So I downloaded the source, installed the XCode tools so that I  
could try to compile it. I'm unable to find apxs2 on my hard drive,  
but I have a apxs file in my /usr/sbin directory, so I thought I  
would try to build using:

./configure --with-apxs=/usr/sbin/apxs
When I install the resultant mod_jk.so, Apache complains that it  
found mod_jk mach-o, but it is for the wrong architecture.

If anyone has already done this, I'd love to hear from you.
Thank you,
Richard


-
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 6 NIO consumes all CPU until restarted

2007-10-29 Thread Peter
Thanks Filip, oversight on my part, here we go:

[EMAIL PROTECTED]:/logs/tomcat ps -eL -o pid,%cpu,lwp | grep -i 4046 | grep 
-iv 0.0
 4046  0.6  4047
 4046  0.1  4052
 4046  0.1  4053
 4046 21.9  4078
 4046 18.7  4108
 4046  0.1  4109

http-8080-Poller-0 daemon prio=1 tid=0x002ae2f860e0 nid=0xfee runnable 
[0x412cf000..0x412cfc10]
at java.util.HashMap.newKeyIterator(HashMap.java:889)
at java.util.HashMap$KeySet.iterator(HashMap.java:921)
at java.util.HashSet.iterator(HashSet.java:154)
at sun.nio.ch.SelectorImpl.processDeregisterQueue(SelectorImpl.java:127)
- locked 0x002ab2ac2810 (a java.util.HashSet)
at sun.nio.ch.PollSelectorImpl.doSelect(PollSelectorImpl.java:60)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:69)
- locked 0x002ab2ac2870 (a sun.nio.ch.Util$1)
- locked 0x002ab2ac2858 (a java.util.Collections$UnmodifiableSet)
- locked 0x002ab2ab5c80 (a sun.nio.ch.PollSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80)
at 
org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1417)
at java.lang.Thread.run(Thread.java:595)

http-8080-exec-18 daemon prio=1 tid=0x002ae3c5d8e0 nid=0x100c runnable 
[0x430ec000..0x430edb10]
at 
org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:44)
at 
org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:794)
at 
org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:126)
at 
org.apache.coyote.http11.filters.GzipOutputFilter$FakeOutputStream.write(GzipOutputFilter.java:164)
at java.util.zip.GZIPOutputStream.finish(GZIPOutputStream.java:95)
at 
org.apache.coyote.http11.filters.GzipOutputFilter.end(GzipOutputFilter.java:122)
at 
org.apache.coyote.http11.InternalNioOutputBuffer.endRequest(InternalNioOutputBuffer.java:396)
at 
org.apache.coyote.http11.Http11NioProcessor.action(Http11NioProcessor.java:1080)
at org.apache.coyote.Response.action(Response.java:183)
at org.apache.coyote.Response.finish(Response.java:305)
at 
org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:276)
at 
org.apache.catalina.connector.Response.finishResponse(Response.java:486)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:287)
at 
org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:887)
at 
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:696)
at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2009)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)



- Original Message 
From: Filip Hanik 

since you are running on linux, you know that you can get the id of the
 
thread that is taking up all the CPU, just use a binary top that let
 you 
list individual threads.

as you can see, the thread dump you have, doesn't really show anything,
 
you're simply assuming that it's that call taking up CPU, but if your 
CPU usage is very high, then very little code is actually moving
 through.

there are a few bugs with references, but until you get the actual 
thread causing the CPU usage, then you wont know for sure

a few examples are, but nothing concrete.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42090
http://issues.apache.org/bugzilla/show_bug.cgi?id=42925

gather up the data, get the thread id that is causing CPU, match that 
with your thread dump, and then you will know for sure

Filip

Peter wrote:
 Hi

 We are having a problem with Tomcat 6 using the NIO (running on linux
 with Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_12-b04, mixed
 mode) that it consumes all CPU after a few hours in production, prior to
 that we ran Tomcat 6 with AJP and Apache 2.0 with mod_jk in front of it
 for over a month without any problems. While it is consuming all CPU it
 still serves requests but obviously much slower. During the last
 episode I collected some thread dumps over the period of 10 - 15 minutes
 and found 3 runnable threads that were present in all the dumps and were
 doing the exact same thing:

 http-8080-exec-41 daemon prio=1 tid=0x002ae320dad0 nid=0x12ac
 runnable [0x45c18000..0x45c18c10]
 at
 
org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:44)
 at
 
org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:794)
 at
 

Re: mod_jk for OS X PPC

2007-10-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Richard,

Richard Doust wrote:
 In case that image doesn't get through, (and to make this text
 searchable) it says:

Thanks for posting the text: the image did not come through; mailing
lists rarely accept non-text attachments (and sometimes not even then).

 Cannot load /usr/libexec/apache2/mod_jk.so into server:
 dlopen(/usr/libexec/apache2/mod_jk.so, 10): no suitable image found. Did
 find /usr/libexec/apache2/mod_jk.so: mach-o, but wrong architecture.

Can you run these on your system, please?

$ uname -a

$ file /path/to/mod_jk.so

??

That should give us some technical details that should help. Also, the
version of your compiler would be helpful, too (usually 'cc -v' or
something similar).

 That's what I get.
 I tried using the mod_jk.so that I had working with the 1.3 version of
 Apache just for hahas and get the same error, so I'm not sure what's
 going on.

That's a little odd... it seems that Apache is complaining about the
architecture, instead of the httpd API version mismatch. The 1.3 binary
will certainly not work.

 I was hoping some kind soul might have a working version of mod_jk.so
 for the PowerPC architecture.
 Any light you can help shed on the subject would be appreciated.
 Oh, the apxs file in /usr/sbin has a timestamp that leads me to believe
 it came with the new version of Apache.

Good to know.

- -chris

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

iD8DBQFHJk0o9CaO5/Lv0PARAnO/AKCUn8Pu2QDquIA14+1qZU/s5jHQNACdH96F
SzaQwwi9GMsABmrZC5henx4=
=wGkY
-END PGP SIGNATURE-

-
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: org.apache.commons.dbcp.DbcpException: java.sql.SQLException

2007-10-29 Thread Swapnil.Kale

The older product was written in a language called FORTE, which is not
migrated to JAVA. Now it uses RMI and Spring on the middle tier to talk to
Services and database.

Oracle does have no of processes which can be set for database which id
related to the performance of the Database server. One of the suggestions i
got was to increase the no. of process on oracle instance (Assuming that my
db server is running only the dedicated schema) but my DB server has got 6
schemas running and the total no. of processes set to 300 which are shared
by all.

The RMI Services (used of caching the data and filtering) create required
connections using the pooling in Tomcat. I wonder how setting the maxActive
in servlet-xml doesnt fulfil the requirement.  I doubt The no. of processes
could be the culprit.

I'm still in discussion with the architechts. 

Your thoughts are really appreciated.


Propes, Barry L wrote:
 
 I think Oracle does have a set number of processes it will allow to run. 
 This is aside from no. of connections. Like the DB handler, that rotates
 the listeners Oracle uses.
 
 -Original Message-
 From: Christopher Schultz [mailto:[EMAIL PROTECTED]
 Sent: Monday, October 29, 2007 3:24 PM
 To: Tomcat Users List
 Subject: Re: org.apache.commons.dbcp.DbcpException:
 java.sql.SQLException
 
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Swapnil,
 
 Swapnil.Kale wrote:
 I'm getting org.apache.commons.dbcp.DbcpException: java.sql.SQLException
 Cannot get a connection, Connection pool exhausted. 
 
 Sounds like you are running out of database connections.
 
 The database has multiple schemas running and the no. of processes are
 set
 to 300.
 
 What do you mean, no. of processes?
 
 Here is the entry for the spring-servlet.
 
   property name=maxActive
 value3000/value
 /property
 
 That's 3000, not 300. And it's a lot, if you ask me. How many
 simultaneous HTTP connections do you support? It's foolish to have the
 number of pooled connections exceed the number of HTTP connections you
 are willing to accept: those extra connections are just taking up memory
 and network resources.
 
 I don't have any other entry related to timeout/removeabondoned etc.
 
 Given that you are running out of connections, I would recommend enabling:
 
 removeAbandoned
 removeAbaondonedTimeout
 logAbandoned
 
 I've to restart the server frequently due to this exception (The
 frequency
 is once in every two days).
 
 Am i missing any important property?  I'm not able to figure out where to
 check the closing connections (A lot of Google threads talk about close
 connections as a major reason behind the failure.)
 
 See above. Yes, the problem is usually sloppy resource management (or
 none at all) in your application's code.
 
 Is there any relation in no. of processes (300) set on oracle and the
 maxActive (3000) in servlet xml?
 
 Well, Oracle will probably veto 90% of the connections you try to make
 to it if you actually start using all 3000 of those connections.
 
 Can anybody throw some light on this issue?
 
 Enable the debugging settings listed above and run your server normally.
 You should be able to see where connections are getting list (you'll get
 a full stack trace dumped for where a connection was requested from the
 pool, if, after removeAbandonedTimeout seconds, the connection is not
 returned to the pool. That will tell you where the connection was
 requested. Then, follow the code starting there to see what might have
 gone wrong.
 
 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.7 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
 iD8DBQFHJkFl9CaO5/Lv0PARAsihAJ9WdoULOjgcfl+b2SVmls46V3uDJACgjA4J
 xR9rAIfMFITeutPIQaFLVdw=
 =UIpr
 -END PGP SIGNATURE-
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/org.apache.commons.dbcp.DbcpException%3A-java.sql.SQLException-tf69524.html#a13477012
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
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: mod_jk for OS X PPC

2007-10-29 Thread Rainer Jung
Sorry, I've no direct solution. If /usr/sbin/apxs belongs to your Apache 
2.2.6, the way you are doing it seems right. What exactly is the error 
text, that you get from Apache during startup?


Regards,

Rainer

Richard Doust wrote:

Hi.
I'm a developer of a JBoss/Tomcat app. I work on a Mac. I upgraded my 
Mac's OS on Saturday to OS X 10.5 (Leopard). Prior to the upgrade I was 
using the version of Apache that came with 10.4, which I think was 1.3. 
Apple is shipping 2.2.6 with 10.5. They don't include the mod_jk module 
built for the OS with the non-server version of the OS. (I guess they 
might with the server version, I'm not sure.) Anyway, I need mod_jk in 
order for Apache to talk to Tomcat, so I went to the Tomcat Connectors 
pages and found that mod_jk is only available in an x86 version as a 
binary. So I downloaded the source, installed the XCode tools so that I 
could try to compile it. I'm unable to find apxs2 on my hard drive, but 
I have a apxs file in my /usr/sbin directory, so I thought I would try 
to build using:

./configure --with-apxs=/usr/sbin/apxs
When I install the resultant mod_jk.so, Apache complains that it found 
mod_jk mach-o, but it is for the wrong architecture.

If anyone has already done this, I'd love to hear from you.
Thank you,
Richard


-
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: org.apache.commons.dbcp.DbcpException: java.sql.SQLException

2007-10-29 Thread Swapnil.Kale

Hi,
I couldnt get a better place to post my question.

I'm getting org.apache.commons.dbcp.DbcpException: java.sql.SQLException
Cannot get a connection, Connection pool exhausted. 
I'm using spring with Tomcat 6 to manage the Connection pooling. My
application is a 3 tier application (Swing + Tomcat 6/Spring/RMI + Database
Oracle 10g)
The database has multiple schemas running and the no. of processes are set
to 300.

Here is the entry for the spring-servlet.

  property name=maxActive
value3000/value
/property

property name=maxWait
value1/value !-- Wait for a connection from the pool
for 10 sec, then time out --
/property
/bean

I dont have any other entry related to timeout/removeabondoned etc.

I've to restart the server frequently due to this exception (The frequency
is once in every two days).

Am i missing any importnt property?  I'm not able to figure out where to
check the closing connections (A lot of Google threads talk about close
connections as a major reason behind the failure.)

Is there any relation in no. of processes (300) set on oracle and the
maxActive (3000) in servlet xml?

Can anybody throw some light on this issue?








ajay kumar wrote:
 
 Hi Everybody,
 
   This is Ajay Kumar.I implemented DBCP through tomcat
 container.Some times when i run the webpages it is giving the
 following Exception:
 
 org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Server
 connection failure during transaction. Attempted reconnect 3 times.
 Giving up
 
   I think it is the problem with the values which are
 mentioned in the server.xml for DBCP.Here are the details of
 server.xml
 
 parameter
namemaxActive/name
value100/value
 /parameter
 parameter
namemaxIdle/name
value20/value
 /parameter
 parameter
   namemaxWait/name
   value1/value
 /parameter
 parameter
nameremoveAbandoned/name
valuetrue/value
 /parameter
 parameter
nameremoveAbandonedTimeout/name
value300/value
 /parameter
 parameter
 namelogAbandoned/name
 valuetrue/value
 /parameter
 
  If any body know the solution please mail me the
 details.Thanks in advance...

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

-- 
View this message in context: 
http://www.nabble.com/org.apache.commons.dbcp.DbcpException%3A-java.sql.SQLException-tf69524.html#a13475886
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
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: mod_jk for OS X PPC

2007-10-29 Thread Richard Doust

uname -a :

Darwin QuadG5.local 9.0.0 Darwin Kernel Version 9.0.0: Tue Oct  9  
21:37:58 PDT 2007; root:xnu-1228~1/RELEASE_PPC Power Macintosh


file /usr/libexec/apache2/mod_jk.so :

/usr/libexec/apache2/mod_jk.so: Mach-O bundle ppc

cc -v:

Using built-in specs.
Target: powerpc-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5465~16/src/configure --disable- 
checking -enable-werror --prefix=/usr --mandir=/share/man --enable- 
languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/ 
$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/ 
lib --build=i686-apple-darwin9 --program-prefix= --host=powerpc-apple- 
darwin9 --target=powerpc-apple-darwin9

Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5465)

Confusing, right? Looks good I'd say (with my total lack of knowledge).

Thanks again,
Richard

On Oct 29, 2007, at 5:14 PM, Christopher Schultz wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Richard,

Richard Doust wrote:

In case that image doesn't get through, (and to make this text
searchable) it says:


Thanks for posting the text: the image did not come through; mailing
lists rarely accept non-text attachments (and sometimes not even  
then).



Cannot load /usr/libexec/apache2/mod_jk.so into server:
dlopen(/usr/libexec/apache2/mod_jk.so, 10): no suitable image  
found. Did

find /usr/libexec/apache2/mod_jk.so: mach-o, but wrong architecture.


Can you run these on your system, please?

$ uname -a

$ file /path/to/mod_jk.so

??

That should give us some technical details that should help. Also, the
version of your compiler would be helpful, too (usually 'cc -v' or
something similar).


That's what I get.
I tried using the mod_jk.so that I had working with the 1.3 version  
of

Apache just for hahas and get the same error, so I'm not sure what's
going on.


That's a little odd... it seems that Apache is complaining about the
architecture, instead of the httpd API version mismatch. The 1.3  
binary

will certainly not work.


I was hoping some kind soul might have a working version of mod_jk.so
for the PowerPC architecture.
Any light you can help shed on the subject would be appreciated.
Oh, the apxs file in /usr/sbin has a timestamp that leads me to  
believe

it came with the new version of Apache.


Good to know.

- -chris

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

iD8DBQFHJk0o9CaO5/Lv0PARAnO/AKCUn8Pu2QDquIA14+1qZU/s5jHQNACdH96F
SzaQwwi9GMsABmrZC5henx4=
=wGkY
-END PGP SIGNATURE-

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

2007-10-29 Thread BuildSmart


On Oct 29, 2007, at 10:27:21, Christopher Schultz wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

BS,

BuildSmart wrote:

jkMount /* myworker -- your example.

It didn't work and only further proves that mod_jk lacks any real
intelligence in functionality.


You are not making any friends on this list. I need to fix your tone
right now before everyone lips your bozo bit and refuses to answer  
your

increasingly stupid posts.

Given that you are trying to hack-up a protocol to work in a way  
that ti

wasn't designed, I wouldn't start shooting my mouth off at the authors
of the code you're bastardizing.


Well it sorta worked, it worked but only with localhost, none of my
virtual hosts worked and I lost perl and php functionality so it  
really

didn't work.


It totally did work. You mapped everything to Tomcat, so everything  
went
to Tomcat. Just because you wanted Apache to make the same decision  
you

would have .php goes to php runner, .jsp goes to Tomcat doesn't mean
that mod_jk is broken: it means that your understanding of how to
configure it is broken.


obviously not only my understanding is broken but the advise from  
well intentioned helpers who direct me to make configuration by only  
providing partial information expecting that I know what I'm doing  
where tomcat is concerned.




You obviously have not read the documentation clearly, or you wouldn't
be asking these questions.


clearly I have read the documentation but it does not provide a  
working configuration or even an example I can copy/paste that that  
does anything remotely close to what I'm being told to configure.




As for only working on localhost, you need to check the rest of your
Apache httpd and Tomcat configurations: you probably don't have the
right virtual host config on either httpd or Tomcat or both. My  
guess is

both.


I only have one webapp in Tomcat as localhost and it's on port 8080  
(with connector on 8009) what more do I need??


Don't tell me now that I have to add an entry in Tomcat for every  
virtualhost that wishes to access the webapp, that makes no logical  
sense to have multiple tomcat virtualhosts pointing to the same  
webapp/docroot.





No idea, why you claim that.


Because it's true and I have seen no proof of the contrary, what I do
get are well intentioned individuals offering advice however the  
advice

must be incomplete because none of the offered suggestions work.


Dude, everyone uses JkMount /*.jsp workerX. It can't be just you. Or
can it? You've been monkeying around in the mod_jk code to create this
zombie mod_just_jsp thing and now you want to complain that it doesn't
work? Get bent. You probably broke it yourself.


I'm using the mod_jk module and not a bastardized version so if it's  
not working per your configuration directives then it's the guys who  
coded mod_jk who are fault and you should bitch to them about it.





Concerning vhosts, I didn't understand, what you try to achieve.
Please try the above JkMount first. As soon as that works for  
you, we

can discuss further requirements.


I did, it doesn't work and it kills python and php functionality.


No, you said that JkMount /* workerX kills Python and Php. Rainer is
asking you to use JkMount /*.jsp workerX.


workerX is not defined anywhere but I'll give it a try to satisfy you.

[Mon Oct 29 17:03:35 2007] [29592:2684415368] [debug]  
map_uri_to_worker::jk_uri_worker_map.c (597): Attempting to map URI '/ 
index.jsp' from 2 maps
[Mon Oct 29 17:03:35 2007] [29592:2684415368] [debug]  
map_uri_to_worker::jk_uri_worker_map.c (609): Attempting to map  
context URI '/servlet/*=workerX' source 'JkMount'
[Mon Oct 29 17:03:35 2007] [29592:2684415368] [debug]  
map_uri_to_worker::jk_uri_worker_map.c (609): Attempting to map  
context URI '/*.jsp=workerX' source 'JkMount'
[Mon Oct 29 17:03:35 2007] [29592:2684415368] [debug]  
map_uri_to_worker::jk_uri_worker_map.c (624): Found a wildchar match  
'/*.jsp=workerX'
[Mon Oct 29 17:03:35 2007] [29592:2684415368] [debug]  
wc_get_worker_for_name::jk_worker.c (115): did not find a worker workerX
[Mon Oct 29 17:03:35 2007] [29592:2684415368] [error]  
jk_handler::mod_jk.c (2194): Could not init service for worker=workerX


guess that doesn't work either, any more suggestion???




Note: Jkmount by default doesn't get inhertited between vhosts,
because usually mounts are vhost specific. You need to put the  
JkMount

into the vhost (or use JkMountCopy). See the docs.


Putting anything into a specific vhost is a moronic concept if the
webapp is to be shared by all virtualhosts.


You seriously need to check yourself. While the above may be true,  
your

frustration should not result in such poor manners.


yes, you are correct, it should not, however, if it had only been a  
day or two of fiddling with it it wouldn't have been so bad but more  
than a week with incomplete directions hasn't help the frustration  
level, something is definitely broken if it wont work as 

Re: Tomcat 6 NIO consumes all CPU until restarted

2007-10-29 Thread Peter
Oh, I forgot to mention, switched back to APR connector for 8080 for the 
weekend and all was fine. Switched back to NIO this morning to gather these 
stats and in a few hours it was stuck at 100% CPU again, very little variance 
in traffic (low traffic site right now, about a constant 1mbit). 

- Original Message 
From: Peter 


Thanks Filip, oversight on my part, here we go:

[EMAIL PROTECTED]:/logs/tomcat ps -eL -o pid,%cpu,lwp | grep -i 4046 | grep
 -iv 0.0
 4046  0.6  4047
 4046  0.1  4052
 4046  0.1  4053
 4046 21.9  4078
 4046 18.7  4108
 4046  0.1  4109

http-8080-Poller-0 daemon prio=1 tid=0x002ae2f860e0 nid=0xfee
 runnable [0x412cf000..0x412cfc10]
at java.util.HashMap.newKeyIterator(HashMap.java:889)
at java.util.HashMap$KeySet.iterator(HashMap.java:921)
at java.util.HashSet.iterator(HashSet.java:154)
at
 sun.nio.ch.SelectorImpl.processDeregisterQueue(SelectorImpl.java:127)
- locked 0x002ab2ac2810 (a java.util.HashSet)
at
 sun.nio.ch.PollSelectorImpl.doSelect(PollSelectorImpl.java:60)
at
 sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:69)
- locked 0x002ab2ac2870 (a sun.nio.ch.Util$1)
- locked 0x002ab2ac2858 (a
 java.util.Collections$UnmodifiableSet)
- locked 0x002ab2ab5c80 (a sun.nio.ch.PollSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80)
at
 org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1417)
at java.lang.Thread.run(Thread.java:595)

http-8080-exec-18 daemon prio=1 tid=0x002ae3c5d8e0 nid=0x100c
 runnable [0x430ec000..0x430edb10]
at
 
org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:44)
at
 
org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:794)
at
 
org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:126)
at
 
org.apache.coyote.http11.filters.GzipOutputFilter$FakeOutputStream.write(GzipOutputFilter.java:164)
at
 java.util.zip.GZIPOutputStream.finish(GZIPOutputStream.java:95)
at
 
org.apache.coyote.http11.filters.GzipOutputFilter.end(GzipOutputFilter.java:122)
at
 
org.apache.coyote.http11.InternalNioOutputBuffer.endRequest(InternalNioOutputBuffer.java:396)
at
 
org.apache.coyote.http11.Http11NioProcessor.action(Http11NioProcessor.java:1080)
at org.apache.coyote.Response.action(Response.java:183)
at org.apache.coyote.Response.finish(Response.java:305)
at
 org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:276)
at
 org.apache.catalina.connector.Response.finishResponse(Response.java:486)
at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:287)
at
 
org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:887)
at
 
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:696)
at
 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2009)
at
 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)



- Original Message 
From: Filip Hanik 

since you are running on linux, you know that you can get the id of the
 
thread that is taking up all the CPU, just use a binary top that let
 you 
list individual threads.

as you can see, the thread dump you have, doesn't really show anything,
 
you're simply assuming that it's that call taking up CPU, but if your 
CPU usage is very high, then very little code is actually moving
 through.

there are a few bugs with references, but until you get the actual 
thread causing the CPU usage, then you wont know for sure

a few examples are, but nothing concrete.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42090
http://issues.apache.org/bugzilla/show_bug.cgi?id=42925

gather up the data, get the thread id that is causing CPU, match that 
with your thread dump, and then you will know for sure

Filip

Peter wrote:
 Hi

 We are having a problem with Tomcat 6 using the NIO (running on linux
 with Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_12-b04, mixed
 mode) that it consumes all CPU after a few hours in production, prior
 to
 that we ran Tomcat 6 with AJP and Apache 2.0 with mod_jk in front of
 it
 for over a month without any problems. While it is consuming all CPU
 it
 still serves requests but obviously much slower. During the last
 episode I collected some thread dumps over the period of 10 - 15
 minutes
 and found 3 runnable threads that were present in all the dumps and
 were
 doing the exact same thing:

 http-8080-exec-41 daemon prio=1 tid=0x002ae320dad0 nid=0x12ac
 runnable 

Re: Where is the POSTED data on login redirect?

2007-10-29 Thread Peter Coppens

Thanks again for the quick replies.

It proved to be a getParameter in some logging code that messed up the
subsequent read. Weird the problem only shows up with a 'savedrequest' and
not with a normal request, but I guess the behaviour is to be expected. 

Peter


-- 
View this message in context: 
http://www.nabble.com/Where-is-the-POSTED-data-on-login-redirect--tf4706256.html#a13478485
Sent from the Tomcat - User mailing list archive at Nabble.com.


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

2007-10-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dale,

BuildSmart wrote:
 As for only working on localhost, you need to check the rest of your
 Apache httpd and Tomcat configurations: you probably don't have the
 right virtual host config on either httpd or Tomcat or both. My guess is
 both.
 
 I only have one webapp in Tomcat as localhost and it's on port 8080
 (with connector on 8009) what more do I need??

So, you have Tomcat configured to support the localhost virtual host
and you expect it to work with other virtual hosts? Apache httpd doesn't
do this, either. Why would you expect that an incorrect configuration
would work properly?

 Don't tell me now that I have to add an entry in Tomcat for every
 virtualhost that wishes to access the webapp, that makes no logical
 sense to have multiple tomcat virtualhosts pointing to the same
 webapp/docroot.

Aah, yes... but you're asking all virtual hosts in httpd to point to the
same Tomcat instance. Why does the symmetric relation not hold for such
an illogical statement?

Tomcat, like Apache httpd, can be configured to use a default virtual
host for all requests that do not match any of the explicitly-defined
virtual hosts. Since you are so familiar with the documentation, I won't
waste space in this post with the configuration.

 I'm using the mod_jk module and not a bastardized version so if it's not
 working per your configuration directives then it's the guys who coded
 mod_jk who are fault and you should bitch to them about it.

I've never had a problem with mod_jk. No complaints required from my
end. It's possible that mod_jk was written to support only virtual
hosts, and not JkMount options at the top-level. I'd be surprised at
this, but there's an easy workaround: use a global virtual host. In any
event, if you need this global capability (and it sounds like you do),
try asking for this capability instead of telling the mod_jk folks that
they are bunch of idiots. You catch more flies...

In your case, you have discrete virtual hosts. You may have to add
JkMount /*.jsp workerX for each virtual host. It's not insane: it's
what's required. You have to map DocumentRoot for each VirtualHost
element. What's wrong with adding this mapping as well.

 Concerning vhosts, I didn't understand, what you try to achieve.
 Please try the above JkMount first. As soon as that works for you, we
 can discuss further requirements.

 I did, it doesn't work and it kills python and php functionality.

 No, you said that JkMount /* workerX kills Python and Php. Rainer is
 asking you to use JkMount /*.jsp workerX.
 
 workerX is not defined anywhere but I'll give it a try to satisfy you.

OMGWTFBBQ. Nearly all of the mod_jk documentation surrounds creating
workers that connect mod_jk to Tomcat. You should have gotten /that/
far. You must have a worker, or nothing works. workerX is a
placeholder for the actual worker you want to use. Put your own worker's
name in there, don't just type workerX and complain when it doesn't work.

 guess that doesn't work either, any more suggestion???

Yes: use the name of the worker that you actually configured (ajp13, as
per the posted configuration).

 it wouldn't have been so bad but more than a
 week with incomplete directions hasn't help the frustration level,
 something is definitely broken if it wont work as people tell me to
 configure it and as you stated that is how everyone configures it and it
 works for them so either I'm not getting all of the information or it
 doesn't work.

Let's take a quick look at your configuration. workers.properties:

worker.list=ajp13
worker.ajp13.host=localhost
worker.ajp13.port=8019
worker.ajp13.type=ajp13

Note that you don't need the 'lbfactor' unless you are using a
load-balanced worker.

Now, to your httpd config:

IfModule mod_jk.c
JKWorkersFile /etc/httpd/workers.ajp13.properties
JKLogFile /var/log/httpd/mod_jk.log
JKLogLevel debug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkMount /*.jsp ajp13
JkOptions +ForwardKeySize +ForwardURICompat
/IfModule

Your config is clearly being loaded, as you are getting messages in your
log file regarding mod_jk.

Where is this configuration located? Is it being put into a VirtualHost,
or is it at the top-level?

Can you post a mod_jk log of what /does/ happen when you use this
configuration and try to access a JSP page? My guess is that you'll see
there are no mappings in the URI worker map for that virtual host.

What happens if, for the sake of testing, you move the JkMount directive
into a specific virtual host and try that? Does it work, then?

- -chris

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

iD8DBQFHJl+s9CaO5/Lv0PARAgEFAJ91gTgqtkKF2gFIbqDRHybp8Y5uOQCeOe+z
wPQ7varIZ+S2UaUMtQBiSmc=
=B5oJ
-END PGP SIGNATURE-

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

RE: IMP - Requests not reaching Tomcat Server

2007-10-29 Thread Mrinmoy Pal
Hello Chris,

Siebel Team made some changes on their side, and we are able to see the timed 
out error on Siebel logs when Siebel is posting data to Tomcat. 

The flow is: Siebel post data to Servlet -- Servlet processes the data..
We observe that Siebel application waits for 2 minutes and then gets a timeout 
while posting data to Tomcat. The request never reaches Tomcat (as seen from 
the localhost log files). If Siebel sends 50 transactions, then only 30-40 
reaches Tomcat Servlet.
At a later point of time, if the Siebel is trying again, then the data is 
getting posted successfully. 

Connector className=org.apache.catalina.connector.http.HttpConnector
   port=8080 minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=10 debug=0 connectionTimeout=6/
 
Timeout at Servlet level is defined as
int requestTimeout = 18;

We are trying to figure out whether the problem is at Tomcat side or Siebel 
side or in between. The ping from Siebel to Tomcat server is fine, so we think 
that network is fine. Also the network team informed that the packets are not 
getting lost. 

There are more than 20 servlets deployed in the tomcat and there are around 
10-12 requests (for all the servlets) coming to Tomcat in a minute.
I even increased the maxProcessors from 75 to 150 and acceptCount from 10 to 
20, but the behavior doesn't change. 
The architecture of Siebel is that it posts all the request at one point of 
time - ie at one instance. 

Please do inform if anybody has seen such behavior and how they resolved the 
problem. How do I find out that this is not a Tomcat issue. 

Thanks
Mrinmoy


-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 26, 2007 2:31 PM
To: Tomcat Users List
Subject: Re: IMP - Requests not reaching Tomcat Server

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mrimony,

Mrinmoy Pal wrote:
 Problem - Some of the requests not reaching Tomcat server from Siebel
 Application.

Sounds like this isn't a Tomcat problem. If Tomcat isn't getting the
request, it certainly can't fail!

 Siebel is posting the message to Tomcat Server via the url -
 http://xyz.ddns.slb.atosorigin-asp.com:8080/servlet/siebelLicenseOrder
 http://xyz.ddns.slb.atosorigin-asp.com:8080/servlet/siebelLicenseOrder .
 SiebelLicenseOrder is a servlet hosted on Tomcat Server.

 Siebel is getting the following error while posting to eGate servelet
 [Wed Sep 26 18:52:53 2007] *** ERROR [@ 0]: PosttoEGate() 201009 - Error
 while posting XML message to
 http://xyz.ddns.slb.atosorigin-asp.com:8080/servlet/siebelLicenseOrder
 http://xyz.ddns.slb.atosorigin-asp.com:8080/servlet/siebelLicenseOrder 
 Exception: 201007 - Invalid Parameter [httpResponse]!

I would try to find out what that error meant to Siebel. It's clearly
interfering with its ability to send the XML message to Tomcat. The
invalid parameter (httpResponse) is unlikely to have come from Tomcat
since Tomcat never handled the request.

- -chris

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

iD8DBQFG+rOL9CaO5/Lv0PARAl++AJ9Glahb9VkC+a9SZgXGGLWTU57UAQCeIHsa
rgknjCBkOOulUew1wsW8xXs=
=WM8o
-END PGP SIGNATURE-

-
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 6 NIO consumes all CPU until restarted

2007-10-29 Thread Filip Hanik - Dev Lists

hi Peter, what I would do in your case is stick to APR.
I believe JDK 1.5 has a nasty bug in the selector, causing the selector 
to constantly wake up for for a key, even though it's been cancelled.
Unfortunately, there are only two work arounds, upgrade to 1.6 or close 
the selector (which is not an option in the Tomcat code).


The first thread, the poller thread, would indicate that you run into 
this problem. The 2nd thread, makes no sense to me as it is, but my 
guess is that it might be related to the first issue.


Unfortunately I can't find the reference to the Sun bug right now, but 
what happens is that select() return 0 keys (over and over again), and 
causes the code to loop.


Since you have a work around, I would stick with that one,

but if you have time, you can test JDK 1.7(where it is supposed to be 
fixed) and supposed to get fixed in JDK 1.6 u4 (not out yet)


a few references could be
http://bugs.sun.com/view_bug.do?bug_id=6403933
http://forum.java.sun.com/thread.jspa?threadID=5135128
http://bugs.sun.com/view_bug.do?bug_id=6525190

if you, or someone else, has a test case to make this happen on tomcat, 
I will happily look into creating a solution. I will pursue it myself, 
but my time is somewhat constrained for recreating the scenario.



Filip

Peter wrote:
Oh, I forgot to mention, switched back to APR connector for 8080 for the weekend and all was fine. Switched back to NIO this morning to gather these stats and in a few hours it was stuck at 100% CPU again, very little variance in traffic (low traffic site right now, about a constant 1mbit). 


- Original Message 
From: Peter 



Thanks Filip, oversight on my part, here we go:

[EMAIL PROTECTED]:/logs/tomcat ps -eL -o pid,%cpu,lwp | grep -i 4046 | grep
 -iv 0.0
 4046  0.6  4047
 4046  0.1  4052
 4046  0.1  4053
 4046 21.9  4078
 4046 18.7  4108
 4046  0.1  4109

http-8080-Poller-0 daemon prio=1 tid=0x002ae2f860e0 nid=0xfee
 runnable [0x412cf000..0x412cfc10]
at java.util.HashMap.newKeyIterator(HashMap.java:889)
at java.util.HashMap$KeySet.iterator(HashMap.java:921)
at java.util.HashSet.iterator(HashSet.java:154)
at
 sun.nio.ch.SelectorImpl.processDeregisterQueue(SelectorImpl.java:127)
- locked 0x002ab2ac2810 (a java.util.HashSet)
at
 sun.nio.ch.PollSelectorImpl.doSelect(PollSelectorImpl.java:60)
at
 sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:69)
- locked 0x002ab2ac2870 (a sun.nio.ch.Util$1)
- locked 0x002ab2ac2858 (a
 java.util.Collections$UnmodifiableSet)
- locked 0x002ab2ab5c80 (a sun.nio.ch.PollSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80)
at
 org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1417)
at java.lang.Thread.run(Thread.java:595)

http-8080-exec-18 daemon prio=1 tid=0x002ae3c5d8e0 nid=0x100c
 runnable [0x430ec000..0x430edb10]
at
 
org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:44)
at
 
org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:794)
at
 
org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:126)
at
 
org.apache.coyote.http11.filters.GzipOutputFilter$FakeOutputStream.write(GzipOutputFilter.java:164)
at
 java.util.zip.GZIPOutputStream.finish(GZIPOutputStream.java:95)
at
 
org.apache.coyote.http11.filters.GzipOutputFilter.end(GzipOutputFilter.java:122)
at
 
org.apache.coyote.http11.InternalNioOutputBuffer.endRequest(InternalNioOutputBuffer.java:396)
at
 
org.apache.coyote.http11.Http11NioProcessor.action(Http11NioProcessor.java:1080)
at org.apache.coyote.Response.action(Response.java:183)
at org.apache.coyote.Response.finish(Response.java:305)
at
 org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:276)
at
 org.apache.catalina.connector.Response.finishResponse(Response.java:486)
at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:287)
at
 
org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:887)
at
 
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:696)
at
 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2009)
at
 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)



- Original Message 
From: Filip Hanik 


since you are running on linux, you know that you can get the id of the
 
thread that is taking up all the CPU, just use a binary top that let
 you 
list individual threads.


as you can see, the thread dump you 

RE: Fix to Tomcat Jasper slow .tag compilation problem.

2007-10-29 Thread Berglas, Anthony
Precompiling would not help.

1. Precompiling JSPs with .tag files is broken in Jasper, if tags call
other tags.

2. If it were fixed I would imagine that it would still recompile each
tag over and over again.  A precompile of a few dozen jsps would then
take hours.

The next issue to fix is the very slow one tag at a time Java compiles.
Then the dependencies can be looked at, but the code is fairly complex.

My enthusiasm for addressing these issues is dependent on the community
being able to incorporate my fixes into the core.  Otherwise I fork
Tomcat, not a good idea.  

My feeling is that my fix below will just be ignored.

Anthony

 -Original Message-
 From: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]
 Sent: Monday, October 29, 2007 8:17 PM
 To: Tomcat Users List
 Subject: Re: Fix to Tomcat Jasper slow .tag compilation problem.
 
 Would pre-compiling your jsp files help you instead? AFAIK that works
on
 the
 tags so you probably don't need to touch jspc.
 
 On 10/29/07, Berglas, Anthony [EMAIL PROTECTED] wrote:
 
  As described in a previous post, Jasper is *extremely* slow at
compiling
  .tag files packaged in a .jar.  Tens of seconds every time you touch
a
  new .jsp for the first time.  Almost unusable if you use .tags
  extensively, as I do.
 
  The following few lines is a hack to fix this.  The added code is
marked
  between //  AJB markers.  It effectively turns off the
timestamp
  checking on .jar files.
 
  This does NOT actually introduce a bug.  There is an existing bug in
  that .jsp files are not automatically recompiled if any .tags in
.jars
  are changed.  So you need to purge work in either case.  A proper
fix
  would be to check dependencies properly, at least to the .jar file
  itself.  But the current fix is *much* better that the existing
  behavior.
 
  COULD SOMEBODY PLEASE ARRANGE FOR THIS CODE TO BE ADDED TO THE
CURRENT
  SUBVERSION REPOSITORY?
 
  Outstanding is to make the compilation of .tags themselves much
faster,
  not tens of seconds.  To do that one needs to call the Java compiler
  once at the end for all the .tags, rather than once for each
individual
  .tag which is *much* slower.
 
  I must admit that I got rather lost reading the Jasper source, with
all
  the contexts etc.  Some better comments on the classes describing
their
  relationships to each other would be most helpful.
 
  Thanks,
 
  Anthony
 
 
 
  // Tomcat 6.0.10 Src deployed version.
 
  public class JspCompilationContext {...
 
  public void compile() throws JasperException,
FileNotFoundException
  {
  createCompiler();
 
  //  begin AJB
  // Hack to stop .tag files that are packaged in .jars being
  recompiled for every single .jsp that uses them.
  // The hack means that .tag files will not be automatically
  recompiled if they change -- you need to delete work area.
  // But that was actually an existing bug -- .jsps are not
  dependent on the .tag .jars so the work area needed deleting anyway.
  // (Outstanding is to compile multiple .tags in one pass and
so
  make the process Much faster.)
  boolean outDated;
  if (isPackagedTagFile) outDated = ! new
  File(getClassFileName()).exists();
  else outDated = jspCompiler.isOutDated();
  //AjbLog.log(### Compiler.compile  + jspUri +  pkgTagFile
 +
  isPackagedTagFile +  outDated  + outDated +   +
getClassFileName());
  if (outDated) {
  // if (isPackagedTagFile || jspCompiler.isOutDated()) {
  //  end AJB
  try {
  jspCompiler.removeGeneratedFiles();
  jspLoader = null;
  jspCompiler.compile();
  jsw.setReload(true);
  jsw.setCompilationException(null);
  } catch (JasperException ex) {
  // Cache compilation exception
  jsw.setCompilationException(ex);
  throw ex;
  } catch (Exception ex) {
  JasperException je = new JasperException(
 
  Localizer.getMessage(jsp.error.unable.compile),
  ex);
  // Cache compilation exception
  jsw.setCompilationException(je);
  throw je;
  }
  }
  }
 
  --
  Dr Anthony Berglas
  Ph. +61 7 3227 4410
  Mob. +61 44 838 8874
  [EMAIL PROTECTED]; [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: Tomcat 6 clustering without mulicast

2007-10-29 Thread Filip Hanik - Dev Lists

ok, let me take a look, I will get back to you tomorrow or Wed

Filip

SANCHEZ, Michel wrote:

I'am not shure that i understand well.

What i whould like to have is session replication on a two members cluster with 
unicast heartbeat.
With DisableMcastInterceptor i have no more multicast but no more session 
replication. It looks like cluster has no members
Here is my configuration :

Server I :
Cluster channelSendOptions=8

className=org.apache.catalina.ha.tcp.SimpleTcpCluster

Manager

className=org.apache.catalina.ha.session.DeltaManager
expireSessionsOnShutdown=false 
domainReplication=true

notifyListenersOnReplication=true /

Channel

className=org.apache.catalina.tribes.group.GroupChannel

Receiver address=auto 
autoBind=100

className=org.apache.catalina.tribes.transport.nio.NioReceiver
maxThreads=6 port=4000 
selectorTimeout=5000 /

Sender

className=org.apache.catalina.tribes.transport.ReplicationTransmitter
Transport

className=org.apache.catalina.tribes.transport.nio.PooledParallelSender /
/Sender
Interceptor

className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector /
Interceptor

className=org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor
Member

className=org.apache.catalina.tribes.membership.StaticMember
port=4001 
securePort=-1 host=localhost
domain=test-domain 
uniqueId={0,0,0,0,0,0,0,0,0,0} /

/Interceptor
Interceptor

className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor
 /

Interceptor

className=org.apache.catalina.ha.tcp.DisableMcastInterceptor /

/Channel

Valve

className=org.apache.catalina.ha.tcp.ReplicationValve filter= /
Valve

className=org.apache.catalina.ha.session.JvmRouteBinderValve /

Deployer

className=org.apache.catalina.ha.deploy.FarmWarDeployer
deployDir=/tmp/war-deploy/ 
tempDir=/tmp/war-temp/
watchDir=/tmp/war-listen/ 
watchEnabled=false /

ClusterListener

className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener /
ClusterListener

className=org.apache.catalina.ha.session.ClusterSessionListener /
/Cluster

Server II :
Cluster channelSendOptions=8

className=org.apache.catalina.ha.tcp.SimpleTcpCluster

Manager

className=org.apache.catalina.ha.session.DeltaManager
expireSessionsOnShutdown=false 
domainReplication=true

notifyListenersOnReplication=true /

Channel

className=org.apache.catalina.tribes.group.GroupChannel
Receiver 

HSE_REQ_SEND_RESPONSE_HEADER failed with error=00002746

2007-10-29 Thread neil.russell

I'm trying to get the iis/tomcat connector to work with IIS 6.0 on Windows
Server 2003 Standard Edition (on vmware esx). I'm using the latest connector
DLL (1.2.25) and am getting the following error message:
HSE_REQ_SEND_RESPONSE_HEADER failed with error=2746
I have had no problems getting the connector working using Microsoft's vm
player image for Windows Server 2003 Enterprise Edition with IIS 6.

This is the full trace log generated. It is same as the trace log from the
server that works up until the line: HSE_REQ_SEND_RESPONSE_HEADER failed
with error=2746

http://www.nabble.com/file/p13479338/Trace%2BLog.txt Trace+Log.txt 

Any help would be great.
Neil
-- 
View this message in context: 
http://www.nabble.com/HSE_REQ_SEND_RESPONSE_HEADER-failed-with-error%3D2746-tf4715414.html#a13479338
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
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 6 clustering without mulicast

2007-10-29 Thread Filip Hanik - Dev Lists

ok, change

address=auto to address=localhost

to match your static members, and that should take care of your problem

Filip

SANCHEZ, Michel wrote:

I'am not shure that i understand well.

What i whould like to have is session replication on a two members cluster with 
unicast heartbeat.
With DisableMcastInterceptor i have no more multicast but no more session 
replication. It looks like cluster has no members
Here is my configuration :

Server I :
Cluster channelSendOptions=8

className=org.apache.catalina.ha.tcp.SimpleTcpCluster

Manager

className=org.apache.catalina.ha.session.DeltaManager
expireSessionsOnShutdown=false 
domainReplication=true

notifyListenersOnReplication=true /

Channel

className=org.apache.catalina.tribes.group.GroupChannel

Receiver address=auto 
autoBind=100

className=org.apache.catalina.tribes.transport.nio.NioReceiver
maxThreads=6 port=4000 
selectorTimeout=5000 /

Sender

className=org.apache.catalina.tribes.transport.ReplicationTransmitter
Transport

className=org.apache.catalina.tribes.transport.nio.PooledParallelSender /
/Sender
Interceptor

className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector /
Interceptor

className=org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor
Member

className=org.apache.catalina.tribes.membership.StaticMember
port=4001 
securePort=-1 host=localhost
domain=test-domain 
uniqueId={0,0,0,0,0,0,0,0,0,0} /

/Interceptor
Interceptor

className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor
 /

Interceptor

className=org.apache.catalina.ha.tcp.DisableMcastInterceptor /

/Channel

Valve

className=org.apache.catalina.ha.tcp.ReplicationValve filter= /
Valve

className=org.apache.catalina.ha.session.JvmRouteBinderValve /

Deployer

className=org.apache.catalina.ha.deploy.FarmWarDeployer
deployDir=/tmp/war-deploy/ 
tempDir=/tmp/war-temp/
watchDir=/tmp/war-listen/ 
watchEnabled=false /

ClusterListener

className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener /
ClusterListener

className=org.apache.catalina.ha.session.ClusterSessionListener /
/Cluster

Server II :
Cluster channelSendOptions=8

className=org.apache.catalina.ha.tcp.SimpleTcpCluster

Manager

className=org.apache.catalina.ha.session.DeltaManager
expireSessionsOnShutdown=false 
domainReplication=true

notifyListenersOnReplication=true /

Channel

className=org.apache.catalina.tribes.group.GroupChannel
  

Re: Fix to Tomcat Jasper slow .tag compilation problem.

2007-10-29 Thread Mark Thomas
Berglas, Anthony wrote:
 My enthusiasm for addressing these issues is dependent on the community
 being able to incorporate my fixes into the core.  Otherwise I fork
 Tomcat, not a good idea.  
 
 My feeling is that my fix below will just be ignored.

It might not get looked at straight away. Creating a bugzilla entry
and attaching your patch means it is much less likely to get
overlooked. I haven't checked - some of the issues you highlighted may
already be in bugzilla.

I don't know if the source has changed, but a patch against the latest
code base is usually easier to work with rather than one several
versions old.

Are you intending to address all of the issues you out-lined? If this
is the case, I would rather wait for the complete solution than commit
an interim hack.

Mark

-
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: Fix to Tomcat Jasper slow .tag compilation problem.

2007-10-29 Thread Peng Tuck Kwok
On 10/30/07, Berglas, Anthony [EMAIL PROTECTED] wrote:

 Precompiling would not help.

 1. Precompiling JSPs with .tag files is broken in Jasper, if tags call
 other tags.

 2. If it were fixed I would imagine that it would still recompile each
 tag over and over again.  A precompile of a few dozen jsps would then
 take hours.

 The next issue to fix is the very slow one tag at a time Java compiles.
 Then the dependencies can be looked at, but the code is fairly complex.

 My enthusiasm for addressing these issues is dependent on the community
 being able to incorporate my fixes into the core.  Otherwise I fork
 Tomcat, not a good idea.

 My feeling is that my fix below will just be ignored.

 Anthony

  -Original Message-
  From: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]
  Sent: Monday, October 29, 2007 8:17 PM
  To: Tomcat Users List
  Subject: Re: Fix to Tomcat Jasper slow .tag compilation problem.
 
  Would pre-compiling your jsp files help you instead? AFAIK that works
 on
  the
  tags so you probably don't need to touch jspc.
 
  On 10/29/07, Berglas, Anthony [EMAIL PROTECTED] wrote:
  
   As described in a previous post, Jasper is *extremely* slow at
 compiling
   .tag files packaged in a .jar.  Tens of seconds every time you touch
 a
   new .jsp for the first time.  Almost unusable if you use .tags
   extensively, as I do.
  
   The following few lines is a hack to fix this.  The added code is
 marked
   between //  AJB markers.  It effectively turns off the
 timestamp
   checking on .jar files.
  
   This does NOT actually introduce a bug.  There is an existing bug in
   that .jsp files are not automatically recompiled if any .tags in
 .jars
   are changed.  So you need to purge work in either case.  A proper
 fix
   would be to check dependencies properly, at least to the .jar file
   itself.  But the current fix is *much* better that the existing
   behavior.
  
   COULD SOMEBODY PLEASE ARRANGE FOR THIS CODE TO BE ADDED TO THE
 CURRENT
   SUBVERSION REPOSITORY?
  
   Outstanding is to make the compilation of .tags themselves much
 faster,
   not tens of seconds.  To do that one needs to call the Java compiler
   once at the end for all the .tags, rather than once for each
 individual
   .tag which is *much* slower.
  
   I must admit that I got rather lost reading the Jasper source, with
 all
   the contexts etc.  Some better comments on the classes describing
 their
   relationships to each other would be most helpful.
  
   Thanks,
  
   Anthony
  
  
  
   // Tomcat 6.0.10 Src deployed version.
  
   public class JspCompilationContext {...
  
   public void compile() throws JasperException,
 FileNotFoundException
   {
   createCompiler();
  
   //  begin AJB
   // Hack to stop .tag files that are packaged in .jars being
   recompiled for every single .jsp that uses them.
   // The hack means that .tag files will not be automatically
   recompiled if they change -- you need to delete work area.
   // But that was actually an existing bug -- .jsps are not
   dependent on the .tag .jars so the work area needed deleting anyway.
   // (Outstanding is to compile multiple .tags in one pass and
 so
   make the process Much faster.)
   boolean outDated;
   if (isPackagedTagFile) outDated = ! new
   File(getClassFileName()).exists();
   else outDated = jspCompiler.isOutDated();
   //AjbLog.log(### Compiler.compile  + jspUri +  pkgTagFile
  +
   isPackagedTagFile +  outDated  + outDated +   +
 getClassFileName());
   if (outDated) {
   // if (isPackagedTagFile || jspCompiler.isOutDated()) {
   //  end AJB
   try {
   jspCompiler.removeGeneratedFiles();
   jspLoader = null;
   jspCompiler.compile();
   jsw.setReload(true);
   jsw.setCompilationException(null);
   } catch (JasperException ex) {
   // Cache compilation exception
   jsw.setCompilationException(ex);
   throw ex;
   } catch (Exception ex) {
   JasperException je = new JasperException(
  
   Localizer.getMessage(jsp.error.unable.compile),
   ex);
   // Cache compilation exception
   jsw.setCompilationException(je);
   throw je;
   }
   }
   }
  
   --
   Dr Anthony Berglas
   Ph. +61 7 3227 4410
   Mob. +61 44 838 8874
   [EMAIL PROTECTED]; [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 

Tracking Authentication rejects in Tomcat 5.5

2007-10-29 Thread Scott Smith
I'm using Tomcat 5.5 and using dataSourceRealm to do authentication.  I
need to track bad logins.  In particular, I want to track any logins
where the password is wrong.  I also want to track the remote server's
IP address that provides a bad login.

 

It appears that I can track bad logins by creating a class derived from
dataSourceRealm and then overriding the authenticate() methods.  I'll
then make the call to dataSourceRealm's authenticate, check for null as
the return and conclude it's a bad login if it is null.  I can then
track the info from there.  However, I don't know how to get the remote
server's IP address (request.getRemoteAddr()).  

 

Does anyone have a suggestion?  Does the general approach seem
reasonable?

 

Scott



Re: jkMount

2007-10-29 Thread BuildSmart


On Oct 29, 2007, at 18:33:16, Christopher Schultz wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dale,

BuildSmart wrote:

As for only working on localhost, you need to check the rest of your
Apache httpd and Tomcat configurations: you probably don't have the
right virtual host config on either httpd or Tomcat or both. My  
guess is

both.


I only have one webapp in Tomcat as localhost and it's on port 8080
(with connector on 8009) what more do I need??


So, you have Tomcat configured to support the localhost virtual host
and you expect it to work with other virtual hosts? Apache httpd  
doesn't

do this, either. Why would you expect that an incorrect configuration
would work properly?


Don't tell me now that I have to add an entry in Tomcat for every
virtualhost that wishes to access the webapp, that makes no logical
sense to have multiple tomcat virtualhosts pointing to the same
webapp/docroot.


Aah, yes... but you're asking all virtual hosts in httpd to point  
to the
same Tomcat instance. Why does the symmetric relation not hold for  
such

an illogical statement?

Tomcat, like Apache httpd, can be configured to use a default virtual
host for all requests that do not match any of the explicitly-defined
virtual hosts. Since you are so familiar with the documentation, I  
won't

waste space in this post with the configuration.


You're shitting me, it can't be that simple, thank you, it works as  
configured with my ajp13 worker.


It still doesn't work with the workerX though, I'm guessing that my  
workers.property file needs modification for workerX to work but  
since ajp13 works I just need to come up with a name that wont be  
common and hard code the properties into the module in an attempt to  
reduce configuration making it easier to implement.




I'm using the mod_jk module and not a bastardized version so if  
it's not
working per your configuration directives then it's the guys who  
coded

mod_jk who are fault and you should bitch to them about it.


I've never had a problem with mod_jk. No complaints required from my
end. It's possible that mod_jk was written to support only virtual
hosts, and not JkMount options at the top-level. I'd be surprised at
this, but there's an easy workaround: use a global virtual host. In  
any

event, if you need this global capability (and it sounds like you do),
try asking for this capability instead of telling the mod_jk folks  
that

they are bunch of idiots. You catch more flies...

In your case, you have discrete virtual hosts. You may have to add
JkMount /*.jsp workerX for each virtual host. It's not insane: it's
what's required. You have to map DocumentRoot for each VirtualHost
element. What's wrong with adding this mapping as well.


Concerning vhosts, I didn't understand, what you try to achieve.
Please try the above JkMount first. As soon as that works for  
you, we

can discuss further requirements.


I did, it doesn't work and it kills python and php functionality.


No, you said that JkMount /* workerX kills Python and Php.  
Rainer is

asking you to use JkMount /*.jsp workerX.


workerX is not defined anywhere but I'll give it a try to satisfy  
you.


OMGWTFBBQ. Nearly all of the mod_jk documentation surrounds creating
workers that connect mod_jk to Tomcat. You should have gotten /that/
far. You must have a worker, or nothing works. workerX is a
placeholder for the actual worker you want to use. Put your own  
worker's
name in there, don't just type workerX and complain when it  
doesn't work.


I had that in my config, that's what I was told to put in it, I  
already had JkMount /*.jsp ajp13 when they said to try JkMount / 
*.jsp workerX so I did.





guess that doesn't work either, any more suggestion???


Yes: use the name of the worker that you actually configured  
(ajp13, as

per the posted configuration).


it wouldn't have been so bad but more than a
week with incomplete directions hasn't help the frustration level,
something is definitely broken if it wont work as people tell me to
configure it and as you stated that is how everyone configures it  
and it

works for them so either I'm not getting all of the information or it
doesn't work.


Let's take a quick look at your configuration. workers.properties:

worker.list=ajp13
worker.ajp13.host=localhost
worker.ajp13.port=8019
worker.ajp13.type=ajp13

Note that you don't need the 'lbfactor' unless you are using a
load-balanced worker.


yeah I removed that a while ago along with the ps=/  variable.



Now, to your httpd config:

IfModule mod_jk.c
JKWorkersFile /etc/httpd/workers.ajp13.properties
JKLogFile /var/log/httpd/mod_jk.log
JKLogLevel debug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkMount /*.jsp ajp13
JkOptions +ForwardKeySize +ForwardURICompat
/IfModule

Your config is clearly being loaded, as you are getting messages in  
your

log file regarding mod_jk.

Where is this configuration located? Is it being put into a  
VirtualHost,

or is it at the top-level?


top 

Re: Tracking Authentication rejects in Tomcat 5.5

2007-10-29 Thread Kevin Jackson
Hi,

 Does anyone have a suggestion?  Does the general approach seem
 reasonable?

We have similar requirements, but at the moment we are using a
subclass of JDBCRealm, here is our authenticate method:

@Override
public Principal authenticate(Connection connection, String userName,
String credentials) {
LoginInfo loginInfoData = new LoginInfo( userName, credentials 
);
loginInfo.set( loginInfoData );

try{

if( getCaseInsensitiveLogin() )
userName = userName.toUpperCase();

Principal principal = super.authenticate( connection, 
userName,
credentials );

// if login failed
if( principal == null )
recordFailureLogon( connection, userName, 
credentials );
else
recordSuccessfulLogon( connection, userName );

return principal;
}catch(SQLException e){
e.printStackTrace();
return null;
}
}

where recordFailureLogin has the following signature:

protected void recordFailureLogon(Connection connection, String
userName, String credentials) throws SQLException

If you find a way of recording the remote IP address I'd love to hear
how you did it

Thanks,
Kev

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

2007-10-29 Thread Ingo Krabbe
Am Montag, 29. Oktober 2007 23:33:16 schrieb Christopher Schultz:
 Dale,

 BuildSmart wrote:
  As for only working on localhost, you need to check the rest of your
  Apache httpd and Tomcat configurations: you probably don't have the
  right virtual host config on either httpd or Tomcat or both. My guess is
  both.
 
  I only have one webapp in Tomcat as localhost and it's on port 8080
  (with connector on 8009) what more do I need??

 So, you have Tomcat configured to support the localhost virtual host
 and you expect it to work with other virtual hosts? Apache httpd doesn't
 do this, either. Why would you expect that an incorrect configuration
 would work properly?

  Don't tell me now that I have to add an entry in Tomcat for every
  virtualhost that wishes to access the webapp, that makes no logical
  sense to have multiple tomcat virtualhosts pointing to the same
  webapp/docroot.

 Aah, yes... but you're asking all virtual hosts in httpd to point to the
 same Tomcat instance. Why does the symmetric relation not hold for such
 an illogical statement?

 Tomcat, like Apache httpd, can be configured to use a default virtual
 host for all requests that do not match any of the explicitly-defined
 virtual hosts. Since you are so familiar with the documentation, I won't
 waste space in this post with the configuration.

  I'm using the mod_jk module and not a bastardized version so if it's not
  working per your configuration directives then it's the guys who coded
  mod_jk who are fault and you should bitch to them about it.

 I've never had a problem with mod_jk. No complaints required from my
 end. It's possible that mod_jk was written to support only virtual
 hosts, and not JkMount options at the top-level. I'd be surprised at
 this, but there's an easy workaround: use a global virtual host. In any
 event, if you need this global capability (and it sounds like you do),
 try asking for this capability instead of telling the mod_jk folks that
 they are bunch of idiots. You catch more flies...

Actually I had BIG problems with JkMount at a time ... well I think there was 
a major flaw in communication between the module and the tomcat vm ... or 
somewhere else.  Anyway these problems are thought to be gone in recent 
versions (I think).


 In your case, you have discrete virtual hosts. You may have to add
 JkMount /*.jsp workerX for each virtual host. It's not insane: it's
 what's required. You have to map DocumentRoot for each VirtualHost
 element. What's wrong with adding this mapping as well.


The virtual host problem can be solved quite easily be apache configuration if 
you define you JkMount statements in a simple include file lets call it 
jkmount.conf and use them in your virtual host statements:

VirtualHost bla:80
#   [...]
include jkmount.conf
#   [...]
/VirtualHost


  Concerning vhosts, I didn't understand, what you try to achieve.
  Please try the above JkMount first. As soon as that works for you, we
  can discuss further requirements.
 
  I did, it doesn't work and it kills python and php functionality.
 
  No, you said that JkMount /* workerX kills Python and Php. Rainer is
  asking you to use JkMount /*.jsp workerX.
 
  workerX is not defined anywhere but I'll give it a try to satisfy you.

 OMGWTFBBQ. Nearly all of the mod_jk documentation surrounds creating
 workers that connect mod_jk to Tomcat. You should have gotten /that/
 far. You must have a worker, or nothing works. workerX is a
 placeholder for the actual worker you want to use. Put your own worker's
 name in there, don't just type workerX and complain when it doesn't work.


ouch, yes of course there should be workers.

  guess that doesn't work either, any more suggestion???

 Yes: use the name of the worker that you actually configured (ajp13, as
 per the posted configuration).

  it wouldn't have been so bad but more than a
  week with incomplete directions hasn't help the frustration level,
  something is definitely broken if it wont work as people tell me to
  configure it and as you stated that is how everyone configures it and it
  works for them so either I'm not getting all of the information or it
  doesn't work.

No, it just a bit insane.  Nore more then anything else that is done with 
Java.


 Let's take a quick look at your configuration. workers.properties:

 worker.list=ajp13
 worker.ajp13.host=localhost
 worker.ajp13.port=8019
 worker.ajp13.type=ajp13

 Note that you don't need the 'lbfactor' unless you are using a
 load-balanced worker.

 Now, to your httpd config:

 IfModule mod_jk.c
 JKWorkersFile /etc/httpd/workers.ajp13.properties
 JKLogFile /var/log/httpd/mod_jk.log
 JKLogLevel debug
 JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
 JkMount /*.jsp ajp13
 JkOptions +ForwardKeySize +ForwardURICompat
 /IfModule

 Your config is clearly being loaded, as you are getting messages in your
 log file regarding mod_jk.

 Where is this configuration located? Is it being put into a VirtualHost,
 or is it at the 

[tomcat]How to decrypt the DIGEST authentication?

2007-10-29 Thread zhongliang zhang
Hi,everyone,
I got a problem with the DIGEST authentication.
I configured my web.xml as followed:
security-constraint
web-resource-collection
  web-resource-nameapp/web-resource-name 
  url-pattern/*/url-pattern 
/web-resource-collection 
auth-constraint 
  role-namepoweruser/role-name
/auth-constraint 
 /security-constraint 
 login-config
auth-methodDIGEST/auth-method
realm-nameapp/realm-name
 /login-config
So,if anybody try to access my app,he needs to input his username and 
password,while the username and password are stored in the Oracle database,not 
configured in the tomcat-users.xml file which located at $tomcat_home/conf/ 
directory. I can not configure it in the tomcat-users.xml for the app has an 
function of make a new user.
 
Is there anyway to solve this problem?
 
P.S. I tried to solve it by coding in my program,like adding the following code 
to set the response's status to ask for DIGEST authentication.
((HttpServletResponse) response).setStatus(HttpServletResponse.SC_UNAUTHORIZED);
But I do not get a way to decryt the DIGEST information.
 
Any advice will be appreciated!
thanks.
_
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx

Re: mod_jk for OS X PPC

2007-10-29 Thread Peter Rossbach

Hi,

I have build my own mod_jk 1.2.25 module at Leopard:

Install current Mac Ports
sudo port install autoconf
sudo port install apr
sudo port install apr-util

# use gnu libtool

ln -s /opt/local/bin/glibtool /opt/local/bin/libtool
ln -s /opt/local/bin/glibtoolize /opt/local/bin/libtoolize

download/extract/goto apache 2.2.6
./configure --prefix=/Users/xxx/server/apache226 --enable-so --with- 
mpm=worker ; make ; make install


download/extract/goto mod_jk 1.2.25
.configure --with-apxs=/Users/xxx/server/apache226/bin/apxs
make
make install

config mod_jk at apache226; start apache and volia mod_jk is up and  
runnig.


I hope we can download the PPC binaries at Wednesday. I can check the  
mod_jk binaries with the standard Leopard apache 2.2.6 installation.


Regards
Peter


Am 29.10.2007 um 22:14 schrieb Christopher Schultz:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Richard,

Richard Doust wrote:

In case that image doesn't get through, (and to make this text
searchable) it says:


Thanks for posting the text: the image did not come through; mailing
lists rarely accept non-text attachments (and sometimes not even  
then).



Cannot load /usr/libexec/apache2/mod_jk.so into server:
dlopen(/usr/libexec/apache2/mod_jk.so, 10): no suitable image  
found. Did

find /usr/libexec/apache2/mod_jk.so: mach-o, but wrong architecture.


Can you run these on your system, please?

$ uname -a

$ file /path/to/mod_jk.so

??

That should give us some technical details that should help. Also, the
version of your compiler would be helpful, too (usually 'cc -v' or
something similar).


That's what I get.
I tried using the mod_jk.so that I had working with the 1.3  
version of

Apache just for hahas and get the same error, so I'm not sure what's
going on.


That's a little odd... it seems that Apache is complaining about the
architecture, instead of the httpd API version mismatch. The 1.3  
binary

will certainly not work.


I was hoping some kind soul might have a working version of mod_jk.so
for the PowerPC architecture.
Any light you can help shed on the subject would be appreciated.
Oh, the apxs file in /usr/sbin has a timestamp that leads me to  
believe

it came with the new version of Apache.


Good to know.

- -chris

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

iD8DBQFHJk0o9CaO5/Lv0PARAnO/AKCUn8Pu2QDquIA14+1qZU/s5jHQNACdH96F
SzaQwwi9GMsABmrZC5henx4=
=wGkY
-END PGP SIGNATURE-

-
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: PKCS#12 type SSL certificate support in Tomcat

2007-10-29 Thread Hitesh Raghav
Hi Lucas,

I'm using following connector/ configuration:

Connector port=8443 maxHttpHeaderSize=8192

   maxThreads=150 minSpareThreads=25
maxSpareThreads=75

   enableLookups=false disableUploadTimeout=true

   acceptCount=100 scheme=https secure=true

   clientAuth=false sslProtocol=TLS /
 
Factory
className=org.apache.coyote.tomcat4.CoyoteServerSocketFactory

clientAuth=false protocol=TLS

keystoreFile=keystore/.keystore

keystorePass=changeit

keystoreType=pkcs12 /


Please let me know in case any other details are needed.


Thanks,
-Hitesh

 

-Original Message-
From: Lucas Galfaso [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 26, 2007 7:39 PM
To: Tomcat Users List
Subject: Re: PKCS#12 type SSL certificate support in Tomcat

Can you post the Connector / configuration that you are using?
- lg

On 10/26/07, Hitesh Raghav [EMAIL PROTECTED] wrote:
 Dear All,

 Is there any limitation to support PKCS#12 type SSL certificate in 
 Tomcat.

 As per Tomcat User Guide, Tomcat currently operates with JKS, PKCS11 
 or
 PKCS12 format keystores.
 http://tomcat.apache.org/tomcat-5.5-doc/ssl-howto.html

 But, I'm unable to use PKCS#12 certificate in my Tomcat.

 It throws:

 java.io.IOException: Invalid keystore format
 at
 sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:633)
 at

sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:38)
 at java.security.KeyStore.load(KeyStore.java:1185)
 at
 org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketF
 ac
 tory.java:287)
 at
 org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(JSSESock
 et
 Factory.java:227)
 at
 org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.getKeyManagers(JSS
 E1
 4SocketFactory.java:142)
 at
 org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(JSSE14SocketF
 ac
 tory.java:110)
 at
 org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESoc
 ke
 tFactory.java:89)
 at

org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.
 java:293)
 at
 org.apache.coyote.http11.Http11BaseProtocol.init(Http11BaseProtocol.ja
 va
 :139)
 at

org.apache.catalina.connector.Connector.initialize(Connector.java:1017)
 at
 org.apache.catalina.core.StandardService.initialize(StandardService.ja
 va
 :578)
 at
 org.apache.catalina.core.StandardServer.initialize(StandardServer.java
 :7
 82)
 at
 org.apache.catalina.startup.Catalina.load(Catalina.java:504)
 at
 org.apache.catalina.startup.Catalina.load(Catalina.java:524)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
 Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
 av
 a:39)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
 or
 Impl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at
 org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:267)
 at
 org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

 Could you please throw some light on PKCS#12 type certificate support.

 Please let me know in case any details are needed.


 Thanks,
 -Hitesh



-
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: Tracking Authentication rejects in Tomcat 5.5

2007-10-29 Thread Scott Smith
I found this tonight.  It looks promising.
 
http://sourceforge.net/projects/lockout-realm
 
It appears he has the HttpServletRequest object available and that means you 
can do a getRemoteAddr().
 
So, I haven't played with it, but...
 
Scott



From: Kevin Jackson [mailto:[EMAIL PROTECTED]
Sent: Mon 10/29/2007 10:03 PM
To: Tomcat Users List
Subject: Re: Tracking Authentication rejects in Tomcat 5.5



Hi,

 Does anyone have a suggestion?  Does the general approach seem
 reasonable?

We have similar requirements, but at the moment we are using a
subclass of JDBCRealm, here is our authenticate method:

@Override
public Principal authenticate(Connection connection, String userName,
String credentials) {
LoginInfo loginInfoData = new LoginInfo( userName, credentials 
);
loginInfo.set( loginInfoData );

try{
   
if( getCaseInsensitiveLogin() )
userName = userName.toUpperCase();
   
Principal principal = super.authenticate( connection, 
userName,
credentials );

// if login failed
if( principal == null )
recordFailureLogon( connection, userName, 
credentials );
else
recordSuccessfulLogon( connection, userName );
   
return principal;
}catch(SQLException e){
e.printStackTrace();
return null;
}
}

where recordFailureLogin has the following signature:

protected void recordFailureLogon(Connection connection, String
userName, String credentials) throws SQLException

If you find a way of recording the remote IP address I'd love to hear
how you did it

Thanks,
Kev

-
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: Keytool: SSL Certification Issue

2007-10-29 Thread zhongliang zhang
Maybe you should try the following fragment:
Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true
maxThreads=150 scheme=https secure=trueclientAuth=false 
sslProtocol=TLS keystorePass=changeit 
keystoreFile= c:/Documents and Settings/rensetty/.keystore 
truststoreFile=C:/Sun/SDK/jdk/jre/lib/security/cacerts
   truststorePass=yourPassword/
By default the truststorePass of cacerts is changeit,while the keystorepass is 
customized by yourself.
Also,you need to configure some external info in the web.xml of Tomcat or your 
own application I think.
like security-constraint  web-resource-collection   
web-resource-nameapp/web-resource-name   
url-pattern/pages/*/url-pattern  /web-resource-collection  
web-resource-collection   web-resource-nameapp/web-resource-name   
url-pattern/index.html/url-pattern  /web-resource-collection  
user-data-constraint   
transport-guaranteeCONFIDENTIAL/transport-guarantee  
/user-data-constraint /security-constraint
 
 !-- Authorization setting for SSL -- login-config  
auth-methodCLIENT-CERT/auth-method  realm-nameClient Cert/realm-name 
/login-config
 
BR.



 Subject: Keytool: SSL Certification Issue Date: Tue, 30 Oct 2007 13:50:06 
 +0800 From: [EMAIL PROTECTED] To: users@tomcat.apache.org  Hi,I 
 am facing SSL certificate issue in my Tomcat Environment. I have created 
 local SSL Server certificate to be authenticated by the certificate imported 
 from Thawte Certificate Authority.   With the following Connector entry in 
 server.xml,Connector port=8443 protocol=HTTP/1.1 
 SSLEnabled=true  maxThreads=150 scheme=https secure=true  
 clientAuth=false sslProtocol=TLS   keystorePass=changeit  
 keystoreFile= c:/Documents and Settings/rensetty/.keystore   
 truststoreFile=C:/Sun/SDK/jdk/jre/lib/security/cacerts/I am seeing 
 the following error repeatedly on my console:*START 
 ** The following is my SSL configuration I have 
 enabled SSL for user authentication. I have is SSL configured. I gWhen I try 
 to authenticate communicate to t
 he I get the following error when to issue when I try to connect to
2007-10-29 09:16:44,217 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] 
[com.arjuna.ats.internal.jta.recovery.info.firstpass] Local XARecoveryModule - 
first pass  2007-10-29 09:16:44,233 INFO 
[org.apache.coyote.http11.Http11Protocol] Starting Coyote HTTP/1.1 on 
http-8443  2007-10-29 09:16:44,249 ERROR 
[org.apache.tomcat.util.net.JIoEndpoint] Socket accept failed  
java.net.SocketException: SSL handshake errorjavax.net.ssl.SSLException: No 
available certificate or key corresponds to the SSL cipher suites which are 
enabled.  at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.acceptSocket(JSSESocketFactory.java:150)
  at 
org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:310)  at 
java.lang.Thread.run(Thread.java:595)  2007-10-29 09:16:44,280 INFO 
[org.apache.coyote.ajp.AjpProtocol] Starting Coyote AJP/1.3 on 
ajp-AGILENT-7B2231B%2F146.208.145.86-8009 END *
 * 
 However with keyAlis (keyAlias=root) included in the Connector Entry I see 
a different error. I saw a couple of similar queries in the mailing lists but 
didn't help address these errors. Any help on this is highly appreciated.   
   **START **  2007-10-29 13:54:52,449 
ERROR [org.apache.coyote.http11.Http11Protocol] Error starting endpoint  
java.io.IOException: Alias name root does not identify a key entry  at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:412)
  at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:378)
  at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:125)
  at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:496)  at 
org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:515)  at 
org.apache.coyot
 e.http11.Http11Protocol.start(Http11Protocol.java:203)  at 
org.apache.catalina.connector.Connector.start(Connector.java:1132)  at 
org.jboss.web.tomcat.service.JBossWeb.startConnectors(JBossWeb.java:584)  at 
org.jboss.web.tomcat.service.JBossWeb.handleNotification(JBossWeb.java:621)  
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)  at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)  at 
org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
  at $Proxy47.handleNotification(Unknown Source)  at 
org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotification(JBossNotificationBroadcasterSupport.java:127)
  at 
org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotification(JBossNotificationBroadcasterSupport.java:108)

Keytool: SSL Certification Issue

2007-10-29 Thread renu-kumar_setty
Hi,

 

I am facing SSL certificate issue in my Tomcat Environment. I have created 
local SSL Server certificate to be authenticated by the certificate imported 
from Thawte Certificate Authority. 

With the following Connector entry in server.xml,

 

Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true

   maxThreads=150 scheme=https secure=true

   clientAuth=false sslProtocol=TLS 

   keystorePass=changeit

   keystoreFile= c:/Documents and Settings/rensetty/.keystore 

   truststoreFile=C:/Sun/SDK/jdk/jre/lib/security/cacerts/

 

I am seeing the following error repeatedly on my console:

 

*START **
The following is my SSL configuration I have enabled SSL for user 
authentication. I have is SSL configured. I gWhen I try to authenticate 
communicate to the I get the following error when to issue when I try to 
connect to

 

2007-10-29 09:16:44,217 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] 
[com.arjuna.ats.internal.jta.recovery.info.firstpass] Local XARecoveryModule - 
first pass

2007-10-29 09:16:44,233 INFO  [org.apache.coyote.http11.Http11Protocol] 
Starting Coyote HTTP/1.1 on http-8443

2007-10-29 09:16:44,249 ERROR [org.apache.tomcat.util.net.JIoEndpoint] Socket 
accept failed

java.net.SocketException: SSL handshake errorjavax.net.ssl.SSLException: No 
available certificate or key corresponds to the SSL cipher suites which are 
enabled.

at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.acceptSocket(JSSESocketFactory.java:150)

at 
org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:310)

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

2007-10-29 09:16:44,280 INFO  [org.apache.coyote.ajp.AjpProtocol] Starting 
Coyote AJP/1.3 on ajp-AGILENT-7B2231B%2F146.208.145.86-8009

 

 END 
**

 

 

However with keyAlis (keyAlias=root) included in the Connector Entry I see a 
different error. I saw a couple of similar queries in the mailing lists but 
didn't help address these errors. Any help on this is highly appreciated.

 

 

**START **

2007-10-29 13:54:52,449 ERROR [org.apache.coyote.http11.Http11Protocol] Error 
starting endpoint

java.io.IOException: Alias name root does not identify a key entry

at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:412)

at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:378)

at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:125)

at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:496)

at 
org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:515)

at 
org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:203)

at 
org.apache.catalina.connector.Connector.start(Connector.java:1132)

at 
org.jboss.web.tomcat.service.JBossWeb.startConnectors(JBossWeb.java:584)

at 
org.jboss.web.tomcat.service.JBossWeb.handleNotification(JBossWeb.java:621)

at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)

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

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

at 
org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)

at $Proxy47.handleNotification(Unknown Source)

at 
org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotification(JBossNotificationBroadcasterSupport.java:127)

at 
org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotification(JBossNotificationBroadcasterSupport.java:108)

at 
org.jboss.system.server.ServerImpl.sendNotification(ServerImpl.java:916)

at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:497)

at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)

at org.jboss.Main.boot(Main.java:200)

at org.jboss.Main$1.run(Main.java:508)

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

2007-10-29 13:54:52,465 WARN  [org.jboss.web.tomcat.service.JBossWeb] Failed to 
startConnectors

 

*END **

 

 

 keytool -v -list **

Enter keystore password:  changeit

 

Keystore type: jks

Keystore provider: SUN

 

Your keystore contains 2 entries

 

Alias name: root

Creation date: 29/10/2007

Entry type: trustedCertEntry

 

Owner: CN=AGILENT-7B2231B.agilent.com, OU=Unknown, O=Unknown, L=Unknown, ST=Unkn

own, C=Unknown

Issuer: CN=Thawte Test CA Root, OU=TEST TEST TEST, O=Thawte Certification, ST=FO

R TESTING