Re: ClientAbortException: java.io.IOException: Failed to send AJP message

2015-10-27 Thread tomcat

On 27.10.2015 10:46, Yogesh Patel wrote:

Ok Thanks,

My Tomcat version is : 7.0.47

Error stack trace is below:

"

org.apache.catalina.core.StandardWrapperValve.invoke:Line 211 -
ClientAbortException:  java.io.IOException: Failed to send AJP message
at 
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:406)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:342)
at 
org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:431)
at 
org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:419)
at 
org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:91)
at

"


Thanks, much more readable.

Previously, you wrote :
"In our case user is downloading the document and got message like "document
is deleted or moved" and tomcat has log like "ClientAbortException:
java.io.IOException: Failed to send AJP message""

But, the error message above still means, at the bottom, that Tomcat is trying to still 
send some bytes to the client, but the connection with the client is not there anymore, so 
it cannot send this..


The connection is as follows :

browser <-- (1) HTTP(S) --> Apache httpd + proxy module <-- (2) AJP --> Connector> +  + .


where "proxy module" is either mod_jk or mod_proxy_ajp.

So we have to assume that :
- when Tomcat + application writes to the client "document has moved..", the whole 
connection (1+2) is still there (because the client sees the message)
- but by the time Tomcat writes this error to its logfile, the AJP connection (2) between 
Tomcat and Apache httpd has been dropped;
It is dropped by the proxy module within Apache; and this is probably because the 
corresponding HTTP connection (1) between the browser and Apache httpd has been dropped. 
And this is probably - as someone else already mentioned - because in the meantime, the 
human at the browser side has decided to click away onto another page.


Humans are relatively slow in computer terms. So if they manage to click somewhere else 
between the moment at which they receive the part about the document having been moved, 
and whatever else the Tomcat application is still trying to send to them afterward, there 
must be a considerable delay somewhere at the application level, between the moment it 
sends the "document moved" response part, and the moment it tries to send some additional 
response part.
That is probably what you should be looking at here : what is it that it cannot send 
anymore, and why is it that there is such a delay between the "document moved" part and 
this second part. What is the application doing in the meantime ?


Of course, the problem, if it is occasional, could also be due to a bad network connection 
somewhere..















On 27 October 2015 at 14:59, André Warnier (tomcat)  wrote:


Yogesh,

1) please follow the rules of this list, and don't "top-post" :
http://tomcat.apache.org/lists.html#tomcat-users  #6
2) please follow the rules of this list, and post your messages as plain
text :
http://tomcat.apache.org/lists.html#tomcat-users #7

As you can see below, what you are sending comes here as an unreadable
blob, and that makes it all the more difficult and demotivating for anyone
wanting to help you.



On 27.10.2015 06:47, Yogesh Patel wrote:


Tomcat 7:

INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/cms][
ajp-apr-10161-exec-282][2015-10-20 10:02:59,673]-
org.apache.catalina.core.
StandardWrapperValve.invoke:Line 211 - ClientAbortException: java.io.
IOException: Failed to send AJP message at org.apache.catalina.connector..
OutputBuffer.realWriteBytes(OutputBuffer.java:406) at
org.apache.tomcat.util
.buf.ByteChunk.append(ByteChunk.java:342) at
org.apache.catalina.connector.
OutputBuffer.writeBytes(OutputBuffer.java:431) at org.apache.catalina.
connector.OutputBuffer.write(OutputBuffer.java:419) at
org.apache.catalina.
connector.CoyoteOutputStream.write(CoyoteOutputStream.java:91) at com.os..
gfnactions.contentmanager.document.documentDownload.
finalDocumentDownloadProcess(documentDownload.java:140) at sun.reflect.
GeneratedMethodAccessor8388.invoke(Unknown Source) at sun.reflect.
DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at
java.lang.reflect.Method.invoke(Method.java:606) at
com.opensymphony.xwork2.
DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:450) at
com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(
DefaultActionInvocation.java:289) at com.opensymphony.xwork2.
DefaultActionInvocation.invoke(DefaultActionInvocation.java:252) at com.
opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(
ExceptionMappingInterceptor.java:189) at com.opensymphony.xwork2.
DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at org.
apache.struts2.interceptor.DeprecationInterceptor.intercept(
DeprecationInterceptor.java:41) at 

Re: ClientAbortException: java.io.IOException: Failed to send AJP message

2015-10-27 Thread Yogesh Patel
Ok Thanks,

My Tomcat version is : 7.0.47

Error stack trace is below:

"

org.apache.catalina.core.StandardWrapperValve.invoke:Line 211 -
ClientAbortException:  java.io.IOException: Failed to send AJP message
at 
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:406)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:342)
at 
org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:431)
at 
org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:419)
at 
org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:91)
at

"


On 27 October 2015 at 14:59, André Warnier (tomcat)  wrote:

> Yogesh,
>
> 1) please follow the rules of this list, and don't "top-post" :
> http://tomcat.apache.org/lists.html#tomcat-users  #6
> 2) please follow the rules of this list, and post your messages as plain
> text :
> http://tomcat.apache.org/lists.html#tomcat-users #7
>
> As you can see below, what you are sending comes here as an unreadable
> blob, and that makes it all the more difficult and demotivating for anyone
> wanting to help you.
>
>
>
> On 27.10.2015 06:47, Yogesh Patel wrote:
>
>> Tomcat 7:
>>
>> INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/cms][
>> ajp-apr-10161-exec-282][2015-10-20 10:02:59,673]-
>> org.apache.catalina.core.
>> StandardWrapperValve.invoke:Line 211 - ClientAbortException: java.io.
>> IOException: Failed to send AJP message at org.apache.catalina.connector.
>> OutputBuffer.realWriteBytes(OutputBuffer.java:406) at
>> org.apache.tomcat.util
>> .buf.ByteChunk.append(ByteChunk.java:342) at
>> org.apache.catalina.connector.
>> OutputBuffer.writeBytes(OutputBuffer.java:431) at org.apache.catalina.
>> connector.OutputBuffer.write(OutputBuffer.java:419) at
>> org.apache.catalina.
>> connector.CoyoteOutputStream.write(CoyoteOutputStream.java:91) at com.os.
>> gfnactions.contentmanager.document.documentDownload.
>> finalDocumentDownloadProcess(documentDownload.java:140) at sun.reflect.
>> GeneratedMethodAccessor8388.invoke(Unknown Source) at sun.reflect.
>> DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> at
>> java.lang.reflect.Method.invoke(Method.java:606) at
>> com.opensymphony.xwork2.
>> DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:450) at
>> com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(
>> DefaultActionInvocation.java:289) at com.opensymphony.xwork2.
>> DefaultActionInvocation.invoke(DefaultActionInvocation.java:252) at com.
>> opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(
>> ExceptionMappingInterceptor.java:189) at com.opensymphony.xwork2.
>> DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at org.
>> apache.struts2.interceptor.DeprecationInterceptor.intercept(
>> DeprecationInterceptor.java:41) at com.opensymphony.xwork2.
>> DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at org.
>> apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(
>> DebuggingInterceptor.java:256) at com.opensymphony.xwork2.
>> DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.
>> opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(
>> DefaultWorkflowInterceptor.java:167) at
>> com.opensymphony.xwork2.interceptor.
>> MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.
>>
>> opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
>> java:246) at com.opensymphony.xwork2.validator.ValidationInterceptor.
>> doIntercept(ValidationInterceptor.java:265) at org.apache.struts2.
>> interceptor.validation.AnnotationValidationInterceptor.doIntercept(
>> AnnotationValidationInterceptor.java:68) at com.opensymphony.xwork2.
>>
>> interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:
>> 98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(
>> DefaultActionInvocation.java:246) at com.opensymphony.xwork2.interceptor.
>> ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
>> at
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(
>> DefaultActionInvocation.java:246) at com.opensymphony.xwork2.interceptor.
>> ParametersInterceptor.doIntercept(ParametersInterceptor.java:249) at com.
>> opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(
>> MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.
>> DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.
>> opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(
>> ParametersInterceptor.java:249) at com.opensymphony.xwork2.interceptor.
>> MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.
>>
>> opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
>> java:246) at
>> com.opensymphony.xwork2.interceptor.StaticParametersInterceptor
>> 

Re: ClientAbortException: java.io.IOException: Failed to send AJP message

2015-10-27 Thread tomcat

Yogesh,

1) please follow the rules of this list, and don't "top-post" :
http://tomcat.apache.org/lists.html#tomcat-users  #6
2) please follow the rules of this list, and post your messages as plain text :
http://tomcat.apache.org/lists.html#tomcat-users #7

As you can see below, what you are sending comes here as an unreadable blob, and that 
makes it all the more difficult and demotivating for anyone wanting to help you.



On 27.10.2015 06:47, Yogesh Patel wrote:

Tomcat 7:

INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/cms][
ajp-apr-10161-exec-282][2015-10-20 10:02:59,673]- org.apache.catalina.core.
StandardWrapperValve.invoke:Line 211 - ClientAbortException: java.io.
IOException: Failed to send AJP message at org.apache.catalina.connector.
OutputBuffer.realWriteBytes(OutputBuffer.java:406) at org.apache.tomcat.util
.buf.ByteChunk.append(ByteChunk.java:342) at org.apache.catalina.connector.
OutputBuffer.writeBytes(OutputBuffer.java:431) at org.apache.catalina.
connector.OutputBuffer.write(OutputBuffer.java:419) at org.apache.catalina.
connector.CoyoteOutputStream.write(CoyoteOutputStream.java:91) at com.os.
gfnactions.contentmanager.document.documentDownload.
finalDocumentDownloadProcess(documentDownload.java:140) at sun.reflect.
GeneratedMethodAccessor8388.invoke(Unknown Source) at sun.reflect.
DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at
java.lang.reflect.Method.invoke(Method.java:606) at com.opensymphony.xwork2.
DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:450) at
com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(
DefaultActionInvocation.java:289) at com.opensymphony.xwork2.
DefaultActionInvocation.invoke(DefaultActionInvocation.java:252) at com.
opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(
ExceptionMappingInterceptor.java:189) at com.opensymphony.xwork2.
DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at org.
apache.struts2.interceptor.DeprecationInterceptor.intercept(
DeprecationInterceptor.java:41) at com.opensymphony.xwork2.
DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at org.
apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(
DebuggingInterceptor.java:256) at com.opensymphony.xwork2.
DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.
opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(
DefaultWorkflowInterceptor.java:167) at com.opensymphony.xwork2.interceptor.
MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.
opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
java:246) at com.opensymphony.xwork2.validator.ValidationInterceptor.
doIntercept(ValidationInterceptor.java:265) at org.apache.struts2.
interceptor.validation.AnnotationValidationInterceptor.doIntercept(
AnnotationValidationInterceptor.java:68) at com.opensymphony.xwork2.
interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:
98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(
DefaultActionInvocation.java:246) at com.opensymphony.xwork2.interceptor.
ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138) at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(
DefaultActionInvocation.java:246) at com.opensymphony.xwork2.interceptor.
ParametersInterceptor.doIntercept(ParametersInterceptor.java:249) at com.
opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(
MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.
DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.
opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(
ParametersInterceptor.java:249) at com.opensymphony.xwork2.interceptor.
MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.
opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
java:246) at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor
.intercept(StaticParametersInterceptor.java:191) at com.opensymphony.xwork2.
DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at org.
apache.struts2.interceptor.MultiselectInterceptor.intercept(
MultiselectInterceptor.java:73) at com.opensymphony.xwork2.
DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at org.
apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor
.java:91) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(
DefaultActionInvocation.java:246) at org.apache.struts2.interceptor.
FileUploadInterceptor.intercept(FileUploadInterceptor.java:252) at com.
opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
java:246) at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.
intercept(ModelDrivenInterceptor.java:100) at com.opensymphony.xwork2.
DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.

jsp to servlet

2015-10-27 Thread Суржин Константин Вадимович
Hi.
win XP. 
Apache Tomcat 8.0.15
jdk8
animal.jsp (page code below)
Animal.java(page code below)

line 10 -> animalBean_0 = new org.animal.Animal();
and all right.

line 16 ->  animalBean_1 = (Animal) 
java.beans.Beans.instantiate(this.getClass().getClassLoader(), "Animal");
but I need a line 1 in animal.isp  and I get differing code ( not new 
org.animal.Animal();)
and ☹
HTTP Status 500 - /animal.jsp (line: 16, column: 8) The value for the useBean 
class attribute Animal is invalid.
and ☹
org.apache.jasper.JasperException: java.lang.ClassNotFoundException: 
org.apache.jsp.animal_jsp

Maybe something is missing or incorrect on this page?? 
http://wiki.apache.org/tomcat/FAQ/Class_Not_Found



animal.jsp

1 <%@page import="org.animal.Animal"%>
2 <%@page language="java" contentType="text/html" pageEncoding="UTF-8"%>
3 
4  
5
6
7   JSP Page
8
9
10
11<%-- intialize bean properties --%>
12
13
14
15 Sample Bean: <%= animalBean_0%>
16
17   <%-- intialize bean properties --%>
18
19
20 
21Sample Bean: <%= animalBean_1%>
22
23 

==
Animal.java
==
package org.animal;
public class Animal {
private String name = "no name";
private Integer age = 0;
public Animal(){
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
@Override
public String toString() {
return "Animal [name=" + name + ", age=" + age + "]";
}
}


Re: Tomcat 6, DB2 Driver Problems

2015-10-27 Thread Anderson Ramos
Hi Simone !

Are you tried to put this jar driver on tomcat common libs ?

I hope helped you.

Best regards...
Em 27/10/2015 12:39,  escreveu:

> Hi,
>
> we are using Apache Tomcat/6.0.41. I added the database driver "
> db2jcc4.jar" into the tomcat lib folder.
> Our application don't deploy the database driver. We are connecting to
> the datasource with a jndi datasource lookup.
>
> But, after a HotDeployment I get every minute the following log-message
>
> org.apache.catalina.loader.WebappClassLoader findResourceInternal
> Information: Illegal access: this web application instance has been
> stopped already.  Could not load DB2JccConfiguration.properties.  The
> eventual following stack trace is caused by an error thrown for debugging
> purposes as well as to attempt to terminate the thread which caused the
> illegal access, and has no functional impact.
>
>
> Any suggestions?
>
> Thx,
> Simone
>
>
>
> Bitte denken Sie an die Umwelt. Müssen Sie diese E-Mail ausdrucken?
> Wichtiger Hinweis zum Schutz Ihrer Daten!
>
> Der Schutz von Kundendaten ist uns ein wichtiges Anliegen. Aus diesem
> Grund hat sich die DEVK freiwillig verpflichtet, die "Verhaltensregeln für
> den Umgang mit personenbezogenen Daten durch die deutsche
> Versicherungswirtschaft" (Code of Conduct) einzuhalten. Sie regeln die
> Erhebung, Verarbeitung und Nutzung von personenbezogenen Daten. Den vollen
> Wortlaut des Code of Conduct finden Sie unter www.devk.de/datenschutz.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Java 7 and 8 features

2015-10-27 Thread David kerber

On 10/27/2015 12:01 PM, Vinicius Corrêa de Almeida wrote:

I analized some releases and i noticed that not using java 7 features like
multi catch and in java 8 do not use lambda expressions and others
features, so i came by this email to know why the developers not using this
features?



Which version of Tomcat were you looking at?  Each version targets a 
certain java version as its minimum, so cannot use feathers which are 
not in that JRE version.



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



AW: Tomcat 6, DB2 Driver Problems

2015-10-27 Thread Simone.Rodenbach.ext
Yes it is the lib folder of the tomcat


-Ursprüngliche Nachricht-
Von: Anderson Ramos [mailto:anderson.andy1...@gmail.com] 
Gesendet: Dienstag, 27. Oktober 2015 15:46
An: Tomcat Users List
Betreff: Re: Tomcat 6, DB2 Driver Problems

Hi Simone !

Are you tried to put this jar driver on tomcat common libs ?

I hope helped you.

Best regards...
Em 27/10/2015 12:39,  escreveu:

> Hi,
>
> we are using Apache Tomcat/6.0.41. I added the database driver "
> db2jcc4.jar" into the tomcat lib folder.
> Our application don't deploy the database driver. We are connecting to
> the datasource with a jndi datasource lookup.
>
> But, after a HotDeployment I get every minute the following log-message
>
> org.apache.catalina.loader.WebappClassLoader findResourceInternal
> Information: Illegal access: this web application instance has been
> stopped already.  Could not load DB2JccConfiguration.properties.  The
> eventual following stack trace is caused by an error thrown for debugging
> purposes as well as to attempt to terminate the thread which caused the
> illegal access, and has no functional impact.
>
>
> Any suggestions?
>
> Thx,
> Simone
>
>
>
> Bitte denken Sie an die Umwelt. Müssen Sie diese E-Mail ausdrucken?
> Wichtiger Hinweis zum Schutz Ihrer Daten!
>
> Der Schutz von Kundendaten ist uns ein wichtiges Anliegen. Aus diesem
> Grund hat sich die DEVK freiwillig verpflichtet, die "Verhaltensregeln für
> den Umgang mit personenbezogenen Daten durch die deutsche
> Versicherungswirtschaft" (Code of Conduct) einzuhalten. Sie regeln die
> Erhebung, Verarbeitung und Nutzung von personenbezogenen Daten. Den vollen
> Wortlaut des Code of Conduct finden Sie unter www.devk.de/datenschutz.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
Wichtiger Hinweis zum Schutz Ihrer Daten!
 
Der Schutz von Kundendaten ist uns ein wichtiges Anliegen. Aus diesem Grund hat 
sich die DEVK freiwillig verpflichtet, die "Verhaltensregeln für den Umgang mit 
personenbezogenen Daten durch die deutsche Versicherungswirtschaft" (Code of 
Conduct) einzuhalten. Sie regeln die Erhebung, Verarbeitung und Nutzung von 
personenbezogenen Daten. Den vollen Wortlaut des Code of Conduct finden Sie 
unter www.devk.de/datenschutz.


Re: jsp to servlet

2015-10-27 Thread Christopher Schultz
Суржин,

On 10/27/15 7:45 AM, Суржин Константин Вадимович wrote:
> Hi.
> win XP. 
> Apache Tomcat 8.0.15
> jdk8
> animal.jsp (page code below)
> Animal.java(page code below)
> 
> line 10 -> animalBean_0 = new org.animal.Animal();
> and all right.
> 
> line 16 ->  animalBean_1 = (Animal) 
> java.beans.Beans.instantiate(this.getClass().getClassLoader(), "Animal");
> but I need a line 1 in animal.isp  and I get differing code ( not new 
> org.animal.Animal();)
> and ☹
> HTTP Status 500 - /animal.jsp (line: 16, column: 8) The value for the useBean 
> class attribute Animal is invalid.
> and ☹
> org.apache.jasper.JasperException: java.lang.ClassNotFoundException: 
> org.apache.jsp.animal_jsp
> 
> Maybe something is missing or incorrect on this page?? 
> http://wiki.apache.org/tomcat/FAQ/Class_Not_Found

You are asking for a bean with the class name "Animal", and the JSP
compiler and/or runtime can't find it. I'm guessing you meant to use
"org.animal.Animal" here?

Or do you have a class, Animal, in the default package?

-chris


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



Re: Tomcat 6, DB2 Driver Problems

2015-10-27 Thread Christopher Schultz
Simone,

On 10/27/15 10:39 AM, simone.rodenbach@devk.de wrote:
> we are using Apache Tomcat/6.0.41. I added the database driver " db2jcc4.jar" 
> into the tomcat lib folder.
> Our application don't deploy the database driver. We are connecting to  the 
> datasource with a jndi datasource lookup.
> 
> But, after a HotDeployment I get every minute the following log-message
> 
> org.apache.catalina.loader.WebappClassLoader findResourceInternal
> Information: Illegal access: this web application instance has been
> stopped already.  Could not load DB2JccConfiguration.properties.  The
> eventual following stack trace is caused by an error thrown for
> debugging purposes as well as to attempt to terminate the thread
> which caused the illegal access, and has no functional impact.

Do you have a stack trace or at least a Thread name for this? If so,
please post that.

This usually happens when the "old" application is shutting-down, and
some component tries to load a resource form the ClassLoader. The most
likely thing is that you have a thread in the "old" deployment of the
application that is either still running, or still trying to shut down
when Tomcat has already "stopped" the old deployment and told the
WebappClassLoader not to load anything else.

The solution is to make sure that you stop all application-started
threads before your application stops. Or, equally likely, you need to
make sure that driver-created threads are started using Tomcat's
ClassLoader and not that of the web application.

You might want to check to make sure you have the latest version of your
DB2 JDBC driver. Also maybe do a web search for "drivername +
classloader" will find information on preventing the problem.

Tomcat can be configured to call certain methods to "trick" a class into
binding to the server's ClassLoader instead of the web application's
ClassLoader on startup. I'm not exactly sure how that would need to be
done with your DB2 driver, which is why I suggested the web search.

-chris

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



Java 7 and 8 features

2015-10-27 Thread Vinicius Corrêa de Almeida
I analized some releases and i noticed that not using java 7 features like
multi catch and in java 8 do not use lambda expressions and others
features, so i came by this email to know why the developers not using this
features?


Re: Java 7 and 8 features

2015-10-27 Thread tomcat

On 27.10.2015 17:01, Vinicius Corrêa de Almeida wrote:

I analized some releases and i noticed that not using java 7 features like
multi catch and in java 8 do not use lambda expressions and others
features, so i came by this email to know why the developers not using this
features?



I believe that you are asking the wrong question.

As per this page : http://tomcat.apache.org/whichversion.html

"Apache Tomcat™ is an open source software implementation of the Java Servlet and 
JavaServer Pages technologies."


In other words, Tomcat is not an implementation of any specific Java version.
If, to fulfill its target of implementing some specific version of the Java Servlet and 
JavaServer Pages technologies, it was necessary for running Tomcat code to use a certain 
minimum version of the Java JVM, then so be it, and the page above would mention that (and 
it does).
But that does not mean that every feature available in such a version of the Java JVM 
/must/ necessarily be used by Tomcat.




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



RE: Tomcat answers on port 80, not on 443

2015-10-27 Thread Beyer, Gregory L
Still struggling with this.   I'm amazed that implementing SSL in Tomcat is so 
difficult.  It's not in straight Apache, or IIS.  Is Tomcat really so different 
an animal? 

I tried changing \\Program files  to \\progra~1\ -- no joy.:-(

A question I posed last week that got overlooked -- Am I supposed to import the 
.keystore into my cacerts file?  When I open the cacerts file that came with 
the java install,  it contains  30-40 certifs (key-pairs?)   that I didn't 
create.

__
Gregory Beyer
gbey...@gatech.edu

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Saturday, October 24, 2015 8:06 AM
To: Tomcat Users List 
Subject: Re: Tomcat answers on port 80, not on 443

André,

On 10/23/15 4:16 PM, André Warnier (tomcat) wrote:
> On 23.10.2015 16:53, Beyer, Gregory L wrote:
> ...
> ##
> # Inbound SSL Settings
> ##
> 
> org.apache.felix.https.enable=true
> org.osgi.service.http.port.secure=443
>  org.apache.felix.https.keystore=E:\\Program
> Files\\Connector\\.keystore
>  org.apache.felix.https.keystore.password=REDACTED
>  org.apache.felix.https.keystore.key.password= REDACTED
>  org.apache.felix.https.truststore=C:\\Program
> Files\\Java\\jre1.8.0_60\\lib\\security\\cacerts
>  org.apache.felix.https.truststore.password= REDACTED
>>
>> Question  -- Does anyone think " Program Files"  (space) above is 
>> contributing to the problem?
>>
> 
> Maybe, maybe not.  It would depend on how "Felix" parses its 
> configuration files.
> 
> 
> But in any case, admitting spaces in file names is certainly one of 
> the stupidest and most costly ideas in the history of computing.
> A close second would be making this a standard program installation 
> directory in some widely-distributed operating systems.
> A close third would be using the same thing in the standard 
> installation path of some popular open-source software.
> oh well..
> 
> 
> Getting back on-topic however : I do not know anything about Felix, 
> and I have not really followed this thread.  But assuming that this 
> Felix is a web application running under Tomcat, the fact that it has 
> the above in its own configuration file, rather than in some Tomcat 
> configuration file, would tend to make one suspect that Felix is 
> opening its own listening socket, of which Tomcat knows nothing. No ?
> 
> And in such a case, there would be some conflict if one simultaneously 
> to deploying this web application, would try to open a Tomcat 
> Connector on the same port.
> One of them is bound to fail.

Felix is an OSGi thingy, which means it can ... do all kinds of things you 
didn't expect it to do. Like turning a server daemon (Tomcat) into a small 
component in a larger system in a single JVM where the daemon is no longer 
completely in charge of the process.

So it's plausible that Felix would be configuring the  even if it 
had never been configured through server.xml.

-chris

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



Re: Tomcat throws IllegalStateException “The remote endpoint was in state [BINARY_FULL_WRITING] …” when calling RemoteEndpoint.Async.sendBinary concurrently on the same session

2015-10-27 Thread Farzad Panahi
Thanks Mark for your quick response.

But how do I know the previous message is finished? RemoteEndpoint
does not expose the state.

On Tue, Oct 27, 2015 at 7:30 PM, Mark Thomas  wrote:
> On 27/10/2015 19:15, Farzad Panahi wrote:
>> Hi,
>>
>> I am using tomcat 8.0.23 to terminate my websocket connections. I have
>> the following code to take care of the incoming messages:
>>
>> @OnMessage
>> public void onMsg(Session session, byte[] request) {
>> executorService.execute(() ->
>> session.getAsyncRemote().sendBinary(
>> ByteBuffer.wrap(getResponse(session,
>> request)), result -> {
>> if (!result.isOK()) {
>> LOGGER.catching(result.getException());
>> }
>> }
>> ));
>> }
>>
>> But I get the following exception:
>>
>> Exception in thread "pool-6-thread-10160"
>> java.lang.IllegalStateException: The remote endpoint was in state
>> [BINARY_FULL_WRITING] which is an invalid state for called method
>> at 
>> org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.checkState(WsRemoteEndpointImplBase.java:1148)
>> at 
>> org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.binaryStart(WsRemoteEndpointImplBase.java:1101)
>> at 
>> org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendBytesByCompletion(WsRemoteEndpointImplBase.java:152)
>> at 
>> org.apache.tomcat.websocket.WsRemoteEndpointAsync.sendBinary(WsRemoteEndpointAsync.java:65)
>>
>> From what I understand from java doc, RemoteEndpoint.Async.sendBinary
>> should not throw IllegalStateException:
>>
>>> sendBinary void sendBinary(ByteBuffer data, SendHandler handler)
>>> Throws: IllegalArgumentException - if either the data or the handler are 
>>> null.
>>
>> It is also good to note that RemoEndpoint.Basic (not
>> RemoteEndpoint.Async) has the following paragraph in java doc:
>>
>>> If the websocket connection underlying this RemoteEndpoint is busy sending 
>>> a  message when a call is made to send another one, for example if two 
>>> threads  attempt to call a send method concurrently, or if a developer 
>>> attempts to send a new message while in the middle of sending an existing 
>>> one, the send method called while the connection is already busy may throw 
>>> an IllegalStateException.
>>
>>
>> Is this expected behaviour from tomcat or a possible implementation bug?
>
> The behaviour is expected. You can't start a new message until the
> previous one has finished.
>
> Mark
>
>
> -
> 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: Tomcat throws IllegalStateException “The remote endpoint was in state [BINARY_FULL_WRITING] …” when calling RemoteEndpoint.Async.sendBinary concurrently on the same session

2015-10-27 Thread Mark Thomas
On 27/10/2015 19:15, Farzad Panahi wrote:
> Hi,
> 
> I am using tomcat 8.0.23 to terminate my websocket connections. I have
> the following code to take care of the incoming messages:
> 
> @OnMessage
> public void onMsg(Session session, byte[] request) {
> executorService.execute(() ->
> session.getAsyncRemote().sendBinary(
> ByteBuffer.wrap(getResponse(session,
> request)), result -> {
> if (!result.isOK()) {
> LOGGER.catching(result.getException());
> }
> }
> ));
> }
> 
> But I get the following exception:
> 
> Exception in thread "pool-6-thread-10160"
> java.lang.IllegalStateException: The remote endpoint was in state
> [BINARY_FULL_WRITING] which is an invalid state for called method
> at 
> org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.checkState(WsRemoteEndpointImplBase.java:1148)
> at 
> org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.binaryStart(WsRemoteEndpointImplBase.java:1101)
> at 
> org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendBytesByCompletion(WsRemoteEndpointImplBase.java:152)
> at 
> org.apache.tomcat.websocket.WsRemoteEndpointAsync.sendBinary(WsRemoteEndpointAsync.java:65)
> 
> From what I understand from java doc, RemoteEndpoint.Async.sendBinary
> should not throw IllegalStateException:
> 
>> sendBinary void sendBinary(ByteBuffer data, SendHandler handler)
>> Throws: IllegalArgumentException - if either the data or the handler are 
>> null.
> 
> It is also good to note that RemoEndpoint.Basic (not
> RemoteEndpoint.Async) has the following paragraph in java doc:
> 
>> If the websocket connection underlying this RemoteEndpoint is busy sending a 
>>  message when a call is made to send another one, for example if two threads 
>>  attempt to call a send method concurrently, or if a developer attempts to 
>> send a new message while in the middle of sending an existing one, the send 
>> method called while the connection is already busy may throw an 
>> IllegalStateException.
> 
> 
> Is this expected behaviour from tomcat or a possible implementation bug?

The behaviour is expected. You can't start a new message until the
previous one has finished.

Mark


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



Tomcat throws IllegalStateException “The remote endpoint was in state [BINARY_FULL_WRITING] …” when calling RemoteEndpoint.Async.sendBinary concurrently on the same session

2015-10-27 Thread Farzad Panahi
Hi,

I am using tomcat 8.0.23 to terminate my websocket connections. I have
the following code to take care of the incoming messages:

@OnMessage
public void onMsg(Session session, byte[] request) {
executorService.execute(() ->
session.getAsyncRemote().sendBinary(
ByteBuffer.wrap(getResponse(session,
request)), result -> {
if (!result.isOK()) {
LOGGER.catching(result.getException());
}
}
));
}

But I get the following exception:

Exception in thread "pool-6-thread-10160"
java.lang.IllegalStateException: The remote endpoint was in state
[BINARY_FULL_WRITING] which is an invalid state for called method
at 
org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.checkState(WsRemoteEndpointImplBase.java:1148)
at 
org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.binaryStart(WsRemoteEndpointImplBase.java:1101)
at 
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendBytesByCompletion(WsRemoteEndpointImplBase.java:152)
at 
org.apache.tomcat.websocket.WsRemoteEndpointAsync.sendBinary(WsRemoteEndpointAsync.java:65)

>From what I understand from java doc, RemoteEndpoint.Async.sendBinary
should not throw IllegalStateException:

> sendBinary void sendBinary(ByteBuffer data, SendHandler handler)
> Throws: IllegalArgumentException - if either the data or the handler are null.

It is also good to note that RemoEndpoint.Basic (not
RemoteEndpoint.Async) has the following paragraph in java doc:

> If the websocket connection underlying this RemoteEndpoint is busy sending a  
> message when a call is made to send another one, for example if two threads  
> attempt to call a send method concurrently, or if a developer attempts to 
> send a new message while in the middle of sending an existing one, the send 
> method called while the connection is already busy may throw an 
> IllegalStateException.


Is this expected behaviour from tomcat or a possible implementation bug?


Cheers

Farzad

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



Re: Tomcat throws IllegalStateException “The remote endpoint was in state [BINARY_FULL_WRITING] …” when calling RemoteEndpoint.Async.sendBinary concurrently on the same session

2015-10-27 Thread Mark Thomas
On 27/10/2015 19:33, Farzad Panahi wrote:
> Thanks Mark for your quick response.
> 
> But how do I know the previous message is finished? RemoteEndpoint
> does not expose the state.

Yes it does. Via the Future or the SendHandler depending on how you sent
the async message.

For the Basic handler, the message is considered sent once the method
call to send the message returns.

Mark


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



Tomcat 6, DB2 Driver Problems

2015-10-27 Thread Simone.Rodenbach.ext
Hi,

we are using Apache Tomcat/6.0.41. I added the database driver " db2jcc4.jar" 
into the tomcat lib folder.
Our application don't deploy the database driver. We are connecting to  the 
datasource with a jndi datasource lookup.

But, after a HotDeployment I get every minute the following log-message

org.apache.catalina.loader.WebappClassLoader findResourceInternal
Information: Illegal access: this web application instance has been stopped 
already.  Could not load DB2JccConfiguration.properties.  The eventual 
following stack trace is caused by an error thrown for debugging purposes as 
well as to attempt to terminate the thread which caused the illegal access, and 
has no functional impact.


Any suggestions?

Thx,
Simone



Bitte denken Sie an die Umwelt. Müssen Sie diese E-Mail ausdrucken?
Wichtiger Hinweis zum Schutz Ihrer Daten!
 
Der Schutz von Kundendaten ist uns ein wichtiges Anliegen. Aus diesem Grund hat 
sich die DEVK freiwillig verpflichtet, die "Verhaltensregeln für den Umgang mit 
personenbezogenen Daten durch die deutsche Versicherungswirtschaft" (Code of 
Conduct) einzuhalten. Sie regeln die Erhebung, Verarbeitung und Nutzung von 
personenbezogenen Daten. Den vollen Wortlaut des Code of Conduct finden Sie 
unter www.devk.de/datenschutz.

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