RE: FW: tomcat 8080 thread not reduced

2017-01-13 Thread smith
The server.xml:





  
  
  
  
  
  
  
  

  
  


  

  
  





















  
  

  
  


  

  









  

  


-Original Message-
From: André Warnier (tomcat) [mailto:a...@ice-sa.com] 
Sent: Friday, January 13, 2017 10:42 AM
To: users@tomcat.apache.org
Subject: Re: FW: tomcat 8080 thread not reduced

On 13.01.2017 09:38, smith wrote:
>
>
>
>
> From: smith [mailto:smith@zoom.us]
> Sent: Tuesday, January 10, 2017 9:57 AM
> To: 'users'
> Subject: tomcat 8080 thread not reduced
>
>
>
> Hi,
>
>
>
> We have installed Apache Tomcat/8.0.14, and found that after one period of 
> time, the thread count for 8080(our port published) goes to 120 and never 
> reduced even the busy count is only 3-4.
>
> Why? Tomcat8 not reduced the thread pool even the thread is idle, and the 
> minSpareThreads for tomcat8 default is only 10.
>
> When will the thread reduce?
>
>
>
>
>
> Best regards
>
> Smith
>
>

Hi.

Please copy/paste your complete server.xml configuration file (confidential 
things removed), so that we could have a useful look at it.
Please edit *only* the confidential things, not entire sections. Often, the 
issue is in the details.



-
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 code=exited status=203/EXEC

2017-01-13 Thread Mark Eggers
Mary,

On 1/13/2017 4:36 PM, Mary Wiegand wrote:
> I'm getting the following error when I try to run tomcat8.
> tomcat code=exited status=203/EXEC
> 
> I've done a bunch of searching for things that might work but haven't had
> any luck with anything and nothing seems to be straight forward.
> 
> I'm using ubuntu server 14.06 and tomcat8.
> 
> Any ideas would be awesome.
> 
> Thanks,
> 
> -Mary
> 

A quick search on Google led me to this link:

https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-8-on-ubuntu-16-04

Check the permissions on the directory.

. . . just my (run Tomcat on CentOS) two cents
/mde/



signature.asc
Description: OpenPGP digital signature


tomcat code=exited status=203/EXEC

2017-01-13 Thread Mary Wiegand
I'm getting the following error when I try to run tomcat8.
tomcat code=exited status=203/EXEC

I've done a bunch of searching for things that might work but haven't had
any luck with anything and nothing seems to be straight forward.

I'm using ubuntu server 14.06 and tomcat8.

Any ideas would be awesome.

Thanks,

-Mary


Re: Tcnative.dll apr-1.5.2-win32-src - unable to compile with openssl-1.0.2j-fips-x86_64

2017-01-13 Thread marcus presley
Hi Mark,


I was able to work through the cmsc failed error.  I rebuilt my environment 
with Visual Studio 2010 and this resolved the issue.


I'm experiencing another issue below, when I'm compiling the openssl source.


   error LNK2005: getenv already defined in MSVCRT.lib


and


   warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; 
use /NODEFAULTLIB: library



Marcus





From: Mark Thomas 
Sent: Thursday, January 12, 2017 6:42 PM
To: Tomcat Users List
Subject: Re: Tcnative.dll apr-1.5.2-win32-src - unable to compile with 
openssl-1.0.2j-fips-x86_64

On 12/01/2017 22:48, marcus presley wrote:
> Mark,
>
>
> I am building the environment but the bat file is failing at the following 
> line:
>
>
> set VSBaseDir=C:\cmsc-master\msvc
> popd
> if not exist "%VSBaseDir%\bin\i386\lib.exe" goto Failed
>
>
> I explicitly copied lib.exe the directory "%VSBaseDir%\bin\i386", but I still 
> receive the error.

I've never seen that error. Is VSBaseDir set correctly?

Mark


>
>
> Marcus
>
>
>
> 
> From: marcus presley 
> Sent: Thursday, January 12, 2017 3:39 PM
> To: Tomcat Users List
> Subject: Re: Tcnative.dll apr-1.5.2-win32-src - unable to compile with 
> openssl-1.0.2j-fips-x86_64
>
> Hi Mark,
>
>
> Thanks for the guide.  Can I use Visual Studio 2015 or should I use the 
> versions you have outlined in guide?
>
>
> Marcus
>
>
> 
> From: Mark Thomas 
> Sent: Thursday, January 12, 2017 2:47 PM
> To: Tomcat Users List
> Subject: Re: Tcnative.dll apr-1.5.2-win32-src - unable to compile with 
> openssl-1.0.2j-fips-x86_64
>
> On 12/01/2017 18:56, marcus presley wrote:
>> Forum,
>>
>>
>> I have been unsuccessful, trying to compile 'tcnative.dll' with Visual 
>> Studio 2015.
>
> https://cwiki.apache.org/confluence/display/TOMCAT/Building+the+Tomcat+Native+Connector+binaries+for+Windows

Building the Tomcat Native Connector binaries for Windows 
...
cwiki.apache.org
This page describes the process for building the Windows Native Connector for 
Windows. This is the native part of the APR/Native connector. These 
instructions assume ...



>
> Building the Tomcat Native Connector binaries for Windows 
> ...

Building the Tomcat Native Connector binaries for Windows 
...
cwiki.apache.org
This page describes the process for building the Windows Native Connector for 
Windows. This is the native part of the APR/Native connector. These 
instructions assume ...



> cwiki.apache.org
> This page describes the process for building the Windows Native Connector for 
> Windows. This is the native part of the APR/Native connector. These 
> instructions assume ...
>
>
>
>
> Building the Tomcat Native Connector binaries for Windows 
> ...

Building the Tomcat Native Connector binaries for Windows 
...
cwiki.apache.org
This page describes the process for building the Windows Native Connector for 
Windows. This is the native part of the APR/Native connector. These 
instructions assume ...



>
> Building the Tomcat Native Connector binaries for Windows 
> ...

Building the Tomcat Native Connector binaries for Windows 
...
cwiki.apache.org
This page describes the process for building the Windows Native Connector for 
Windows. This is the native part of the APR/Native connector. These 
instructions assume ...



> cwiki.apache.org
> This page describes the process for building the Windows Native Connector for 
> Windows. This is the native part of the APR/Native connector. These 
> instructions assume ...
>
>
>
> cwiki.apache.org
> This page describes the process for building the Windows Native Connector for 
> Windows. This is the native part of the APR/Native connector. These 
> instructions assume ...
>
>
>
>
> Mark
>
>>
>>
>> I have used several online forums including the instructions on Apache 
>> website (https://tomcat.apache.org/download-native.cgi).

Apache Tomcat® - Tomcat Native 
Downloads
tomcat.apache.org
Use the links below to download the Apache Tomcat ® Native software from one of 
our mirrors. You must verify the integrity of the 

Re: Multiple directories under /WEB-INF/classes

2017-01-13 Thread Mark Thomas
On 13/01/2017 11:14, Tom Eugelink wrote:
> I'm trying to migrate a very old ANT based project into the future, the
> ANT scripts I inherited are (of course) very complex, so I need to make
> babysteps. The first thing I did was compile the Java code with Maven and
> thus replaced a lot of copy statements and checked in lib directories with
> dependencies. This is working fine, but it also means that there is no
> single directory anymore where all the classfiles, jars, configuration
> files, etc are copied to. So now I need a way to start Tomcat for
> developers using (still) separated directories.
> 
> The best approach seemed like to start Tomcat embedded, this also allows
> me to use it for running cucumber and integration tests against. The thing
> is I cannot get it to work, even after searching google, stackoverflow and
> reading the Tomcat (8.0.39) configuration guides for 2 days. It should, I
> would not mind if it did, but it does not.
> 
> To begin I have a maven project with:
> - classes in target/classes
> - web files in webapps
> - configuration files in /somewhere/outside/the/project/cfg
> 
> This what I have so far:
>   StandardContext standardContext =
> (StandardContext)tomcat.addWebapp("/myapp,
> "/path/to/maven/project/webapps);
>   standardContext.setCrossContext(true);
>   standardContext.addParameter("SomeOwnFramework.Home",
> "/somewhere/outside/the/project");
>   standardContext.addParameter("SomeOwnFramework.ContainerName",
> "MijnCaress Backend Container");
>   
> standardContext.addParameter("SomeOwnFramework.XmlConfigurationFile",
> "/somewhere/outside/the/project/cfg/Framework-backend.xml");
>   
> standardContext.getNamingResources().addResource(createJdbcResource());
> // returns a
> org.apache.tomcat.util.descriptor.web.ContextResource
> 
>   org.apache.catalina.webresources.StandardRoot standardRoot = new
> org.apache.catalina.webresources.StandardRoot(standardContext);
>   standardRoot.setCachingAllowed(true);
>   standardRoot.setCacheMaxSize(10);
>   // add classes
>   standardRoot.addPreResources(new
> org.apache.catalina.webresources.DirResourceSet(standardRoot,
> "/WEB-INF/classes", new File("target/classes").getAbsolutePath(),
> "/"));
>   // add configuration files
>   standardRoot.addPostResources(new
> org.apache.catalina.webresources.DirResourceSet(standardRoot,
> "/WEB-INF/classes", new
> File("/somewhere/outside/the/project/cfg").getAbsolutePath(),
> "/"));
>   standardContext.setResources(standardRoot);
> 
> This ends with a ClassNotFoundException on a class that is in
> target/classes, also if I remove the configuration files resource.
> The target/classes absolute path is correct, exists and contains the class.
> 
> It would be great to get some pointers on why this is not working.

Class loader resources have special handling. I think you'll be able to
get this to work with:

standardRoot.createWebResourceSet(CLASSES_JAR, "/WEB-INF/classes",
new File("target/classes").getAbsolutePath(), null, "/");

If that doesn't work, I'd recommend using a debugger to figure out what
is going on. It wouldn't surprise me to find we need to extend the API
as more use cases emerge.

Mark


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



Re: Tomcat is scanning strange jars in the maven repo

2017-01-13 Thread Mark Thomas
On 13/01/2017 11:23, Tom Eugelink wrote:
> When my embedded Tomcat (8.0.39) is starting in my Maven-Eclipse project,
> I get these warnings:
> 
> WARNING: Failed to scan
> [file:/C:/Users/TEUGELINK/.m2/repository/org/apache/xmlgraphics/fop/0.94/commons-io-1.3.1.jar]
> from classloader hierarchy
> java.io.FileNotFoundException:
> C:\Users\TEUGELINK\.m2\repository\org\apache\xmlgraphics\fop\0.94\commons-io-1.3.1.jar
> (Het systeem kan het opgegeven bestand niet vinden) // file cannot be
> found
>   at java.util.zip.ZipFile.open(Native Method)
>   at java.util.zip.ZipFile.(ZipFile.java:219)
>   at java.util.zip.ZipFile.(ZipFile.java:149)
>   at java.util.jar.JarFile.(JarFile.java:166)
>   at java.util.jar.JarFile.(JarFile.java:130)
>   at 
> org.apache.tomcat.util.scan.JarFileUrlJar.(JarFileUrlJar.java:60)
>   at 
> org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:48)
>   at
> org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:334)
>   at
> org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:284)
>   at org.apache.jasper.servlet.TldScanner.scanJars(TldScanner.java:262)
>   at org.apache.jasper.servlet.TldScanner.scan(TldScanner.java:106)
>   at
> org.apache.jasper.servlet.JasperInitializer.onStartup(JasperInitializer.java:101)
>   at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
>   at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
>   at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
>   at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
>   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>   at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> 
> What is weird is that it is looking for the commons-io artifact in a
> totally wrong repo group. The project was setup by Eclipse's Maven plugin
> (import maven project), and commons-io is indeed part of the project's
> Maven dependencies, but in the correct location. The correct commons-io is
> also scanned, but somehow 30ish of those incorrect permutations of group
> and artifact id are also scanned.
> 
> Now these are warnings, so no fuss, but still strange?

Tomcat will be picking them up from the class path. You can enable trace
level logging for StandardJarScanner to get more detail on what is going on.

Mark


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



Re: Multiple directories under /WEB-INF/classes

2017-01-13 Thread Tom Eugelink

On 13-1-2017 16:09, Christopher Schultz wrote:


Are you trying to build a WAR file/directory, or are you trying to
launch a Tomcat instance? Or both?


I am trying to launch a Tomcat instance by assembling the WAR from different 
places. The addPre/PostResources seem to allow that.




Ultimately, you will not be able to deploy a web application unless it
is properly-assembled into a WAR-like structure. You can't get around
that, embedded or not.


In my search I found many examples of starting tomcat without building a full 
WAR structure:
http://stackoverflow.com/questions/23143697/adding-external-resources-to-class-path-in-tomcat-8

The main problem is that the WAR project, as created in Eclipse by the Maven 
plugin, writes the class files to target/classes instead of 
webapps/WEB-INF/classes.

Tom

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



Re: Upgrade fom Tomat 8.0.33 to 8.5.9 - stuck clients

2017-01-13 Thread Enrico Olivelli
After rolling back to old Nio all clients works very well as expected.


I'm sorry, I don't know how to reproduce this kind of issue on a test case,
I have tried to write some simple multi-thread tests but I cannot break
Tomcat Nio2 connector, it happens only on my QA environment.

At this point I'm not able to submit any issue to your bug tracker.

Thank you


2017-01-13 0:43 GMT+01:00 Mark Thomas :

> On 12/01/2017 21:09, Enrico Olivelli wrote:
> > Thank you Chris
> >
> > Il gio 12 gen 2017, 18:04 Christopher Schultz <
> ch...@christopherschultz.net>
> > ha scritto:
> >
> > Enrico,
> >
> > On 1/12/17 8:53 AM, Enrico Olivelli wrote:
>  I'm upgrading from Tomcat 8.0.33. I see that after a period of work
>  requests remains "pending", for instance I get all clients
>  remaining waiting for a response (parsing HTTP Response header) and
>  no active thread on my Tomcat.
> 
>  This happens in my QA environment where I start several
>  WebDriver/Unit tests againts my web application. I have many cases,
>  the most simple I this is the following:
> 
>  on  the client side (a JAX-WS client):
> 
>  "main" #1 prio=5 os_prio=0 tid=0x7f7cf0009000 nid=0x7ddc
>  runnable [0x7f7cf6e3f000]
> 
>  java.lang.Thread.State: RUNNABLE
> 
>  at java.net.SocketInputStream.socketRead0(Native Method)
> 
>  at
>  java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
> 
>  at java.net.SocketInputStream.read(SocketInputStream.java:170)
> 
>  at java.net.SocketInputStream.read(SocketInputStream.java:141)
> 
>  at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
> 
>  at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
> 
>  at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
> 
>  - locked <0xfd159a18> (a java.io.BufferedInputStream)
> 
>  at
>  sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:704)
> >
> > Okay, client is waiting.
> >
> >
> >> From server side application logs I see that the webapp has processed
> the
> >> request. In this case I am using Metro JAX-WS.
> >> It seems that the reponse is waiting in some buffer.
> >> Is there any way to inspect tomcat buffers? Network buffers? I am using
> >> linux.
> >
> >> The strange thing is that with Tomcat 8.0.33 there is no problem.
> >>  The same problem happens even with other servlets of different
> frameworks
> >> and other webapps.
> >
> >> On 8.0.x I was using Nio connector, on 8.5 I am using Nio2.
> >> The problem is both on http and jsse https.
>
> Try NIO.
>
> Mark
>
>
> >
> >> Is any new relevant default value changed from 8.0 and 8.5? I can't find
> >> any idea on changelogs or documentation
> >
> >
> >
> >
> >
>  in the server side: Full thread dump Java HotSpot(TM) 64-Bit Server
>  VM (25.92-b14 mixed mode):
> 
> 
>  "anInnocuousThread" #861 daemon prio=5 os_prio=0
>  tid=0x7ff23c0de800 nid=0xdb26 runnable [0x7ff1ad379000]
>  java.lang.Thread.State: RUNNABLE at
>  sun.nio.ch.EPoll.epollWait(Native Method) at
>  sun.nio.ch.EPollPort$EventHandlerTask.poll(EPollPort.java:194) at
>  sun.nio.ch.EPollPort$EventHandlerTask.run(EPollPort.java:268) at
>  java.lang.Thread.run(Thread.java:745) at
>  sun.misc.InnocuousThread.run(InnocuousThread.java:74)
> 
>  (lots of this kind) (HTTPS Connector I think)
> >
> > Without the rest of the stack trace, it's hard to tell if those are okay
> >
> >
> >> I have cut all the other threads which had the same stacktrace.
> >> I have stripped out GC threads, JMX...
> >> My application is not present in any thread but I have several clients
> >> stuck at waiting for a response.
> >
> >> As soon as I can I will attach the full dump
> >
> >> Thank you very much
> >> I appreciate your help
> >
> >> Enrico
> >
> >> .
> >
>  "https-jsse-nio2-10.168.10.55-8443-exec-130" #572 daemon prio=5
>  os_prio=0 tid=0x7ff23c0a nid=0xd4a2 waiting on condition
>  [0x7ff1b2bbf000] java.lang.Thread.State: WAITING (parking) at
>  sun.misc.Unsafe.park(Native Method) - parking to wait for
>  <0x80f1d420> (a
>  java.util.concurrent.locks.AbstractQueuedSynchronizer$
> ConditionObject)
> >
> > These
> 
> > are request-processing threads, waiting for work. They are idle.
> >
>  (lots of this kind) (HTTP Connector I think)
> 
>  "http-nio2-10.168.10.55-8080-exec-21" #281 daemon prio=5 os_prio=0
>  tid=0x7ff2340e7000 nid=0xd262 waiting on condition
>  [0x7ff1af995000] java.lang.Thread.State: WAITING (parking) at
>  sun.misc.Unsafe.park(Native Method) - parking to wait for
>  <0x80f0cdb0> (a
>  java.util.concurrent.locks.AbstractQueuedSynchronizer$
> ConditionObject)
> >
> > Same
> 
> > here.
> >
> > The others look okay to me.
> >
> > -chris
> >>
> >> 

Re: Multiple directories under /WEB-INF/classes

2017-01-13 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Tom,

On 1/13/17 6:14 AM, Tom Eugelink wrote:
> I'm trying to migrate a very old ANT based project into the future,
> the ANT scripts I inherited are (of course) very complex, so I need
> to make babysteps. The first thing I did was compile the Java code
> with Maven and thus replaced a lot of copy statements and checked
> in lib directories with dependencies. This is working fine, but it
> also means that there is no single directory anymore where all the
> classfiles, jars, configuration files, etc are copied to. So now I
> need a way to start Tomcat for developers using (still) separated
> directories.

Are you trying to build a WAR file/directory, or are you trying to
launch a Tomcat instance? Or both?

> The best approach seemed like to start Tomcat embedded, this also
> allows me to use it for running cucumber and integration tests
> against.

Ultimately, you will not be able to deploy a web application unless it
is properly-assembled into a WAR-like structure. You can't get around
that, embedded or not.

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

iQIcBAEBCAAGBQJYeO2XAAoJEBzwKT+lPKRYo9YP/3iWdfVJcbNNr2MubmmbTxAy
rD4qE8UNK+JXKD3YusuKXzeQvON00Syh5ttKLWfcN37LpWbwfOjRILp8Ln7zcyRG
YMUIw9CqQkxLYG8Cz7G/guAilE3+4AnUG24/0s/UFQKsj3S2llQ9q9o0DHnysB0t
Ocu6+ErZR/K8Kt4Mke8whh11FyC/qYCRrY0iNAcPuBhZ13kumJ69Y55m4FwczwpY
EZUQEL1xZ2WA1xQ3P22uuZkYnGuLyVAxxurv64tAikHe1fneGchzzs21BKHHOwHS
UKZ/zfi6Mzqk509UqY4E4/XY1Ji2qTglAMSpVfko5IxvEA1L+3vKi7wJEZD4LIH6
gHl0xcwcMireybRrayelmHlNIYC0NjWePGUbQJpCcrhzmdCtAGpDFKRapWTpUSNe
Vrps9+wGJcZEYNxAlHdJKy58d2g680rG3yn8y7Bl9Ez2W7KZ+kIenxs6yJRhRQ2j
kG2q/GZ2zTWN0CF50wPQtROW9d308U1+tu7xhbi9+P9HwJoK+Kq620xT6zuhzApH
mQp8Aq/wml2+N+ULLCVXmOidMU7x9SoGihc2Dq2rhKXnkQXdcocdN0UQEBoRQmTI
enREMH46RA6liy+N0wx0t+sMFv/yqwUCbnYWkvDL4STwjVZht3jY/As3N3wBbxGz
8TkL2w2pgNXPAG6ia6J4
=Ht0E
-END PGP SIGNATURE-

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



Tomcat is scanning strange jars in the maven repo

2017-01-13 Thread Tom Eugelink
When my embedded Tomcat (8.0.39) is starting in my Maven-Eclipse project,
I get these warnings:

WARNING: Failed to scan
[file:/C:/Users/TEUGELINK/.m2/repository/org/apache/xmlgraphics/fop/0.94/commons-io-1.3.1.jar]
from classloader hierarchy
java.io.FileNotFoundException:
C:\Users\TEUGELINK\.m2\repository\org\apache\xmlgraphics\fop\0.94\commons-io-1.3.1.jar
(Het systeem kan het opgegeven bestand niet vinden) // file cannot be
found
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:219)
at java.util.zip.ZipFile.(ZipFile.java:149)
at java.util.jar.JarFile.(JarFile.java:166)
at java.util.jar.JarFile.(JarFile.java:130)
at 
org.apache.tomcat.util.scan.JarFileUrlJar.(JarFileUrlJar.java:60)
at 
org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:48)
at
org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:334)
at
org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:284)
at org.apache.jasper.servlet.TldScanner.scanJars(TldScanner.java:262)
at org.apache.jasper.servlet.TldScanner.scan(TldScanner.java:106)
at
org.apache.jasper.servlet.JasperInitializer.onStartup(JasperInitializer.java:101)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

What is weird is that it is looking for the commons-io artifact in a
totally wrong repo group. The project was setup by Eclipse's Maven plugin
(import maven project), and commons-io is indeed part of the project's
Maven dependencies, but in the correct location. The correct commons-io is
also scanned, but somehow 30ish of those incorrect permutations of group
and artifact id are also scanned.

Now these are warnings, so no fuss, but still strange?


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



Multiple directories under /WEB-INF/classes

2017-01-13 Thread Tom Eugelink
I'm trying to migrate a very old ANT based project into the future, the
ANT scripts I inherited are (of course) very complex, so I need to make
babysteps. The first thing I did was compile the Java code with Maven and
thus replaced a lot of copy statements and checked in lib directories with
dependencies. This is working fine, but it also means that there is no
single directory anymore where all the classfiles, jars, configuration
files, etc are copied to. So now I need a way to start Tomcat for
developers using (still) separated directories.

The best approach seemed like to start Tomcat embedded, this also allows
me to use it for running cucumber and integration tests against. The thing
is I cannot get it to work, even after searching google, stackoverflow and
reading the Tomcat (8.0.39) configuration guides for 2 days. It should, I
would not mind if it did, but it does not.

To begin I have a maven project with:
- classes in target/classes
- web files in webapps
- configuration files in /somewhere/outside/the/project/cfg

This what I have so far:
StandardContext standardContext =
(StandardContext)tomcat.addWebapp("/myapp,
"/path/to/maven/project/webapps);
standardContext.setCrossContext(true);
standardContext.addParameter("SomeOwnFramework.Home",
"/somewhere/outside/the/project");
standardContext.addParameter("SomeOwnFramework.ContainerName",
"MijnCaress Backend Container");

standardContext.addParameter("SomeOwnFramework.XmlConfigurationFile",
"/somewhere/outside/the/project/cfg/Framework-backend.xml");

standardContext.getNamingResources().addResource(createJdbcResource());
// returns a
org.apache.tomcat.util.descriptor.web.ContextResource

org.apache.catalina.webresources.StandardRoot standardRoot = new
org.apache.catalina.webresources.StandardRoot(standardContext);
standardRoot.setCachingAllowed(true);
standardRoot.setCacheMaxSize(10);
// add classes
standardRoot.addPreResources(new
org.apache.catalina.webresources.DirResourceSet(standardRoot,
"/WEB-INF/classes", new File("target/classes").getAbsolutePath(),
"/"));
// add configuration files
standardRoot.addPostResources(new
org.apache.catalina.webresources.DirResourceSet(standardRoot,
"/WEB-INF/classes", new
File("/somewhere/outside/the/project/cfg").getAbsolutePath(),
"/"));
standardContext.setResources(standardRoot);

This ends with a ClassNotFoundException on a class that is in
target/classes, also if I remove the configuration files resource.
The target/classes absolute path is correct, exists and contains the class.

It would be great to get some pointers on why this is not working.

Tom


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



Web sockets - issue with proxy handling

2017-01-13 Thread Svetlin Zarev
Hi all!

Recently I stumbled in a possible bug in WsWebSocketContainer. When
connecting to server, if the authority in the URI does not contain the
remote port, the proxy rejects the connection. In WsWebSocketContainer the
port is determined based on WS/WSS when constructing the InetSocketAddress
for non-proxied communication. But when using proxy, the WS/WSS scheme is
ignored and the CONNECT request looks like:

CONNECT gmail.com HTTP/1.1

So the proxy does not know to which port to open a tunnel. And as a result
connectToServer() fails with DeploymentException due to the proxy rejecting
the connect request.

Patch proposed: https://github.com/apache/tomcat/pull/39
What do you think ?

Best regards,
Svetlin


Re: FW: tomcat 8080 thread not reduced

2017-01-13 Thread tomcat

On 13.01.2017 09:38, smith wrote:





From: smith [mailto:smith@zoom.us]
Sent: Tuesday, January 10, 2017 9:57 AM
To: 'users'
Subject: tomcat 8080 thread not reduced



Hi,



We have installed Apache Tomcat/8.0.14, and found that after one period of 
time, the thread count for 8080(our port published) goes to 120 and never 
reduced even the busy count is only 3-4.

Why? Tomcat8 not reduced the thread pool even the thread is idle, and the 
minSpareThreads for tomcat8 default is only 10.

When will the thread reduce?





Best regards

Smith




Hi.

Please copy/paste your complete server.xml configuration file (confidential things 
removed), so that we could have a useful look at it.
Please edit *only* the confidential things, not entire sections. Often, the issue is in 
the details.




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



Re: Error 404 - The requested resource is not available

2017-01-13 Thread Christoph Nenning
> From: Torsten Krah 
> To: users@tomcat.apache.org, 
> Date: 13.01.2017 08:56
> Subject: Re: Error 404 - The requested resource is not available
> 
> Am Donnerstag, den 12.01.2017, 13:38 -0600 schrieb fonsin2008 .:
> > Here are the  log files.
> 
> What about fixing those NPE and enable debug/trace logs of struts2 to
> get more information about how struts is going to map the request and
> where the 404 is written to the response.
> 
> 

Yes, the NPE happens in application code so you have to ask developers of 
that app.


Regards,
Christoph

This Email was scanned by Sophos Anti Virus


FW: tomcat 8080 thread not reduced

2017-01-13 Thread smith
 

 

From: smith [mailto:smith@zoom.us] 
Sent: Tuesday, January 10, 2017 9:57 AM
To: 'users'
Subject: tomcat 8080 thread not reduced

 

Hi,

 

We have installed Apache Tomcat/8.0.14, and found that after one period of 
time, the thread count for 8080(our port published) goes to 120 and never 
reduced even the busy count is only 3-4. 

Why? Tomcat8 not reduced the thread pool even the thread is idle, and the 
minSpareThreads for tomcat8 default is only 10.

When will the thread reduce?

 

 

Best regards

Smith