AW: Java Connector help needed

2023-08-13 Thread Thomas Hoffmann (Speed4Trade GmbH)
Hello Charlie,

> -Ursprüngliche Nachricht-
> Von: Charlie DiDonato 
> Gesendet: Sonntag, 13. August 2023 18:08
> An: users@tomcat.apache.org
> Betreff: Java Connector help needed
> 
> Hi All,
> I am migrating from tomcat 8.5x to 9.0.78
> 
> Below is my server .xml
> 
> I don't have Apache webserver fronting this yet on my local machine
> (Windows 10).
> 
> It is a Java app.
> 
> 
> 
> Here is the part that I feel is relevant, but the full config is listed below 
> that.-
> 
> I order to see that tomcat is working without Apache WS, do I need to also
> create an HTTP1.1 connector in addition to AJP connector?

The browser only speaks HTTP protocol. So yes, if you want to bypass Apache 
Frontend-server you need an http connector on tomcat side.

> 
> And what should happen when I define a redirectPort ?

The redirect Port is only used, when Tomcat needs to redirect HTTP to HTTPS.
If you only use HTTP or only HTTPS, this attribute is not used.

> And finally, how do I access tomcat URL to hit tomcat and bypass Apache WS?

This depends on your infrastructure. You can use a separate http(s) port. E.g. 
80/443 is used by Apache and 8080 is used by Tomcat.
Then you can used http://:8080/ to access Tomcat directly. Of 
course, firewall etc. must allow this traffic.
 
> Thanks
> 
> Charlie DiDonato
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  
>address="192.168.0.28"
> 
>port="8009"
> 
>redirectPort="8020"
> 
>secretRequired="false"
> 
>maxParameterCount="1000"
> 
>/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>/>
> 
>   
> 
>   
> 
>SSLEngine="on" />
> 
>   
> 
>className="org.apache.catalina.core.JreMemoryLeakPreventionListener"
> />
> 
>className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
> />
> 
>className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"
> />
> 
> 
> 
>   
> 
>   
> 
> 
> 
>  
>   type="org.apache.catalina.UserDatabase"
> 
>   description="User database that can be updated and saved"
> 
>   factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
> 
>   pathname="conf/tomcat-users.xml" />
> 
>   
> 
> 
> 
>   
> 
>   
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  
>address="192.168.0.28"
> 
>port="8009"
> 
>redirectPort="8020"
> 
>secretRequired="false"
> 
>maxParameterCount="1000"
> 
>/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   
> 
> 
> 
>   
> 
> 
> 
> 
> 
>   
> 
>   
> 
> 
> 
>  
>resourceName="UserDatabase"/>
> 
>   
> 
> 
> 
>
> unpackWARs="true" autoDeploy="true">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  directory="logs"
> 
>prefix="localhost_access_log" suffix=".txt"
> 
>pattern="%h %l %u %t %r %s %b" />
> 
> 
> 
>   
> 
> 
> 
>   
> 
> 


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



Java Connector help needed

2023-08-13 Thread Charlie DiDonato
Hi All,
I am migrating from tomcat 8.5x to 9.0.78

Below is my server .xml

I don't have Apache webserver fronting this yet on my local machine (Windows
10).

It is a Java app.

 

Here is the part that I feel is relevant, but the full config is listed
below that.-

I order to see that tomcat is working without Apache WS, do I need to also
create an HTTP1.1 connector in addition to AJP connector?

And what should happen when I define a redirectPort ?

And finally, how do I access tomcat URL to hit tomcat and bypass Apache WS?

Thanks

Charlie DiDonato

 

 







 

 

 

 

 

 









  

  

  

  

  

  

  

  

 

  

  





  

 

  

  

 





 

 















 









 



 





 

  

  

  

 

 

  

  





  

 

  

 





 





 

  



  





Re: Help Needed for installation of apache-tomcat-8.5.5

2022-10-08 Thread Olaf Kock


On 08.10.22 05:09, Verma, Sahil wrote:


Hi Team,

We have a requirement to install Tomcat 8.5.5 version in Linux 
environment. Please help with steps of downloading the package and 
installation steps.


Linux version -  Red Hat Enterprise Linux release 8.6



You have a requirement to install a 6 years old version of a software on 
a current Enterprise-labelled OS?


I'd say: Start with the documentation 
(https://tomcat.apache.org/tomcat-8.5-doc/setup.html), but use the 
current release - if you want to use Tomcat 8.5, use 8.5.82 (at the time 
of writing this)


If you need other steps, please be more specific about what you need.

Olaf


Help Needed for installation of apache-tomcat-8.5.5

2022-10-07 Thread Verma, Sahil
Hi Team,



We have a requirement to install Tomcat 8.5.5 version in Linux environment. 
Please help with steps of downloading the package and installation steps.

Linux version -  Red Hat Enterprise Linux release 8.6


Thanks and Regards,
Sahil Verma
AMS Middleware shared Team.

[cid:image001.jpg@01D8DAF1.15A5CAB0]

Galaxy IT Park, Tower-A 44/45, Sector 62, Noida-201307, India
Mobile: +91-9643206413 | sverm...@dxc.com | 
www.dxc.technology
OoO:
dxc.technology / 
Twitter / 
Facebook / 
LinkedIn

DXC Technology India Private Limited - 9th Floor, Block-D Littlewood Tower, 
TRIL Info Park Ramanujan IT City, Rajiv Gandhi Salai, Taramani, Chennai - 
600113. CIN: U72900TN2015FTC102489.
DXC Technology Company -- This message is transmitted to you by or on behalf of 
DXC Technology Company or one of its affiliates. It is intended exclusively for 
the addressee. The substance of this message, along with any attachments, may 
contain proprietary, confidential or privileged information or information that 
is otherwise legally exempt from disclosure. Any unauthorized review, use, 
disclosure or distribution is prohibited. If you are not the intended recipient 
of this message, you are not authorized to read, print, retain, copy or 
disseminate any part of this message. If you have received this message in 
error, please destroy and delete all copies and notify the sender by return 
e-mail. Regardless of content, this e-mail shall not operate to bind DXC 
Technology Company or any of its affiliates to any order or other contract 
unless pursuant to explicit written agreement or government initiative 
expressly permitting the use of e-mail for such purpose.


Re: Help Needed

2022-06-27 Thread Christopher Schultz

Mohan,

On 6/27/22 02:17, Mohan T wrote:

Dear All,

We have deployed a application in tomcat 8.5  and  while accessing

http://sebswarcnv08.ramco:8081/samldemo-0.0.1-SNAPSHOT/hello

Error retrieving metadata from 
https://dev-67198606.okta.com/app/exk5htsyx3S4UcaHA5d7/sso/saml/metadata
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: 
PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
valid certification path to requested target


A stack trace will help, here.

The URL you have above has a TLS Certificate signed by DigiCert, which 
is a well-trusted Certificate Authority so, unless you have done 
something specific with your trust store for that connection, it's not 
likely the problem.


Because you are using SAML, I suspect that the error occurs when 
validating the SAML response itself, and your trust store does not 
contain the certificate required to validate the signed SAML response.


-chris

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



AW: Help Needed

2022-06-27 Thread Thomas Hoffmann (Speed4Trade GmbH)
Hello Mohan,

> -Ursprüngliche Nachricht-
> Von: Mohan T 
> Gesendet: Montag, 27. Juni 2022 08:18
> An: Tomcat Users List 
> Betreff: Help Needed
> 
> Dear All,
> 
> We have deployed a application in tomcat 8.5  and  while accessing
> 
> http://sebswarcnv08.ramco:8081/samldemo-0.0.1-SNAPSHOT/hello
> 
> Error retrieving metadata from https://dev-
> 67198606.okta.com/app/exk5htsyx3S4UcaHA5d7/sso/saml/metadata
> javax.net.ssl.SSLHandshakeException:
> sun.security.validator.ValidatorException: PKIX path building failed:
> sun.security.provider.certpath.SunCertPathBuilderException: unable to find
> valid certification path to requested target
> 
> Kindly  help us in overcoming thie.
> 
> Thanks
> 
> Mohan

The target server uses SSL. The server therefore has a private key and the 
client must have the corresponding public key.
The error message tells, that your client doesn't have the public key and 
therefore doesn't trust the servers private key.
Usually the private key is signed by a certificate authority or for development 
it can also be self-signed.
Check the "certificate tree" in the browser to check which party has signed the 
private key and get the public key of the root certificate.
This public key must be imported into the java truststore.

Here is an example of that tree / chain of trust: 
https://i.stack.imgur.com/julIO.png 

Greetings, Thomas

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



Help Needed

2022-06-27 Thread Mohan T
Dear All,

We have deployed a application in tomcat 8.5  and  while accessing

http://sebswarcnv08.ramco:8081/samldemo-0.0.1-SNAPSHOT/hello

Error retrieving metadata from 
https://dev-67198606.okta.com/app/exk5htsyx3S4UcaHA5d7/sso/saml/metadata
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: 
PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
valid certification path to requested target

Kindly  help us in overcoming thie.

Thanks

Mohan
.
DISCLAIMER: This communication contains information which is confidential and 
the copyright of Ramco Systems Ltd, its subsidiaries or a third party 
("Ramco"). This email may also contain legally privileged information. 
Confidentiality and legal privilege attached to this communication are not 
waived or lost by reason of mistaken delivery to you.This email is intended to 
be read or used by the addressee only. If you are not the intended recipient, 
any use, distribution, disclosure or copying of this email is strictly 
prohibited without the express written approval of Ramco. Please delete and 
destroy all copies and email Ramco at le...@ramco.com immediately. Any views 
expressed in this communication are those of the individual sender, except 
where the sender specifically states them to be the views of Ramco. Except as 
required by law, Ramco does not represent, warrant and/or guarantee that the 
integrity of this communication has been maintained nor that the communication 
is free of errors, virus, interception or interference. If you do not wish to 
receive such communications, please forward this communication to 
market...@ramco.com and express your wish not to receive such communications 
henceforth.


Re: Help Needed for Root cause - ApacheTomcat services stopped

2022-05-13 Thread Christopher Schultz

Sahil,

On 5/11/22 14:56, Verma, Sahil wrote:

Yes, we are using both Apache & Tomcat environment.

Apache - 2.4.25 version
Tomcat - 8.5.5 version


If this version number is correct, you should *seriously* consider 
upgrading to the latest Tomcat 8.5.x release. That release is more than 
5 years old and contains published security vulnerabilities.



You are correct, we got this error in Apache webserver logs. We are
attaching both Apache httpd (error.log) and Tomcat (Catalina.out) logs

Please let us know if any other information required.


Are you sure you actually have a problem? Or is the only problem that 
you are seeing this message in your log files?


For example, are you observing any decrease in availability or 
performance when you see these messages appear in the logs?


-chris


-Original Message-
From: Mark Thomas 
Sent: Wednesday, May 11, 2022 11:39 PM
To: users@tomcat.apache.org
Subject: Re: Help Needed for Root cause - ApacheTomcat services stopped

That is an Apache Web Server (httpd) log message, not an Apache Tomcat log 
message. Are you sure you are using Apache Tomcat?

Mark


On 11/05/2022 19:01, Verma, Sahil wrote:

Hi Team,



In our production environment, ApacheTomcat services went down. We
have checked the logs and found below error -



[Thu May 05 10:34:51.441668 2022] [mpm_event:error] [pid 27440:tid
140464737793792] AH00484: server reached MaxRequestWorkers setting,
consider raising the MaxRequestWorkers setting



Please help to find the root cause of the issue why services got stopped. 
Kindly let us know if any other information required.

Apache version - 2.2
OS - Linux


Thanks,
Sahil

DXC Technology India Private Limited - 9th Floor, Block-D Littlewood Tower, 
TRIL Info Park Ramanujan IT City, Rajiv Gandhi Salai, Taramani, Chennai - 
600113. CIN: U72900TN2015FTC102489.
DXC Technology Company -- This message is transmitted to you by or on behalf of 
DXC Technology Company or one of its affiliates. It is intended exclusively for 
the addressee. The substance of this message, along with any attachments, may 
contain proprietary, confidential or privileged information or information that 
is otherwise legally exempt from disclosure. Any unauthorized review, use, 
disclosure or distribution is prohibited. If you are not the intended recipient 
of this message, you are not authorized to read, print, retain, copy or 
disseminate any part of this message. If you have received this message in 
error, please destroy and delete all copies and notify the sender by return 
e-mail. Regardless of content, this e-mail shall not operate to bind DXC 
Technology Company or any of its affiliates to any order or other contract 
unless pursuant to explicit written agreement or government initiative 
expressly permitting the use of e-mail for such purpose.



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



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


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



RE: Help Needed for Root cause - ApacheTomcat services stopped

2022-05-13 Thread Verma, Sahil
Hi Thomas,

Thank you very much for the valuable information. It will surely help us to 
find the root cause of the issue. We are monitoring our environment as per your 
suggestions.

Regards,
Sahil

-Original Message-
From: Thomas Hoffmann (Speed4Trade GmbH) 

Sent: Thursday, May 12, 2022 12:01 PM
To: Tomcat Users List 
Subject: AW: Help Needed for Root cause - ApacheTomcat services stopped

Hello Sahil,

> -Ursprüngliche Nachricht-
> Von: Verma, Sahil 
> Gesendet: Mittwoch, 11. Mai 2022 20:56
> An: Tomcat Users List 
> Betreff: RE: Help Needed for Root cause - ApacheTomcat services
> stopped
>
> Hi Mark,
> Good day!
>
> Thank you very much for the reply!
>
> Yes, we are using both Apache & Tomcat environment.
>
> Apache - 2.4.25 version
> Tomcat - 8.5.5 version
> OS - Linux
>
>
> You are correct, we got this error in Apache webserver logs. We are
> attaching both Apache httpd (error.log) and Tomcat (Catalina.out) logs
>
> Please let us know if any other information required.
>
> Thanks,
> Sahil
>
>
>
> -Original Message-
> From: Mark Thomas 
> Sent: Wednesday, May 11, 2022 11:39 PM
> To: users@tomcat.apache.org
> Subject: Re: Help Needed for Root cause - ApacheTomcat services
> stopped
>
> That is an Apache Web Server (httpd) log message, not an Apache Tomcat
> log message. Are you sure you are using Apache Tomcat?
>
> Mark
>
>
> On 11/05/2022 19:01, Verma, Sahil wrote:
> > Hi Team,
> >
> >
> >
> > In our production environment, ApacheTomcat services went down. We
> > have checked the logs and found below error -
> >
> >
> >
> > [Thu May 05 10:34:51.441668 2022] [mpm_event:error] [pid 27440:tid
> > 140464737793792] AH00484: server reached MaxRequestWorkers setting,
> > consider raising the MaxRequestWorkers setting
> >
> >
> >
> > Please help to find the root cause of the issue why services got stopped.
> Kindly let us know if any other information required.
> >
> > Apache version - 2.2
> > OS - Linux
> >
> >
> > Thanks,
> > Sahil
> >

Tomcat-Logs looks fine (except some warnings which doesn’t matter here).

The MaxRequestWorkers is documented here:
https://clicktime.symantec.com/3VtPgJ8rmEck16yTrydmCdA6xU?u=https%3A%2F%2Fhttpd.apache.org%2Fdocs%2F2.4%2Fen%2Fmod%2Fmpm_common.html%23maxrequestworkers

You actually have a load or performance issue. This is usually related to your 
application or environment.
You can activate the access-log (either on apache or tomcat side) to view the 
number of requests.
Also log the processing time to see if some requests are taking too long.
Another option would be to activate and check tomcat-manager about the 
currently processed requests or use Apachetop 
(https://clicktime.symantec.com/3WxaHnjWYoWZzcQmX18dHkP6xU?u=https%3A%2F%2Flinux.die.net%2Fman%2F1%2Fapachetop)

I can think of two possible cases:
1) Requests are taking too long (performance issue in the application) and thus 
the number of workers get exhausted
2) You have a high load / number or requests. If you still have CPU and memory 
left, you can increase the workers in the Apache configuration

Greetings,
Thomas


DXC Technology India Private Limited - 9th Floor, Block-D Littlewood Tower, 
TRIL Info Park Ramanujan IT City, Rajiv Gandhi Salai, Taramani, Chennai - 
600113. CIN: U72900TN2015FTC102489.
DXC Technology Company -- This message is transmitted to you by or on behalf of 
DXC Technology Company or one of its affiliates. It is intended exclusively for 
the addressee. The substance of this message, along with any attachments, may 
contain proprietary, confidential or privileged information or information that 
is otherwise legally exempt from disclosure. Any unauthorized review, use, 
disclosure or distribution is prohibited. If you are not the intended recipient 
of this message, you are not authorized to read, print, retain, copy or 
disseminate any part of this message. If you have received this message in 
error, please destroy and delete all copies and notify the sender by return 
e-mail. Regardless of content, this e-mail shall not operate to bind DXC 
Technology Company or any of its affiliates to any order or other contract 
unless pursuant to explicit written agreement or government initiative 
expressly permitting the use of e-mail for such purpose.


AW: Help Needed for Root cause - ApacheTomcat services stopped

2022-05-12 Thread Thomas Hoffmann (Speed4Trade GmbH)
Hello Sahil,

> -Ursprüngliche Nachricht-
> Von: Verma, Sahil 
> Gesendet: Mittwoch, 11. Mai 2022 20:56
> An: Tomcat Users List 
> Betreff: RE: Help Needed for Root cause - ApacheTomcat services stopped
> 
> Hi Mark,
> Good day!
> 
> Thank you very much for the reply!
> 
> Yes, we are using both Apache & Tomcat environment.
> 
> Apache - 2.4.25 version
> Tomcat - 8.5.5 version
> OS - Linux
> 
> 
> You are correct, we got this error in Apache webserver logs. We are attaching
> both Apache httpd (error.log) and Tomcat (Catalina.out) logs
> 
> Please let us know if any other information required.
> 
> Thanks,
> Sahil
> 
> 
> 
> -Original Message-
> From: Mark Thomas 
> Sent: Wednesday, May 11, 2022 11:39 PM
> To: users@tomcat.apache.org
> Subject: Re: Help Needed for Root cause - ApacheTomcat services stopped
> 
> That is an Apache Web Server (httpd) log message, not an Apache Tomcat log
> message. Are you sure you are using Apache Tomcat?
> 
> Mark
> 
> 
> On 11/05/2022 19:01, Verma, Sahil wrote:
> > Hi Team,
> >
> >
> >
> > In our production environment, ApacheTomcat services went down. We
> > have checked the logs and found below error -
> >
> >
> >
> > [Thu May 05 10:34:51.441668 2022] [mpm_event:error] [pid 27440:tid
> > 140464737793792] AH00484: server reached MaxRequestWorkers setting,
> > consider raising the MaxRequestWorkers setting
> >
> >
> >
> > Please help to find the root cause of the issue why services got stopped.
> Kindly let us know if any other information required.
> >
> > Apache version - 2.2
> > OS - Linux
> >
> >
> > Thanks,
> > Sahil
> >

Tomcat-Logs looks fine (except some warnings which doesn’t matter here).

The MaxRequestWorkers is documented here:
https://httpd.apache.org/docs/2.4/en/mod/mpm_common.html#maxrequestworkers

You actually have a load or performance issue. This is usually related to your 
application or environment.
You can activate the access-log (either on apache or tomcat side) to view the 
number of requests.
Also log the processing time to see if some requests are taking too long.
Another option would be to activate and check tomcat-manager about the 
currently processed requests or use Apachetop 
(https://linux.die.net/man/1/apachetop)

I can think of two possible cases:
1) Requests are taking too long (performance issue in the application) and thus 
the number of workers get exhausted
2) You have a high load / number or requests. If you still have CPU and memory 
left, you can increase the workers in the Apache configuration

Greetings,
Thomas



RE: Help Needed for Root cause - ApacheTomcat services stopped

2022-05-11 Thread Verma, Sahil
Hi Mark,
Good day!

Thank you very much for the reply!

Yes, we are using both Apache & Tomcat environment.

Apache - 2.4.25 version
Tomcat - 8.5.5 version
OS - Linux 


You are correct, we got this error in Apache webserver logs. We are attaching 
both Apache httpd (error.log) and Tomcat (Catalina.out) logs

Please let us know if any other information required.

Thanks,
Sahil



-Original Message-
From: Mark Thomas  
Sent: Wednesday, May 11, 2022 11:39 PM
To: users@tomcat.apache.org
Subject: Re: Help Needed for Root cause - ApacheTomcat services stopped

That is an Apache Web Server (httpd) log message, not an Apache Tomcat log 
message. Are you sure you are using Apache Tomcat?

Mark


On 11/05/2022 19:01, Verma, Sahil wrote:
> Hi Team,
> 
> 
> 
> In our production environment, ApacheTomcat services went down. We 
> have checked the logs and found below error -
> 
> 
> 
> [Thu May 05 10:34:51.441668 2022] [mpm_event:error] [pid 27440:tid 
> 140464737793792] AH00484: server reached MaxRequestWorkers setting, 
> consider raising the MaxRequestWorkers setting
> 
> 
> 
> Please help to find the root cause of the issue why services got stopped. 
> Kindly let us know if any other information required.
> 
> Apache version - 2.2
> OS - Linux
> 
> 
> Thanks,
> Sahil
> 
> DXC Technology India Private Limited - 9th Floor, Block-D Littlewood Tower, 
> TRIL Info Park Ramanujan IT City, Rajiv Gandhi Salai, Taramani, Chennai - 
> 600113. CIN: U72900TN2015FTC102489.
> DXC Technology Company -- This message is transmitted to you by or on behalf 
> of DXC Technology Company or one of its affiliates. It is intended 
> exclusively for the addressee. The substance of this message, along with any 
> attachments, may contain proprietary, confidential or privileged information 
> or information that is otherwise legally exempt from disclosure. Any 
> unauthorized review, use, disclosure or distribution is prohibited. If you 
> are not the intended recipient of this message, you are not authorized to 
> read, print, retain, copy or disseminate any part of this message. If you 
> have received this message in error, please destroy and delete all copies and 
> notify the sender by return e-mail. Regardless of content, this e-mail shall 
> not operate to bind DXC Technology Company or any of its affiliates to any 
> order or other contract unless pursuant to explicit written agreement or 
> government initiative expressly permitting the use of e-mail for such purpose.
> 

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

-bash-4.1$ cat error_log.20220505
rm: cannot remove `/share/images/pdf/Statementkimpickett20220505.zip': No such 
file or directory
rm: cannot remove `/share/images/pdf/Statementcweishuhn20220505.zip': No such 
file or directory
[Thu May 05 10:34:51.441668 2022] [mpm_event:error] [pid 27440:tid 
140464737793792] AH00484: server reached MaxRequestWorkers setting, consider 
raising the MaxRequestWorkers setting
[Thu May 05 11:28:16.826878 2022] [core:warn] [pid 27440:tid 140464737793792] 
AH00045: child process 27465 still did not exit, sending a SIGTERM
[Thu May 05 11:28:16.826994 2022] [core:warn] [pid 27440:tid 140464737793792] 
AH00045: child process 27466 still did not exit, sending a SIGTERM
[Thu May 05 11:28:16.827047 2022] [core:warn] [pid 27440:tid 140464737793792] 
AH00045: child process 27467 still did not exit, sending a SIGTERM
[Thu May 05 11:28:16.827098 2022] [core:warn] [pid 27440:tid 140464737793792] 
AH00045: child process 27698 still did not exit, sending a SIGTERM
[Thu May 05 11:28:16.827151 2022] [core:warn] [pid 27440:tid 140464737793792] 
AH00045: child process 27896 still did not exit, sending a SIGTERM
[Thu May 05 11:28:16.827205 2022] [core:warn] [pid 27440:tid 140464737793792] 
AH00045: child process 27971 still did not exit, sending a SIGTERM
[Thu May 05 11:28:16.827254 2022] [core:warn] [pid 27440:tid 140464737793792] 
AH00045: child process 28071 still did not exit, sending a SIGTERM
[Thu May 05 11:28:16.827307 2022] [core:warn] [pid 27440:tid 140464737793792] 
AH00045: child process 28135 still did not exit, sending a SIGTERM
[Thu May 05 11:28:18.829711 2022] [core:warn] [pid 27440:tid 140464737793792] 
AH00045: child process 27465 still did not exit, sending a SIGTERM
[Thu May 05 11:28:18.829835 2022] [core:warn] [pid 27440:tid 140464737793792] 
AH00045: child process 27466 still did not exit, sending a SIGTERM
[Thu May 05 11:28:18.829901 2022] [core:warn] [pid 27440:tid 140464737793792] 
AH00045: child process 27467 still did not exit, sending a SIGTERM
[Thu May 05 11:28:18.829970 2022] [core:warn] [pid 27440:tid 140464737793792] 
AH00045: child process 27698 still did not exit, sending a SIGTERM
[Thu 

Re: Help Needed for Root cause - ApacheTomcat services stopped

2022-05-11 Thread Mark Thomas
That is an Apache Web Server (httpd) log message, not an Apache Tomcat 
log message. Are you sure you are using Apache Tomcat?


Mark


On 11/05/2022 19:01, Verma, Sahil wrote:

Hi Team,



In our production environment, ApacheTomcat services went down. We have checked 
the logs and found below error -



[Thu May 05 10:34:51.441668 2022] [mpm_event:error] [pid 27440:tid 
140464737793792] AH00484: server reached MaxRequestWorkers setting, consider 
raising the MaxRequestWorkers setting



Please help to find the root cause of the issue why services got stopped. 
Kindly let us know if any other information required.

Apache version - 2.2
OS - Linux


Thanks,
Sahil

DXC Technology India Private Limited - 9th Floor, Block-D Littlewood Tower, 
TRIL Info Park Ramanujan IT City, Rajiv Gandhi Salai, Taramani, Chennai - 
600113. CIN: U72900TN2015FTC102489.
DXC Technology Company -- This message is transmitted to you by or on behalf of 
DXC Technology Company or one of its affiliates. It is intended exclusively for 
the addressee. The substance of this message, along with any attachments, may 
contain proprietary, confidential or privileged information or information that 
is otherwise legally exempt from disclosure. Any unauthorized review, use, 
disclosure or distribution is prohibited. If you are not the intended recipient 
of this message, you are not authorized to read, print, retain, copy or 
disseminate any part of this message. If you have received this message in 
error, please destroy and delete all copies and notify the sender by return 
e-mail. Regardless of content, this e-mail shall not operate to bind DXC 
Technology Company or any of its affiliates to any order or other contract 
unless pursuant to explicit written agreement or government initiative 
expressly permitting the use of e-mail for such purpose.



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



Help Needed for Root cause - ApacheTomcat services stopped

2022-05-11 Thread Verma, Sahil
Hi Team,



In our production environment, ApacheTomcat services went down. We have checked 
the logs and found below error -



[Thu May 05 10:34:51.441668 2022] [mpm_event:error] [pid 27440:tid 
140464737793792] AH00484: server reached MaxRequestWorkers setting, consider 
raising the MaxRequestWorkers setting



Please help to find the root cause of the issue why services got stopped. 
Kindly let us know if any other information required.

Apache version - 2.2
OS - Linux


Thanks,
Sahil

DXC Technology India Private Limited - 9th Floor, Block-D Littlewood Tower, 
TRIL Info Park Ramanujan IT City, Rajiv Gandhi Salai, Taramani, Chennai - 
600113. CIN: U72900TN2015FTC102489.
DXC Technology Company -- This message is transmitted to you by or on behalf of 
DXC Technology Company or one of its affiliates. It is intended exclusively for 
the addressee. The substance of this message, along with any attachments, may 
contain proprietary, confidential or privileged information or information that 
is otherwise legally exempt from disclosure. Any unauthorized review, use, 
disclosure or distribution is prohibited. If you are not the intended recipient 
of this message, you are not authorized to read, print, retain, copy or 
disseminate any part of this message. If you have received this message in 
error, please destroy and delete all copies and notify the sender by return 
e-mail. Regardless of content, this e-mail shall not operate to bind DXC 
Technology Company or any of its affiliates to any order or other contract 
unless pursuant to explicit written agreement or government initiative 
expressly permitting the use of e-mail for such purpose.


Re: Help needed reg Context

2021-10-13 Thread Mark Thomas

On 13/10/2021 14:19, Mohan T wrote:

Dear All,

We are using Tomcat 8.5 on Suse linix.

We are deploying one of our artifacts as below

hub#app#classic#admin.war

The components are also deployed and the context is also created 
Successfully.


Is there any other alternative way to set the context other than using 
*#*.


Please guide us.


Move the WAR file *outside* of the Host's appBase. i.e. You need to move 
it out of the webapps directory.


You then have two options.

1. Recommended
Add a file named
$CATALINA_BASE/conf/Catalina/localhost/hub#app#classic#admin.xml

with the following content:



2. Not recommended
Nest the following inside the Host element in server.xml


Mark

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



Help needed reg Context

2021-10-13 Thread Mohan T
Dear All,

We are using Tomcat 8.5 on Suse linix.

We are deploying one of our artifacts as below

hub#app#classic#admin.war

The components are also deployed and the context is also created Successfully.

Is there any other alternative way to set the context other than using # .

[cid:image001.png@01D7C063.1175FF40]

Please guide us.

Thanks

Mohan


DISCLAIMER: This communication contains information which is confidential and 
the copyright of Ramco Systems Ltd, its subsidiaries or a third party 
("Ramco"). This email may also contain legally privileged information. 
Confidentiality and legal privilege attached to this communication are not 
waived or lost by reason of mistaken delivery to you.This email is intended to 
be read or used by the addressee only. If you are not the intended recipient, 
any use, distribution, disclosure or copying of this email is strictly 
prohibited without the express written approval of Ramco. Please delete and 
destroy all copies and email Ramco at le...@ramco.com immediately. Any views 
expressed in this communication are those of the individual sender, except 
where the sender specifically states them to be the views of Ramco. Except as 
required by law, Ramco does not represent, warrant and/or guarantee that the 
integrity of this communication has been maintained nor that the communication 
is free of errors, virus, interception or interference. If you do not wish to 
receive such communications, please forward this communication to 
market...@ramco.com and express your wish not to receive such communications 
henceforth.


Re: Help Needed

2021-08-18 Thread Christopher Schultz

Mohan,

On 8/8/21 08:45, Mohan T wrote:

There is no specific upgrade to the environment.


Did you see the reply to your message I sent on August 6th?

We are introducing new components and the permission is being set for 
them in catalina.policy file.


Are your JAR files signed? The error says they are not signed. (And 
presumably you are requiring them to be signed.)



Attaching the Catalina.policy file for reference.


Your attachment has been stripped. Find another way to communicate the
policy. Copy/paste in the message ought to work.


openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-b12)
OpenJDK 64-Bit Server VM (build 25.131-b12, mixed mode)


FYI This is also quite old.

-chris


*From:*Mohan T
*Sent:* 07 August 2021 08:00
*To:* 'Tomcat Users List' 
*Subject:* RE: Help Needed

Dear All,

Any inputs on this. We are not getting a break in this.

Kindly help us in taking things forward.

Thanks

Mohan

*From:*Mohan T
*Sent:* 06 August 2021 09:21
*To:* Tomcat Users List <mailto:users@tomcat.apache.org>>

*Subject:* Help Needed

Dear All,

*/_We are using Tomcat 8.5 on Suse LINUX. _/*

We enabled JAvA security in  tomcat and invoking the Catalina.sh. We are 
facing some permission issues in the environment.


We could see the below error messages.

access: access allowed ("java.util.logging.LoggingPermission" "control")

java.lang.Exception: Stack trace

     at java.lang.Thread.dumpStack(Thread.java:1336)

     at 
java.security.AccessControlContext.checkPermission(AccessControlContext.java:419)


     at 
java.security.AccessController.checkPermission(AccessController.java:884)


     at 
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)


     at 
java.util.logging.LogManager.checkPermission(LogManager.java:1586)


     at java.util.logging.Logger.checkPermission(Logger.java:422)

     at java.util.logging.Logger.removeHandler(Logger.java:1764)

     at 
org.apache.juli.ClassLoaderLogManager.resetLoggers(ClassLoaderLogManager.java:393)


     at 
org.apache.juli.ClassLoaderLogManager.shutdown(ClassLoaderLogManager.java:377)


     at 
org.apache.juli.ClassLoaderLogManager$Cleaner.run(ClassLoaderLogManager.java:81)


policy: getPermissions:

     PD CodeSource: 
(file:/home/ilas/tomcat8.5_tech/apache-tomcat-8.5.35/bin/tomcat-juli.jar 
)


     PD ClassLoader: sun.misc.Launcher$AppClassLoader@3d4eac69 
<mailto:sun.misc.Launcher$AppClassLoader@3d4eac69>


     PD Principals: 

policy: evaluate codesources:

     Policy CodeSource: (file:/usr/java/jdk1.8.0_162/jre/lib/- signer certificates>)


     Active CodeSource: 
(file:/home/ilas/tomcat8.5_tech/apache-tomcat-8.5.35/bin/tomcat-juli.jar 
)


Thanks

Mohan

DISCLAIMER: This communication contains information which is 
confidential and the copyright of Ramco Systems Ltd, its subsidiaries or 
a third party (“Ramco”). This email may also contain legally privileged 
information. Confidentiality and legal privilege attached to this 
communication are not waived or lost by reason of mistaken delivery to 
you.This email is intended to be read or used by the addressee only. If 
you are not the intended recipient, any use, distribution, disclosure or 
copying of this email is strictly prohibited without the express written 
approval of Ramco. Please delete and destroy all copies and email Ramco 
at le...@ramco.com immediately. Any views expressed in this 
communication are those of the individual sender, except where the 
sender specifically states them to be the views of Ramco. Except as 
required by law, Ramco does not represent, warrant and/or guarantee that 
the integrity of this communication has been maintained nor that the 
communication is free of errors, virus, interception or interference. If 
you do not wish to receive such communications, please forward this 
communication to market...@ramco.com and express your wish not to 
receive such communications henceforth.



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



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



RE: Help Needed

2021-08-08 Thread Mohan T
Hi,

There is no specific upgrade to the environment .

We are introducing new components and the permission is being set for them in 
catalina.policy file.

Attaching the Catalina.policy file for reference.

openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-b12)
OpenJDK 64-Bit Server VM (build 25.131-b12, mixed mode)

Thanks

Mohan

From: Mohan T
Sent: 07 August 2021 08:00
To: 'Tomcat Users List' 
Subject: RE: Help Needed

Dear All,

Any inputs on this. We are not getting a break in this.

Kindly help us in taking things forward.

Thanks

Mohan

From: Mohan T
Sent: 06 August 2021 09:21
To: Tomcat Users List mailto:users@tomcat.apache.org>>
Subject: Help Needed

Dear All,

We are using Tomcat 8.5 on Suse LINUX.

We enabled JAvA security in  tomcat and invoking the Catalina.sh. We are facing 
some permission issues in the environment.

We could see the below error messages.

access: access allowed ("java.util.logging.LoggingPermission" "control")
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Thread.java:1336)
at 
java.security.AccessControlContext.checkPermission(AccessControlContext.java:419)
at 
java.security.AccessController.checkPermission(AccessController.java:884)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.util.logging.LogManager.checkPermission(LogManager.java:1586)
at java.util.logging.Logger.checkPermission(Logger.java:422)
at java.util.logging.Logger.removeHandler(Logger.java:1764)
at 
org.apache.juli.ClassLoaderLogManager.resetLoggers(ClassLoaderLogManager.java:393)
at 
org.apache.juli.ClassLoaderLogManager.shutdown(ClassLoaderLogManager.java:377)
at 
org.apache.juli.ClassLoaderLogManager$Cleaner.run(ClassLoaderLogManager.java:81)
policy: getPermissions:
PD CodeSource: 
(file:/home/ilas/tomcat8.5_tech/apache-tomcat-8.5.35/bin/tomcat-juli.jar )
PD ClassLoader: 
sun.misc.Launcher$AppClassLoader@3d4eac69<mailto:sun.misc.Launcher$AppClassLoader@3d4eac69>
PD Principals: 
policy: evaluate codesources:
Policy CodeSource: (file:/usr/java/jdk1.8.0_162/jre/lib/- )
Active CodeSource: 
(file:/home/ilas/tomcat8.5_tech/apache-tomcat-8.5.35/bin/tomcat-juli.jar )

Thanks

Mohan
DISCLAIMER: This communication contains information which is confidential and 
the copyright of Ramco Systems Ltd, its subsidiaries or a third party 
("Ramco"). This email may also contain legally privileged information. 
Confidentiality and legal privilege attached to this communication are not 
waived or lost by reason of mistaken delivery to you.This email is intended to 
be read or used by the addressee only. If you are not the intended recipient, 
any use, distribution, disclosure or copying of this email is strictly 
prohibited without the express written approval of Ramco. Please delete and 
destroy all copies and email Ramco at le...@ramco.com immediately. Any views 
expressed in this communication are those of the individual sender, except 
where the sender specifically states them to be the views of Ramco. Except as 
required by law, Ramco does not represent, warrant and/or guarantee that the 
integrity of this communication has been maintained nor that the communication 
is free of errors, virus, interception or interference. If you do not wish to 
receive such communications, please forward this communication to 
market...@ramco.com and express your wish not to receive such communications 
henceforth.

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

Re: Help Needed

2021-08-06 Thread Rob Sargent
> 
> On Aug 6, 2021, at 8:31 PM, Mohan T  wrote:
> 
> Dear All,
> 
> Any inputs on this. We are not getting a break in this.

Did upgrading change anything?
You may want to layout your configuration and why you think it should work. 
Which version of Java, etc?
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Help Needed

2021-08-06 Thread Mohan T
Dear All,

Any inputs on this. We are not getting a break in this.

Kindly help us in taking things forward.

Thanks

Mohan

From: Mohan T
Sent: 06 August 2021 09:21
To: Tomcat Users List 
Subject: Help Needed

Dear All,

We are using Tomcat 8.5 on Suse LINUX.

We enabled JAvA security in  tomcat and invoking the Catalina.sh. We are facing 
some permission issues in the environment.

We could see the below error messages.

access: access allowed ("java.util.logging.LoggingPermission" "control")
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Thread.java:1336)
at 
java.security.AccessControlContext.checkPermission(AccessControlContext.java:419)
at 
java.security.AccessController.checkPermission(AccessController.java:884)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.util.logging.LogManager.checkPermission(LogManager.java:1586)
at java.util.logging.Logger.checkPermission(Logger.java:422)
at java.util.logging.Logger.removeHandler(Logger.java:1764)
at 
org.apache.juli.ClassLoaderLogManager.resetLoggers(ClassLoaderLogManager.java:393)
at 
org.apache.juli.ClassLoaderLogManager.shutdown(ClassLoaderLogManager.java:377)
at 
org.apache.juli.ClassLoaderLogManager$Cleaner.run(ClassLoaderLogManager.java:81)
policy: getPermissions:
PD CodeSource: 
(file:/home/ilas/tomcat8.5_tech/apache-tomcat-8.5.35/bin/tomcat-juli.jar )
PD ClassLoader: 
sun.misc.Launcher$AppClassLoader@3d4eac69<mailto:sun.misc.Launcher$AppClassLoader@3d4eac69>
PD Principals: 
policy: evaluate codesources:
Policy CodeSource: (file:/usr/java/jdk1.8.0_162/jre/lib/- )
Active CodeSource: 
(file:/home/ilas/tomcat8.5_tech/apache-tomcat-8.5.35/bin/tomcat-juli.jar )

Thanks

Mohan
DISCLAIMER: This communication contains information which is confidential and 
the copyright of Ramco Systems Ltd, its subsidiaries or a third party 
("Ramco"). This email may also contain legally privileged information. 
Confidentiality and legal privilege attached to this communication are not 
waived or lost by reason of mistaken delivery to you.This email is intended to 
be read or used by the addressee only. If you are not the intended recipient, 
any use, distribution, disclosure or copying of this email is strictly 
prohibited without the express written approval of Ramco. Please delete and 
destroy all copies and email Ramco at le...@ramco.com immediately. Any views 
expressed in this communication are those of the individual sender, except 
where the sender specifically states them to be the views of Ramco. Except as 
required by law, Ramco does not represent, warrant and/or guarantee that the 
integrity of this communication has been maintained nor that the communication 
is free of errors, virus, interception or interference. If you do not wish to 
receive such communications, please forward this communication to 
market...@ramco.com and express your wish not to receive such communications 
henceforth.


Re: Help Needed

2021-08-05 Thread Christopher Schultz

Mohan,

On 8/5/21 23:51, Mohan T wrote:

Dear All,

We are using Tomcat 8.5 on Suse LINUX.

We enabled JAvA security in  tomcat and invoking the Catalina.sh. We are facing 
some permission issues in the environment.

We could see the below error messages.

access: access allowed ("java.util.logging.LoggingPermission" "control")
java.lang.Exception: Stack trace
 at java.lang.Thread.dumpStack(Thread.java:1336)
 at 
java.security.AccessControlContext.checkPermission(AccessControlContext.java:419)
 at 
java.security.AccessController.checkPermission(AccessController.java:884)
 at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
 at java.util.logging.LogManager.checkPermission(LogManager.java:1586)
 at java.util.logging.Logger.checkPermission(Logger.java:422)
 at java.util.logging.Logger.removeHandler(Logger.java:1764)
 at 
org.apache.juli.ClassLoaderLogManager.resetLoggers(ClassLoaderLogManager.java:393)
 at 
org.apache.juli.ClassLoaderLogManager.shutdown(ClassLoaderLogManager.java:377)
 at 
org.apache.juli.ClassLoaderLogManager$Cleaner.run(ClassLoaderLogManager.java:81)
policy: getPermissions:
 PD CodeSource: 
(file:/home/ilas/tomcat8.5_tech/apache-tomcat-8.5.35/bin/tomcat-juli.jar )
 PD ClassLoader: sun.misc.Launcher$AppClassLoader@3d4eac69
 PD Principals: 
policy: evaluate codesources:
 Policy CodeSource: (file:/usr/java/jdk1.8.0_162/jre/lib/- )
 Active CodeSource: 
(file:/home/ilas/tomcat8.5_tech/apache-tomcat-8.5.35/bin/tomcat-juli.jar )


If you require signed JAR files, please use a more recent version of 
Tomcat 8.5.x. I'm not sure when signing was introduced, but 8.5.35 
nearly 3 years ago and definitely should be upgraded if you are 
sensitive to security issues.


-chris

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



Help Needed

2021-08-05 Thread Mohan T
Dear All,

We are using Tomcat 8.5 on Suse LINUX.

We enabled JAvA security in  tomcat and invoking the Catalina.sh. We are facing 
some permission issues in the environment.

We could see the below error messages.

access: access allowed ("java.util.logging.LoggingPermission" "control")
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Thread.java:1336)
at 
java.security.AccessControlContext.checkPermission(AccessControlContext.java:419)
at 
java.security.AccessController.checkPermission(AccessController.java:884)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.util.logging.LogManager.checkPermission(LogManager.java:1586)
at java.util.logging.Logger.checkPermission(Logger.java:422)
at java.util.logging.Logger.removeHandler(Logger.java:1764)
at 
org.apache.juli.ClassLoaderLogManager.resetLoggers(ClassLoaderLogManager.java:393)
at 
org.apache.juli.ClassLoaderLogManager.shutdown(ClassLoaderLogManager.java:377)
at 
org.apache.juli.ClassLoaderLogManager$Cleaner.run(ClassLoaderLogManager.java:81)
policy: getPermissions:
PD CodeSource: 
(file:/home/ilas/tomcat8.5_tech/apache-tomcat-8.5.35/bin/tomcat-juli.jar )
PD ClassLoader: sun.misc.Launcher$AppClassLoader@3d4eac69
PD Principals: 
policy: evaluate codesources:
Policy CodeSource: (file:/usr/java/jdk1.8.0_162/jre/lib/- )
Active CodeSource: 
(file:/home/ilas/tomcat8.5_tech/apache-tomcat-8.5.35/bin/tomcat-juli.jar )

Thanks

Mohan
DISCLAIMER: This communication contains information which is confidential and 
the copyright of Ramco Systems Ltd, its subsidiaries or a third party 
("Ramco"). This email may also contain legally privileged information. 
Confidentiality and legal privilege attached to this communication are not 
waived or lost by reason of mistaken delivery to you.This email is intended to 
be read or used by the addressee only. If you are not the intended recipient, 
any use, distribution, disclosure or copying of this email is strictly 
prohibited without the express written approval of Ramco. Please delete and 
destroy all copies and email Ramco at le...@ramco.com immediately. Any views 
expressed in this communication are those of the individual sender, except 
where the sender specifically states them to be the views of Ramco. Except as 
required by law, Ramco does not represent, warrant and/or guarantee that the 
integrity of this communication has been maintained nor that the communication 
is free of errors, virus, interception or interference. If you do not wish to 
receive such communications, please forward this communication to 
market...@ramco.com and express your wish not to receive such communications 
henceforth.


Re: Help Needed : Increased amount of I/O - Tomcat 7.0.81 vs 8.5.32

2019-04-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Aadit,

On 4/9/19 15:19, Aadit Shah wrote:
> We have recently upgraded our software to utilize Tomcat 8.5.32
> from Tomcat 7.0.81. With the upgrade, we are seeing an increased
> amount of I/Os happening between the Tomcat Server and the DB.
Do you have Tomcat configured to handle user-authentication? Id not,
then Tomcat is not contacting your database at all.

> We are looking for help to understand the cause of the increased 
> amount of I/Os and possible solutions to improve our software to
> get a workaround.
> 
> Issue: Tomcat is one of the core components of our software. With
> 8.5.32 upgrade, due to the increased amount of I/Os, we are seeing
> a latency in our software. Due to the latency, the overall
> performance of the software has been degraded and the end users are
> seeing issues like
> 
> - longer login times - longer wait time to load/reload the data.
> 
> Troubleshooting: We ran a bunch of tests and confirmed that our
> packet captures show that 20x increase in the I/O operations
> between Tomcat 7.0.81 and 8.5.32.
Did you change your database driver version at the same time? What
about the application? Did the application change at all?

> Here’s the matrix which shows number of I/O we captured between 
> different versions of Our Software version and Tomcat versions.
Your attachment and/or screenshot has been removed from the mailing
list. Please provide a text-only rendering in your follow-up post.

> Our Software Version
> 
> Tomcat 7.0.81
> 
> 8.5.32
> 
> 18
> 
> 200
> 
> 23,000
> 
> 19
> 
> 1200
> 
> 240,000

The above table didn't translate well. What is it supposed to be?

> Server Information: OS: Windows Server 2012 R2

Ouch. A 5-year-old abandoned Microsoft operating system? I hope you
pay a lot to your security provider for all the CYA you need.

> Java : JRE1.8.0.111 Initial Memory Pool: 512 MB Maximum Memory Pool
> : 1024 MB

Recommendation: set min and max to the same value. There is no
advantage to setting them to different values and some performance
advantages to setting them to the same value.

> Note: There are other software running on the server.
> 
> DB Connection Configuration: Here’s how the connection from the
> Tomcat Server to DB Server look like:
> 
> Tomcat 7.0.81:
> 
>  type="javax.sql.DataSource" maxActive="200" maxIdle="30"
> maxWait="1" 
> driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" 
> url="jdbc:sqlserver://\;database=heartbeat;integrate
dSecurity=true"
>
> 
validationQuery="SELECT 1"
> testWhileIdle="true" timeBetweenEvictionRunsMillis="360" 
> numTestsPerEvictionRun="30" minEvictableIdleTimeMillis="1440" 
> removeAbandoned="true" removeAbandonedTimeout="300" 
> logAbandoned="true"/>

200 connections is a lot of connections. How many concurrent requests
would you estimate that you actually handle at peak?

> Tomcat 8.5.32:
> 
>  type="javax.sql.DataSource" maxTotal="200" maxIdle="30"
> maxWaitMillis="1" 
> driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" 
> url="jdbc:sqlserver://\;database=heartbeat;integrate
dSecurity=true"
>
> 
testWhileIdle="true"
> validationQuery="SELECT 1" timeBetweenEvictionRunsMillis="360" 
> numTestsPerEvictionRun="30" minEvictableIdleTimeMillis="1440" 
> removeAbandonedOnBorrow="true" removeAbandonedOnMaintenance="true" 
> removeAbandonedTimeout="300" logAbandoned="true" />
> 
> Let me know if you need more information from our side. We can
> also provide full server.xml configuration from both the versions
> of the software.
> 
> We are new to Tomcat Support group, so let us know if this is the 
> right way to request for help.
> 
> If you want to learn more about our company, you can click the
> links in the signature.

Are you using Tomcat for container-managed authentication? That's not
clear from your configuration.

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlytJ80ACgkQHPApP6U8
pFhFkQ//fvNVhgRno2H7IOdULXN0BlAAE6kW6/wuClAYNB++t9Y+96lnEIoMgQx3
+W7Ind4g1TepwXBK9mVPuuS30i4O8/uCtBL9rCf6z5xJZGV113Gova/U04TIt2iO
jQ2neeBdsUg5abcCQH959qGGp0he4hibH7xeWXabp42a5WaFLNQFu4YtUj9wFWlw
A9/8EhWVOqRmkX/0vcSkj/MgE/kAR+C4dkQBHjZpQzKWRjGiWrJVXJ/Ujpp+AL3f
JY2S76d7IG+XQ1BngZcbX9k83IM7crfCcPWeNsQM4C/LgfJWHu0Jt7dVyDBbHU4Y
Jkyd1OWoAnNQCfvXbkb8C6mdCtjVjCrlziBd6JJ8QJTBkhMW2L9v0clMJvL4U9yY
aEDKCEhAOLlsYtcWIyv2hLvUFmjKmjbRm7pv1N1+TQXSw+1qDsCHNQC+KLyN5kI/
ac/fxxArQ0fxsanTSh3jI8qCcsLKx5kwDxjtB2u1IiPlYaxi9zCG11lIEsCn9BQz
ALnnFKDODEiyAYkzjau82rrToWgootsUmgLUMpN3prOuyXwawfq9GMyMcEA6zzGT
P51LU4dvIWjeBtI+W8mTZ/yxV882prJZtBCeBk/WOeTeKNN/Jrd2VeUE7ROvM9Lh
firIRCsm5oVcu5miRBw2kU49NTmEE/pqHWhMjduOLW2+lXDBxKw=
=95f+
-END PGP SIGNATURE-

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



Re: Help Needed : Increased amount of I/O - Tomcat 7.0.81 vs 8.5.32

2019-04-09 Thread Aadit Shah
Hello all,
We have recently upgraded our software to utilize Tomcat 8.5.32 from Tomcat 
7.0.81.
With the upgrade, we are seeing an increased amount of I/Os happening between 
the Tomcat Server and the DB.
We are looking for help to understand the cause of the increased amount of I/Os 
and possible solutions to improve our software to get a workaround.

Issue:
Tomcat is one of the core components of our software. With 8.5.32 upgrade, due 
to the increased amount of I/Os, we are seeing a latency in our software.
Due to the latency, the overall performance of the software has been degraded 
and the end users are seeing issues like
- longer login times
- longer wait time to load/reload the data.

Troubleshooting:
We ran a bunch of tests and confirmed that our packet captures show that 20x 
increase in the I/O operations between Tomcat 7.0.81 and 8.5.32.

Here’s the matrix which shows number of I/O we captured between different 
versions of Our Software version and Tomcat versions.

Our Software Version

Tomcat 7.0.81

8.5.32

18

200

23,000

19

1200

240,000



Server Information:
OS: Windows Server 2012 R2
Java : JRE1.8.0.111
Initial Memory Pool: 512 MB
Maximum Memory Pool : 1024 MB
Note: There are other software running on the server.

DB Connection Configuration:
Here’s how the connection from the Tomcat Server to DB Server look like:

Tomcat 7.0.81:



Tomcat 8.5.32:



Let me know if you need more information from our side. We can also provide 
full server.xml configuration from both the versions of the software.

We are new to Tomcat Support group, so let us know if this is the right way to 
request for help.

If you want to learn more about our company, you can click the links in the 
signature.

Thanks,
Aadit
--
Aadit Shah | Mobile Heartbeat
Solutions Engineer
aadit.s...@mobileheartbeat.com
Phone: (781) 238-,,2036


Fw: Re: Help needed - JPA probem - No connection specified with project

2017-10-08 Thread Karen Goh
Hi,

I have been trying to get a reply on this but seems like nobody can help me on 
this.
Till today, no matter what I did, I still get a JPA - no connection specified 
with project.

Can someone give me a tutorial that uses Javax JPA that works with JDBC mysql ?

Thanks!

--- On Mon, 10/2/17, Karen Goh <karenwo...@yahoo.com> wrote:

> From: Karen Goh <karenwo...@yahoo.com>
> Subject: Re: Help needed - JPA probem - No connection specified with project
> To: knst.koli...@gmail.com
> Cc: "Tomcat Users List" <users@tomcat.apache.org>
> Date: Monday, October 2, 2017, 4:01 PM
> 
> 
> On Fri, 9/29/17, Konstantin Kolinko
> <knst.koli...@gmail.com>
> wrote:
> 
>  Subject: Re: Help needed - JPA probem
> - No connection specified with project
>  To: "Karen Goh" <karenwo...@yahoo.com>
>  Cc: "Tomcat Users List" <users@tomcat.apache.org>
>  Date: Friday, September 29, 2017, 9:16
> PM
>  
>  >>
>  >>  1. See a link to Eclipse
> IDE FAQ
>  here:
>  >>
>  >>  https://wiki.apache.org/tomcat/FAQ/Developing#Q6
>  
>  The actual Tomcat
>  configuration that is running is in
> 
> ".metadata/.plugins/org.eclipse.wst.server.core"
>  directory (the
>  Eclipse Web Tools FAQ should
>  provide more pointers). There may be
>  situations when it becomes stale.
>  
>  >>  2. See the
>  >>  following thread on how to
> turn on
>  "Publish module
>  >>  context to
>  separate XML files" option in
> Eclipse.
>  >>
>  >>  By
>  default
>  >>  (without that option)
>  Eclipse IDE places 
>  >>  elements into server.xml,
> which is a
>  rather
>  >>  discourage practice.
>  >>
>  >>  http://markmail.org/message/7zkyocvph56b6t6q
>  >
>  > OK.  I managed to
>  turn on "Publish module context..but
> my problem of
>  context not bound is still there.
>  >
>  >>  3.
>  >> 
>  Documentation on Context:
>  >>
>  >>  http://tomcat.apache.org/tomcat-8.0-doc/config/context.html
>  >>
>  >>  The
>   element in
>  >>  your
>  context.xml has a lot of attributes
> that
>  >>  should not be there,
> starting
>  with
>  >>  "debug". What
>  (bad) example were
>  >>  they copied
>  from?
>  >
>  >  4. The
>  current version of
>  >  Tomcat 8.0 is
>  8.0.46.
>  >  There were security
>  >  fixes in Java as well (8u141
> was a
>  security update
>  >  in July 2017)
>  >
>  >  Also EOL date for
>  Tomcat 8.0 has been
>  >  announced. Users
>  are advised to
>  >  migrate to
>  >  8.5.
>  >  http://tomcat.apache.org/tomcat-80-eol.html
>  >
>  > Hi kolinko, I have
>  now installed Tomcat 8.5.20 but same
> problem.
>  
>  Even if it is "the same
>  problem", it 'd better if you provide
> the
>  actual log messages and stacktraces.
> Those
>  differ between versions.
>  
> Here's my latest error in which I
> really don't know what have cause the JPA no connection is
> specified :
> 
> INFO: Starting service Catalina
> Oct 02, 2017 3:53:51 PM
> org.apache.catalina.core.StandardEngine startInternal
> INFO: Starting Servlet Engine: Apache
> Tomcat/8.0.29
> Oct 02, 2017 3:53:52 PM
> org.apache.catalina.startup.HostConfig deployDescriptor
> INFO: Deploying configuration
> descriptor C:\Users\Karen Goh Seow
> Hui\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\conf\Catalina\localhost\Hi5S.xml
> Oct 02, 2017 3:53:53 PM
> org.apache.catalina.startup.SetContextPropertiesRule begin
> WARNING:
> [SetContextPropertiesRule]{Context} Setting property
> 'source' to 'org.eclipse.jst.jee.server:Hi5S' did not find a
> matching property.
> Oct 02, 2017 3:53:57 PM
> org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory
> getObjectInstance
> INFO: Name = hi5 Ignoring unknown
> property: value of "" for "description" property
> Oct 02, 2017 3:53:57 PM
> org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory
> getObjectInstance
> INFO: Name = hi5 Ignoring unknown
> property: value of "" for "mappedName" property
> Oct 02, 2017 3:53:58 PM
> org.apache.jasper.servlet.TldScanner scanJars
> INFO: At least one JAR was scanned for
> TLDs yet contained no TLDs. Enable debug logging for this
> logger for a complete list of JARs that were scanned but no
> TLDs were found in them. Skipping unneeded JARs during
> scanning can improve startup time and JSP compilation t

Re: Help needed - JPA probem - No connection specified with project

2017-10-02 Thread Karen Goh


On Fri, 9/29/17, Konstantin Kolinko <knst.koli...@gmail.com> wrote:

 Subject: Re: Help needed - JPA probem - No connection specified with project
 To: "Karen Goh" <karenwo...@yahoo.com>
 Cc: "Tomcat Users List" <users@tomcat.apache.org>
 Date: Friday, September 29, 2017, 9:16 PM
 
 >>
 >>  1. See a link to Eclipse IDE FAQ
 here:
 >>
 >>  https://wiki.apache.org/tomcat/FAQ/Developing#Q6
 
 The actual Tomcat
 configuration that is running is in
 ".metadata/.plugins/org.eclipse.wst.server.core"
 directory (the
 Eclipse Web Tools FAQ should
 provide more pointers). There may be
 situations when it becomes stale.
 
 >>  2. See the
 >>  following thread on how to turn on
 "Publish module
 >>  context to
 separate XML files" option in Eclipse.
 >>
 >>  By
 default
 >>  (without that option)
 Eclipse IDE places 
 >>  elements into server.xml, which is a
 rather
 >>  discourage practice.
 >>
 >>  http://markmail.org/message/7zkyocvph56b6t6q
 >
 > OK.  I managed to
 turn on "Publish module context..but my problem of
 context not bound is still there.
 >
 >>  3.
 >> 
 Documentation on Context:
 >>
 >>  http://tomcat.apache.org/tomcat-8.0-doc/config/context.html
 >>
 >>  The
  element in
 >>  your
 context.xml has a lot of attributes that
 >>  should not be there, starting
 with
 >>  "debug". What
 (bad) example were
 >>  they copied
 from?
 >
 >  4. The
 current version of
 >  Tomcat 8.0 is
 8.0.46.
 >  There were security
 >  fixes in Java as well (8u141 was a
 security update
 >  in July 2017)
 >
 >  Also EOL date for
 Tomcat 8.0 has been
 >  announced. Users
 are advised to
 >  migrate to
 >  8.5.
 >  http://tomcat.apache.org/tomcat-80-eol.html
 >
 > Hi kolinko, I have
 now installed Tomcat 8.5.20 but same problem.
 
 Even if it is "the same
 problem", it 'd better if you provide the
 actual log messages and stacktraces. Those
 differ between versions.
 
Here's my latest error in which I really don't know what have cause the JPA no 
connection is specified :

INFO: Starting service Catalina
Oct 02, 2017 3:53:51 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.0.29
Oct 02, 2017 3:53:52 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor C:\Users\Karen Goh Seow 
Hui\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\conf\Catalina\localhost\Hi5S.xml
Oct 02, 2017 3:53:53 PM org.apache.catalina.startup.SetContextPropertiesRule 
begin
WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 
'org.eclipse.jst.jee.server:Hi5S' did not find a matching property.
Oct 02, 2017 3:53:57 PM org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory 
getObjectInstance
INFO: Name = hi5 Ignoring unknown property: value of "" for "description" 
property
Oct 02, 2017 3:53:57 PM org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory 
getObjectInstance
INFO: Name = hi5 Ignoring unknown property: value of "" for "mappedName" 
property
Oct 02, 2017 3:53:58 PM org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug 
logging for this logger for a complete list of JARs that were scanned but no 
TLDs were found in them. Skipping unneeded JARs during scanning can improve 
startup time and JSP compilation time.
2017-10-02 15:53:59,962 localhost-startStop-1 ERROR Error processing element 
Configuration ([Configuration: null]): CLASS_NOT_FOUND
2017-10-02 15:54:00,324 localhost-startStop-1 ERROR No ConnectionSource 
provided: connectionSource
2017-10-02 15:54:00,327 localhost-startStop-1 ERROR Unable to inject fields 
into builder class for plugin type class 
org.apache.logging.log4j.core.appender.db.jdbc.JdbcAppender, element Jdbc. 
org.apache.logging.log4j.core.config.ConfigurationException: Arguments given 
for element Jdbc are invalid
at 
org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.injectFields(PluginBuilder.java:198)
at 
org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:121)
at 
org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:952)
at 
org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:892)
at 
org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:884)
at 
org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:508)
at 
org.apache.logging.log4j.core.config.AbstractConfiguratio

Re: Help needed - JPA probem - No connection specified with project

2017-09-29 Thread Konstantin Kolinko
>>
>>  1. See a link to Eclipse IDE FAQ here:
>>
>>  https://wiki.apache.org/tomcat/FAQ/Developing#Q6

The actual Tomcat configuration that is running is in
".metadata/.plugins/org.eclipse.wst.server.core" directory (the
Eclipse Web Tools FAQ should provide more pointers). There may be
situations when it becomes stale.

>>  2. See the
>>  following thread on how to turn on "Publish module
>>  context to separate XML files" option in Eclipse.
>>
>>  By default
>>  (without that option) Eclipse IDE places 
>>  elements into server.xml, which is a rather
>>  discourage practice.
>>
>>  http://markmail.org/message/7zkyocvph56b6t6q
>
> OK.  I managed to turn on "Publish module context..but my problem of context 
> not bound is still there.
>
>>  3.
>>  Documentation on Context:
>>
>>  http://tomcat.apache.org/tomcat-8.0-doc/config/context.html
>>
>>  The  element in
>>  your context.xml has a lot of attributes that
>>  should not be there, starting with
>>  "debug". What (bad) example were
>>  they copied from?
>
>  4. The current version of
>  Tomcat 8.0 is 8.0.46.
>  There were security
>  fixes in Java as well (8u141 was a security update
>  in July 2017)
>
>  Also EOL date for Tomcat 8.0 has been
>  announced. Users are advised to
>  migrate to
>  8.5.
>  http://tomcat.apache.org/tomcat-80-eol.html
>
> Hi kolinko, I have now installed Tomcat 8.5.20 but same problem.

Even if it is "the same problem", it 'd better if you provide the
actual log messages and stacktraces. Those differ between versions.

>>  5. Your
>>  META-INF/context.xml is broken: [...]
>>
>
> I have changed my context.xml as follows :
>
> 
> 

"path" and "docBase" should not be here.

>  name="jdbc/hi5"
> auth="Container"
> type="javax.sql.DataSource"
> maxTotal="8"
> maxActive="100"
> maxIdle="30"
> maxWait="-1"
> username="root"
> singleton="true"
> override="true"
> factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
> password="password"
>alternateUsernameAllowed="true"
> driverClassName="com.mysql.jdbc.Driver"
> url="jdbc:mysql://localhost:3306/hi5" />
>
>
> And my web.xml ;
>
> 
> http://www.w3.org/2001/XMLSchema-instance; 
> xmlns="http://xmlns.jcp.org/xml/ns/javaee; 
> xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
> http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd; version="3.1">
>   Hi5S
>   
> Index.jsp

Are you sure? Usually the name of a welcome file is "index.jsp" (lowercase).

>   
>   
> MySQL dataSource
> JDBC/hi5

"JDBC/hi5" here != "jdbc/hi5" used in your Resource

Case matters.

> javax.sql.DataSource
> Container
>   
>
> util.HibernateSessionFactoryListener 
> // I do not know if this is necessary.  Wld like to have your comments. Tks.
> 
> 

Best regards,
Konstantin Kolinko

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



Re: Help needed - JPA probem - No connection specified with project

2017-09-29 Thread Guang Chao
On Fri, Sep 22, 2017 at 6:35 PM, Karen Goh 
wrote:

> Hi expert,
>
> I have been trying very hard to nail the above problem including asking
> various forums like CodeRanch, dream in code etc but to no avail.
>
> As such, I am hoping to get help from the Apache Tomcat user support.
>
> Tools and setting : Eclipse Mars, Tomcat 1.8, MySQL, OS : Windows 7,
> Maven, Java JPA with Hibernate framework 5.1.0
>
> The MySQL setting is confirmed correct, as I have managed to insert the
> data via single JDBC connection.
>
> Project summary : J2ee servlet with JSP, Java JPA in Hibernate framework.
> (Hibernate is for pure insertion of data - many to many relationship)
>
> My purpose is to get the JNDI datasource working but till now I can't just
> get it work.
>
> Here's my context.xml :
>
> 
>  antiResourceLocking="true" debug="1">
>  type="javax.sql.DataSource"/>
> 
> name="jdbc/hi5"
> auth="Container"
> type="javax.sql.DataSource"
> maxTotal="8"
> maxActive="100"
> maxIdle="30"
> maxWait="-1"
> username="root"
> singleton="true"
> override="true"
> factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
> password="password"
>   alternateUsernameAllowed="true"
> driverClassName="com.mysql.jdbc.Driver"
> url="jdbc:mysql://localhost:3306/hi5" />
>   
>   
>
>
I review again original, can you remove the factory here and try?
 factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"


> Here's my web.xml:
>
> 
> http://www.w3.org/2001/XMLSchema-instance; xmlns="
> http://xmlns.jcp.org/xml/ns/javaee; xsi:schemaLocation="http://
> xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/
> javaee/web-app_3_1.xsd" version="3.1">
>   Hi5S
>   
> Index.jsp
>   
>   
> MySQL Datasource
> jdbc/hi5
> javax.sql.DataSource
> Container
>   
>
> 
>
> And my singletonDatasource class:
>
> package util;
>
>
> import java.sql.Connection;
> import java.sql.SQLException;
>
> import javax.annotation.Resource;
> import javax.naming.Context;
> import javax.naming.InitialContext;
> import javax.naming.NamingException;
> import javax.sql.DataSource;
>
>
> @Resource(name = "jdbc/hi5")
> public class SingletonDBConnection{
>
> private static SingletonDBConnection singleInstance;
> private static DataSource dataSource;
> private static Connection dbConnect;
>
> private SingletonDBConnection() {
> try {
> Context initContext = new InitialContext();
> Context envContext = (Context) initContext.lookup("java:/
> comp/env");
> dataSource = (DataSource) envContext.lookup("jdbc/hi5");
>
> try {
> dbConnect = dataSource.getConnection();
> } catch (SQLException e) {
> e.printStackTrace();
> }
> } catch (NamingException e) {
> e.printStackTrace();
> }
> }
>
>
> public static DataSource getMySQLDataSource() { // using apacheDBCP
> if (singleInstance == null) {
> synchronized (SingletonDBConnection.class) {
> if (singleInstance == null) {
> singleInstance = new SingletonDBConnection();
> }
> }
> }
>
> return (DataSource) singleInstance;
> }
>
> public static DataSource getConnInst() {
> try {
> dbConnect = dataSource.getConnection();
> } catch (SQLException e1) {
> e1.printStackTrace();
> }
>
> if (dbConnect == null) {
> try {
> Context initContext = new InitialContext();
> Context envContext = (Context) initContext.lookup("java:/
> comp/env");
> dataSource = (DataSource) envContext.lookup("jdbc/hi5");
>
> try {
> dbConnect = dataSource.getConnection();
> } catch (SQLException e) {
> e.printStackTrace();
> }
> } catch (NamingException e) {
> e.printStackTrace();
> }
> }
>
> return dataSource;
> }
>
> }
>
>
> And the persistence.xml ;
>
> 
> http://xmlns.jcp.org/xml/ns/persistence;
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="
> http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/
> persistence/persistence_2_1.xsd">
> 
> model.Subject
> model.Tutor
>
> 
> 
>value="java:comp/env/jdbc/hi5"/>
>
> 
> 
>
> 
>
> As the mailing list does not allow large error attachment, therefore, I am
> appending the error below :
>
> Sep 22, 2017 5:59:46 PM org.apache.tomcat.util.digester.SetPropertiesRule
> begin
> WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting
> property 'debug' to '1' did not find a matching property.
> Sep 22, 2017 5:59:46 PM org.apache.tomcat.util.digester.SetPropertiesRule
> begin
> WARNING: 

Re: Help needed - JPA probem - No connection specified with project

2017-09-28 Thread Karen Goh


On Thu, 9/28/17, Guang Chao <guang.chao.1...@gmail.com> wrote:

 Subject: Re: Help needed - JPA probem - No connection specified with project
 To: "Tomcat Users List" <users@tomcat.apache.org>, "Karen Goh" 
<karenwo...@yahoo.com>
 Date: Thursday, September 28, 2017, 1:25 PM
 
 On Thu, Sep 28, 2017 at 12:57 PM,
 Karen Goh <karenwo...@yahoo.com.invalid>
 wrote:
 
 >
 >
 
 > On Tue, 9/26/17, Konstantin Kolinko <knst.koli...@gmail.com>
 wrote:
 >
 >  Subject:
 Re: Help needed - JPA probem - No connection specified
 with
 > project
 >  To:
 "Tomcat Users List" <users@tomcat.apache.org>
 >  Date: Tuesday, September 26, 2017, 8:52
 AM
 >
 >  2017-09-25
 18:02 GMT+03:00 Karen
 >  Goh <karenwo...@yahoo.com>:
 >  > Hi Kolinko,
 > 
 >
 >  > I have now removed the
 ResourceLink and
 >  left with Resource
 in my context.xml which is resided at
 > 
 WebContent/META-INF.
 >  >
 >  > And this is C:\Program
 Files\Apache
 >  Software
 Foundation\Tomcat 8.0\conf\context.xml
 >  >
 >  >
   version="1.0"
 encoding="UTF-8"?>
 >  >
 
 >  >
 >  >    
 
 >  >     
 >  >
 > 
 WEB-INF/web.xml
 >  >
 > 
 ${catalina.base}/conf/web.xml
 >  >
 >  >    
 
 >  >     
 > 
 >
 >  >     
 >  >    
 
 >  >
 > 
 
 >  >
 >  >
 >  And
 here's my web.xml :
 >  >
 >  >   encoding="UTF-8"?>
 >  >
 >  http://www.w3.org/2001/XMLSchema-instance;
 >  xmlns="http://xmlns.jcp.org/xml/ns/javaee;
 >  xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
 > http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd;
 >  version="3.1">
 >  >
 > 
 Hi5S
 >  >   
 >  >
 > 
 Index.jsp
 >  >   
 >  >   
 >  >     MySQL
 >  Datasource
 >  >
 > 
 jdbc/hi5
 >  >
 > 
 javax.sql.DataSource
 >  >
 > 
 Container
 >  >   
 >  >
 >  >
 
 >  >
 >  > The error remains the
 >  same and my Tomcat failed to start,
 despite I cleaned them
 >  etc etc.
 >  >
 >  > SEVERE:
 A
 >  child container failed during
 start
 >  >
 > 
 java.util.concurrent.ExecutionException:
 >  org.apache.catalina.LifecycleException:
 Failed to start
 >  component
 > 
 [StandardEngine[Catalina].StandardHost[localhost]]
 >  >
 >  > Could
 you advise how
 >  to go about making it
 work ?
 >
 >  Mailing
 list rules:
 >  http://tomcat.apache.org/lists.html#tomcat-users
 >  -> Top-posting is bad.
 >
 > Ok. Tks, now I follow
 your requirements.
 >
 >
 >  1. See a link to
 Eclipse IDE FAQ here:
 >
 >  https://wiki.apache.org/tomcat/FAQ/Developing#Q6
 >
 >
 >  2. See the
 > 
 following thread on how to turn on "Publish module
 >  context
 >  to
 separate XML files" option
 >  in
 Eclipse.
 >
 >  By
 default
 >  (without that option) Eclipse
 IDE places 
 > 
 elements
 >  into server.xml, which is a
 rather
 >  discourage practice.
 >
 >  http://markmail.org/message/7zkyocvph56b6t6q
 >
 >
 >
 OK.  I managed to turn on "Publish module context..but
 my problem of
 > context not bound is
 still there.
 >
 > 
 3.
 >  Documentation on Context:
 >
 >  http://tomcat.apache.org/tomcat-8.0-doc/config/context.html
 >
 >  The 
 element in
 >  your context.xml has a lot
 of attributes that
 >  should not be
 there, starting with
 > 
 "debug". What (bad) example were
 >  they copied from?
 >
 >
 >  4. The current version of
 >  Tomcat 8.0 is 8.0.46.
 >  There were security
 >  fixes in Java as well (8u141 was a
 security update
 >  in July 2017)
 >
 >  Also EOL date for
 Tomcat 8.0 has been
 >  announced. Users
 are advised to
 >  migrate to
 >  8.5.
 >  http://tomcat.apache.org/tomcat-80-eol.html
 >
 > Hi kolinko, I have
 now installed Tomcat 8.5.20 but same problem.
 >
 >
 >
 >
 >  5. Your
 > 
 META-INF/context.xml is broken:
 > 
 [[[
 >    // here is
 rogue
 >  ">", thus your
 Resource has no name (all
 >  the
 following is plain text, not attributes)
 >  and thus NPE happens
 >
 > 
 name="jdbc/hi5"
 >
 >  auth="Container"
 >
 > 
 type="javax.sql.DataSource"
 >
 > 
 maxTotal="8"
 >
 >  maxActive="100"
 >
 > 
 maxIdle="30"
 >
 >  maxWait="-1"
 >
 > 
 username="root"
 >
 >  singleton="true"
 >
 > 
 override="true"
 >
 > 
 factory="or

Re: Help needed - JPA probem - No connection specified with project

2017-09-27 Thread Guang Chao
On Thu, Sep 28, 2017 at 12:57 PM, Karen Goh <karenwo...@yahoo.com.invalid>
wrote:

>
> 
> On Tue, 9/26/17, Konstantin Kolinko <knst.koli...@gmail.com> wrote:
>
>  Subject: Re: Help needed - JPA probem - No connection specified with
> project
>  To: "Tomcat Users List" <users@tomcat.apache.org>
>  Date: Tuesday, September 26, 2017, 8:52 AM
>
>  2017-09-25 18:02 GMT+03:00 Karen
>  Goh <karenwo...@yahoo.com>:
>  > Hi Kolinko,
>  >
>  > I have now removed the ResourceLink and
>  left with Resource in my context.xml which is resided at
>  WebContent/META-INF.
>  >
>  > And this is C:\Program Files\Apache
>  Software Foundation\Tomcat 8.0\conf\context.xml
>  >
>  >   version="1.0" encoding="UTF-8"?>
>  > 
>  >
>  > 
>  > 
>  >
>  WEB-INF/web.xml
>  >
>  ${catalina.base}/conf/web.xml
>  >
>  > 
>  > 
>  >
>  > 
>  > 
>  >
>  
>  >
>  >
>  And here's my web.xml :
>  >
>  >   encoding="UTF-8"?>
>  >
>  http://www.w3.org/2001/XMLSchema-instance;
>  xmlns="http://xmlns.jcp.org/xml/ns/javaee;
>  xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
> http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd;
>  version="3.1">
>  >
>  Hi5S
>  >   
>  >
>  Index.jsp
>  >   
>  >   
>  > MySQL
>  Datasource
>  >
>  jdbc/hi5
>  >
>  javax.sql.DataSource
>  >
>  Container
>  >   
>  >
>  > 
>  >
>  > The error remains the
>  same and my Tomcat failed to start, despite I cleaned them
>  etc etc.
>  >
>  > SEVERE: A
>  child container failed during start
>  >
>  java.util.concurrent.ExecutionException:
>  org.apache.catalina.LifecycleException: Failed to start
>  component
>  [StandardEngine[Catalina].StandardHost[localhost]]
>  >
>  > Could you advise how
>  to go about making it work ?
>
>  Mailing list rules:
>  http://tomcat.apache.org/lists.html#tomcat-users
>  -> Top-posting is bad.
>
> Ok. Tks, now I follow your requirements.
>
>
>  1. See a link to Eclipse IDE FAQ here:
>
>  https://wiki.apache.org/tomcat/FAQ/Developing#Q6
>
>
>  2. See the
>  following thread on how to turn on "Publish module
>  context
>  to separate XML files" option
>  in Eclipse.
>
>  By default
>  (without that option) Eclipse IDE places 
>  elements
>  into server.xml, which is a rather
>  discourage practice.
>
>  http://markmail.org/message/7zkyocvph56b6t6q
>
>
> OK.  I managed to turn on "Publish module context..but my problem of
> context not bound is still there.
>
>  3.
>  Documentation on Context:
>
>  http://tomcat.apache.org/tomcat-8.0-doc/config/context.html
>
>  The  element in
>  your context.xml has a lot of attributes that
>  should not be there, starting with
>  "debug". What (bad) example were
>  they copied from?
>
>
>  4. The current version of
>  Tomcat 8.0 is 8.0.46.
>  There were security
>  fixes in Java as well (8u141 was a security update
>  in July 2017)
>
>  Also EOL date for Tomcat 8.0 has been
>  announced. Users are advised to
>  migrate to
>  8.5.
>  http://tomcat.apache.org/tomcat-80-eol.html
>
> Hi kolinko, I have now installed Tomcat 8.5.20 but same problem.
>
>
>
>
>  5. Your
>  META-INF/context.xml is broken:
>  [[[
>// here is rogue
>  ">", thus your Resource has no name (all
>  the following is plain text, not attributes)
>  and thus NPE happens
>
>  name="jdbc/hi5"
>
>  auth="Container"
>
>  type="javax.sql.DataSource"
>
>  maxTotal="8"
>
>  maxActive="100"
>
>  maxIdle="30"
>
>  maxWait="-1"
>
>  username="root"
>
>  singleton="true"
>
>  override="true"
>
>  factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
>  password="password"
>
>  alternateUsernameAllowed="true"
>
>driverClassName="com.mysql.jdbc.Driver"
>
>  url="jdbc:mysql://localhost:3306/hi5" />  //
>  You either use /> or
>  ,
>  not both.
>
>  ]]]
>
>
> I have changed my context.xml as follows :
>
> 
>  >
>  name="jdbc/hi5"
> auth="Container"
> type="java

Re: Help needed - JPA probem - No connection specified with project

2017-09-27 Thread Karen Goh


On Tue, 9/26/17, Konstantin Kolinko <knst.koli...@gmail.com> wrote:

 Subject: Re: Help needed - JPA probem - No connection specified with project
 To: "Tomcat Users List" <users@tomcat.apache.org>
 Date: Tuesday, September 26, 2017, 8:52 AM
 
 2017-09-25 18:02 GMT+03:00 Karen
 Goh <karenwo...@yahoo.com>:
 > Hi Kolinko,
 >
 > I have now removed the ResourceLink and
 left with Resource in my context.xml which is resided at
 WebContent/META-INF.
 >
 > And this is C:\Program Files\Apache
 Software Foundation\Tomcat 8.0\conf\context.xml
 >
 > 
 > 
 >
 >     
 >     
 >    
 WEB-INF/web.xml
 >    
 ${catalina.base}/conf/web.xml
 >
 >     
 >     
 >
 >     
 >     
 >
 
 >
 >
 And here's my web.xml :
 >
 > 
 >
 http://www.w3.org/2001/XMLSchema-instance;
 xmlns="http://xmlns.jcp.org/xml/ns/javaee;
 xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd;
 version="3.1">
 >  
 Hi5S
 >   
 >    
 Index.jsp
 >   
 >   
 >     MySQL
 Datasource
 >    
 jdbc/hi5
 >    
 javax.sql.DataSource
 >    
 Container
 >   
 >
 > 
 >
 > The error remains the
 same and my Tomcat failed to start, despite I cleaned them
 etc etc.
 >
 > SEVERE: A
 child container failed during start
 >
 java.util.concurrent.ExecutionException:
 org.apache.catalina.LifecycleException: Failed to start
 component
 [StandardEngine[Catalina].StandardHost[localhost]]
 >
 > Could you advise how
 to go about making it work ?
 
 Mailing list rules:
 http://tomcat.apache.org/lists.html#tomcat-users
 -> Top-posting is bad.

Ok. Tks, now I follow your requirements.

 
 1. See a link to Eclipse IDE FAQ here:
 
 https://wiki.apache.org/tomcat/FAQ/Developing#Q6
 
 
 2. See the
 following thread on how to turn on "Publish module
 context
 to separate XML files" option
 in Eclipse.

 By default
 (without that option) Eclipse IDE places 
 elements
 into server.xml, which is a rather
 discourage practice.
 
 http://markmail.org/message/7zkyocvph56b6t6q


OK.  I managed to turn on "Publish module context..but my problem of context 
not bound is still there. 
 
 3.
 Documentation on Context:
 
 http://tomcat.apache.org/tomcat-8.0-doc/config/context.html
 
 The  element in
 your context.xml has a lot of attributes that
 should not be there, starting with
 "debug". What (bad) example were
 they copied from?
 
 
 4. The current version of
 Tomcat 8.0 is 8.0.46.
 There were security
 fixes in Java as well (8u141 was a security update
 in July 2017)
 
 Also EOL date for Tomcat 8.0 has been
 announced. Users are advised to
 migrate to
 8.5.
 http://tomcat.apache.org/tomcat-80-eol.html

Hi kolinko, I have now installed Tomcat 8.5.20 but same problem.
 


 
 5. Your
 META-INF/context.xml is broken:
 [[[
   // here is rogue
 ">", thus your Resource has no name (all
 the following is plain text, not attributes)
 and thus NPE happens
    
 name="jdbc/hi5"
    
 auth="Container"
    
 type="javax.sql.DataSource"
    
 maxTotal="8"
    
 maxActive="100"
    
 maxIdle="30"
    
 maxWait="-1"
    
 username="root"
    
 singleton="true"
    
 override="true"
    
 factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
     password="password"
      
 alternateUsernameAllowed="true"
  
   driverClassName="com.mysql.jdbc.Driver"
    
 url="jdbc:mysql://localhost:3306/hi5" />  //
 You either use /> or
 ,
 not both.
   
 ]]]
 
 
I have changed my context.xml as follows :



   


And my web.xml ;


http://www.w3.org/2001/XMLSchema-instance; 
xmlns="http://xmlns.jcp.org/xml/ns/javaee; 
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd; version="3.1">
  Hi5S
  
Index.jsp
  
  
MySQL dataSource
JDBC/hi5
javax.sql.DataSource
Container
  
   
util.HibernateSessionFactoryListener 
// I do not know if this is necessary.  Wld like to have your comments. Tks.



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

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



Re: Help needed - JPA probem - No connection specified with project

2017-09-25 Thread Konstantin Kolinko
2017-09-25 18:02 GMT+03:00 Karen Goh :
> Hi Kolinko,
>
> I have now removed the ResourceLink and left with Resource in my context.xml 
> which is resided at WebContent/META-INF.
>
> And this is C:\Program Files\Apache Software Foundation\Tomcat 
> 8.0\conf\context.xml
>
> 
> 
>
> 
> 
> WEB-INF/web.xml
> ${catalina.base}/conf/web.xml
>
> 
> 
>
> 
> 
> 
>
> And here's my web.xml :
>
> 
> http://www.w3.org/2001/XMLSchema-instance; 
> xmlns="http://xmlns.jcp.org/xml/ns/javaee; 
> xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
> http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd; version="3.1">
>   Hi5S
>   
> Index.jsp
>   
>   
> MySQL Datasource
> jdbc/hi5
> javax.sql.DataSource
> Container
>   
>
> 
>
> The error remains the same and my Tomcat failed to start, despite I cleaned 
> them etc etc.
>
> SEVERE: A child container failed during start
> java.util.concurrent.ExecutionException: 
> org.apache.catalina.LifecycleException: Failed to start component 
> [StandardEngine[Catalina].StandardHost[localhost]]
>
> Could you advise how to go about making it work ?

Mailing list rules:
http://tomcat.apache.org/lists.html#tomcat-users
-> Top-posting is bad.

1. See a link to Eclipse IDE FAQ here:

https://wiki.apache.org/tomcat/FAQ/Developing#Q6


2. See the following thread on how to turn on "Publish module context
to separate XML files" option in Eclipse.

By default (without that option) Eclipse IDE places  elements
into server.xml, which is a rather discourage practice.

http://markmail.org/message/7zkyocvph56b6t6q


3. Documentation on Context:

http://tomcat.apache.org/tomcat-8.0-doc/config/context.html

The  element in your context.xml has a lot of attributes that
should not be there, starting with "debug". What (bad) example were
they copied from?


4. The current version of Tomcat 8.0 is 8.0.46.
There were security fixes in Java as well (8u141 was a security update
in July 2017)

Also EOL date for Tomcat 8.0 has been announced. Users are advised to
migrate to 8.5.
http://tomcat.apache.org/tomcat-80-eol.html


5. Your META-INF/context.xml is broken:
[[[
  // here is rogue ">", thus your Resource has no name (all
the following is plain text, not attributes) and thus NPE happens
name="jdbc/hi5"
auth="Container"
type="javax.sql.DataSource"
maxTotal="8"
maxActive="100"
maxIdle="30"
maxWait="-1"
username="root"
singleton="true"
override="true"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
password="password"
  alternateUsernameAllowed="true"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/hi5" />  // You either use /> or
, not both.
  
]]]


Best regards,
Konstantin Kolinko

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



Re: Help needed - JPA probem - No connection specified with project

2017-09-25 Thread Karen Goh
Hi Kolinko,

I have now removed the ResourceLink and left with Resource in my context.xml 
which is resided at WebContent/META-INF.

And this is C:\Program Files\Apache Software Foundation\Tomcat 
8.0\conf\context.xml






WEB-INF/web.xml
${catalina.base}/conf/web.xml








And here's my web.xml :


http://www.w3.org/2001/XMLSchema-instance; 
xmlns="http://xmlns.jcp.org/xml/ns/javaee; 
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd; version="3.1">
  Hi5S
  
Index.jsp
  
  
MySQL Datasource
jdbc/hi5
javax.sql.DataSource
Container
  
  


The error remains the same and my Tomcat failed to start, despite I cleaned 
them etc etc.

SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: 
org.apache.catalina.LifecycleException: Failed to start component 
[StandardEngine[Catalina].StandardHost[localhost]]

Could you advise how to go about making it work ?

Hope to hear from you soon.

On Fri, 9/22/17, Konstantin Kolinko <knst.koli...@gmail.com> wrote:

 Subject: Re: Help needed - JPA probem - No connection specified with project
 To: "Tomcat Users List" <users@tomcat.apache.org>, "Karen Goh" 
<karenwo...@yahoo.com>
 Date: Friday, September 22, 2017, 10:00 PM
 
 2017-09-22 13:35 GMT+03:00 Karen
 Goh <karenwo...@yahoo.com.invalid>:
 > Hi expert,
 >
 > I have been trying very hard to nail the
 above problem including asking various forums like
 CodeRanch, dream in code etc but to no avail.
 >
 > As such, I am hoping
 to get help from the Apache Tomcat user support.
 >
 > Tools and setting :
 Eclipse Mars, Tomcat 1.8, MySQL, OS : Windows 7, Maven, Java
 JPA with Hibernate framework 5.1.0
 
 There is no such version as "Tomcat
 1.8". I assume that you meant some
 version of Tomcat 8.0.x.
 
 
 > The MySQL setting is
 confirmed correct, as I have managed to insert the data via
 single JDBC connection.
 >
 > Project summary : J2ee servlet with JSP,
 Java JPA in Hibernate framework. (Hibernate is for pure
 insertion of data - many to many relationship)
 >
 > My purpose is to get
 the JNDI datasource working but till now I can't just
 get it work.
 >
 >
 Here's my context.xml :
 >
 > 
 >
 
 >
 
 > 
 >   
  name="jdbc/hi5"
 >    
 auth="Container"
 >    
 type="javax.sql.DataSource"
 > 
    maxTotal="8"
 >    
 maxActive="100"
 >    
 maxIdle="30"
 >    
 maxWait="-1"
 >    
 username="root"
 >    
 singleton="true"
 >    
 override="true"
 >    
 factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
 >     password="password"
 >      
 alternateUsernameAllowed="true"
 >    
 driverClassName="com.mysql.jdbc.Driver"
 >    
 url="jdbc:mysql://localhost:3306/hi5" />
 >   
 >   
 
 The META-INF/context.xml file of a web
 application must have only one
 of
 <Resource, ResourceLink> elements with the same value
 of "name"
 attribute.
 
 
 If you have a
 ResourceLink in context.xml, it means that your Resource
 element must go into GlobalNamingResources
 element of conf/server.xml
 file.
 http://tomcat.apache.org/tomcat-8.5-doc/config/globalresources.html
 
 
 BTW, you
 should not modify conf/context.xml file. It is the
 defaults
 file shared by all web
 applications. (Modifying it is a common
 configuration mistake).
 
 
 Best regards,
 Konstantin Kolinko
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 

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



Fw: Re: Help needed - JPA probem - No connection specified with project

2017-09-23 Thread Karen Goh
Hi all,

I'd like to add that I did not add EclipseLink cos I learnt that you cannot mix 
Hibernate with EclipseLink.

Tks & rgds,
Karen

--- On Sat, 9/23/17, Karen Goh <karenwo...@yahoo.com> wrote:

> From: Karen Goh <karenwo...@yahoo.com>
> Subject: Re: Help needed - JPA probem - No connection specified with project
> To: "Tomcat Users List" <users@tomcat.apache.org>, knst.koli...@gmail.com
> Date: Saturday, September 23, 2017, 1:03 PM
> Hi all,
> 
> My apologies, my Tomcat server version
> is Apache Tomcat 8.0.29 Server.
> The JDK is 1.8
> 
> Hope to get some advice what went wrong
> in regards to the No connection specified with project.
> 
> Tks & rgds,
> Karen
> 
> On Fri, 9/22/17, Konstantin Kolinko
> <knst.koli...@gmail.com>
> wrote:
> 
>  Subject: Re: Help needed - JPA probem
> - No connection specified with project
>  To: "Tomcat Users List" <users@tomcat.apache.org>,
> "Karen Goh" <karenwo...@yahoo.com>
>  Date: Friday, September 22, 2017,
> 10:00 PM
>  
>  2017-09-22 13:35 GMT+03:00 Karen
>  Goh <karenwo...@yahoo.com.invalid>:
>  > Hi expert,
>  >
>  > I have been trying very hard to
> nail the
>  above problem including asking various
> forums like
>  CodeRanch, dream in code etc but to no
> avail.
>  >
>  > As such, I am hoping
>  to get help from the Apache Tomcat
> user support.
>  >
>  > Tools and setting :
>  Eclipse Mars, Tomcat 1.8, MySQL, OS :
> Windows 7, Maven, Java
>  JPA with Hibernate framework 5.1.0
>  
>  There is no such version as "Tomcat
>  1.8". I assume that you meant some
>  version of Tomcat 8.0.x.
>  
>  
>  > The MySQL setting is
>  confirmed correct, as I have managed
> to insert the data via
>  single JDBC connection.
>  >
>  > Project summary : J2ee servlet
> with JSP,
>  Java JPA in Hibernate framework.
> (Hibernate is for pure
>  insertion of data - many to many
> relationship)
>  >
>  > My purpose is to get
>  the JNDI datasource working but till
> now I can't just
>  get it work.
>  >
>  >
>  Here's my context.xml :
>  >
>  >   encoding="UTF-8"?>
>  >
>   docBase="Hi5S"
>  crossContext="true" reloadable="true"
>  antiResourceLocking="true"
>  debug="1">
>  >
>name="jdbc/hi5"
>  type="javax.sql.DataSource"/>
>  > 
>  >   
>   name="jdbc/hi5"
>  >    
>  auth="Container"
>  >    
>  type="javax.sql.DataSource"
>  > 
>     maxTotal="8"
>  >    
>  maxActive="100"
>  >    
>  maxIdle="30"
>  >    
>  maxWait="-1"
>  >    
>  username="root"
>  >    
>  singleton="true"
>  >    
>  override="true"
>  >    
> 
> factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
>  >     password="password"
>  >      
>  alternateUsernameAllowed="true"
>  >    
> 
> driverClassName="com.mysql.jdbc.Driver"
>  >    
>  url="jdbc:mysql://localhost:3306/hi5"
> />
>  >   
>  >   
>  
>  The META-INF/context.xml file of a
> web
>  application must have only one
>  of
>  <Resource, ResourceLink>
> elements with the same value
>  of "name"
>  attribute.
>  
>  
>  If you have a
>  ResourceLink in context.xml, it means
> that your Resource
>  element must go into
> GlobalNamingResources
>  element of conf/server.xml
>  file.
>  http://tomcat.apache.org/tomcat-8.5-doc/config/globalresources.html
>  
>  
>  BTW, you
>  should not modify conf/context.xml
> file. It is the
>  defaults
>  file shared by all web
>  applications. (Modifying it is a
> common
>  configuration mistake).
>  
>  
>  Best regards,
>  Konstantin Kolinko
>  
> 
> -
>  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>  For additional commands, e-mail: users-h...@tomcat.apache.org
>  
>  

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



Re: Help needed - JPA probem - No connection specified with project

2017-09-22 Thread Karen Goh
Hi all,

My apologies, my Tomcat server version is Apache Tomcat 8.0.29 Server.
The JDK is 1.8

Hope to get some advice what went wrong in regards to the No connection 
specified with project.

Tks & rgds,
Karen

On Fri, 9/22/17, Konstantin Kolinko <knst.koli...@gmail.com> wrote:

 Subject: Re: Help needed - JPA probem - No connection specified with project
 To: "Tomcat Users List" <users@tomcat.apache.org>, "Karen Goh" 
<karenwo...@yahoo.com>
 Date: Friday, September 22, 2017, 10:00 PM
 
 2017-09-22 13:35 GMT+03:00 Karen
 Goh <karenwo...@yahoo.com.invalid>:
 > Hi expert,
 >
 > I have been trying very hard to nail the
 above problem including asking various forums like
 CodeRanch, dream in code etc but to no avail.
 >
 > As such, I am hoping
 to get help from the Apache Tomcat user support.
 >
 > Tools and setting :
 Eclipse Mars, Tomcat 1.8, MySQL, OS : Windows 7, Maven, Java
 JPA with Hibernate framework 5.1.0
 
 There is no such version as "Tomcat
 1.8". I assume that you meant some
 version of Tomcat 8.0.x.
 
 
 > The MySQL setting is
 confirmed correct, as I have managed to insert the data via
 single JDBC connection.
 >
 > Project summary : J2ee servlet with JSP,
 Java JPA in Hibernate framework. (Hibernate is for pure
 insertion of data - many to many relationship)
 >
 > My purpose is to get
 the JNDI datasource working but till now I can't just
 get it work.
 >
 >
 Here's my context.xml :
 >
 > 
 >
 
 >
 
 > 
 >   
  name="jdbc/hi5"
 >    
 auth="Container"
 >    
 type="javax.sql.DataSource"
 > 
    maxTotal="8"
 >    
 maxActive="100"
 >    
 maxIdle="30"
 >    
 maxWait="-1"
 >    
 username="root"
 >    
 singleton="true"
 >    
 override="true"
 >    
 factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
 >     password="password"
 >      
 alternateUsernameAllowed="true"
 >    
 driverClassName="com.mysql.jdbc.Driver"
 >    
 url="jdbc:mysql://localhost:3306/hi5" />
 >   
 >   
 
 The META-INF/context.xml file of a web
 application must have only one
 of
 <Resource, ResourceLink> elements with the same value
 of "name"
 attribute.
 
 
 If you have a
 ResourceLink in context.xml, it means that your Resource
 element must go into GlobalNamingResources
 element of conf/server.xml
 file.
 http://tomcat.apache.org/tomcat-8.5-doc/config/globalresources.html
 
 
 BTW, you
 should not modify conf/context.xml file. It is the
 defaults
 file shared by all web
 applications. (Modifying it is a common
 configuration mistake).
 
 
 Best regards,
 Konstantin Kolinko
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 

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



Re: Help needed - JPA probem - No connection specified with project

2017-09-22 Thread Konstantin Kolinko
2017-09-22 13:35 GMT+03:00 Karen Goh :
> Hi expert,
>
> I have been trying very hard to nail the above problem including asking 
> various forums like CodeRanch, dream in code etc but to no avail.
>
> As such, I am hoping to get help from the Apache Tomcat user support.
>
> Tools and setting : Eclipse Mars, Tomcat 1.8, MySQL, OS : Windows 7, Maven, 
> Java JPA with Hibernate framework 5.1.0

There is no such version as "Tomcat 1.8". I assume that you meant some
version of Tomcat 8.0.x.


> The MySQL setting is confirmed correct, as I have managed to insert the data 
> via single JDBC connection.
>
> Project summary : J2ee servlet with JSP, Java JPA in Hibernate framework. 
> (Hibernate is for pure insertion of data - many to many relationship)
>
> My purpose is to get the JNDI datasource working but till now I can't just 
> get it work.
>
> Here's my context.xml :
>
> 
>  antiResourceLocking="true" debug="1">
> 
> 
> name="jdbc/hi5"
> auth="Container"
> type="javax.sql.DataSource"
> maxTotal="8"
> maxActive="100"
> maxIdle="30"
> maxWait="-1"
> username="root"
> singleton="true"
> override="true"
> factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
> password="password"
>   alternateUsernameAllowed="true"
> driverClassName="com.mysql.jdbc.Driver"
> url="jdbc:mysql://localhost:3306/hi5" />
>   
>   

The META-INF/context.xml file of a web application must have only one
of  elements with the same value of "name"
attribute.


If you have a ResourceLink in context.xml, it means that your Resource
element must go into GlobalNamingResources element of conf/server.xml
file.
http://tomcat.apache.org/tomcat-8.5-doc/config/globalresources.html


BTW, you should not modify conf/context.xml file. It is the defaults
file shared by all web applications. (Modifying it is a common
configuration mistake).


Best regards,
Konstantin Kolinko

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



Help needed - JPA probem - No connection specified with project

2017-09-22 Thread Karen Goh
Hi expert,

I have been trying very hard to nail the above problem including asking various 
forums like CodeRanch, dream in code etc but to no avail.

As such, I am hoping to get help from the Apache Tomcat user support.

Tools and setting : Eclipse Mars, Tomcat 1.8, MySQL, OS : Windows 7, Maven, 
Java JPA with Hibernate framework 5.1.0

The MySQL setting is confirmed correct, as I have managed to insert the data 
via single JDBC connection.

Project summary : J2ee servlet with JSP, Java JPA in Hibernate framework. 
(Hibernate is for pure insertion of data - many to many relationship)

My purpose is to get the JNDI datasource working but till now I can't just get 
it work.

Here's my context.xml :





name="jdbc/hi5"
auth="Container" 
type="javax.sql.DataSource"
maxTotal="8" 
maxActive="100" 
maxIdle="30" 
maxWait="-1"
username="root"
singleton="true" 
override="true"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
password="password" 
  alternateUsernameAllowed="true"
driverClassName="com.mysql.jdbc.Driver" 
url="jdbc:mysql://localhost:3306/hi5" />  
  


Here's my web.xml:


http://www.w3.org/2001/XMLSchema-instance; 
xmlns="http://xmlns.jcp.org/xml/ns/javaee; 
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd; version="3.1">
  Hi5S
  
Index.jsp
  
  
MySQL Datasource
jdbc/hi5
javax.sql.DataSource
Container
  
  


And my singletonDatasource class:

package util;


import java.sql.Connection;
import java.sql.SQLException;

import javax.annotation.Resource;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;


@Resource(name = "jdbc/hi5")
public class SingletonDBConnection{

private static SingletonDBConnection singleInstance;
private static DataSource dataSource;
private static Connection dbConnect;

private SingletonDBConnection() {
try {
Context initContext = new InitialContext();
Context envContext = (Context) initContext.lookup("java:/comp/env");
dataSource = (DataSource) envContext.lookup("jdbc/hi5");

try {
dbConnect = dataSource.getConnection();
} catch (SQLException e) {
e.printStackTrace();
}
} catch (NamingException e) {
e.printStackTrace();
}
}


public static DataSource getMySQLDataSource() { // using apacheDBCP
if (singleInstance == null) {
synchronized (SingletonDBConnection.class) {
if (singleInstance == null) {
singleInstance = new SingletonDBConnection();
}
}
}

return (DataSource) singleInstance;
}

public static DataSource getConnInst() {
try {
dbConnect = dataSource.getConnection();
} catch (SQLException e1) {
e1.printStackTrace();
}

if (dbConnect == null) {
try {
Context initContext = new InitialContext();
Context envContext = (Context) 
initContext.lookup("java:/comp/env");
dataSource = (DataSource) envContext.lookup("jdbc/hi5");

try {
dbConnect = dataSource.getConnection();
} catch (SQLException e) {
e.printStackTrace();
}
} catch (NamingException e) {
e.printStackTrace();
}
}

return dataSource;
}

}


And the persistence.xml ;


http://xmlns.jcp.org/xml/ns/persistence; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence 
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd;>

model.Subject
model.Tutor


  

  





As the mailing list does not allow large error attachment, therefore, I am 
appending the error below :

Sep 22, 2017 5:59:46 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting 
property 'debug' to '1' did not find a matching property.
Sep 22, 2017 5:59:46 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting 
property 'source' to 'org.eclipse.jst.jee.server:Hi5S' did not find a matching 
property.
Sep 22, 2017 5:59:46 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version:Apache Tomcat/8.0.29
Sep 22, 2017 5:59:46 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built:  Nov 20 2015 09:18:00 UTC
Sep 22, 2017 5:59:46 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number: 8.0.29.0
Sep 22, 2017 5:59:46 PM 

Re: Help needed

2016-04-12 Thread Sajin S
Nullpointerexception
On 13-Apr-2016 12:38 am, "David kerber"  wrote:

>
> On 4/12/2016 2:56 PM, Sajin S wrote:
>
>> Expection :
>>
>> at org.apache.coyote.http11.InternalAprOutputBuffer.addToBB(
>> *InternalAprOutputBuffer.java:186*)
>>
>
> You still missed the exception itself; you need what's before the "at" in
> the above lines.
>
>
>
>
>> at org.apache.coyote.http11.InternalAprOutputBuffer.access$000(
>> *InternalAprOutputBuffer.java:40*)
>>
>> at
>>
>> org.apache.coyote.http11.InternalAprOutputBuffer$SocketOutputBuffer.doWrite(
>> *InternalAprOutputBuffer.java:349*)
>>
>> at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(
>> *ChunkedOutputFilter.java:116*)
>>
>> at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(
>> *AbstractOutputBuffer.java:256*)
>>
>> at org.apache.coyote.Response.doWrite(*Response.java:501*)
>>
>> at org.apache.catalina.connector.OutputBuffer.realWriteBytes(
>> *OutputBuffer.java:388*)
>>
>> at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(
>> *ByteChunk.java:426*)
>>
>> at
>> org.apache.tomcat.util.buf.ByteChunk.append(*ByteChunk.java:339*)
>>
>> at org.apache.catalina.connector.OutputBuffer.writeBytes(
>> *OutputBuffer.java:418*)
>>
>> at org.apache.catalina.connector.OutputBuffer.write(
>> *OutputBuffer.java:406*)
>>
>> at org.apache.catalina.connector.CoyoteOutputStream.write(
>> *CoyoteOutputStream.java:97*)
>>
>> at
>>
>> jp.co.hitachi_ul.mvspf.restbase.service.RestVoiceService$1$1.onChunkReceived(
>> *RestVoiceService.java:170*)
>>
>> at
>> jp.co.hitachi_ul.mvspf.middleware.base.SessionContainer.onChunkReceived(
>> *SessionContainer.java:106*)
>>
>> at jp.co.hitachi_ul.mvspf.middleware.util.IpThread.callback(
>> *IpThread.java:188*)
>>
>> at
>> jp.co.hitachi_ul.mvspf.middleware.util.IpAdapter$ReadThread.run(
>> *IpAdapter.java:193*)
>> On 12-Apr-2016 11:55 pm, "Mark Thomas"  wrote:
>>
>> On 12/04/2016 18:42, Sajin S wrote:
>>>
   I am using tomcat 8.0.33 and getting this issue. Kindly help me.


 While doing asynchronous call back and write the output using

>>> outputstream
>>>
 am getting this issue.


 Current protocol is bio. Please help.

>>>
>>> You've removed the exception information that would let us help you.
>>>
>>> What you have left clearly shows you are not using BIO.
>>>
>>> It looks like you need to read this:
>>> http://www.catb.org/esr/faqs/smart-questions.html
>>>
>>> Mark
>>>
>>>


 Expection :

 at org.apache.coyote.http11.InternalAprOutputBuffer.addToBB(
 *InternalAprOutputBuffer.java:186*)

 at org.apache.coyote.http11.InternalAprOutputBuffer.access$000(
 *InternalAprOutputBuffer.java:40*)

 at


>>> org.apache.coyote.http11.InternalAprOutputBuffer$SocketOutputBuffer.doWrite(
>>>
 *InternalAprOutputBuffer.java:349*)

 at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(
 *ChunkedOutputFilter.java:116*)

 at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(
 *AbstractOutputBuffer.java:256*)

 at org.apache.coyote.Response.doWrite(*Response.java:501*)

 at org.apache.catalina.connector.OutputBuffer.realWriteBytes(
 *OutputBuffer.java:388*)

 at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(
 *ByteChunk.java:426*)

 at

>>> org.apache.tomcat.util.buf.ByteChunk.append(*ByteChunk.java:339*)
>>>

 at org.apache.catalina.connector.OutputBuffer.writeBytes(
 *OutputBuffer.java:418*)

 at org.apache.catalina.connector.OutputBuffer.write(
 *OutputBuffer.java:406*)

 at org.apache.catalina.connector.CoyoteOutputStream.write(
 *CoyoteOutputStream.java:97*)

 at


>>> jp.co.hitachi_ul.mvspf.restbase.service.RestVoiceService$1$1.onChunkReceived(
>>>
 *RestVoiceService.java:170*)

 at
 jp.co.hitachi_ul.mvspf.middleware.base.SessionContainer.onChunkReceived(
 *SessionContainer.java:106*)

 at jp.co.hitachi_ul.mvspf.middleware.util.IpThread.callback(
 *IpThread.java:188*)

 at

>>> jp.co.hitachi_ul.mvspf.middleware.util.IpAdapter$ReadThread.run(
>>>
 *IpAdapter.java:193*)
 Thanks & Regards,
 Sajin S
 +919995047208


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


Re: Help needed

2016-04-12 Thread David kerber


On 4/12/2016 2:56 PM, Sajin S wrote:

Expection :

at org.apache.coyote.http11.InternalAprOutputBuffer.addToBB(
*InternalAprOutputBuffer.java:186*)


You still missed the exception itself; you need what's before the "at" 
in the above lines.






at org.apache.coyote.http11.InternalAprOutputBuffer.access$000(
*InternalAprOutputBuffer.java:40*)

at
org.apache.coyote.http11.InternalAprOutputBuffer$SocketOutputBuffer.doWrite(
*InternalAprOutputBuffer.java:349*)

at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(
*ChunkedOutputFilter.java:116*)

at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(
*AbstractOutputBuffer.java:256*)

at org.apache.coyote.Response.doWrite(*Response.java:501*)

at org.apache.catalina.connector.OutputBuffer.realWriteBytes(
*OutputBuffer.java:388*)

at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(
*ByteChunk.java:426*)

at org.apache.tomcat.util.buf.ByteChunk.append(*ByteChunk.java:339*)

at org.apache.catalina.connector.OutputBuffer.writeBytes(
*OutputBuffer.java:418*)

at org.apache.catalina.connector.OutputBuffer.write(
*OutputBuffer.java:406*)

at org.apache.catalina.connector.CoyoteOutputStream.write(
*CoyoteOutputStream.java:97*)

at
jp.co.hitachi_ul.mvspf.restbase.service.RestVoiceService$1$1.onChunkReceived(
*RestVoiceService.java:170*)

at
jp.co.hitachi_ul.mvspf.middleware.base.SessionContainer.onChunkReceived(
*SessionContainer.java:106*)

at jp.co.hitachi_ul.mvspf.middleware.util.IpThread.callback(
*IpThread.java:188*)

at jp.co.hitachi_ul.mvspf.middleware.util.IpAdapter$ReadThread.run(
*IpAdapter.java:193*)
On 12-Apr-2016 11:55 pm, "Mark Thomas"  wrote:


On 12/04/2016 18:42, Sajin S wrote:

  I am using tomcat 8.0.33 and getting this issue. Kindly help me.


While doing asynchronous call back and write the output using

outputstream

am getting this issue.


Current protocol is bio. Please help.


You've removed the exception information that would let us help you.

What you have left clearly shows you are not using BIO.

It looks like you need to read this:
http://www.catb.org/esr/faqs/smart-questions.html

Mark





Expection :

at org.apache.coyote.http11.InternalAprOutputBuffer.addToBB(
*InternalAprOutputBuffer.java:186*)

at org.apache.coyote.http11.InternalAprOutputBuffer.access$000(
*InternalAprOutputBuffer.java:40*)

at


org.apache.coyote.http11.InternalAprOutputBuffer$SocketOutputBuffer.doWrite(

*InternalAprOutputBuffer.java:349*)

at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(
*ChunkedOutputFilter.java:116*)

at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(
*AbstractOutputBuffer.java:256*)

at org.apache.coyote.Response.doWrite(*Response.java:501*)

at org.apache.catalina.connector.OutputBuffer.realWriteBytes(
*OutputBuffer.java:388*)

at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(
*ByteChunk.java:426*)

at

org.apache.tomcat.util.buf.ByteChunk.append(*ByteChunk.java:339*)


at org.apache.catalina.connector.OutputBuffer.writeBytes(
*OutputBuffer.java:418*)

at org.apache.catalina.connector.OutputBuffer.write(
*OutputBuffer.java:406*)

at org.apache.catalina.connector.CoyoteOutputStream.write(
*CoyoteOutputStream.java:97*)

at


jp.co.hitachi_ul.mvspf.restbase.service.RestVoiceService$1$1.onChunkReceived(

*RestVoiceService.java:170*)

at
jp.co.hitachi_ul.mvspf.middleware.base.SessionContainer.onChunkReceived(
*SessionContainer.java:106*)

at jp.co.hitachi_ul.mvspf.middleware.util.IpThread.callback(
*IpThread.java:188*)

at

jp.co.hitachi_ul.mvspf.middleware.util.IpAdapter$ReadThread.run(

*IpAdapter.java:193*)
Thanks & Regards,
Sajin S
+919995047208




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







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



Re: Help needed

2016-04-12 Thread Sajin S
Expection :

at org.apache.coyote.http11.InternalAprOutputBuffer.addToBB(
*InternalAprOutputBuffer.java:186*)

   at org.apache.coyote.http11.InternalAprOutputBuffer.access$000(
*InternalAprOutputBuffer.java:40*)

   at
org.apache.coyote.http11.InternalAprOutputBuffer$SocketOutputBuffer.doWrite(
*InternalAprOutputBuffer.java:349*)

   at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(
*ChunkedOutputFilter.java:116*)

   at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(
*AbstractOutputBuffer.java:256*)

   at org.apache.coyote.Response.doWrite(*Response.java:501*)

   at org.apache.catalina.connector.OutputBuffer.realWriteBytes(
*OutputBuffer.java:388*)

   at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(
*ByteChunk.java:426*)

   at org.apache.tomcat.util.buf.ByteChunk.append(*ByteChunk.java:339*)

   at org.apache.catalina.connector.OutputBuffer.writeBytes(
*OutputBuffer.java:418*)

   at org.apache.catalina.connector.OutputBuffer.write(
*OutputBuffer.java:406*)

   at org.apache.catalina.connector.CoyoteOutputStream.write(
*CoyoteOutputStream.java:97*)

   at
jp.co.hitachi_ul.mvspf.restbase.service.RestVoiceService$1$1.onChunkReceived(
*RestVoiceService.java:170*)

   at
jp.co.hitachi_ul.mvspf.middleware.base.SessionContainer.onChunkReceived(
*SessionContainer.java:106*)

   at jp.co.hitachi_ul.mvspf.middleware.util.IpThread.callback(
*IpThread.java:188*)

   at jp.co.hitachi_ul.mvspf.middleware.util.IpAdapter$ReadThread.run(
*IpAdapter.java:193*)
On 12-Apr-2016 11:55 pm, "Mark Thomas"  wrote:

> On 12/04/2016 18:42, Sajin S wrote:
> >  I am using tomcat 8.0.33 and getting this issue. Kindly help me.
> >
> >
> > While doing asynchronous call back and write the output using
> outputstream
> > am getting this issue.
> >
> >
> > Current protocol is bio. Please help.
>
> You've removed the exception information that would let us help you.
>
> What you have left clearly shows you are not using BIO.
>
> It looks like you need to read this:
> http://www.catb.org/esr/faqs/smart-questions.html
>
> Mark
>
> >
> >
> >
> > Expection :
> >
> > at org.apache.coyote.http11.InternalAprOutputBuffer.addToBB(
> > *InternalAprOutputBuffer.java:186*)
> >
> >at org.apache.coyote.http11.InternalAprOutputBuffer.access$000(
> > *InternalAprOutputBuffer.java:40*)
> >
> >at
> >
> org.apache.coyote.http11.InternalAprOutputBuffer$SocketOutputBuffer.doWrite(
> > *InternalAprOutputBuffer.java:349*)
> >
> >at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(
> > *ChunkedOutputFilter.java:116*)
> >
> >at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(
> > *AbstractOutputBuffer.java:256*)
> >
> >at org.apache.coyote.Response.doWrite(*Response.java:501*)
> >
> >at org.apache.catalina.connector.OutputBuffer.realWriteBytes(
> > *OutputBuffer.java:388*)
> >
> >at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(
> > *ByteChunk.java:426*)
> >
> >at
> org.apache.tomcat.util.buf.ByteChunk.append(*ByteChunk.java:339*)
> >
> >at org.apache.catalina.connector.OutputBuffer.writeBytes(
> > *OutputBuffer.java:418*)
> >
> >at org.apache.catalina.connector.OutputBuffer.write(
> > *OutputBuffer.java:406*)
> >
> >at org.apache.catalina.connector.CoyoteOutputStream.write(
> > *CoyoteOutputStream.java:97*)
> >
> >at
> >
> jp.co.hitachi_ul.mvspf.restbase.service.RestVoiceService$1$1.onChunkReceived(
> > *RestVoiceService.java:170*)
> >
> >at
> > jp.co.hitachi_ul.mvspf.middleware.base.SessionContainer.onChunkReceived(
> > *SessionContainer.java:106*)
> >
> >at jp.co.hitachi_ul.mvspf.middleware.util.IpThread.callback(
> > *IpThread.java:188*)
> >
> >at
> jp.co.hitachi_ul.mvspf.middleware.util.IpAdapter$ReadThread.run(
> > *IpAdapter.java:193*)
> > Thanks & Regards,
> > Sajin S
> > +919995047208
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Help needed

2016-04-12 Thread Mark Thomas
On 12/04/2016 18:42, Sajin S wrote:
>  I am using tomcat 8.0.33 and getting this issue. Kindly help me.
> 
> 
> While doing asynchronous call back and write the output using outputstream
> am getting this issue.
> 
> 
> Current protocol is bio. Please help.

You've removed the exception information that would let us help you.

What you have left clearly shows you are not using BIO.

It looks like you need to read this:
http://www.catb.org/esr/faqs/smart-questions.html

Mark

> 
> 
> 
> Expection :
> 
> at org.apache.coyote.http11.InternalAprOutputBuffer.addToBB(
> *InternalAprOutputBuffer.java:186*)
> 
>at org.apache.coyote.http11.InternalAprOutputBuffer.access$000(
> *InternalAprOutputBuffer.java:40*)
> 
>at
> org.apache.coyote.http11.InternalAprOutputBuffer$SocketOutputBuffer.doWrite(
> *InternalAprOutputBuffer.java:349*)
> 
>at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(
> *ChunkedOutputFilter.java:116*)
> 
>at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(
> *AbstractOutputBuffer.java:256*)
> 
>at org.apache.coyote.Response.doWrite(*Response.java:501*)
> 
>at org.apache.catalina.connector.OutputBuffer.realWriteBytes(
> *OutputBuffer.java:388*)
> 
>at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(
> *ByteChunk.java:426*)
> 
>at org.apache.tomcat.util.buf.ByteChunk.append(*ByteChunk.java:339*)
> 
>at org.apache.catalina.connector.OutputBuffer.writeBytes(
> *OutputBuffer.java:418*)
> 
>at org.apache.catalina.connector.OutputBuffer.write(
> *OutputBuffer.java:406*)
> 
>at org.apache.catalina.connector.CoyoteOutputStream.write(
> *CoyoteOutputStream.java:97*)
> 
>at
> jp.co.hitachi_ul.mvspf.restbase.service.RestVoiceService$1$1.onChunkReceived(
> *RestVoiceService.java:170*)
> 
>at
> jp.co.hitachi_ul.mvspf.middleware.base.SessionContainer.onChunkReceived(
> *SessionContainer.java:106*)
> 
>at jp.co.hitachi_ul.mvspf.middleware.util.IpThread.callback(
> *IpThread.java:188*)
> 
>at jp.co.hitachi_ul.mvspf.middleware.util.IpAdapter$ReadThread.run(
> *IpAdapter.java:193*)
> Thanks & Regards,
> Sajin S
> +919995047208
> 


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



Help needed

2016-04-12 Thread Sajin S
 I am using tomcat 8.0.33 and getting this issue. Kindly help me.


While doing asynchronous call back and write the output using outputstream
am getting this issue.


Current protocol is bio. Please help.



Expection :

at org.apache.coyote.http11.InternalAprOutputBuffer.addToBB(
*InternalAprOutputBuffer.java:186*)

   at org.apache.coyote.http11.InternalAprOutputBuffer.access$000(
*InternalAprOutputBuffer.java:40*)

   at
org.apache.coyote.http11.InternalAprOutputBuffer$SocketOutputBuffer.doWrite(
*InternalAprOutputBuffer.java:349*)

   at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(
*ChunkedOutputFilter.java:116*)

   at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(
*AbstractOutputBuffer.java:256*)

   at org.apache.coyote.Response.doWrite(*Response.java:501*)

   at org.apache.catalina.connector.OutputBuffer.realWriteBytes(
*OutputBuffer.java:388*)

   at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(
*ByteChunk.java:426*)

   at org.apache.tomcat.util.buf.ByteChunk.append(*ByteChunk.java:339*)

   at org.apache.catalina.connector.OutputBuffer.writeBytes(
*OutputBuffer.java:418*)

   at org.apache.catalina.connector.OutputBuffer.write(
*OutputBuffer.java:406*)

   at org.apache.catalina.connector.CoyoteOutputStream.write(
*CoyoteOutputStream.java:97*)

   at
jp.co.hitachi_ul.mvspf.restbase.service.RestVoiceService$1$1.onChunkReceived(
*RestVoiceService.java:170*)

   at
jp.co.hitachi_ul.mvspf.middleware.base.SessionContainer.onChunkReceived(
*SessionContainer.java:106*)

   at jp.co.hitachi_ul.mvspf.middleware.util.IpThread.callback(
*IpThread.java:188*)

   at jp.co.hitachi_ul.mvspf.middleware.util.IpAdapter$ReadThread.run(
*IpAdapter.java:193*)
Thanks & Regards,
Sajin S
+919995047208


Re: [OT] secure reverse proxy to my tomcat server HELP NEEDED

2014-03-05 Thread Jeff Haferman
André Warnier wrote:

 Jeff Haferman wrote:
 Jeff Top-Posting is not Bad because you have to scroll to the bottom to see 
 what you're after Haferman wrote:
 
 [...]

 quote :

 A: Because it messes up the order in which people normally read text.
 Q: Why is top-posting such a bad thing?
 A: Top-posting.
 Q: What is the most annoying thing in e-mail?

 Bottom-posting preserves the logical order of the replies and is consistent 
 with the 
 Western reading direction from top to bottom.

 unquote.

 My comment was not meant to start a flame war, just to remind you (and 
 gently, at that) of 
 what the usage rules of this list are.  Even if for your own personal 
 communications 
 elsewhere you prefer to use another style, when you are going somewhere in 
 order to get 
 free help in resolving a problem of yours, and you obtain such help freely 
 given, it would 
 seem just mere politeness to abide by the customs of the place, no ?

[snip]

...you will note that I subsequently *did* bottom-post. This is an endless 
debate that has been going on for a couple of 
decades. I will abide by the mailing list rules, that does not mean I have to 
agree with the rationale. End of story.


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



Re: secure reverse proxy to my tomcat server HELP NEEDED

2014-03-04 Thread André Warnier

Hi.

On this list, it is preferred (strongly) if you do not top-post, but respond in the text 
or below the question.  It just makes it easier to follow what is going on.

I have moved your previous response, to the logival order.

Jeff Haferman wrote:


Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Jeff,

On 3/3/14, 5:11 PM, Jeff Haferman wrote:

Yes, for development httpd and tomcat are on the same physical
machine. Eventually they will be on different machines. But, even
if I try browser --- HTTPS -- httpd -- HTTP -- Tomcat by just
changing the ProxyPass and ProxyPassReverse directives to use the
unencrypted URLs as follows

VirtualHost *:443 SSLEngine on SSLProxyEngine on 
SSLCertificateFile /path/to/server.crt SSLCertificateKeyFile

/path/to/server.key ServerName my.webserver.com ProxyPass /
http://my.webserver.com:8080/ ProxyPassReverse /
http://my.webserver.com:8080/ /VirtualHost

the reverse proxy still does not serve the tomcat pages as I would
expect.

Given the above setup, what /actually/ happens when you try to request
a resource that should go to Tomcat? does not serve pages as I
expect is not a good description.




Oh, and everyone posting NEEDS HELP to it's not necessary to add HELP
NEEDED or similar text to your subjects.


 Hi Chris -
 Sorry for the HELP NEEDED.

 What actually happens is that, just for https://my.webserver.com/, I get served the 
pages that are

 at the apache root, *not* what is being served by tomcat at port 8443.

 I do get the tomcat pages if I explicitly add the port, i.e. 
https://my.webserver.com:8443/
 So, the reverse proxy seems to be broken for https only.

 The reverse proxy works fine for http, i.e. http://my.webserver.com/ gets the tomcat 
pages served

 at http://my.webserver.com:8080/


Ok, that is bizarre.  I am sure that we are missing some piece of the puzzle here, because 
if it was a real bug, it would have come out by now.


According to the symptoms, the Apache mod_proxy module either is not activated for that 
HTTPS VirtualHost, or it is activated but decides not to proxy these calls to Tomcat.

Which on the face of it, shouldn't happen.
It could also be that the requests are not being processed by the httpd VirtualHost which 
you think is processing them.  Under Apache httpd, the first configured VirtualHost (from 
top to bottom of the includes-assembled configuration file), is the default host, which 
catches all requests that arrive there, but where the ServerName doesn't match any of the 
configured ones.


Referring to the configuration in your original post, I would try to simplify it, by first 
removing the unnecessary/potentially confusing bits.

I would first remove these sections :
proxy http://my.webserver.com:8080/
AllowOverride None
Order Deny,Allow
Allow from all
/proxy
proxy https://my.webserver.com:8443/
AllowOverride None
Order Deny,Allow
Allow from all
/proxy

because they are for *forward* proxying, which is not what you are trying to do here (and 
you correctly have ProxyRequests Off anyway).

(See http://httpd.apache.org/docs/2.2/mod/mod_proxy.html)

Also, I would remove the ProxyPreserveHost on line. See 
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypreservehost;.


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



Re: secure reverse proxy to my tomcat server HELP NEEDED

2014-03-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Jeff,

On 3/3/14, 6:25 PM, Jeff Haferman wrote:
 What actually happens is that, just for https://my.webserver.com/,
 I get served the pages that are at the apache root, *not* what is
 being served by tomcat at port 8443.

Ok. Let's take a look at your original configuration you posted:

 VirtualHost *:80
 
 ServerName my.webserver.com ProxyPass /
 http://my.webserver.com:8080/ ProxyPassReverse /app
 http://localhost:8080/
 
 /VirtualHost
 
 VirtualHost *:443
 
 SSLEngine on SSLProxyEngine on SSLCertificateFile
 /path/to/server.crt SSLCertificateKeyFile /path/to/server.key 
 ServerName my.webserver.com ProxyPass /
 http://my.webserver.com:8443/ ProxyPassReverse /app
 http://localhost:8443/
 
 /VirtualHost

You also had proxy elements outside of the above. Those are
configured differently than the ProxyPass/ProxyPassReverse you have
above. What were those proxy elements supposed to do?

Also, you are likely confusing yourself id you are using ProxyPass and
ProxyPassReverse with different URL prefixes (/ vs /app). Why are you
doing that?

 I do get the tomcat pages if I explicitly add the port, i.e.
 https://my.webserver.com:8443/ So, the reverse proxy seems to be
 broken for https only.

Sounds plausible.

 The reverse proxy works fine for http, i.e.
 http://my.webserver.com/ gets the tomcat pages served at
 http://my.webserver.com:8080/

You don't have multiple interfaces (IP addresses) on this machine, do you?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTFikFAAoJEBzwKT+lPKRYUP8P/2PV9XctTcAKp8p0ISguxoey
NmvD9vhhv7f9tBMhWCCe95gTp5NWIFGV5O7vc0F0ooUPzScuu2SsVurz0CO2J5RG
kld4tt3E8kJ+d68UvpiqL3UGBjxgShMjKUSgh6dW1UgKV3WYk56unWm7HDDEjS0E
zjuGwa0u9agncP6Ipyv8sxwZDflyYdAv0qmlZ0f3YUAR+vCCKN5Byn/4BqvFFfUa
2iMhJLQeVb9if7AHc7J97hNpZf1djNO4WgFYfrXshKaASz+YwGig29Yy2qqMcZPB
v9YRBqpZdObshTJuQGnb2NrDNMuoBfpIrUrRETlNLh2odvNjUhUKlrTpgF/JOI9H
eBw1PE/ymHyTZSltgvAMsuQoykJcbbm05xKuWIGVWcq81iqsKfBoEVgxufIMLrXs
C+MP2xDbidU24tGI3n/ZONwEV152no9CUKI3N7avDgkRb20AGh6+85zRYGyCMWcJ
PFMJl8djBVwsddlGYTcBuhyUZxVaYheQr0wVxfkn4syG70YtyO/lUMy5zSb3NJtg
CmrsCHMGnX83ApW0HivGi6REvn7gdZ6vn3YWYQd2IxhbuTUOtRrNgG4gIjAK0dRE
M2ahASYv2AYa3u00PW/918lbubXn34waHI3yOYi2wz+UzWW12wqjkku3DazzwmcB
x5/3VgLt7ha2rd0Sybn5
=eEVb
-END PGP SIGNATURE-

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



Re: secure reverse proxy to my tomcat server HELP NEEDED

2014-03-04 Thread Jeff Haferman
Christopher Schultz wrote:

 Jeff,

 On 3/3/14, 6:25 PM, Jeff Haferman wrote:
 What actually happens is that, just for https://my.webserver.com/,
 I get served the pages that are at the apache root, *not* what is
 being served by tomcat at port 8443.

 Ok. Let's take a look at your original configuration you posted:

 VirtualHost *:80
 
 ServerName my.webserver.com ProxyPass /
 http://my.webserver.com:8080/ ProxyPassReverse /app
 http://localhost:8080/
 
 /VirtualHost
 
 VirtualHost *:443
 
 SSLEngine on SSLProxyEngine on SSLCertificateFile
 /path/to/server.crt SSLCertificateKeyFile /path/to/server.key 
 ServerName my.webserver.com ProxyPass /
 http://my.webserver.com:8443/ ProxyPassReverse /app
 http://localhost:8443/
 
 /VirtualHost

 You also had proxy elements outside of the above. Those are
 configured differently than the ProxyPass/ProxyPassReverse you have
 above. What were those proxy elements supposed to do?

 Also, you are likely confusing yourself id you are using ProxyPass and
 ProxyPassReverse with different URL prefixes (/ vs /app). Why are you
 doing that?

Chris -
This came up in a previous response, when I edited my domain name in my 
posting, I actually fat-fingered a couple of things... the config looks like

Listen 80
ProxyRequests Off
ProxyPreserveHost on
VirtualHost *:80

ServerName my.webserver.com
ProxyPass / http://my.webserver.com:8080/
ProxyPassReverse / http://localhost:8080/
  
/VirtualHost
proxy http://my.webserver.com:8080/
AllowOverride None
Order Deny,Allow
Allow from all
/proxy

Listen 443
VirtualHost *:443

SSLEngine on
SSLProxyEngine on
SSLCertificateFile /path/to/server.crt
SSLCertificateKeyFile /path/to/server.key
ServerName my.webserver.com
ProxyPass / https://my.webserver.com:8443/
ProxyPassReverse / https://localhost:8443/

/VirtualHost
proxy https://my.webserver.com:8443/
AllowOverride None
Order Deny,Allow
Allow from all
/proxy


 I do get the tomcat pages if I explicitly add the port, i.e.
 https://my.webserver.com:8443/ So, the reverse proxy seems to be
 broken for https only.

 Sounds plausible.

 The reverse proxy works fine for http, i.e.
 http://my.webserver.com/ gets the tomcat pages served at
 http://my.webserver.com:8080/

 You don't have multiple interfaces (IP addresses) on this machine, do you?


No, I do not.

 - -chris

Jeff


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



Re: secure reverse proxy to my tomcat server HELP NEEDED

2014-03-04 Thread Jeff Haferman
Jeff Top-Posting is not Bad because you have to scroll to the bottom to see 
what you're after Haferman wrote:



 Listen 80
 ProxyRequests Off
 ProxyPreserveHost on
VirtualHost *:80

 ServerName my.webserver.com
 ProxyPass / http://my.webserver.com:8080/
 ProxyPassReverse / http://localhost:8080/
   
/VirtualHost
proxy http://my.webserver.com:8080/
 AllowOverride None
 Order Deny,Allow
 Allow from all
/proxy

 Listen 443
VirtualHost *:443

 SSLEngine on
 SSLProxyEngine on
 SSLCertificateFile /path/to/server.crt
 SSLCertificateKeyFile /path/to/server.key
 ServerName my.webserver.com
 ProxyPass / https://my.webserver.com:8443/
 ProxyPassReverse / https://localhost:8443/

/VirtualHost
proxy https://my.webserver.com:8443/
 AllowOverride None
 Order Deny,Allow
 Allow from all
/proxy


Problem solved. The config listed is good. It was getting borked by some 
garbage in an included extra/httpd-ssl.conf file. Most helpful resource I found 
was the apache mod_proxy documentation...I thought it might have been a tomcat 
connector problem but not so... 


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



Re: [OT] secure reverse proxy to my tomcat server HELP NEEDED

2014-03-04 Thread André Warnier


Jeff Haferman wrote:

Jeff Top-Posting is not Bad because you have to scroll to the bottom to see what 
you're after Haferman wrote:


[...]

quote :

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

Bottom-posting preserves the logical order of the replies and is consistent with the 
Western reading direction from top to bottom.


unquote.

My comment was not meant to start a flame war, just to remind you (and gently, at that) of 
what the usage rules of this list are.  Even if for your own personal communications 
elsewhere you prefer to use another style, when you are going somewhere in order to get 
free help in resolving a problem of yours, and you obtain such help freely given, it would 
seem just mere politeness to abide by the customs of the place, no ?


(Which customs are listed here : http://tomcat.apache.org/lists.html - tomcat-users - 
Important, as Chuck already pointed out)



Apart from this, if you want to understand better how Apache httpd handles requests and in 
which order things happen (such as proxying via mod_proxy or mod_jk, or things like 
JkMount, SetHandler/AddHandler etc), one of the best explanations I know of, is to be 
found here :


http://perl.apache.org/docs/2.0/user/handlers/http.html

This is related to Perl, and mod_perl (a tight integration of a Perl interpreter into 
Apache httpd), which in itself might not be of direct interest to you.
But in the process, it gives a very good idea of how Apache httpd works internally, 
including at what stages of the HTTP request processing cycle it decides to pass the 
request to the various mod_xxx modules within httpd.
(including mod_jk, which is in fact for Apache httpd only one of the possible 
response-generating modules).



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



secure reverse proxy to my tomcat server HELP NEEDED

2014-03-03 Thread Jeff Haferman

The subject says it, I need help getting a secure reverse proxy to my tomcat 
server working. There is a lot of doc on the web, and it seems like I have 
everything configured properly, but I can't quite get the reverse proxy to work 
on the https side of things.

Here is my config:
Apache2.4.2
Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-24-generic x86_64)
Tomcat 7.0.33

I simply want the reverse proxy to work so that https://my.webserver.com gets 
https://my.webserver.com:8443 (which is the secure tomcat server URL).
I have the reverse proxy working so that http://my.webserver.com redirects the 
traffic on port 80 to the normal tomcat server on port 8080, and I also seem 
to have the secure tomcat server working because I can browse to 
https://my.webserver.com:8443

However when I bring up https://my.webserver.com, I get the contents of the 
Apache Root document at port 80. I'm using a self-signed cert.

My httpd.conf file basically looks like (at least these are the important lines)

Listen 80
ProxyRequests Off
ProxyPreserveHost on
VirtualHost *:80

ServerName my.webserver.com
ProxyPass / http://my.webserver.com:8080/
ProxyPassReverse /app http://localhost:8080/
  
/VirtualHost
proxy http://my.webserver.com:8080/
AllowOverride None
Order Deny,Allow
Allow from all
/proxy

Listen 443
VirtualHost *:443

SSLEngine on
SSLProxyEngine on
SSLCertificateFile /path/to/server.crt
SSLCertificateKeyFile /path/to/server.key
ServerName my.webserver.com
ProxyPass / http://my.webserver.com:8443/
ProxyPassReverse /app http://localhost:8443/

/VirtualHost
proxy https://my.webserver.com:8443/
AllowOverride None
Order Deny,Allow
Allow from all
/proxy


And my tomcat config (server.xml) connectors are defined like

Connector port=8080 
protocol=org.apache.coyote.http11.Http11NioProtocol maxHttpHeaderSize=8192 
useBodyEncodingForURI=true
   maxThreads=1000 minSpareThreads=25 maxSpareThreads=75
   enableLookups=false redirectPort=443 acceptCount=100 
   compression=on compressionMinSize=2048 
   
compressableMimeType=text/html,text/xml,text/javascript,text/css,text/plain
   connectionTimeout=2 disableUploadTimeout=true 
URIEncoding=UTF-8/

Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true
   maxThreads=150 scheme=https secure=false proxyPort=443 
proxyName=my.webserver.com
   keystoreType= PKCS12 
   keystoreFile=/path/to/server.p12 keystorePass=changeit
   clientAuth=false sslProtocol=TLSv1 /


I fire up tomcat and apache, I have debug loglevel set, and I don't see any 
real clues. The certificate files seem to be read fine and
match my domain name. When I do the https://my.company.com/ request however, I 
see a debug line that says my client has obtained an HTTP 
connection to my.company.com. A few lines down, I see a line that says
The timeout specified has expired: [client xxx.xxx.xxx.xxx:xxx] AH01991: SSL 
input filter read failed.

But I also see the timeout messsage when I do a (successful) connection to 
https://my.company.com:8443
Currently no firewall rules set up, so nothing should be blocked.

I'm not sure what to try at this point. The logfiles don't seem to any info 
that appears helpful. ANY suggestions would be appreciated. 

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



Re: secure reverse proxy to my tomcat server HELP NEEDED

2014-03-03 Thread J Java
Can you change and retry below lines :
ProxyPass / http://my.webserver.com:8443/  toProxyPass
/ https://my.webserver.com:8443/ http://my.webserver.com:8443/
ProxyPassReverse /app http://localhost:8443/  to  ProxyPassReverse
/app https://localhost:8443/ http://localhost:8443/

Thanks,
Shailesh


On Tue, Mar 4, 2014 at 1:44 AM, Jeff Haferman j...@haferman.com wrote:


 The subject says it, I need help getting a secure reverse proxy to my
 tomcat server working. There is a lot of doc on the web, and it seems like
 I have everything configured properly, but I can't quite get the reverse
 proxy to work on the https side of things.

 Here is my config:
 Apache2.4.2
 Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-24-generic x86_64)
 Tomcat 7.0.33

 I simply want the reverse proxy to work so that https://my.webserver.comgets
 https://my.webserver.com:8443 (which is the secure tomcat server URL).
 I have the reverse proxy working so that http://my.webserver.comredirects the 
 traffic on port 80 to the normal tomcat server on port
 8080, and I also seem to have the secure tomcat server working because I
 can browse to https://my.webserver.com:8443

 However when I bring up https://my.webserver.com, I get the contents of
 the Apache Root document at port 80. I'm using a self-signed cert.

 My httpd.conf file basically looks like (at least these are the important
 lines)

 Listen 80
 ProxyRequests Off
 ProxyPreserveHost on
 VirtualHost *:80

 ServerName my.webserver.com
 ProxyPass / http://my.webserver.com:8080/
 ProxyPassReverse /app http://localhost:8080/

 /VirtualHost
 proxy http://my.webserver.com:8080/
 AllowOverride None
 Order Deny,Allow
 Allow from all
 /proxy

 Listen 443
 VirtualHost *:443

 SSLEngine on
 SSLProxyEngine on
 SSLCertificateFile /path/to/server.crt
 SSLCertificateKeyFile /path/to/server.key
 ServerName my.webserver.com
 ProxyPass / http://my.webserver.com:8443/
 ProxyPassReverse /app http://localhost:8443/

 /VirtualHost
 proxy https://my.webserver.com:8443/
 AllowOverride None
 Order Deny,Allow
 Allow from all
 /proxy


 And my tomcat config (server.xml) connectors are defined like

 Connector port=8080
 protocol=org.apache.coyote.http11.Http11NioProtocol
 maxHttpHeaderSize=8192 useBodyEncodingForURI=true
maxThreads=1000 minSpareThreads=25 maxSpareThreads=75
enableLookups=false redirectPort=443 acceptCount=100
compression=on compressionMinSize=2048

  compressableMimeType=text/html,text/xml,text/javascript,text/css,text/plain
connectionTimeout=2 disableUploadTimeout=true
 URIEncoding=UTF-8/

 Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true
maxThreads=150 scheme=https secure=false
 proxyPort=443 proxyName=my.webserver.com
keystoreType= PKCS12
keystoreFile=/path/to/server.p12 keystorePass=changeit
clientAuth=false sslProtocol=TLSv1 /


 I fire up tomcat and apache, I have debug loglevel set, and I don't see
 any real clues. The certificate files seem to be read fine and
 match my domain name. When I do the https://my.company.com/ request
 however, I see a debug line that says my client has obtained an HTTP
 connection to my.company.com. A few lines down, I see a line that says
 The timeout specified has expired: [client xxx.xxx.xxx.xxx:xxx] AH01991:
 SSL input filter read failed.

 But I also see the timeout messsage when I do a (successful) connection
 to https://my.company.com:8443
 Currently no firewall rules set up, so nothing should be blocked.

 I'm not sure what to try at this point. The logfiles don't seem to any
 info that appears helpful. ANY suggestions would be appreciated.

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




Re: secure reverse proxy to my tomcat server HELP NEEDED

2014-03-03 Thread Jeff Haferman
Sorry, I made a couple of typos when I copied my stuff over and edited out my 
actual FQDN... I do have

VirtualHost *:443

SSLEngine on
SSLProxyEngine on
SSLCertificateFile /path/to/server.crt
SSLCertificateKeyFile /path/to/server.key
ServerName my.webserver.com
ProxyPass / https://my.webserver.com:8443/
ProxyPassReverse / https://my.webserver.com:8443/

/VirtualHost

which I think is what you are suggesting?


J Java wrote:
 --089e0160d0b63bc50904f3b99c68
 Content-Type: text/plain; charset=ISO-8859-1

 Can you change and retry below lines :
 ProxyPass / http://my.webserver.com:8443/  toProxyPass
 / https://my.webserver.com:8443/ http://my.webserver.com:8443/
 ProxyPassReverse /app http://localhost:8443/  to  ProxyPassReverse
 /app https://localhost:8443/ http://localhost:8443/

 Thanks,
 Shailesh


 On Tue, Mar 4, 2014 at 1:44 AM, Jeff Haferman j...@haferman.com wrote:


 The subject says it, I need help getting a secure reverse proxy to my
 tomcat server working. There is a lot of doc on the web, and it seems like
 I have everything configured properly, but I can't quite get the reverse
 proxy to work on the https side of things.

 Here is my config:
 Apache2.4.2
 Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-24-generic x86_64)
 Tomcat 7.0.33

 I simply want the reverse proxy to work so that https://my.webserver.comgets
 https://my.webserver.com:8443 (which is the secure tomcat server URL).
 I have the reverse proxy working so that http://my.webserver.comredirects 
 the traffic on port 80 to the normal tomcat server on port
 8080, and I also seem to have the secure tomcat server working because I
 can browse to https://my.webserver.com:8443

 However when I bring up https://my.webserver.com, I get the contents of
 the Apache Root document at port 80. I'm using a self-signed cert.

 My httpd.conf file basically looks like (at least these are the important
 lines)

 Listen 80
 ProxyRequests Off
 ProxyPreserveHost on
 VirtualHost *:80

 ServerName my.webserver.com
 ProxyPass / http://my.webserver.com:8080/
 ProxyPassReverse /app http://localhost:8080/

 /VirtualHost
 proxy http://my.webserver.com:8080/
 AllowOverride None
 Order Deny,Allow
 Allow from all
 /proxy

 Listen 443
 VirtualHost *:443

 SSLEngine on
 SSLProxyEngine on
 SSLCertificateFile /path/to/server.crt
 SSLCertificateKeyFile /path/to/server.key
 ServerName my.webserver.com
 ProxyPass / http://my.webserver.com:8443/
 ProxyPassReverse /app http://localhost:8443/

 /VirtualHost
 proxy https://my.webserver.com:8443/
 AllowOverride None
 Order Deny,Allow
 Allow from all
 /proxy


 And my tomcat config (server.xml) connectors are defined like

 Connector port=8080
 protocol=org.apache.coyote.http11.Http11NioProtocol
 maxHttpHeaderSize=8192 useBodyEncodingForURI=true
maxThreads=1000 minSpareThreads=25 maxSpareThreads=75
enableLookups=false redirectPort=443 acceptCount=100
compression=on compressionMinSize=2048

  
 compressableMimeType=text/html,text/xml,text/javascript,text/css,text/plain
connectionTimeout=2 disableUploadTimeout=true
 URIEncoding=UTF-8/

 Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true
maxThreads=150 scheme=https secure=false
 proxyPort=443 proxyName=my.webserver.com
keystoreType= PKCS12
keystoreFile=/path/to/server.p12 keystorePass=changeit
clientAuth=false sslProtocol=TLSv1 /


 I fire up tomcat and apache, I have debug loglevel set, and I don't see
 any real clues. The certificate files seem to be read fine and
 match my domain name. When I do the https://my.company.com/ request
 however, I see a debug line that says my client has obtained an HTTP
 connection to my.company.com. A few lines down, I see a line that says
 The timeout specified has expired: [client xxx.xxx.xxx.xxx:xxx] AH01991:
 SSL input filter read failed.

 But I also see the timeout messsage when I do a (successful) connection
 to https://my.company.com:8443
 Currently no firewall rules set up, so nothing should be blocked.

 I'm not sure what to try at this point. The logfiles don't seem to any
 info that appears helpful. ANY suggestions would be appreciated.

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



 --089e0160d0b63bc50904f3b99c68--



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



Re: secure reverse proxy to my tomcat server HELP NEEDED

2014-03-03 Thread André Warnier

Jeff Haferman wrote:
The subject says it, I need help getting a secure reverse proxy to my tomcat server working. 


Maybe one question here would be : why ?

browser --- HTTPS -- httpd -- HTTPS -- Tomcat

The browser encrypts and sends to httpd.
httpd decrypts.
httpd then re-encrypts and sends to Tomcat.
Tomcat decrypts.

and vice-versa on the way back.  That is quite inefficient.

And as your example configuration seems to show, httpd and Tomcat are running inside the 
same physical host, so the httpd -- Tomcat information does not circulate outside (of 
the physical host).

What is the point then of this double encryption/decryption ?

It is more usual in such a configuration to terminate HTTPS at the httpd 
level, like :

browser --- HTTPS -- httpd -- HTTP -- Tomcat
or
browser --- HTTPS -- httpd -- AJP -- Tomcat

and use non-encrypted data between httpd and Tomcat, saving yourself 2 
encryption/decryption cycles for each request/response.



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



Re: secure reverse proxy to my tomcat server HELP NEEDED

2014-03-03 Thread Jeff Haferman
Yes, for development httpd and tomcat are on the same physical machine. 
Eventually they will be on different machines.
But, even if I try
browser --- HTTPS -- httpd -- HTTP -- Tomcat
by just changing the ProxyPass and ProxyPassReverse directives to use the 
unencrypted URLs as follows

VirtualHost *:443
SSLEngine on
SSLProxyEngine on
SSLCertificateFile /path/to/server.crt
SSLCertificateKeyFile /path/to/server.key
ServerName my.webserver.com
ProxyPass / http://my.webserver.com:8080/
ProxyPassReverse / http://my.webserver.com:8080/
/VirtualHost

the reverse proxy still does not serve the tomcat pages as I would expect.


André Warnier wrote:
 Jeff Haferman wrote:
 The subject says it, I need help getting a secure reverse proxy to my tomcat 
 server working. 

 Maybe one question here would be : why ?

 browser --- HTTPS -- httpd -- HTTPS -- Tomcat

 The browser encrypts and sends to httpd.
 httpd decrypts.
 httpd then re-encrypts and sends to Tomcat.
 Tomcat decrypts.

 and vice-versa on the way back.  That is quite inefficient.

 And as your example configuration seems to show, httpd and Tomcat are running 
 inside the 
 same physical host, so the httpd -- Tomcat information does not circulate 
 outside (of 
 the physical host).
 What is the point then of this double encryption/decryption ?

 It is more usual in such a configuration to terminate HTTPS at the httpd 
 level, like :

 browser --- HTTPS -- httpd -- HTTP -- Tomcat
 or
 browser --- HTTPS -- httpd -- AJP -- Tomcat

 and use non-encrypted data between httpd and Tomcat, saving yourself 2 
 encryption/decryption cycles for each request/response.


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



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



Re: secure reverse proxy to my tomcat server HELP NEEDED

2014-03-03 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Jeff,

On 3/3/14, 5:11 PM, Jeff Haferman wrote:
 Yes, for development httpd and tomcat are on the same physical
 machine. Eventually they will be on different machines. But, even
 if I try browser --- HTTPS -- httpd -- HTTP -- Tomcat by just
 changing the ProxyPass and ProxyPassReverse directives to use the
 unencrypted URLs as follows
 
 VirtualHost *:443 SSLEngine on SSLProxyEngine on 
 SSLCertificateFile /path/to/server.crt SSLCertificateKeyFile
 /path/to/server.key ServerName my.webserver.com ProxyPass /
 http://my.webserver.com:8080/ ProxyPassReverse /
 http://my.webserver.com:8080/ /VirtualHost
 
 the reverse proxy still does not serve the tomcat pages as I would
 expect.

Given the above setup, what /actually/ happens when you try to request
a resource that should go to Tomcat? does not serve pages as I
expect is not a good description.

Oh, and everyone posting NEEDS HELP to it's not necessary to add HELP
NEEDED or similar text to your subjects.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTFQFUAAoJEBzwKT+lPKRY2HYP+wb7xl7KYjOP6svlQE8qmI6r
B8d/wUdteORgBK+kFjVZhsK8w14pvHIg5Ujxzigk8SMfwWXEFF/gwJCR+r/9lBIZ
nKqarrMr3fwnY0AubTcnraYSywKofGmOPDXjOJFjZqQ/r9DdVaSVZuNCrdN+WL0I
26NXuRvEv9aJyIcYxTH8NHyFgmqZYhiylkQ7NTtR1Fp5sp9pHvy77JMbfxymaiQq
Ac0sNbrNCf7BgmKqwe1E9cWDVcXIoYoYNbKZ0lY06t37IVsOdJW4Qru95XRnSBt9
DgMUBqVB0AQ0cxlu1h6qAhzgt7VuAE685ap3/HGlNv6r6PNgNIO69PRyPb+MvGEX
P77avVNGLKKeYz0JtvlxNTwsemNTQMJj3nqYmGiBYOKppJ5l8a6vtFqkfM3Cm3TP
hpd1IajBddGSFGSDIrLN4O1RqNPwclP3fce9BGC+5IuQv76wAlovWMoQrK+C+jE/
KA6VpdAIBAm2YvbPZzYJgLaFJY7u1zFqFKactx1qs1XX7hrt4J/Hq9Xk4KsIPuFu
cfjrEIppVHhtbrlwoAfqjA8JEqoiS6mO6mdbZfMpzLr2+cMg8Mer7kt9XRV0yE3q
E+g3QmLMrVjJQSixrb5525WsQCLavkdf+Ynvg1aIDoXA8usTcP+jb3wLb9OSKYc3
6qVD7hgYoqREEXDt6pOc
=WPxU
-END PGP SIGNATURE-

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



Re: secure reverse proxy to my tomcat server HELP NEEDED

2014-03-03 Thread Jeff Haferman
Hi Chris -
Sorry for the HELP NEEDED.

What actually happens is that, just for https://my.webserver.com/, I get served 
the pages that are 
at the apache root, *not* what is being served by tomcat at port 8443.

I do get the tomcat pages if I explicitly add the port, i.e. 
https://my.webserver.com:8443/
So, the reverse proxy seems to be broken for https only.

The reverse proxy works fine for http, i.e. http://my.webserver.com/ gets the 
tomcat pages served
at http://my.webserver.com:8080/

Jeff

Christopher Schultz wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Jeff,

 On 3/3/14, 5:11 PM, Jeff Haferman wrote:
 Yes, for development httpd and tomcat are on the same physical
 machine. Eventually they will be on different machines. But, even
 if I try browser --- HTTPS -- httpd -- HTTP -- Tomcat by just
 changing the ProxyPass and ProxyPassReverse directives to use the
 unencrypted URLs as follows
 
 VirtualHost *:443 SSLEngine on SSLProxyEngine on 
 SSLCertificateFile /path/to/server.crt SSLCertificateKeyFile
 /path/to/server.key ServerName my.webserver.com ProxyPass /
 http://my.webserver.com:8080/ ProxyPassReverse /
 http://my.webserver.com:8080/ /VirtualHost
 
 the reverse proxy still does not serve the tomcat pages as I would
 expect.

 Given the above setup, what /actually/ happens when you try to request
 a resource that should go to Tomcat? does not serve pages as I
 expect is not a good description.

 Oh, and everyone posting NEEDS HELP to it's not necessary to add HELP
 NEEDED or similar text to your subjects.

 - -chris


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



Re: Help needed with SpnegoAuthenticator authentication

2013-11-16 Thread Cédric Couralet
2013/11/15 chris ch...@ottmountainbike.co.uk:
 Any help with this would be very much appreciated.  We are trying to proof of
 concept this to return the remote user's domain login name to use it in a Web
 application.  Attempting to use a keytab method to hopefully negate any
 requirement for exposing the kerberos principal delegate in any server
 configuration files.

 We have a test configuration for SpnegoAuthenticator authentication using 
 Apache
 Tomcat/7.0.47 in sandbox environment.  From a remote client workstation we are
 seeing an HTTP 500 error when testing and looking for some insight as to what 
 is
 wrong or missing in our test environment.

 Environment:

 Apache Tomcat/7.0.47
 Java JDK/JRE 1.7.0_45
 Test Workstation:  Windows 7 x64 (domain joined)
 Test Server:  Windows Server 2008 R2

 When testing see Log dump ---

   Nov 14, 2013 10:04:50 PM 
 org.apache.catalina.authenticator.SpnegoAuthenticator
 authenticate

   SEVERE: Unable to login as the service principal

   javax.security.auth.login.LoginException: Unable to obtain password from 
 user

 at
 com.sun.security.auth.module.Krb5LoginModule.promptForPass(Unknown Source)
 at
 com.sun.security.auth.module.Krb5LoginModule.attemptAuthentication(Unknown
[..]


 SPN is delegated to the domain account with UPN:  svctomca...@mydom.int

 (Setspn –a http/tomcatsvr.mydom.int:8080 svctomcatdv)

No need for the port when defining a SPN.


 * Domain Controller DC1 is Server 2008 R2
 * Windows server hosting Tomcat is Server 2008 R2
 * PC is Windows 7 and configured to automatically login in Intranet zone
 identified by *.mydom.int

 Keytab generated using the ktpass.exe utility with command:

 ktpass /crypto AES256-SHA1 /princ svctomca...@mydom.int /pass * /kvno 0 /ptype
 KRB5_NT_SRV_INST /out C:\temp\tc.keytab


I have found that an error like this indicates a bad keytab.

I generate keytab with the /princ option set to the SPN of the user
(as indicated on tomcat documentation :
http://tomcat.apache.org/tomcat-7.0-doc/windows-auth-howto.html#Domain_Controller)

Could you try it this way?
ktpass /crypto AES256-SHA1 /princ  http/tomcatsvr.mydom@mydom.int
/pass * /kvno 0  /out C:\temp\tc.keytab

Cédric

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



Help needed with SpnegoAuthenticator authentication

2013-11-15 Thread chris
Any help with this would be very much appreciated.  We are trying to proof of
concept this to return the remote user's domain login name to use it in a Web
application.  Attempting to use a keytab method to hopefully negate any
requirement for exposing the kerberos principal delegate in any server
configuration files.

We have a test configuration for SpnegoAuthenticator authentication using Apache
Tomcat/7.0.47 in sandbox environment.  From a remote client workstation we are
seeing an HTTP 500 error when testing and looking for some insight as to what is
wrong or missing in our test environment.

Environment:

Apache Tomcat/7.0.47
Java JDK/JRE 1.7.0_45
Test Workstation:  Windows 7 x64 (domain joined)
Test Server:  Windows Server 2008 R2

When testing see Log dump ---

  Nov 14, 2013 10:04:50 PM org.apache.catalina.authenticator.SpnegoAuthenticator
authenticate

  SEVERE: Unable to login as the service principal

  javax.security.auth.login.LoginException: Unable to obtain password from user

at
com.sun.security.auth.module.Krb5LoginModule.promptForPass(Unknown Source)
at
com.sun.security.auth.module.Krb5LoginModule.attemptAuthentication(Unknown
Source)
at com.sun.security.auth.module.Krb5LoginModule.login(Unknown
Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at javax.security.auth.login.LoginContext.invoke(Unknown Source)
at javax.security.auth.login.LoginContext.access$000(Unknown Source)
at javax.security.auth.login.LoginContext$4.run(Unknown Source)
at javax.security.auth.login.LoginContext$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(Unknown Source)
at javax.security.auth.login.LoginContext.login(Unknown Source)
at
org.apache.catalina.authenticator.SpnegoAuthenticator.authenticate(SpnegoAuthenticator.java:214)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:574)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)
at java.lang.Thread.run(Unknown Source)



SPN is delegated to the domain account with UPN:  svctomca...@mydom.int

(Setspn –a http/tomcatsvr.mydom.int:8080 svctomcatdv)

* Domain Controller DC1 is Server 2008 R2
* Windows server hosting Tomcat is Server 2008 R2
* PC is Windows 7 and configured to automatically login in Intranet zone
identified by *.mydom.int

Keytab generated using the ktpass.exe utility with command:

ktpass /crypto AES256-SHA1 /princ svctomca...@mydom.int /pass * /kvno 0 /ptype
KRB5_NT_SRV_INST /out C:\temp\tc.keytab

Tomcat Java options set are:

-Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 7.0
-Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 7.0
-Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat
7.0\endorsed -Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat
7.0\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=C:\Program Files\Apache Software
Foundation\Tomcat 7.0\conf\logging.properties
-Djava.security.krb5.conf=C:\Program Files\Apache Software Foundation\Tomcat
7.0\conf\krb5.ini
-Djava.security.auth.login.config=C:\Program Files\Apache Software
Foundation\Tomcat 7.0\conf\jaas.conf
-Djavax.security.auth.useSubjectCredsOnly=false
-Dsun.security.krb5.debug=true

Context.xml has the Spnego Valve declared ---

 Valve
className=org.apache.catalina.authenticator.SpnegoAuthenticator

   
loginConfigName=com.sun.security.auth.module.Krb5LoginModule.accept
storeDelegatedCredential=true /

 Web.xml has security constraints, roles, and SPNEGO authentication methods ---

 security-constraint

Re: Help needed with SpnegoAuthenticator authentication

2013-11-15 Thread André Warnier

chris wrote:
...



When testing see Log dump ---

  Nov 14, 2013 10:04:50 PM org.apache.catalina.authenticator.SpnegoAuthenticator
authenticate

  SEVERE: Unable to login as the service principal

  javax.security.auth.login.LoginException: Unable to obtain password from user

at
com.sun.security.auth.module.Krb5LoginModule.promptForPass(Unknown Source)
at

..
I am not a Kerberos specialist, but why would the above 2 lines be there ?
The whole point of SSO normally, is to not have to promt the user for a login/password, 
and get the authentication directly from the logged-in workstation.
In a Windows-domain-style SSO, the fact of prompting the user usually already indicates 
that something (some prior step) is not working as it should.


I would suggest to use a protocol analyser (maybe just a browser plugin) to check what 
really goes on there.


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



Help needed on apache tomcat 7.0

2011-01-28 Thread Anup Niroula
hi,

Actually, i am trying to include jar file in apache tomcat server so that i
can access the classes of the jar file to use it in my jsp pages (web
application). How can i do this ? Any help would be appreciated.

Regards,
Anup Niroula


RE: Help needed on apache tomcat 7.0

2011-01-28 Thread Caldarale, Charles R
 From: Anup Niroula [mailto:anup.niro...@gmail.com] 
 Subject: Help needed on apache tomcat 7.0

 Actually, i am trying to include jar file in apache tomcat 
 server so that i can access the classes of the jar file to
 use it in my jsp pages (web application). How can i do this ?
 
Long answer: read the servlet spec; it details exactly what the structure of a 
webapp is, including where to place jar files for the webapp.  Short answer: in 
your webapp's WEB-INF/lib directory.

 - Chuck


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


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



Re: Help needed on apache tomcat 7.0

2011-01-28 Thread Anup Niroula
Hi,
Thank you for the reply. I am new to JSP and i am using tomcat server 7.0
for the first time. could you please tell me where can i find examples of
web applications importing classes from jar file ?


On Fri, Jan 28, 2011 at 1:46 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Anup Niroula [mailto:anup.niro...@gmail.com]
  Subject: Help needed on apache tomcat 7.0

  Actually, i am trying to include jar file in apache tomcat
  server so that i can access the classes of the jar file to
  use it in my jsp pages (web application). How can i do this ?

 Long answer: read the servlet spec; it details exactly what the structure
 of a webapp is, including where to place jar files for the webapp.  Short
 answer: in your webapp's WEB-INF/lib directory.

  - Chuck


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


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




RE: Help needed on apache tomcat 7.0

2011-01-28 Thread Caldarale, Charles R
 From: Anup Niroula [mailto:anup.niro...@gmail.com] 
 Subject: Re: Help needed on apache tomcat 7.0

 could you please tell me where can i find examples of
 web applications importing classes from jar file ?

In several of the example webapps that come with the Tomcat distribution.  Look 
in webapps/examples.

 - Chuck


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


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



Re: Help needed on apache tomcat 7.0

2011-01-28 Thread Anup Niroula
Thanx

On Fri, Jan 28, 2011 at 2:21 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Anup Niroula [mailto:anup.niro...@gmail.com]
  Subject: Re: Help needed on apache tomcat 7.0

  could you please tell me where can i find examples of
  web applications importing classes from jar file ?

 In several of the example webapps that come with the Tomcat distribution.
  Look in webapps/examples.

  - Chuck


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


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




Help Needed: Tomcat and ldap configuration for authentication

2010-09-16 Thread Manish Kashikar -X (mkashika - Zensar at Cisco)
Hi

 

Is it possible to configure tomcat and ldap for authentication purpose.
Please can anyone give detail steps to configure. 

 

Thanks

Manish K



RE: Help Needed: Tomcat and ldap configuration for authentication

2010-09-16 Thread Caldarale, Charles R
 From: Manish Kashikar -X (mkashika - Zensar at Cisco) 
 [mailto:mkash...@cisco.com] 
 Subject: Help Needed: Tomcat and ldap configuration for authentication

 Is it possible to configure tomcat and ldap for authentication 
 purpose.  Please can anyone give detail steps to configure. 

Read the docs:
http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html#JNDIRealm

 - Chuck


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


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



Re: Help Needed: Tomcat and ldap configuration for authentication

2010-09-16 Thread Mark Thomas
On 16/09/2010 18:40, Manish Kashikar -X (mkashika - Zensar at Cisco) wrote:
 Hi
 
 Is it possible to configure tomcat and ldap for authentication purpose.
 Please can anyone give detail steps to configure.

I was seriously tempted to reply Yes. Yes.

Try reading the Tomcat documentation and this
http://www.catb.org/esr/faqs/smart-questions.html and then try again.

Mark

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



Re: Help Needed: Tomcat and ldap configuration for authentication

2010-09-16 Thread André Warnier

Manish Kashikar -X (mkashika - Zensar at Cisco) wrote:

Hi

 


Is it possible to configure tomcat and ldap for authentication purpose.


Yes.

Please can anyone give detail steps to configure. 


Yes.
How much are you paying ?

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



Two applications, one in a sub folder - Urgent help needed

2010-06-25 Thread abhishek jain
Dear friends,
I have a website in Struts 1.2 and i want to install another Struts
application made by me, in a subfolder of the website. I don't know will
this work,
Both are struts 1.2 applications.
I am using apache 2.x and  Tomcat 5, on Cpanel , linux centos 5.5.

I think one of the possible sol might be mapping the location tag in
httpd.conf to diff webapp , i dont know how to do so.

Pl. help,
-- 
Thanks and kind Regards,
Abhishek jain


Re: Two applications, one in a sub folder - Urgent help needed

2010-06-25 Thread Paweł Zuzelski
No, it is not „Urgent” for anyone but you. If you one it to be
urgent for anyone else, pay for it :)

 Dear friends,
 I have a website in Struts 1.2 and i want to install another Struts
 application made by me, in a subfolder of the website. I don't know will
 this work,
 Both are struts 1.2 applications.
 I am using apache 2.x and  Tomcat 5, on Cpanel , linux centos 5.5.

I would define context of these applications explicite in Catalina
config. I mean:

unpack your war files into some directories, let say:
   /usr/local/share/app1
   /usr/local/share/app2

then create files

(home_of_your_tomcat_installation)/tomcat/conf/Catalina/localhost/app.xml
(home_of_your_tomcat_installation)/tomcat/conf/Catalina/localhost/app#subapp.xml

app.xml should be something like:
?xml version=1.0 encoding=UTF-8?
Context path=/app docBase=/usr/local/share/app1 privileged=false 
allowLinking=true
/Context

app#subapp.xml:
?xml version=1.0 encoding=UTF-8?
Context path=/app/subapp docBase=/usr/local/share/app2 privileged=false 
allowLinking=true
/Context

Note that “path” attribute must match xml context file name (note:
'/' becomes '#' in filename)

Hope it helps.

 I think one of the possible sol might be mapping the location tag in
 httpd.conf to diff webapp , i dont know how to do so.

IMO it's better to configure it at tomcat level.

-- 
Regards,
Paweł Zuzelski

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



Re: Two applications, one in a sub folder - Urgent help needed

2010-06-25 Thread abhishek jain
hi
thanks for the email,
but the path is like
  /usr/local/share/apps

and for the second application:

  /usr/local/share/apps/app2

i mean it is a subfolder.

will this still work?

2010/6/25 Paweł Zuzelski z...@xatka.net

 No, it is not „Urgent” for anyone but you. If you one it to be
 urgent for anyone else, pay for it :)

  Dear friends,
  I have a website in Struts 1.2 and i want to install another Struts
  application made by me, in a subfolder of the website. I don't know will
  this work,
  Both are struts 1.2 applications.
  I am using apache 2.x and  Tomcat 5, on Cpanel , linux centos 5.5.

 I would define context of these applications explicite in Catalina
 config. I mean:

 unpack your war files into some directories, let say:
   /usr/local/share/app1
   /usr/local/share/app2

 then create files

 (home_of_your_tomcat_installation)/tomcat/conf/Catalina/localhost/app.xml

 (home_of_your_tomcat_installation)/tomcat/conf/Catalina/localhost/app#subapp.xml

 app.xml should be something like:
 ?xml version=1.0 encoding=UTF-8?
 Context path=/app docBase=/usr/local/share/app1 privileged=false
 allowLinking=true
 /Context

 app#subapp.xml:
 ?xml version=1.0 encoding=UTF-8?
 Context path=/app/subapp docBase=/usr/local/share/app2
 privileged=false allowLinking=true
 /Context

 Note that “path” attribute must match xml context file name (note:
 '/' becomes '#' in filename)

 Hope it helps.


-- 
Thanks and kind Regards,
Abhishek jain


Re: Two applications, one in a sub folder - Urgent help needed

2010-06-25 Thread abhishek jain
On Fri, Jun 25, 2010 at 4:16 PM, abhishek jain
abhishek.netj...@gmail.comwrote:

 hi
 thanks for the email,
 but the path is like
   /usr/local/share/apps

 and for the second application:

   /usr/local/share/apps/app2

 i mean it is a subfolder.

 sorry i think you are right i will give it a try.
please , ignore previous email.


 will this still work?

 2010/6/25 Paweł Zuzelski z...@xatka.net

 No, it is not „Urgent” for anyone but you. If you one it to be
 urgent for anyone else, pay for it :)

  Dear friends,
  I have a website in Struts 1.2 and i want to install another Struts
  application made by me, in a subfolder of the website. I don't know will
  this work,
  Both are struts 1.2 applications.
  I am using apache 2.x and  Tomcat 5, on Cpanel , linux centos 5.5.

 I would define context of these applications explicite in Catalina
 config. I mean:

 unpack your war files into some directories, let say:
   /usr/local/share/app1
   /usr/local/share/app2

 then create files

 (home_of_your_tomcat_installation)/tomcat/conf/Catalina/localhost/app.xml

 (home_of_your_tomcat_installation)/tomcat/conf/Catalina/localhost/app#subapp.xml

 app.xml should be something like:
 ?xml version=1.0 encoding=UTF-8?
 Context path=/app docBase=/usr/local/share/app1 privileged=false
 allowLinking=true
 /Context

 app#subapp.xml:
 ?xml version=1.0 encoding=UTF-8?
 Context path=/app/subapp docBase=/usr/local/share/app2
 privileged=false allowLinking=true
 /Context

 Note that “path” attribute must match xml context file name (note:
 '/' becomes '#' in filename)

 Hope it helps.





Please ignore previous email
- abhi


Re: Two applications, one in a sub folder - Urgent help needed

2010-06-25 Thread Pid
On 25/06/2010 11:46, abhishek jain wrote:
 hi
 thanks for the email,
 but the path is like
   /usr/local/share/apps
 
 and for the second application:
 
   /usr/local/share/apps/app2
 
 i mean it is a subfolder.
 
 will this still work?

Depends which Tomcat version you actually have.  I don't think
multilevel paths are supported in 5.0.n, (but I might be wrong).


p

 2010/6/25 Paweł Zuzelski z...@xatka.net
 
 No, it is not „Urgent” for anyone but you. If you one it to be
 urgent for anyone else, pay for it :)

 Dear friends,
 I have a website in Struts 1.2 and i want to install another Struts
 application made by me, in a subfolder of the website. I don't know will
 this work,
 Both are struts 1.2 applications.
 I am using apache 2.x and  Tomcat 5, on Cpanel , linux centos 5.5.

 I would define context of these applications explicite in Catalina
 config. I mean:

 unpack your war files into some directories, let say:
   /usr/local/share/app1
   /usr/local/share/app2

 then create files

 (home_of_your_tomcat_installation)/tomcat/conf/Catalina/localhost/app.xml

 (home_of_your_tomcat_installation)/tomcat/conf/Catalina/localhost/app#subapp.xml

 app.xml should be something like:
 ?xml version=1.0 encoding=UTF-8?
 Context path=/app docBase=/usr/local/share/app1 privileged=false
 allowLinking=true
 /Context

 app#subapp.xml:
 ?xml version=1.0 encoding=UTF-8?
 Context path=/app/subapp docBase=/usr/local/share/app2
 privileged=false allowLinking=true
 /Context

 Note that “path” attribute must match xml context file name (note:
 '/' becomes '#' in filename)

 Hope it helps.

 




signature.asc
Description: OpenPGP digital signature


Re: Two applications, one in a sub folder - Urgent help needed

2010-06-25 Thread Mark Thomas
On 25/06/2010 11:50, Pid wrote:
 On 25/06/2010 11:46, abhishek jain wrote:
 hi
 thanks for the email,
 but the path is like
   /usr/local/share/apps

 and for the second application:

   /usr/local/share/apps/app2

 i mean it is a subfolder.

 will this still work?
 
 Depends which Tomcat version you actually have.  I don't think
 multilevel paths are supported in 5.0.n, (but I might be wrong).

It isn't (but that doesn't matter). Overlapping values for docBase are
never valid. This configuration cannot work.

Mark

 
 
 p
 
 2010/6/25 Paweł Zuzelski z...@xatka.net

 No, it is not „Urgent” for anyone but you. If you one it to be
 urgent for anyone else, pay for it :)

 Dear friends,
 I have a website in Struts 1.2 and i want to install another Struts
 application made by me, in a subfolder of the website. I don't know will
 this work,
 Both are struts 1.2 applications.
 I am using apache 2.x and  Tomcat 5, on Cpanel , linux centos 5.5.

 I would define context of these applications explicite in Catalina
 config. I mean:

 unpack your war files into some directories, let say:
   /usr/local/share/app1
   /usr/local/share/app2

 then create files

 (home_of_your_tomcat_installation)/tomcat/conf/Catalina/localhost/app.xml

 (home_of_your_tomcat_installation)/tomcat/conf/Catalina/localhost/app#subapp.xml

 app.xml should be something like:
 ?xml version=1.0 encoding=UTF-8?
 Context path=/app docBase=/usr/local/share/app1 privileged=false
 allowLinking=true
 /Context

 app#subapp.xml:
 ?xml version=1.0 encoding=UTF-8?
 Context path=/app/subapp docBase=/usr/local/share/app2
 privileged=false allowLinking=true
 /Context

 Note that “path” attribute must match xml context file name (note:
 '/' becomes '#' in filename)

 Hope it helps.


 
 




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



Re: Two applications, one in a sub folder - Urgent help needed

2010-06-25 Thread abhishek jain
On Fri, Jun 25, 2010 at 4:26 PM, Mark Thomas ma...@apache.org wrote:

 On 25/06/2010 11:50, Pid wrote:
  On 25/06/2010 11:46, abhishek jain wrote:
  hi
  thanks for the email,
  but the path is like
/usr/local/share/apps
 
  and for the second application:
 
/usr/local/share/apps/app2
 
  i mean it is a subfolder.
 
  will this still work?
 
  Depends which Tomcat version you actually have.  I don't think
  multilevel paths are supported in 5.0.n, (but I might be wrong).

 It isn't (but that doesn't matter). Overlapping values for docBase are
 never valid. This configuration cannot work.


but are the overlapping values of context path valid, ?

- abhi


Re: Two applications, one in a sub folder - Urgent help needed

2010-06-25 Thread Pid
On 25/06/2010 11:56, Mark Thomas wrote:
 On 25/06/2010 11:50, Pid wrote:
 On 25/06/2010 11:46, abhishek jain wrote:
 hi
 thanks for the email,
 but the path is like
   /usr/local/share/apps

 and for the second application:

   /usr/local/share/apps/app2

 i mean it is a subfolder.

 will this still work?

 Depends which Tomcat version you actually have.  I don't think
 multilevel paths are supported in 5.0.n, (but I might be wrong).
 
 It isn't (but that doesn't matter). Overlapping values for docBase are
 never valid. This configuration cannot work.

Ah yes.  Fail.


p


 Mark
 


 p

 2010/6/25 Paweł Zuzelski z...@xatka.net

 No, it is not „Urgent” for anyone but you. If you one it to be
 urgent for anyone else, pay for it :)

 Dear friends,
 I have a website in Struts 1.2 and i want to install another Struts
 application made by me, in a subfolder of the website. I don't know will
 this work,
 Both are struts 1.2 applications.
 I am using apache 2.x and  Tomcat 5, on Cpanel , linux centos 5.5.

 I would define context of these applications explicite in Catalina
 config. I mean:

 unpack your war files into some directories, let say:
   /usr/local/share/app1
   /usr/local/share/app2

 then create files

 (home_of_your_tomcat_installation)/tomcat/conf/Catalina/localhost/app.xml

 (home_of_your_tomcat_installation)/tomcat/conf/Catalina/localhost/app#subapp.xml

 app.xml should be something like:
 ?xml version=1.0 encoding=UTF-8?
 Context path=/app docBase=/usr/local/share/app1 privileged=false
 allowLinking=true
 /Context

 app#subapp.xml:
 ?xml version=1.0 encoding=UTF-8?
 Context path=/app/subapp docBase=/usr/local/share/app2
 privileged=false allowLinking=true
 /Context

 Note that “path” attribute must match xml context file name (note:
 '/' becomes '#' in filename)

 Hope it helps.




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




signature.asc
Description: OpenPGP digital signature


Re: Two applications, one in a sub folder - Urgent help needed

2010-06-25 Thread Pid
On 25/06/2010 12:02, abhishek jain wrote:
 On Fri, Jun 25, 2010 at 4:26 PM, Mark Thomas ma...@apache.org wrote:
 
 On 25/06/2010 11:50, Pid wrote:
 On 25/06/2010 11:46, abhishek jain wrote:
 hi
 thanks for the email,
 but the path is like
   /usr/local/share/apps

 and for the second application:

   /usr/local/share/apps/app2

 i mean it is a subfolder.

 will this still work?

 Depends which Tomcat version you actually have.  I don't think
 multilevel paths are supported in 5.0.n, (but I might be wrong).

 It isn't (but that doesn't matter). Overlapping values for docBase are
 never valid. This configuration cannot work.


 but are the overlapping values of context path valid, ?

Depends on which version of Tomcat you have.
And whether you've configured it correctly.


p

 - abhi
 




signature.asc
Description: OpenPGP digital signature


Re: Two applications, one in a sub folder - Urgent help needed

2010-06-25 Thread Mark Thomas
On 25/06/2010 12:19, Pid wrote:
 On 25/06/2010 12:02, abhishek jain wrote:
 On Fri, Jun 25, 2010 at 4:26 PM, Mark Thomas ma...@apache.org wrote:

 On 25/06/2010 11:50, Pid wrote:
 On 25/06/2010 11:46, abhishek jain wrote:
 hi
 thanks for the email,
 but the path is like
   /usr/local/share/apps

 and for the second application:

   /usr/local/share/apps/app2

 i mean it is a subfolder.

 will this still work?

 Depends which Tomcat version you actually have.  I don't think
 multilevel paths are supported in 5.0.n, (but I might be wrong).

 It isn't (but that doesn't matter). Overlapping values for docBase are
 never valid. This configuration cannot work.


 but are the overlapping values of context path valid, ?
 
 Depends on which version of Tomcat you have.

Actually, overlapping context paths are always valid. Consider:
/
and
/docs

 And whether you've configured it correctly.

+1. Especially if you want /my/context/path

Correct varies by version.

Mark



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



Re: Two applications, one in a sub folder - Urgent help needed

2010-06-25 Thread abhishek jain
On Fri, Jun 25, 2010 at 4:51 PM, Mark Thomas ma...@apache.org wrote:

 On 25/06/2010 12:19, Pid wrote:
  On 25/06/2010 12:02, abhishek jain wrote:
  On Fri, Jun 25, 2010 at 4:26 PM, Mark Thomas ma...@apache.org wrote:
 
  On 25/06/2010 11:50, Pid wrote:
  On 25/06/2010 11:46, abhishek jain wrote:
  hi
  thanks for the email,
  but the path is like
/usr/local/share/apps
 
  and for the second application:
 
/usr/local/share/apps/app2
 
  i mean it is a subfolder.
 
  will this still work?
 
  Depends which Tomcat version you actually have.  I don't think
  multilevel paths are supported in 5.0.n, (but I might be wrong).
 
  It isn't (but that doesn't matter). Overlapping values for docBase are
  never valid. This configuration cannot work.
 
 
  but are the overlapping values of context path valid, ?
 
  Depends on which version of Tomcat you have.

 Actually, overlapping context paths are always valid. Consider:
 /
 and
 /docs

  And whether you've configured it correctly.

 +1. Especially if you want /my/context/path

 Correct varies by version.





I am using tomcat 5.5 and cpanel is configuring it,
but i think for this configuration i will have to go to file server.xml and
add the additional  context path row in the xml , something like:

Host name=xxx appBase=/home/xxx/public_html
  Aliasxxx/Alias
*  Context path= reloadable=true docBase=/x/public_html
debug=1/
  Context path=/subfolder reloadable=true
docBase=//public_html debug=1/
*  Context path=/manager debug=0 privileged=true
  docBase=/usr/local/jakarta/tomcat/server/webapps/manager
  /Context
   /Host

is this the right way?

-- 
Thanks and kind Regards,
Abhishek jain


Re: Two applications, one in a sub folder - Urgent help needed

2010-06-25 Thread Pid
On 25/06/2010 12:27, abhishek jain wrote:
 On Fri, Jun 25, 2010 at 4:51 PM, Mark Thomas ma...@apache.org wrote:
 
 On 25/06/2010 12:19, Pid wrote:
 On 25/06/2010 12:02, abhishek jain wrote:
 On Fri, Jun 25, 2010 at 4:26 PM, Mark Thomas ma...@apache.org wrote:

 On 25/06/2010 11:50, Pid wrote:
 On 25/06/2010 11:46, abhishek jain wrote:
 hi
 thanks for the email,
 but the path is like
   /usr/local/share/apps

 and for the second application:

   /usr/local/share/apps/app2

 i mean it is a subfolder.

 will this still work?

 Depends which Tomcat version you actually have.  I don't think
 multilevel paths are supported in 5.0.n, (but I might be wrong).

 It isn't (but that doesn't matter). Overlapping values for docBase are
 never valid. This configuration cannot work.


 but are the overlapping values of context path valid, ?

 Depends on which version of Tomcat you have.

 Actually, overlapping context paths are always valid. Consider:
 /
 and
 /docs

 And whether you've configured it correctly.

 +1. Especially if you want /my/context/path

 Correct varies by version.


 
 
 
 I am using tomcat 5.5 and cpanel is configuring it,
 but i think for this configuration i will have to go to file server.xml and
 add the additional  context path row in the xml , something like:
 
 Host name=xxx appBase=/home/xxx/public_html

appBase should not equal docBase.

   Aliasxxx/Alias
 *  Context path= reloadable=true docBase=/x/public_html
 debug=1/

see above.

   Context path=/subfolder reloadable=true
 docBase=//public_html debug=1/

That's just the same docBase again.

 *  Context path=/manager debug=0 privileged=true
   docBase=/usr/local/jakarta/tomcat/server/webapps/manager
   /Context
/Host
 
 is this the right way?


Let's start over.

Exactly which version: 5.5.what?

... and which JVM version; also are you using HTTPD  mod_jk in front of
Tomcat - if so, what versions are they?


p






signature.asc
Description: OpenPGP digital signature


RE: Two applications, one in a sub folder - Urgent help needed

2010-06-25 Thread Caldarale, Charles R
 From: Paweł Zuzelski [mailto:z...@xatka.net]
 Subject: Re: Two applications, one in a sub folder - Urgent help needed
 
 app.xml should be something like:
 ?xml version=1.0 encoding=UTF-8?
 Context path=/app docBase=/usr/local/share/app1 privileged=false
 allowLinking=true
 /Context
 
 app#subapp.xml:
 ?xml version=1.0 encoding=UTF-8?
 Context path=/app/subapp docBase=/usr/local/share/app2
 privileged=false allowLinking=true
 /Context
 
 Note that “path” attribute must match xml context file name (note:
 '/' becomes '#' in filename)

Actually, the path attribute must be removed - it's not allowed here.  The path 
is derived from the name of the .xml file.

Otherwise, the above configuration is exactly what the OP needs, and seems to 
be studiously avoiding.

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



How to setup Tomcat Cluster - Help needed

2010-03-12 Thread Josef Pullicino
Dear All,

I would like to setup a tomcat cluster with 2 nodes. The configuration
must be in a horizontal alignment, meaning that the two nodes are going
to reside on two different machines. Any idea of how to set it up since
the default tomcat help guide does not provide any configuration
examples.

Any help would be greatly appreciated.

Thanks for your support,

Regards,

Josef Pullicino

Systems Administrator

GO

 

GO Mobile, Fra Diego Street, Marsa, MRS 1501, Malta.

t  +356 2594 6827 f  +356 2124 0112

w www.go.com.mt

 

This email and any files or content transmitted with it are confidential
and intended solely for the use of the individual or entity to whom they
are addressed. This message contains confidential information and is
intended only for the individual named. If you are not the named
addressee you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system. If you are
not the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
information is strictly prohibited. The Company and the originator of
this email accept no liability for the content of this email, or for the
consequences of any actions taken on the basis of the information
provided, unless that information is subsequently confirmed in writing.
If you are not the intended recipient you are notified that disclosing,
copying, distributing or taking any action in reliance on the contents
of this information is strictly prohibited.


Warning: Although the Company and the originator  have taken reasonable
precautions to ensure no viruses are present in this email, the company
cannot accept responsibility for any loss or damage arising from the use
of this email or attachments.

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



Re: How to setup Tomcat Cluster - Help needed

2010-03-12 Thread Philip Wigg
On 12 March 2010 09:29, Josef Pullicino josef.pullic...@go.com.mt wrote:
 Dear All,

 I would like to setup a tomcat cluster with 2 nodes. The configuration
 must be in a horizontal alignment, meaning that the two nodes are going
 to reside on two different machines. Any idea of how to set it up since
 the default tomcat help guide does not provide any configuration
 examples.

http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html

-- Phil

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



RE: How to setup Tomcat Cluster - Help needed

2010-03-12 Thread Robin D. Wilson
This reference is what we used - it seemed to work fine for us:

http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html

Don't forget to add this part:

distributable/ 

Into the 'web.xml' file from the .war files you want to use clustered 
sessions.

In our environment, we have 4 .war files with various webapps we deploy. Only 
our 'ROOT.war' is clustered though. So it is the
only .war file with the distributable tag in its web.xml.

Also, we changed a few settings in the 'server.xml' file settings, such as: 

1) Changed the channelSendOptions setting to '6' instead of '8'...

2) Increased some of the timeouts (we have a high-volume environment, 
and 4 clustered tomcats)

3) Removed the 'autobind' and manually set the IP addresses of the 
Receiver (it was picking the
wrong interface - lo0 (127.0.0.1) instead of 'et0'...)

Lastly, you need to change (at least) the port # for the McastService if you 
are running multiple clusters on the same network.
(For example, all of our developers have their own personal clusters - so 
each of them uses a different 'port' for their cluster's
multicast messages - this avoids cross-talk between their cluster and our main 
environment. Of course, our production environment is
completely isolated from this - but when you are testing multiple environments, 
this can be confusing...)

PS. We made adjustments to the DeltaManager and SessionManager code for some 
unique session issues we had - because we are using
Tapestry, and it creates a session if there are any 'form' tags on a page. This 
meant that our site was creating a session for every
visitor - which sort of overwhelmed the cluster (all sessions are supposed to 
be replicated to all cluster members - right?)... So
our adjustments just keep certain sessions from wasting cluster bandwidth if 
they are of sufficiently short duration so as not to
warrant replication. The best way to avoid this is to not create sessions that 
you don't really want replicated to all members of
the cluster.

--
Robin D. Wilson
Director of Web Development
KingsIsle Entertainment, Inc.
CELL: 512-426-3929
DESK: 512-623-5913
www.KingsIsle.com


-Original Message-
From: Josef Pullicino [mailto:josef.pullic...@go.com.mt] 
Sent: Friday, March 12, 2010 3:30 AM
To: Tomcat Users List
Subject: How to setup Tomcat Cluster - Help needed

Dear All,

I would like to setup a tomcat cluster with 2 nodes. The configuration
must be in a horizontal alignment, meaning that the two nodes are going
to reside on two different machines. Any idea of how to set it up since
the default tomcat help guide does not provide any configuration
examples.

Any help would be greatly appreciated.

Thanks for your support,

Regards,

Josef Pullicino

Systems Administrator

GO

 

GO Mobile, Fra Diego Street, Marsa, MRS 1501, Malta.

t  +356 2594 6827 f  +356 2124 0112

w www.go.com.mt

 

This email and any files or content transmitted with it are confidential
and intended solely for the use of the individual or entity to whom they
are addressed. This message contains confidential information and is
intended only for the individual named. If you are not the named
addressee you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system. If you are
not the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
information is strictly prohibited. The Company and the originator of
this email accept no liability for the content of this email, or for the
consequences of any actions taken on the basis of the information
provided, unless that information is subsequently confirmed in writing.
If you are not the intended recipient you are notified that disclosing,
copying, distributing or taking any action in reliance on the contents
of this information is strictly prohibited.


Warning: Although the Company and the originator  have taken reasonable
precautions to ensure no viruses are present in this email, the company
cannot accept responsibility for any loss or damage arising from the use
of this email or attachments.

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


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



RE: How to setup Tomcat Cluster - Help needed

2010-03-12 Thread Josef Pullicino
Dear Robin,

Thanks very much for your kind help and information provided below. 

Up till now, I copied the following configuration into the server.xml
file of each of the two tomcats. The result is that each tomcat is being
aware of each member added or deleted to/from each tomcat. So, I guess
that the tomcats are communicating well in between them.

Engine name=Catalina defaultHost=localhost jvmRoute=jvm2

  !--For clustering, please take a look at documentation at:
  /docs/cluster-howto.html  (simple how to)
  /docs/config/cluster.html (reference documentation) --
  !--
  Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster/
  --
Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
 channelSendOptions=6

  Manager
className=org.apache.catalina.ha.session.BackupManager
   expireSessionsOnShutdown=false
   notifyListenersOnReplication=true
   mapSendOptions=6/
  !--
  Manager
className=org.apache.catalina.ha.session.DeltaManager
   expireSessionsOnShutdown=false
   notifyListenersOnReplication=true/
  --
  Channel
className=org.apache.catalina.tribes.group.GroupChannel
Membership
className=org.apache.catalina.tribes.membership.McastService
address=228.0.0.4
port=45564
frequency=500
dropTime=3000/
Receiver
className=org.apache.catalina.tribes.transport.nio.NioReceiver
  address=auto
  port=5000
  selectorTimeout=100
  maxThreads=6/

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.TcpFailureDetec
tor/
Interceptor
className=org.apache.catalina.tribes.group.interceptors.MessageDispatch
15Interceptor/
Interceptor
className=org.apache.catalina.tribes.group.interceptors.ThroughputInter
ceptor/
  /Channel

  Valve className=org.apache.catalina.ha.tcp.ReplicationValve
 
filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;
/

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

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

With regards to your suggestions, what is the difference between
channelSendOptions setting to '6' instead of '8'? Also, how did you
setup the configuration so that it will not pick up the loopback
(127.0.0.1) but using the eth0?

Thanks a lot for your kind help provide. Really appreciated.

Regards, 

Josef Pullicino

Systems Administrator

GO
GO Mobile, Fra Diego Street, Marsa, MRS 1501, Malta.

t  +356 2594 6827 f  +356 2124 0112

w www.go.com.mt

 

This email and any files or content transmitted with it are confidential
and intended solely for the use of the individual or entity to whom they
are addressed. This message contains confidential information and is
intended only for the individual named. If you are not the named
addressee you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system. If you are
not the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
information is strictly prohibited. The Company and the originator of
this email accept no liability for the content of this email, or for the
consequences of any actions taken on the basis of the information
provided, unless that information is subsequently confirmed in writing.
If you are not the intended recipient you are notified that disclosing,
copying, distributing or taking any action in reliance on the contents
of this information is strictly prohibited.


Warning: Although the Company and the originator  have taken reasonable
precautions to ensure no viruses are present in this email, the company
cannot accept responsibility for any loss or damage arising from the use
of this email or attachments.

-Original Message-
From: Robin D. Wilson [mailto:rwils...@gmail.com] 
Sent: 12 March 2010 14:12
To: 'Tomcat Users List'
Subject: RE: How to setup Tomcat Cluster - Help needed

This reference is what we used - it seemed to work fine for us:

http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html

Don't forget to add this part

RE: How to setup Tomcat Cluster - Help needed

2010-03-12 Thread Robin D. Wilson
I can't recall exactly why we went with the channelSendOptions=6, but the 
docs are here:

http://tomcat.apache.org/tomcat-6.0-doc/config/cluster.html

Basically the '6' was to use synchronous replication.

To get the receiver to stop 'auto' configuring on the loopback interface (lo0), 
we just hard-coded the IP address for each host's
'et0' interface in the receiver:

Receiver className=org.apache.catalina.tribes.transport.nio.NioReceiver
address=111.111.111.111
port=5000
selectorTimeout=100
maxThreads=6/

(So you would change the '111.111.111.111' above to match the IP address of the 
host you are configuring.)

The only downside to this is that you have to have a different 'server.xml' 
file for each host in the cluster.

Once you get this up, and you have your 'distributable /' tag in your 
'web.xml' you should be replicating sessions between the two
hosts.

We use an 'apache' setup to proxy (over AJP) to our tomcats, so in our testing 
we setup a load-balancing config from apache, and our
simple test is to only enable 'tomcat 1' from apache, login - which should set 
the session on 'tomcat 1'. Then reset the apache so
that 'tomcat 2' is the proxied host - and see if we're still logged in... That 
seemed to work for us.


--
Robin D. Wilson
Director of Web Development
KingsIsle Entertainment, Inc.
CELL: 512-426-3929
DESK: 512-623-5913
www.KingsIsle.com


-Original Message-
From: Josef Pullicino [mailto:josef.pullic...@go.com.mt] 
Sent: Friday, March 12, 2010 8:04 AM
To: Tomcat Users List
Subject: RE: How to setup Tomcat Cluster - Help needed

Dear Robin,

Thanks very much for your kind help and information provided below. 

Up till now, I copied the following configuration into the server.xml
file of each of the two tomcats. The result is that each tomcat is being
aware of each member added or deleted to/from each tomcat. So, I guess
that the tomcats are communicating well in between them.

Engine name=Catalina defaultHost=localhost jvmRoute=jvm2

  !--For clustering, please take a look at documentation at:
  /docs/cluster-howto.html  (simple how to)
  /docs/config/cluster.html (reference documentation) --
  !--
  Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster/
  --
Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
 channelSendOptions=6

  Manager
className=org.apache.catalina.ha.session.BackupManager
   expireSessionsOnShutdown=false
   notifyListenersOnReplication=true
   mapSendOptions=6/
  !--
  Manager
className=org.apache.catalina.ha.session.DeltaManager
   expireSessionsOnShutdown=false
   notifyListenersOnReplication=true/
  --
  Channel
className=org.apache.catalina.tribes.group.GroupChannel
Membership
className=org.apache.catalina.tribes.membership.McastService
address=228.0.0.4
port=45564
frequency=500
dropTime=3000/
Receiver
className=org.apache.catalina.tribes.transport.nio.NioReceiver
  address=auto
  port=5000
  selectorTimeout=100
  maxThreads=6/

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.TcpFailureDetec
tor/
Interceptor
className=org.apache.catalina.tribes.group.interceptors.MessageDispatch
15Interceptor/
Interceptor
className=org.apache.catalina.tribes.group.interceptors.ThroughputInter
ceptor/
  /Channel

  Valve className=org.apache.catalina.ha.tcp.ReplicationValve
 
filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;
/

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

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

With regards to your suggestions, what is the difference between
channelSendOptions setting to '6' instead of '8'? Also, how did you
setup the configuration so that it will not pick up the loopback
(127.0.0.1) but using the eth0?

Thanks a lot for your kind help provide. Really appreciated.

Regards, 

Josef Pullicino

Systems Administrator

GO
GO Mobile, Fra Diego Street, Marsa, MRS 1501, Malta.

t  +356 2594 6827 f  +356 2124 0112

w www.go.com.mt

 

This email and any files or content transmitted with it are confidential
and intended solely for the use

RE: How to setup Tomcat Cluster - Help needed

2010-03-12 Thread Josef Pullicino
Robin,

Thanks a lot for your kind help. In fact, those were the ways that we
were thinking to setup. 

Thanks again for your cooperation :)

Kind Regards,

Josef Pullicino

Systems Administrator

GO

 

GO Mobile, Fra Diego Street, Marsa, MRS 1501, Malta.

t  +356 2594 6827 f  +356 2124 0112

w www.go.com.mt

 

This email and any files or content transmitted with it are confidential
and intended solely for the use of the individual or entity to whom they
are addressed. This message contains confidential information and is
intended only for the individual named. If you are not the named
addressee you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system. If you are
not the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
information is strictly prohibited. The Company and the originator of
this email accept no liability for the content of this email, or for the
consequences of any actions taken on the basis of the information
provided, unless that information is subsequently confirmed in writing.
If you are not the intended recipient you are notified that disclosing,
copying, distributing or taking any action in reliance on the contents
of this information is strictly prohibited.


Warning: Although the Company and the originator  have taken reasonable
precautions to ensure no viruses are present in this email, the company
cannot accept responsibility for any loss or damage arising from the use
of this email or attachments.


-Original Message-
From: Robin D. Wilson [mailto:rwils...@gmail.com] 
Sent: 12 March 2010 15:21
To: 'Tomcat Users List'
Subject: RE: How to setup Tomcat Cluster - Help needed

I can't recall exactly why we went with the channelSendOptions=6, but
the docs are here:

http://tomcat.apache.org/tomcat-6.0-doc/config/cluster.html

Basically the '6' was to use synchronous replication.

To get the receiver to stop 'auto' configuring on the loopback interface
(lo0), we just hard-coded the IP address for each host's
'et0' interface in the receiver:

Receiver
className=org.apache.catalina.tribes.transport.nio.NioReceiver
address=111.111.111.111
port=5000
selectorTimeout=100
maxThreads=6/

(So you would change the '111.111.111.111' above to match the IP address
of the host you are configuring.)

The only downside to this is that you have to have a different
'server.xml' file for each host in the cluster.

Once you get this up, and you have your 'distributable /' tag in your
'web.xml' you should be replicating sessions between the two
hosts.

We use an 'apache' setup to proxy (over AJP) to our tomcats, so in our
testing we setup a load-balancing config from apache, and our
simple test is to only enable 'tomcat 1' from apache, login - which
should set the session on 'tomcat 1'. Then reset the apache so
that 'tomcat 2' is the proxied host - and see if we're still logged
in... That seemed to work for us.


--
Robin D. Wilson
Director of Web Development
KingsIsle Entertainment, Inc.
CELL: 512-426-3929
DESK: 512-623-5913
www.KingsIsle.com


-Original Message-
From: Josef Pullicino [mailto:josef.pullic...@go.com.mt] 
Sent: Friday, March 12, 2010 8:04 AM
To: Tomcat Users List
Subject: RE: How to setup Tomcat Cluster - Help needed

Dear Robin,

Thanks very much for your kind help and information provided below. 

Up till now, I copied the following configuration into the server.xml
file of each of the two tomcats. The result is that each tomcat is being
aware of each member added or deleted to/from each tomcat. So, I guess
that the tomcats are communicating well in between them.

Engine name=Catalina defaultHost=localhost jvmRoute=jvm2

  !--For clustering, please take a look at documentation at:
  /docs/cluster-howto.html  (simple how to)
  /docs/config/cluster.html (reference documentation) --
  !--
  Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster/
  --
Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
 channelSendOptions=6

  Manager
className=org.apache.catalina.ha.session.BackupManager
   expireSessionsOnShutdown=false
   notifyListenersOnReplication=true
   mapSendOptions=6/
  !--
  Manager
className=org.apache.catalina.ha.session.DeltaManager
   expireSessionsOnShutdown=false
   notifyListenersOnReplication=true/
  --
  Channel
className=org.apache.catalina.tribes.group.GroupChannel
Membership
className=org.apache.catalina.tribes.membership.McastService
address=228.0.0.4
port=45564
frequency=500
dropTime=3000

Re: java.util.logging - help needed with configuration and problem determination

2010-03-04 Thread Konstantin Kolinko
2010/3/3 Stuart Grace sgr...@us.ibm.com:
 logging.properties
 handlers = 6IBINET.org.apache.juli.FileHandler,
 7IBMIN.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler


You have not defined .handlers property in your logging.properties.

If I understand the o.a.juli.ClassLoaderLogManager code correctly, in
such circumstances it behaves as if .handlers property were equal to
value of handlers, that is all handlers are assigned to the default
logger.

Thus, all output not handled by other loggers will go to all defined handlers.


 eocene.web.*.[Catalina].[localhost].[/IBINET].level = FINE
 eocene.web.*.[Catalina].[localhost].[/IBINET].handlers =
Won't work at all.

The category name is
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/contextpath]

You cannot replace org.apache.catalina.core.ContainerBase with anything else.

And that category is just where the output from the
javax.servlet.ServletContext.log() calls goes. Nothing more that that.
Not very useful.

That is unless you ask for that log category explicitly, as a String.


Best regards,
Konstantin Kolinko

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



Fw: java.util.logging - help needed with configuration and problem determination

2010-03-03 Thread Stuart Grace
I mistakenly stated this worked on my PC.  I think the problem is 
happening on my workstation and is not related to jsvc.




Stuart Grace/Fishkill/IBM 
03/03/2010 12:21 AM

To
users@tomcat.apache.org
cc

Subject
java.util.logging - help needed with configuration and problem 
determination





I'm using JSVC to start Tomcat 6.0.20 as a daemon on Solaris.  Java is 
jdk1.6.0_16. 
I need to deploy the same war file as 2 different contexts.  Each context 
has the same logging.properties file in the classes directory.  The 
conf/logging.properties has not been changed.

Problem:  The logging from both contexts IBINET and IBMIN are being 
written to both logs.  ie IBINET.-mm-dd.log and IBMIN--mm-dd.log.  


This did work on my PC where jsvc was not being used.   Very difficult to 
test with out jsvc on Solaris due to firewall. 

Does the logging.properties file below look correct for loggers named 
eocene.web.*  ? 



logging.properties
handlers = 6IBINET.org.apache.juli.FileHandler, 
7IBMIN.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

6IBINET.org.apache.juli.FileHandler.level = FINE
6IBINET.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
6IBINET.org.apache.juli.FileHandler.prefix = IBINET.

7IBMIN.org.apache.juli.FileHandler.level = FINE
7IBMIN.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
7IBMIN.org.apache.juli.FileHandler.prefix = IBMIN.

eocene.web.*.[Catalina].[localhost].[/IBINET].level = FINE
eocene.web.*.[Catalina].[localhost].[/IBINET].handlers = 
6IBINET.org.apache.juli.FileHandler

eocene.web.*.[Catalina].[localhost].[/IBMIN].level = FINE
eocene.web.*.[Catalina].[localhost].[/IBMIN].handlers = 
7IBMIN.org.apache.juli.FileHandler

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = 
java.util.logging.SimpleFormatter

startup script looks like 
case $1 in
  start)
#
# Start Tomcat
#
$DAEMON_HOME/jsvc \
-user $TOMCAT_USER \
-home $JAVA_HOME \
-Dcatalina.home=$CATALINA_HOME \
-Dcatalina.base=$CATALINA_BASE \
-Djava.io.tmpdir=$TMP_DIR \
-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties 
\
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
-wait 10 \
-pidfile $PID_FILE \
-outfile $CATALINA_HOME/logs/catalina.out \
-errfile '1' \
$CATALINA_OPTS \
-cp $CLASSPATH \
org.apache.catalina.startup.Bootstrap
#
# To get a verbose JVM
#-verbose \
# To get a debug of jsvc.
#-debug \
exit $?
;;

IBINET and IBMIN logs contain the same exact data from both contexts
 =ls -l logs
total 82
-rw-r--r--   1 eocene01 atthb3589930 Mar  2 23:26 
IBINET.2010-03-02.log
-rw-r--r--   1 eocene01 atthb3589930 Mar  2 23:26 IBMIN.2010-03-02.log
-rw-r--r--   1 root other   1377 Mar  2 23:25 
catalina.2010-03-02.log
-rw-r--r--   1 root other  15722 Mar  2 23:26 catalina.out
-rw-r--r--   1 root other  0 Mar  2 23:22 
host-manager.2010-03-02.log
-rw-r--r--   1 root other232 Mar  2 23:22 
localhost.2010-03-02.log
-rw-r--r--   1 root other   1132 Mar  2 23:25 
manager.2010-03-02.log


java.util.logging - help needed with configuration and problem determination

2010-03-02 Thread Stuart Grace
I'm using JSVC to start Tomcat 6.0.20 as a daemon on Solaris.  Java is 
jdk1.6.0_16. 
I need to deploy the same war file as 2 different contexts.  Each context 
has the same logging.properties file in the classes directory.  The 
conf/logging.properties has not been changed.

Problem:  The logging from both contexts IBINET and IBMIN are being 
written to both logs.  ie IBINET.-mm-dd.log and IBMIN--mm-dd.log.  


This did work on my PC where jsvc was not being used.   Very difficult to 
test with out jsvc on Solaris due to firewall. 

Does the logging.properties file below look correct for loggers named 
eocene.web.*  ? 



logging.properties
handlers = 6IBINET.org.apache.juli.FileHandler, 
7IBMIN.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

6IBINET.org.apache.juli.FileHandler.level = FINE
6IBINET.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
6IBINET.org.apache.juli.FileHandler.prefix = IBINET.

7IBMIN.org.apache.juli.FileHandler.level = FINE
7IBMIN.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
7IBMIN.org.apache.juli.FileHandler.prefix = IBMIN.

eocene.web.*.[Catalina].[localhost].[/IBINET].level = FINE
eocene.web.*.[Catalina].[localhost].[/IBINET].handlers = 
6IBINET.org.apache.juli.FileHandler

eocene.web.*.[Catalina].[localhost].[/IBMIN].level = FINE
eocene.web.*.[Catalina].[localhost].[/IBMIN].handlers = 
7IBMIN.org.apache.juli.FileHandler

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = 
java.util.logging.SimpleFormatter

startup script looks like 
case $1 in
  start)
#
# Start Tomcat
#
$DAEMON_HOME/jsvc \
-user $TOMCAT_USER \
-home $JAVA_HOME \
-Dcatalina.home=$CATALINA_HOME \
-Dcatalina.base=$CATALINA_BASE \
-Djava.io.tmpdir=$TMP_DIR \
-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties 
\
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
-wait 10 \
-pidfile $PID_FILE \
-outfile $CATALINA_HOME/logs/catalina.out \
-errfile '1' \
$CATALINA_OPTS \
-cp $CLASSPATH \
org.apache.catalina.startup.Bootstrap
#
# To get a verbose JVM
#-verbose \
# To get a debug of jsvc.
#-debug \
exit $?
;;

IBINET and IBMIN logs contain the same exact data from both contexts
 =ls -l logs
total 82
-rw-r--r--   1 eocene01 atthb3589930 Mar  2 23:26 
IBINET.2010-03-02.log
-rw-r--r--   1 eocene01 atthb3589930 Mar  2 23:26 IBMIN.2010-03-02.log
-rw-r--r--   1 root other   1377 Mar  2 23:25 
catalina.2010-03-02.log
-rw-r--r--   1 root other  15722 Mar  2 23:26 catalina.out
-rw-r--r--   1 root other  0 Mar  2 23:22 
host-manager.2010-03-02.log
-rw-r--r--   1 root other232 Mar  2 23:22 
localhost.2010-03-02.log
-rw-r--r--   1 root other   1132 Mar  2 23:25 
manager.2010-03-02.log


compiling mod_jk1.2.28 with apache2.2.9 on windows 2003 server help needed.

2009-06-25 Thread Ashwin K
Hi ,

I have followed the instruction said in here Building mod_jk for Apache on
Windows NT/2K/XP at this official tomcat site
http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html.
Basically the step i did was

1) download and install jdk1.6.0_07
2) download and install apapche2.2.9 msi file with headers and with openssl.
3) Download the source of  JK 1.2.28 Source Release zip file from
http://tomcat.apache.org/download-connectors.cgi
4) Install visual C++ 6.0
5) Then set java_home and apache2_home.
6) Then run MSDEV mod_jk.dsp /MAKE ALL at apache2.0 folder inside native.

It throws error stating that mstcpip.h is missing. But real concern is not
about the missing mstcpip.h. But the folder structure in source file
conatins the following
D:\tomcat-connectors-1.2.28-src\native contains only apache-1.3 and
apache-2.0. Note that there is no apache2.2 folder. So I think, the module
was meant for 2.0 and not 2.2. 
Here is the full story.
I installed the apache2.2.9 and mod_jk-1.2.28 and tomcat5.5.20 on windows
2003 server (all in binary version). There is only tomcat and apache running
on that server. No php or anything else. I have noticed that memory increase
from 20KB to 1.5G and then crashes as there no more memory left on the
machine. I think this is because of a memory leak with apache or on one of
the modules. The most heavily used module is mod_jk. So I thought may be
compiling this module from source will solve the memory leak. When I got the
source I find only folder for apache2.0 and apache1.3. And there is no
apache2.2 folder to compile. Can anyone tell me the reason for this memory
leak, as we have the same setup in windows 2003 x64 (which somewhat less
heavily used than this 32-bit box) which doesn't produce this issue. I have
installed apache-2.2.11 and found the same issue is reproducing. So now I am
using apache2.2.9

-- Ashwin K.


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



Re: compiling mod_jk1.2.28 with apache2.2.9 on windows 2003 server help needed.

2009-06-25 Thread Steve Ochani
Send reply to:  Tomcat Users List users@tomcat.apache.org
From:   Ashwin K akesa...@premiertechnologygroup.com
To: users@tomcat.apache.org
Subject:compiling mod_jk1.2.28 with apache2.2.9 on windows 2003 
server 
help
needed.
Date sent:  Thu, 25 Jun 2009 17:38:59 +0530

 Hi ,
 
 I have followed the instruction said in here Building mod_jk for
 Apache on Windows NT/2K/XP at this official tomcat site
 http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html.
 Basically the step i did was
 
 1) download and install jdk1.6.0_07
 2) download and install apapche2.2.9 msi file with headers and with
 openssl. 3) Download the source of  JK 1.2.28 Source Release zip file
 from http://tomcat.apache.org/download-connectors.cgi 

Why not use the compiled binary?

http://mirror.cloudera.com/apache/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.28/


4) Install
 visual C++ 6.0 5) Then set java_home and apache2_home. 6) Then run
 MSDEV mod_jk.dsp /MAKE ALL at apache2.0 folder inside native.
 
 It throws error stating that mstcpip.h is missing. But real concern is
 not about the missing mstcpip.h. But the folder structure in source
 file conatins the following D:\tomcat-connectors-1.2.28-src\native
 contains only apache-1.3 and apache-2.0. Note that there is no
 apache2.2 folder. So I think, the module was meant for 2.0 and not
 2.2. Here is the full story. I installed the apache2.2.9 and
 mod_jk-1.2.28 and tomcat5.5.20 on windows 2003 server (all in binary
 version). There is only tomcat and apache running on that server. No
 php or anything else. I have noticed that memory increase from 20KB to
 1.5G and then crashes as there no more memory left on the machine. I
 think this is because of a memory leak with apache or on one of the
 modules. The most heavily used module is mod_jk. So I thought may be
 compiling this module from source will solve the memory leak. When I
 got the source I find only folder for apache2.0 and apache1.3. And
 there is no apache2.2 folder to compile. Can anyone tell me the reason
 for this memory leak, as we have the same setup in windows 2003 x64
 (which somewhat less heavily used than this 32-bit box) which doesn't
 produce this issue. I have installed apache-2.2.11 and found the same
 issue is reproducing. So now I am using apache2.2.9
 
 -- Ashwin K.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For
 additional commands, e-mail: users-h...@tomcat.apache.org
 



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



Re: compiling mod_jk1.2.28 with apache2.2.9 on windows 2003 server help needed.

2009-06-25 Thread Rainer Jung
Hi,

On 25.06.2009 14:08, Ashwin K wrote:
 Hi ,
 
 I have followed the instruction said in here Building mod_jk for Apache on
 Windows NT/2K/XP at this official tomcat site
 http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html.
 Basically the step i did was
 
 1) download and install jdk1.6.0_07
 2) download and install apapche2.2.9 msi file with headers and with openssl.
 3) Download the source of  JK 1.2.28 Source Release zip file from
 http://tomcat.apache.org/download-connectors.cgi
 4) Install visual C++ 6.0
 5) Then set java_home and apache2_home.
 6) Then run MSDEV mod_jk.dsp /MAKE ALL at apache2.0 folder inside native.
 
 It throws error stating that mstcpip.h is missing. But real concern is not
 about the missing mstcpip.h. But the folder structure in source file
 conatins the following
 D:\tomcat-connectors-1.2.28-src\native contains only apache-1.3 and
 apache-2.0. Note that there is no apache2.2 folder. So I think, the module
 was meant for 2.0 and not 2.2. 

Apache 2.0 and 2.2 have a compatible module API. So the binaries of
mod_jk for 2.0 and 2.2 are build using the same source code file. That's
why it's the same folder.

 Here is the full story.
 I installed the apache2.2.9 and mod_jk-1.2.28 and tomcat5.5.20 on windows
 2003 server (all in binary version). There is only tomcat and apache running
 on that server. No php or anything else. I have noticed that memory increase
 from 20KB to 1.5G and then crashes as there no more memory left on the
 machine. I think this is because of a memory leak with apache or on one of
 the modules. The most heavily used module is mod_jk. So I thought may be
 compiling this module from source will solve the memory leak. When I got the
 source I find only folder for apache2.0 and apache1.3. And there is no
 apache2.2 folder to compile. Can anyone tell me the reason for this memory
 leak, as we have the same setup in windows 2003 x64 (which somewhat less
 heavily used than this 32-bit box) which doesn't produce this issue. I have
 installed apache-2.2.11 and found the same issue is reproducing. So now I am
 using apache2.2.9

If the leak is in mod_jk, I doubt that it will go away by recompiling.

Until now I am not aware of any memory leak in mod_jk. Can you reproduce
the problem on a test system?

Microsoft has a number of free tools under the umbrella name
SysInternals. One of them is named VMMap and shows memory split into
different regions. It's not unlikely, that the growth or leak will
happen in a part of the memory, that's not nicely named in VMMap, but it
would be a start looking at memory with VMMap and identifiying the
growing region. It can also show strings in that part of memory, so some
data in it might indicate, what it is used for.

If you are able to build something with visual studio you should also be
able to attach a debugger to the process and use the address info from
vmmap to inspect the memory.

Not a concise plan, but something to start with.

Regards,

Rainer

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



RE: compiling mod_jk1.2.28 with apache2.2.9 on windows 2003 server help needed.

2009-06-25 Thread Ashwin K

Thank you Rainer,

I will update the list with my finding, once I get back to work tomorrow.

-Original Message-
From: Rainer Jung [mailto:rainer.j...@kippdata.de] 
Sent: Thursday, June 25, 2009 8:36 PM
To: Tomcat Users List
Subject: Re: compiling mod_jk1.2.28 with apache2.2.9 on windows 2003 server
help needed.

Hi,

On 25.06.2009 14:08, Ashwin K wrote:
 Hi ,
 
 I have followed the instruction said in here Building mod_jk for Apache
on
 Windows NT/2K/XP at this official tomcat site
 http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html.
 Basically the step i did was
 
 1) download and install jdk1.6.0_07
 2) download and install apapche2.2.9 msi file with headers and with
openssl.
 3) Download the source of  JK 1.2.28 Source Release zip file from
 http://tomcat.apache.org/download-connectors.cgi
 4) Install visual C++ 6.0
 5) Then set java_home and apache2_home.
 6) Then run MSDEV mod_jk.dsp /MAKE ALL at apache2.0 folder inside native.
 
 It throws error stating that mstcpip.h is missing. But real concern is not
 about the missing mstcpip.h. But the folder structure in source file
 conatins the following
 D:\tomcat-connectors-1.2.28-src\native contains only apache-1.3 and
 apache-2.0. Note that there is no apache2.2 folder. So I think, the module
 was meant for 2.0 and not 2.2. 

Apache 2.0 and 2.2 have a compatible module API. So the binaries of
mod_jk for 2.0 and 2.2 are build using the same source code file. That's
why it's the same folder.

 Here is the full story.
 I installed the apache2.2.9 and mod_jk-1.2.28 and tomcat5.5.20 on windows
 2003 server (all in binary version). There is only tomcat and apache
running
 on that server. No php or anything else. I have noticed that memory
increase
 from 20KB to 1.5G and then crashes as there no more memory left on the
 machine. I think this is because of a memory leak with apache or on one of
 the modules. The most heavily used module is mod_jk. So I thought may be
 compiling this module from source will solve the memory leak. When I got
the
 source I find only folder for apache2.0 and apache1.3. And there is no
 apache2.2 folder to compile. Can anyone tell me the reason for this memory
 leak, as we have the same setup in windows 2003 x64 (which somewhat less
 heavily used than this 32-bit box) which doesn't produce this issue. I
have
 installed apache-2.2.11 and found the same issue is reproducing. So now I
am
 using apache2.2.9

If the leak is in mod_jk, I doubt that it will go away by recompiling.

Until now I am not aware of any memory leak in mod_jk. Can you reproduce
the problem on a test system?

Microsoft has a number of free tools under the umbrella name
SysInternals. One of them is named VMMap and shows memory split into
different regions. It's not unlikely, that the growth or leak will
happen in a part of the memory, that's not nicely named in VMMap, but it
would be a start looking at memory with VMMap and identifiying the
growing region. It can also show strings in that part of memory, so some
data in it might indicate, what it is used for.

If you are able to build something with visual studio you should also be
able to attach a debugger to the process and use the address info from
vmmap to inspect the memory.

Not a concise plan, but something to start with.

Regards,

Rainer

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


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



Re: Help needed to run JSTL 1.1 in Tomcat 6.0.16

2009-05-20 Thread David Smith
The setup looks good from what I can tell.  The only side note (and this
isn't causing your error) is to drop the ?autoconnect=true from your
mysql URL, replacing it with a validationQuery attribute in the
Resource .../ element.  The error itself makes me think your jstl jars
aren't visible to tomcat.  Can you provide more information about your
file layout ... especially any differences between the working Eclipse
setup and the non-working setup?

--David

Deepa Annamalai wrote:
 -- Forwarded message --
 From: Deepa Annamalai deardeep...@gmail.com
 Date: 2009/5/20
 Subject: Help needed to run JSTL 1.1 in Tomcat 6.0.16
 To: users@tomcat.apache.org


 Hi All,

 Help needed to run JSTL 1.1 in Tomcat 6.0.16

 I am trying to run the example given in
 http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html

 The example tries to connect to MySQL database from JSP using JSTL and JNDI
 Datasource.I am running the example using Eclipse 3.4.2 using Sysdeo plugin
 to start and stop Tomcat server from Eclipse IDE.

 My *web.xml* file looks like this

 ?xml version=1.0 encoding=UTF-8?
 web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xmlns=http://java.sun.com/xml/ns/javaee;
 xmlns:web=http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
 xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
 http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; id=WebApp_ID *
 version=2.5*
   display-nameDBTest/display-name
   descriptionMySQL Test App/description
   resource-ref
   descriptionDB Connection/description
   res-ref-namejdbc/TestDB/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
   /resource-ref
 /web-app

 and* test.jsp* looks like this

 *%@ taglib prefix=sql uri=http://java.sun.com/jsp/jstl/sql; %
 %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %*

 sql:query var=rs dataSource=jdbc/TestDB
 select id, foo, bar from testdata
 /sql:query

 %@ page language=java contentType=text/html; charset=ISO-8859-1
 pageEncoding=ISO-8859-1%
 !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
 http://www.w3.org/TR/html4/loose.dtd;
 html
 head
 meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1
 titleDB Test/title
 /head
 body
 h2Results/h2

 c:forEach var=row items=${rs.rows}
 Foo ${row.foo}br/
 Bar ${row.bar}br/
 /c:forEach

 /body
 /html


 I have placed the *jstl.jar* and *standard.jar* of
 the*jakarta-taglibs-standard-1.1.2.zip
 *  under E:\Deepa\workspace\DBTest\WebContent\WEB-INF\lib directory

 I have also placed context.xml file under
 E:\Deepa\workspace\DBTest\WebContent\META-INF and the content of *
 context.xml* is as below

 Context path=/DBTest docBase=DBTest
 debug=5 reloadable=true crossContext=true
   Resource name=jdbc/TestDB auth=Container
 type=javax.sql.DataSource
maxActive=100 maxIdle=30 maxWait=1
username=deepa password=mysql
driverClassName=com.mysql.jdbc.Driver

 url=jdbc:mysql://localhost:3306/javatest?autoReconnect=true/

 /Context

 Now while running the example, Eclipse creates one *DBTest.xml* file
 under C:\Program
 Files\Apache Software Foundation\Tomcat 6.0\conf\Catalina\localhost
 which has the following line:

 Context path=/DBTest reloadable=true
 docBase=E:\Deepa\workspace\DBTest workDir=E:\Deepa\workspace\DBTest\work
 /


 I am getting the following error in Firefox Browser:

 HTTP Status 500 -
 --

 *type* Exception report

 *message*

 *description* *The server encountered an internal error () that prevented it
 from fulfilling this request.*

 *exception*

 org.apache.jasper.JasperException: *The absolute uri:
 http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml
 or the jar files deployed with this application*

   
 org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
   
 org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
   
 org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)

   
 org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:315)
   
 org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java:148)
   org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:431)

   org.apache.jasper.compiler.Parser.parseDirective(Parser.java:494)
   org.apache.jasper.compiler.Parser.parseElements(Parser.java:1444)
   org.apache.jasper.compiler.Parser.parse(Parser.java:138)
   
 org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)

   
 org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
   org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:154)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:295

Re: Help needed to run JSTL 1.1 in Tomcat 6.0.16

2009-05-20 Thread Deepa Annamalai
My file layout is like this

E:\Deepa\workspace\DBTest\WebContent
under this folder I have WEB-INF and META-INF and the test.jsp.
In WEB-INF folder there is web.xml and lib folder(having jstl.jar and
Standard.jar)

/DBTest is my context name and with this setup it works fine when I run the
application in Tomcat server connection within Eclipse IDE. But if I start
tomcat using Sysdeo plugin in Eclipse and connect to the server using
firefox browser with url - http://localhost/DBTest/test.jsp I get the before
mentioned error. In the server console,

May 20, 2009 6:36:48 AM org.apache.jasper.compiler.TldLocationsCache
 processWebDotXml
 WARNING: Internal Error: *File /WEB-INF/web.xml not found*
 May 20, 2009 6:36:48 AM org.apache.catalina.core.StandardWrapperValve
invoke
 SEVERE: Servlet.service() for servlet jsp threw exception
 org.apache.jasper.JasperException: The absolute uri:
 http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml or
the
 jar files deployed with this application*

why web.xml is not found I am not able to understand.

Any help appreciated.
Thanks,
Deepa


Help needed to run JSTL 1.1 in Tomcat 6.0.16

2009-05-19 Thread Deepa Annamalai
-- Forwarded message --
From: Deepa Annamalai deardeep...@gmail.com
Date: 2009/5/20
Subject: Help needed to run JSTL 1.1 in Tomcat 6.0.16
To: users@tomcat.apache.org


Hi All,

Help needed to run JSTL 1.1 in Tomcat 6.0.16

I am trying to run the example given in
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html

The example tries to connect to MySQL database from JSP using JSTL and JNDI
Datasource.I am running the example using Eclipse 3.4.2 using Sysdeo plugin
to start and stop Tomcat server from Eclipse IDE.

My *web.xml* file looks like this

?xml version=1.0 encoding=UTF-8?
web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns=http://java.sun.com/xml/ns/javaee;
xmlns:web=http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; id=WebApp_ID *
version=2.5*
  display-nameDBTest/display-name
  descriptionMySQL Test App/description
  resource-ref
  descriptionDB Connection/description
  res-ref-namejdbc/TestDB/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
  /resource-ref
/web-app

and* test.jsp* looks like this

*%@ taglib prefix=sql uri=http://java.sun.com/jsp/jstl/sql; %
%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %*

sql:query var=rs dataSource=jdbc/TestDB
select id, foo, bar from testdata
/sql:query

%@ page language=java contentType=text/html; charset=ISO-8859-1
pageEncoding=ISO-8859-1%
!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
http://www.w3.org/TR/html4/loose.dtd;
html
head
meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1
titleDB Test/title
/head
body
h2Results/h2

c:forEach var=row items=${rs.rows}
Foo ${row.foo}br/
Bar ${row.bar}br/
/c:forEach

/body
/html


I have placed the *jstl.jar* and *standard.jar* of
the*jakarta-taglibs-standard-1.1.2.zip
*  under E:\Deepa\workspace\DBTest\WebContent\WEB-INF\lib directory

I have also placed context.xml file under
E:\Deepa\workspace\DBTest\WebContent\META-INF and the content of *
context.xml* is as below

Context path=/DBTest docBase=DBTest
debug=5 reloadable=true crossContext=true
  Resource name=jdbc/TestDB auth=Container
type=javax.sql.DataSource
   maxActive=100 maxIdle=30 maxWait=1
   username=deepa password=mysql
   driverClassName=com.mysql.jdbc.Driver

url=jdbc:mysql://localhost:3306/javatest?autoReconnect=true/

/Context

Now while running the example, Eclipse creates one *DBTest.xml* file
under C:\Program
Files\Apache Software Foundation\Tomcat 6.0\conf\Catalina\localhost
which has the following line:

Context path=/DBTest reloadable=true
docBase=E:\Deepa\workspace\DBTest workDir=E:\Deepa\workspace\DBTest\work
/


I am getting the following error in Firefox Browser:

HTTP Status 500 -
--

*type* Exception report

*message*

*description* *The server encountered an internal error () that prevented it
from fulfilling this request.*

*exception*

org.apache.jasper.JasperException: *The absolute uri:
http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml
or the jar files deployed with this application*


org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)

org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)

org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)


org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:315)

org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java:148)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:431)

org.apache.jasper.compiler.Parser.parseDirective(Parser.java:494)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1444)
org.apache.jasper.compiler.Parser.parse(Parser.java:138)

org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)


org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:154)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


In the Tomcat Server console, I am getting the following error:

May 20, 2009 6:33:30 AM

Help Needed with getting Client Authentication Working With Tomcat 5.5

2009-04-16 Thread Ron Perkins
I am trying to get Client Authentication working with Tomcat 5.5, I
have successfully got SSL working without Client Authentication.

This is what I have done so far.

Created a keystore with new certificate:

keytool -genkey -alias mykey -keyalg RSA -kaypass changeit -keystore
keystore.jks -storepass changeit

Exported certificate:

keytool -export -alias mykey -file mykey.cer -keystore keystore.jks
-storepass changeit

Imported certificate into trust store:

keytool -import -v -trustcacerts alias mykey -keypass changeit -file
mykey.cer -keystore cacerts.jks -storepass changeit

Added the following Connector into server.xml:

Connector
port=443
scheme=https
secure=true
keystoreFile=C:/keystore.jks
keystorePass=changeit
  keystoreType=JKS
  keyAlias=mykey
truststoreFile=C:/cacerts.jks
  truststorePass=changeit
  truststoreType=JKS
sslProtocol=TLS
maxSpareThreads=75
maxThreads=350
uRIEncoding=UTF-8
minSpareThreads=25
clientAuth=true
/Connector

Within the Firefox browser this gives the following error when going
to url: https//hostname.domain

SSL peer cannot verify your certificate (Error code: ssl_error_bad_cert_alert)

If I change clientAuth=true to clientAuth=false the default Tomcat
webpage is displayed within the browser.

Have I missed something within the configuration or do I need to do
something different of the creation of the trust store certificate?

Thanks
Ron

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



HELP NEEDED: Https, Tomcat, Apache - Total Noob to all this

2008-12-31 Thread scurenton

First off, I am sure this is probably posted somewhere but not sure what to
search on.

I am new to the Tomcat world so bare with me.  I have a reverse proxy setup
in our DMZ running Tomcat 5 and Apache 2 and an Application internal that is
running on Tomcat 5.  I have a SSL cert from Go Daddy for services.xxx.xxx 
OK, I want an INET user to type in https://services.xxx.xxx/Ef3/ and
have it be directed to our internal application which is on a server called
http://bcccrmecm:8080/Ef3/
I do have it to where a user can type in http:/services.xxx.xxx/Ef3/ and
it hits the reverse proxy and the RP redirects it internally fine.  I did
this by using some directionds that had me uncomment the mod_proxy lines and
add:

# mod_proxy setup. 
ProxyRequests Off
ProxyPass /Ef3 http://bcccrmecm:8080/Ef3
ProxyPassReverse /Ef3 http://bcccrmecm:8080/Ef3
ProxyPass /selfservice http://bcccrmecm:8080/selfservice
ProxyPassReverse /selfservice http://bcccrmecm:8080/selfservice
Location /Ef3
Order allow,deny
  Allow from all
/Location
Location /selfservice
  Order allow,deny
  Allow from all
/Location

How do I setup the reverse proxy to redirect any traffic from
https://services.xxx.xxx/Ef3/ to internal http://bcccrmecm/Ef3/
?
-- 
View this message in context: 
http://www.nabble.com/HELP-NEEDED%3A--Https%2C-Tomcat%2C-Apache---Total-Noob-to-all-this-tp21233479p21233479.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: tomcat 5.5 help needed in start-stop

2008-07-23 Thread suman
Hi,
I made the script as told by you. Now I can run it. But it ends up with
following error:

pwd is /sw/tomcat55
Using CATALINA_BASE:   /sw/tomcat55
Using CATALINA_HOME:   /sw/tomcat55
Using CATALINA_TMPDIR: /sw/tomcat55/temp
Using JRE_HOME:   /sw/jdk1.5.0_16
23 Jul, 2008 11:10:37 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:520)
at java.net.Socket.connect(Socket.java:470)
at java.net.Socket.init(Socket.java:367)
at java.net.Socket.init(Socket.java:180)
at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:395)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435)

--
Why the Connection refused error is here? Any idea?
I am running the service by root user and trying to stop it also as a root
user.
Thank you.
-suman



On Mon, Jul 21, 2008 at 11:22 PM, Deepak Mishra [EMAIL PROTECTED]
wrote:

 Any idea wht's going wrong here. Please let me know how to start and stop
 this server like we do for other daemons. e.g
 /etc/init.d/httpd start
 /etc/init.d/httpd stop
 etc.

 Any help is appreciated.
 Thank you.
 -suman


 if you installed tomcat through the repositories , you should have got a
 start-stop script as /etc/init.d/tomcat5.5
 if you have compiled and installed tomcat, you can make the above file like
 this :(this is for java1.6 and tomcat6,adjust the parameters).

 export JAVA_HOME=/usr/lib/jvm/java-6-sun
 case $1 in
 start)
sh /usr/local/apache-tomcat-6.0.14/bin/startup.sh;;
 stop)
sh /usr/local/apache-tomcat-6.0.14/bin/shutdown.sh;;
 restart)
sh /usr/local/apache-tomcat-6.0.14/bin/shutdown.sh sleep 5  sh
 /usr/local/apache-tomcat-6.0.14/bin/startup.sh;;
 esac
 exit 0


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




Re: tomcat 5.5 help needed in start-stop

2008-07-23 Thread Deepak Mishra

maybe creating symlinks should do..
try these :
sudo ln -s /etc/init.d/tomcat /etc/rc1.d/K99tomcat
sudo ln -s /etc/init.d/tomcat /etc/rc2.d/S99tomcat

(adjust the parameters accrording to your script name).

On Wed, 23 Jul 2008 23:13:39 +0530, suman [EMAIL PROTECTED]  
wrote:



Hi,
I made the script as told by you. Now I can run it. But it ends up with
following error:

pwd is /sw/tomcat55
Using CATALINA_BASE:   /sw/tomcat55
Using CATALINA_HOME:   /sw/tomcat55
Using CATALINA_TMPDIR: /sw/tomcat55/temp
Using JRE_HOME:   /sw/jdk1.5.0_16
23 Jul, 2008 11:10:37 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at  
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)

at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:520)
at java.net.Socket.connect(Socket.java:470)
at java.net.Socket.init(Socket.java:367)
at java.net.Socket.init(Socket.java:180)
at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:395)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at  
org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435)

--
Why the Connection refused error is here? Any idea?
I am running the service by root user and trying to stop it also as a  
root

user.
Thank you.
-suman



On Mon, Jul 21, 2008 at 11:22 PM, Deepak Mishra [EMAIL PROTECTED]
wrote:

Any idea wht's going wrong here. Please let me know how to start and  
stop

this server like we do for other daemons. e.g
/etc/init.d/httpd start
/etc/init.d/httpd stop
etc.

Any help is appreciated.
Thank you.
-suman



if you installed tomcat through the repositories , you should have got a
start-stop script as /etc/init.d/tomcat5.5
if you have compiled and installed tomcat, you can make the above file  
like

this :(this is for java1.6 and tomcat6,adjust the parameters).

export JAVA_HOME=/usr/lib/jvm/java-6-sun
case $1 in
start)
   sh /usr/local/apache-tomcat-6.0.14/bin/startup.sh;;
stop)
   sh /usr/local/apache-tomcat-6.0.14/bin/shutdown.sh;;
restart)
   sh /usr/local/apache-tomcat-6.0.14/bin/shutdown.sh sleep 5   
sh

/usr/local/apache-tomcat-6.0.14/bin/startup.sh;;
esac
exit 0


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






--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

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



Tomcat 5.5 help needed

2008-07-21 Thread suman
Hello,
I install Apache 5.5 on Ubuntu as super user.
I also do following:
I also create executable tomcat in /etc/init.d with following contents:

export JAVA_HOME=/sw/jdk1.5.0_16
export PATH=$JAVA_HOME/bin:$PATH
export CATALINA_HOME=/sw/tomcat55
cd $CATALINA_HOME
./bin/jsvc -Djava.endorsed.dirs=./common/endorsed -cp ./bin/bootstrap.jar
-outfile ./logs/catalina.out -errfile ./logs/catalina.err
org.apache.catalina.startup.Bootstrap
---
I create rc2.d/S31tomcat  and rc6.d/S31tomcat  to point to above executable
and the tomcat comes up when machine reboots. Till now I have no issues.
Now when I try to start / shutdown the tomcat process I see jsvc is unable
to shut it down.
I use following command to shut it down:
-
/sw/tomcat55/bin/jsvc -Djava.endorsed.dirs=./common/endorsed -cp
./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile
./logs/catalina.err org.apache.catalina.startup.Bootstrap -stop -pidfile
/var/run/jsvc.pid


--

Now the .logs.catalina.err has following error:
---
19/07/2008 13:06:43 6455 jsvc.exec error: Still running according to PID
file /var/run/jsvc.pid, PID is 6300
19/07/2008 13:06:43 6454 jsvc.exec error: Service exit with a return value
of 122

-

Any idea wht's going wrong here. Please let me know how to start and stop
this server like we do for other daemons. e.g
/etc/init.d/httpd start
/etc/init.d/httpd stop
etc.

Any help is appreciated.
Thank you.
-suman


  1   2   >