Re: Tomcat error at run-time.

2018-08-03 Thread noel joseph
Thanks Luis. Will definitely try it.

On Fri, Aug 3, 2018 at 2:23 PM, Luis Rodríguez Fernández 
wrote:

> Hello Noel,
>
> mmm, perhaps you could consider to use spring-boot for this. It provides a
> nice out-of-the-box embedded tomcat:
> https://spring.io/blog/2014/03/07/deploying-spring-boot-applications
>
> Hope it helps,
>
> Luis
>
> 2018-08-03 7:06 GMT+02:00 noel joseph :
>
> > Hey Chris,
> >
> > This is my code...
> >
> > package com.TomCat.EmbTC;
> >
> > import java.io.File;
> > import javax.servlet.ServletException;
> > import org.apache.catalina.LifecycleException;
> > import org.apache.catalina.startup.Tomcat;
> >
> > public class App {
> >  public static void main(String[] args) throws LifecycleException,
> > InterruptedException,
> >  ServletException {
> >   String docBase = "src/main/webapp/";
> >
> >   Tomcat tomcat = new Tomcat();
> >   String webPort = System.getenv("PORT");
> > if(webPort == null || webPort.isEmpty()) {
> > webPort = "8111";
> > }
> > tomcat.setPort(Integer.valueOf(webPort));
> >
> >   tomcat.addWebapp("/", new File(docBase).getAbsolutePath());
> >System.out.println("configuring app with basedir: " + new File("./" +
> > docBase).getAbsolutePath());
> >
> >   tomcat.start();
> >   tomcat.getServer().await();
> >
> >  }
> > }
> >
> > and this is my pom.xml file
> > http://maven.apache.org/POM/4.0.0"; xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance";
> >   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> > http://maven.apache.org/maven-v4_0_0.xsd";>
> >   4.0.0
> >   com.TomCat
> >   EmbTC
> >   jar
> >   0.0.1-SNAPSHOT
> >   EmbTC Maven Webapp
> >   http://maven.apache.org
> > 
> > UTF-8 sourceEncoding>
> > 1.8
> > 1.8
> > 8.5.5
> > 
> >
> >   
> > 
> >   junit
> >   junit
> >   3.8.1
> >   test
> > 
> >
> > 
> > commons-logging
> > commons-logging
> > 1.2
> > 
> > 
> > org.apache.tomcat.embed
> > tomcat-embed-core
> > ${tomcat.version}
> > 
> >
> > 
> > org.apache.tomcat
> > tomcat-jasper
> > ${tomcat.version}
> > 
> >
> > 
> > org.apache.tomcat
> > tomcat-jasper-el
> > ${tomcat.version}
> > 
> >
> > 
> > org.apache.tomcat
> > tomcat-jsp-api
> > ${tomcat.version}
> > 
> >   
> >   
> >  EmbTC
> >   
> > 
> >
> >
> > I am not making use of a web.xml file.
> > This codes running perfectly on eclipse when run, depolying a tomcat
> server
> > as expected.
> > But when i convert into a jar and run it as a jnlp file i get the
> error...
> >
> > org.apache.catalina.LifecycleException: A child container failed during
> > start
> > at
> > org.apache.catalina.core.ContainerBase.startInternal(
> > ContainerBase.java:947)
> > at
> > org.apache.catalina.core.StandardEngine.startInternal(
> > StandardEngine.java:262)
> > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> > at
> > org.apache.catalina.core.StandardService.startInternal(
> > StandardService.java:422)
> > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> > at
> > org.apache.catalina.core.StandardServer.startInternal(
> > StandardServer.java:793)
> > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> > at org.apache.catalina.startup.Tomcat.start(Tomcat.java:344)
> > at com.TomCat.EmbTC.App.main(App.java:23)
> > 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 com.sun.javaws.Launcher.executeApplication(Unknown Source)
> > at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
> > at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
> > at com.sun.javaws.Launcher.run(Unknown Source)
> > at java.lang.Thread.run(Unknown Source)
> >
> > Please let me know what's the problem with my code.
> >
> > Thanks,
> > Noel
> >
>
>
>
> --
>
> "Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better."
>
> - Samuel Beckett
>


Re: Tomcat error at run-time.

2018-08-03 Thread Luis Rodríguez Fernández
Hello Noel,

mmm, perhaps you could consider to use spring-boot for this. It provides a
nice out-of-the-box embedded tomcat:
https://spring.io/blog/2014/03/07/deploying-spring-boot-applications

Hope it helps,

Luis

2018-08-03 7:06 GMT+02:00 noel joseph :

> Hey Chris,
>
> This is my code...
>
> package com.TomCat.EmbTC;
>
> import java.io.File;
> import javax.servlet.ServletException;
> import org.apache.catalina.LifecycleException;
> import org.apache.catalina.startup.Tomcat;
>
> public class App {
>  public static void main(String[] args) throws LifecycleException,
> InterruptedException,
>  ServletException {
>   String docBase = "src/main/webapp/";
>
>   Tomcat tomcat = new Tomcat();
>   String webPort = System.getenv("PORT");
> if(webPort == null || webPort.isEmpty()) {
> webPort = "8111";
> }
> tomcat.setPort(Integer.valueOf(webPort));
>
>   tomcat.addWebapp("/", new File(docBase).getAbsolutePath());
>System.out.println("configuring app with basedir: " + new File("./" +
> docBase).getAbsolutePath());
>
>   tomcat.start();
>   tomcat.getServer().await();
>
>  }
> }
>
> and this is my pom.xml file
> http://maven.apache.org/POM/4.0.0"; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance";
>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd";>
>   4.0.0
>   com.TomCat
>   EmbTC
>   jar
>   0.0.1-SNAPSHOT
>   EmbTC Maven Webapp
>   http://maven.apache.org
> 
> UTF-8
> 1.8
> 1.8
> 8.5.5
> 
>
>   
> 
>   junit
>   junit
>   3.8.1
>   test
> 
>
> 
> commons-logging
> commons-logging
> 1.2
> 
> 
> org.apache.tomcat.embed
> tomcat-embed-core
> ${tomcat.version}
> 
>
> 
> org.apache.tomcat
> tomcat-jasper
> ${tomcat.version}
> 
>
> 
> org.apache.tomcat
> tomcat-jasper-el
> ${tomcat.version}
> 
>
> 
> org.apache.tomcat
> tomcat-jsp-api
> ${tomcat.version}
> 
>   
>   
>  EmbTC
>   
> 
>
>
> I am not making use of a web.xml file.
> This codes running perfectly on eclipse when run, depolying a tomcat server
> as expected.
> But when i convert into a jar and run it as a jnlp file i get the error...
>
> org.apache.catalina.LifecycleException: A child container failed during
> start
> at
> org.apache.catalina.core.ContainerBase.startInternal(
> ContainerBase.java:947)
> at
> org.apache.catalina.core.StandardEngine.startInternal(
> StandardEngine.java:262)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> at
> org.apache.catalina.core.StandardService.startInternal(
> StandardService.java:422)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> at
> org.apache.catalina.core.StandardServer.startInternal(
> StandardServer.java:793)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> at org.apache.catalina.startup.Tomcat.start(Tomcat.java:344)
> at com.TomCat.EmbTC.App.main(App.java:23)
> 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 com.sun.javaws.Launcher.executeApplication(Unknown Source)
> at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
> at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
> at com.sun.javaws.Launcher.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
>
> Please let me know what's the problem with my code.
>
> Thanks,
> Noel
>



-- 

"Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better."

- Samuel Beckett


Re: Tomcat error at run-time.

2018-08-02 Thread noel joseph
Hey Chris,

This is my code...

package com.TomCat.EmbTC;

import java.io.File;
import javax.servlet.ServletException;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.startup.Tomcat;

public class App {
 public static void main(String[] args) throws LifecycleException,
InterruptedException,
 ServletException {
  String docBase = "src/main/webapp/";

  Tomcat tomcat = new Tomcat();
  String webPort = System.getenv("PORT");
if(webPort == null || webPort.isEmpty()) {
webPort = "8111";
}
tomcat.setPort(Integer.valueOf(webPort));

  tomcat.addWebapp("/", new File(docBase).getAbsolutePath());
   System.out.println("configuring app with basedir: " + new File("./" +
docBase).getAbsolutePath());

  tomcat.start();
  tomcat.getServer().await();

 }
}

and this is my pom.xml file
http://maven.apache.org/POM/4.0.0"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd";>
  4.0.0
  com.TomCat
  EmbTC
  jar
  0.0.1-SNAPSHOT
  EmbTC Maven Webapp
  http://maven.apache.org

UTF-8
1.8
1.8
8.5.5


  

  junit
  junit
  3.8.1
  test



commons-logging
commons-logging
1.2


org.apache.tomcat.embed
tomcat-embed-core
${tomcat.version}



org.apache.tomcat
tomcat-jasper
${tomcat.version}



org.apache.tomcat
tomcat-jasper-el
${tomcat.version}



org.apache.tomcat
tomcat-jsp-api
${tomcat.version}

  
  
 EmbTC
  



I am not making use of a web.xml file.
This codes running perfectly on eclipse when run, depolying a tomcat server
as expected.
But when i convert into a jar and run it as a jnlp file i get the error...

org.apache.catalina.LifecycleException: A child container failed during
start
at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:947)
at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.startup.Tomcat.start(Tomcat.java:344)
at com.TomCat.EmbTC.App.main(App.java:23)
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 com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Please let me know what's the problem with my code.

Thanks,
Noel


Re: Tomcat error at run-time.

2018-08-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Noel,

On 8/1/18 1:13 AM, noel joseph wrote:
> Hey Chris, I am having a little difficulty in logging. As mentioned
> before I am new to tomcat and don't exactly know how to enable
> logging. Could you please instruct me on how to do so.

Can you post your code for how to launch Tomcat from within your
application? Basically, your use of the Tomcat class.

- -chris

> On Tue, Jul 31, 2018 at 7:49 PM, noel joseph
>  wrote:
> 
>> Thank you so much Cris I will try your methods and let you know
>> off the results. Thanks for the quick response!
>> 
>> Cheers Noel
>> 
>> On Tue, Jul 31, 2018, 6:44 PM Christopher Schultz < 
>> ch...@christopherschultz.net> wrote:
>> 
> Noel,
> 
> On 7/31/18 2:54 AM, noel joseph wrote:
> Hi, I am rather new to tomcat, I've been trying to embed
> tomcat in a java application. I further want to convert
> this into a java web start file so that on deploying it I
> can have a separate tomcat server for my application. The
> error I am facing is... 
> org.apache.catalina.LifecycleException: A child container
> failed during start.
> 
> A "child container" usually ends up being something like an 
> application. Do you have any logging enabled? If so, what does the
> log say? If not, try enabling logging and then checking the log.
> Tomcat is usually pretty verbose about what happened and what it
> happened to.
> 
> I tried a couple of methods to solve it but with no use,
> the error still stays. I am using embedded tomcat 8.5.23, I
> changed it to the latest tomcat 9.0.10 which fixed the
> error but then the server didn't start. it just stops at..
> WARNING: Creation of secureRandom insatnce.
> 
> If you are hanging on creating SecureRandom, your server (or 
> workstation) might have run out of cryptographic entropy. This can 
> happen when you restart a server like Tomcat too rapidly and the
> OS doesn't have enough time to re-fill the entropy pool.
> 
> Can you take a thread dump[1] of the running process the next time 
> this stalls, just to be sure?
> 
> By reverting back to tomcat 8.5.23 this was solved but
> again I'm facing the child container failed error.
> 
> Please let me know if there is a fix to my issue or if
> there is a better version of tomcat that I can use.
> 
> The problem is likely with a component of your application. Logs
> will help discover the root of the problem.
> 
> The decision to use Tomcat 8.5 or Tomcat 9.0 has more to do with
> your risk-aversion. Both versions are still under active
> development, but Tomcat 8.5 is more mature and stable (from a code
> perspective, not that it is any more reliable than 9.0). Both
> versions should be maintained for the next few years.
> 
> Hope that helps, -chris
> 
> [1] 
> https://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_
my
>
> 
_running_webapp_.3F
>>> 
>>> 
- -
>>>
>>> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>> 
>>> 
> 
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlth5hQACgkQHPApP6U8
pFhpZRAAvdbq6qZbew+Yn7XTk07P70/IZ9zi11f2Sz4+ZOH6XPC81fGEuQGwuwXZ
fLtzbP7JiXoN9lzq0rPBsN8Kq7PM58umiy5uT/ygOW0B+ehnymC7Ud3CYAvhZBkW
r+cqrqOnhYt+lvEOGgADl4O/4y2kzFSIFpNFXMLXp3zVDpGgZJJU96dXhx2G1TA2
f8px3uanQt3JOggrf3+pxxkmvyRshWumDgFplUvkxPUEhFFpgxiO1fUZUu9AOCQU
Wgh5/Rr+7qn1KwJFWxFO4fAqQFJxIMFGNElDqH8wuTfqacyvKMulw8YCcdNdbwBv
/WyBzz1K33D9X8SMtSJ5RBKGpLdDESFrmJieGWqnQd6C7VMDoJMJilGfsrCOVP8f
zq0EOMWrHOLYOYxAc+ij85RtDTDZF/TTkF6dwd/2RNX+gVxOSnN0/azR7AUKsgbf
GYYplGmuUNRLUPEHb3uKkE3k15iys4MQKySaHO3eGphEbTGX4OeYOblghV8/eRih
RO90QKShvczGFw/lHMi3Lj3Az3NeUwqpems1kGPti/cxVR/ZxJRwYuJ3jlns1fg9
OZKRbRYrucXVWOrdwkyZhhMIpn9KoT+sryoJtJuRqLWB/GzGpb3iqHh2Pt+22apn
J58mh9ur7fEgRSnId8kxU+w4uwfmavQMuI3v7jJA7Ian5yxdAAY=
=nowB
-END PGP SIGNATURE-

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



Re: Tomcat error at run-time.

2018-07-31 Thread noel joseph
Hey Chris,
 I am having a little difficulty in logging. As mentioned before I am new
to tomcat and don't exactly know how to enable logging.
Could you please instruct me on how to do so.

Thanks,
Noel

On Tue, Jul 31, 2018 at 7:49 PM, noel joseph  wrote:

> Thank you so much Cris I will try your methods and let you know off the
> results. Thanks for the quick response!
>
> Cheers
> Noel
>
> On Tue, Jul 31, 2018, 6:44 PM Christopher Schultz <
> ch...@christopherschultz.net> wrote:
>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA256
>>
>> Noel,
>>
>> On 7/31/18 2:54 AM, noel joseph wrote:
>> > Hi, I am rather new to tomcat, I've been trying to embed tomcat in
>> > a java application. I further want to convert this into a java web
>> > start file so that on deploying it I can have a separate tomcat
>> > server for my application. The error I am facing is...
>> > org.apache.catalina.LifecycleException: A child container failed
>> > during start.
>>
>> A "child container" usually ends up being something like an
>> application. Do you have any logging enabled? If so, what does the log
>> say? If not, try enabling logging and then checking the log. Tomcat is
>> usually pretty verbose about what happened and what it happened to.
>>
>> > I tried a couple of methods to solve it but with no use, the error
>> > still stays. I am using embedded tomcat 8.5.23, I changed it to the
>> > latest tomcat 9.0.10 which fixed the error but then the server
>> > didn't start. it just stops at.. WARNING: Creation of secureRandom
>> > insatnce.
>>
>> If you are hanging on creating SecureRandom, your server (or
>> workstation) might have run out of cryptographic entropy. This can
>> happen when you restart a server like Tomcat too rapidly and the OS
>> doesn't have enough time to re-fill the entropy pool.
>>
>> Can you take a thread dump[1] of the running process the next time
>> this stalls, just to be sure?
>>
>> > By reverting back to tomcat 8.5.23 this was solved but again I'm
>> > facing the child container failed error.
>> >
>> > Please let me know if there is a fix to my issue or if there is a
>> > better version of tomcat that I can use.
>>
>> The problem is likely with a component of your application. Logs will
>> help discover the root of the problem.
>>
>> The decision to use Tomcat 8.5 or Tomcat 9.0 has more to do with your
>> risk-aversion. Both versions are still under active development, but
>> Tomcat 8.5 is more mature and stable (from a code perspective, not
>> that it is any more reliable than 9.0). Both versions should be
>> maintained for the next few years.
>>
>> Hope that helps,
>> - -chris
>>
>> [1]
>> https://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my
>> _running_webapp_.3F
>> -BEGIN PGP SIGNATURE-
>> Comment: GPGTools - http://gpgtools.org
>> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>>
>> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAltgYMsACgkQHPApP6U8
>> pFiNlA//bg52WqByfHyAAEMep0a47ZIZ5Bn8D951/p6k5fht/G31ZlzLXXwYzlBk
>> Redx7Aozx2JG7C0mfPXKHxcr8TqxPcEFC4LDBPs+ywRNhIkGE+ZQtVfIS9+3Wmz1
>> aKUsXiK0DYMiRHoHNY0V0G8Zt6sJNlT0MkFpAVbD3EcHm2vrw8T4G0+9lOslMe01
>> Pd172hZ+xE9zpouceFNFPHJVWldwSgxrXNvQOV0VdBVTME7BGMf6yWzJrMxLTNj6
>> z8EY501ZZd3awrva+JMRFnzQS4qS7dRBMgIP7qJ5S8LLH+OuWcJ99a1s1AAgX9hq
>> x+bsuOugiZITz/GAD8+lbTIfiGeZefIALyekYCEwBH8lgMAqlZRhGc+H/5UsFwiX
>> 1XEgDbaINHOrMWOBFJVAmT6b3pkSt/Rj2mnb0knYjRDVbcmkPyj3P1Px2opQjEkt
>> adCxpCQYGDQh/Ddy+q0nj7flAkIgGRwQi7jIfLUJRvE00N0QlTNGscbXr+lzbQCr
>> kh3xrvGsEWhiNluhZAosGmpwQPtcCByV4EBjNpvF4/p3mXEIOm/f+k9X816ian4B
>> nDJOyjwDhxVFNVfHR7tP991CMPuQnK1SZf8wRj2S91Un9E+QOrtxusAOQch96M0D
>> 4nKYH3vlduzaeqbdhSa5vAzsTVGffICl6PmowWeNGQ4I4c1vcBI=
>> =x/SS
>> -END PGP SIGNATURE-
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>


Re: Tomcat error at run-time.

2018-07-31 Thread noel joseph
Thank you so much Cris I will try your methods and let you know off the
results. Thanks for the quick response!

Cheers
Noel

On Tue, Jul 31, 2018, 6:44 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Noel,
>
> On 7/31/18 2:54 AM, noel joseph wrote:
> > Hi, I am rather new to tomcat, I've been trying to embed tomcat in
> > a java application. I further want to convert this into a java web
> > start file so that on deploying it I can have a separate tomcat
> > server for my application. The error I am facing is...
> > org.apache.catalina.LifecycleException: A child container failed
> > during start.
>
> A "child container" usually ends up being something like an
> application. Do you have any logging enabled? If so, what does the log
> say? If not, try enabling logging and then checking the log. Tomcat is
> usually pretty verbose about what happened and what it happened to.
>
> > I tried a couple of methods to solve it but with no use, the error
> > still stays. I am using embedded tomcat 8.5.23, I changed it to the
> > latest tomcat 9.0.10 which fixed the error but then the server
> > didn't start. it just stops at.. WARNING: Creation of secureRandom
> > insatnce.
>
> If you are hanging on creating SecureRandom, your server (or
> workstation) might have run out of cryptographic entropy. This can
> happen when you restart a server like Tomcat too rapidly and the OS
> doesn't have enough time to re-fill the entropy pool.
>
> Can you take a thread dump[1] of the running process the next time
> this stalls, just to be sure?
>
> > By reverting back to tomcat 8.5.23 this was solved but again I'm
> > facing the child container failed error.
> >
> > Please let me know if there is a fix to my issue or if there is a
> > better version of tomcat that I can use.
>
> The problem is likely with a component of your application. Logs will
> help discover the root of the problem.
>
> The decision to use Tomcat 8.5 or Tomcat 9.0 has more to do with your
> risk-aversion. Both versions are still under active development, but
> Tomcat 8.5 is more mature and stable (from a code perspective, not
> that it is any more reliable than 9.0). Both versions should be
> maintained for the next few years.
>
> Hope that helps,
> - -chris
>
> [1]
> https://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my
> _running_webapp_.3F
> -BEGIN PGP SIGNATURE-
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAltgYMsACgkQHPApP6U8
> pFiNlA//bg52WqByfHyAAEMep0a47ZIZ5Bn8D951/p6k5fht/G31ZlzLXXwYzlBk
> Redx7Aozx2JG7C0mfPXKHxcr8TqxPcEFC4LDBPs+ywRNhIkGE+ZQtVfIS9+3Wmz1
> aKUsXiK0DYMiRHoHNY0V0G8Zt6sJNlT0MkFpAVbD3EcHm2vrw8T4G0+9lOslMe01
> Pd172hZ+xE9zpouceFNFPHJVWldwSgxrXNvQOV0VdBVTME7BGMf6yWzJrMxLTNj6
> z8EY501ZZd3awrva+JMRFnzQS4qS7dRBMgIP7qJ5S8LLH+OuWcJ99a1s1AAgX9hq
> x+bsuOugiZITz/GAD8+lbTIfiGeZefIALyekYCEwBH8lgMAqlZRhGc+H/5UsFwiX
> 1XEgDbaINHOrMWOBFJVAmT6b3pkSt/Rj2mnb0knYjRDVbcmkPyj3P1Px2opQjEkt
> adCxpCQYGDQh/Ddy+q0nj7flAkIgGRwQi7jIfLUJRvE00N0QlTNGscbXr+lzbQCr
> kh3xrvGsEWhiNluhZAosGmpwQPtcCByV4EBjNpvF4/p3mXEIOm/f+k9X816ian4B
> nDJOyjwDhxVFNVfHR7tP991CMPuQnK1SZf8wRj2S91Un9E+QOrtxusAOQch96M0D
> 4nKYH3vlduzaeqbdhSa5vAzsTVGffICl6PmowWeNGQ4I4c1vcBI=
> =x/SS
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat error at run-time.

2018-07-31 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Noel,

On 7/31/18 2:54 AM, noel joseph wrote:
> Hi, I am rather new to tomcat, I've been trying to embed tomcat in
> a java application. I further want to convert this into a java web
> start file so that on deploying it I can have a separate tomcat
> server for my application. The error I am facing is... 
> org.apache.catalina.LifecycleException: A child container failed
> during start.

A "child container" usually ends up being something like an
application. Do you have any logging enabled? If so, what does the log
say? If not, try enabling logging and then checking the log. Tomcat is
usually pretty verbose about what happened and what it happened to.

> I tried a couple of methods to solve it but with no use, the error
> still stays. I am using embedded tomcat 8.5.23, I changed it to the
> latest tomcat 9.0.10 which fixed the error but then the server
> didn't start. it just stops at.. WARNING: Creation of secureRandom
> insatnce.

If you are hanging on creating SecureRandom, your server (or
workstation) might have run out of cryptographic entropy. This can
happen when you restart a server like Tomcat too rapidly and the OS
doesn't have enough time to re-fill the entropy pool.

Can you take a thread dump[1] of the running process the next time
this stalls, just to be sure?

> By reverting back to tomcat 8.5.23 this was solved but again I'm
> facing the child container failed error.
> 
> Please let me know if there is a fix to my issue or if there is a
> better version of tomcat that I can use.

The problem is likely with a component of your application. Logs will
help discover the root of the problem.

The decision to use Tomcat 8.5 or Tomcat 9.0 has more to do with your
risk-aversion. Both versions are still under active development, but
Tomcat 8.5 is more mature and stable (from a code perspective, not
that it is any more reliable than 9.0). Both versions should be
maintained for the next few years.

Hope that helps,
- -chris

[1]
https://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my
_running_webapp_.3F
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAltgYMsACgkQHPApP6U8
pFiNlA//bg52WqByfHyAAEMep0a47ZIZ5Bn8D951/p6k5fht/G31ZlzLXXwYzlBk
Redx7Aozx2JG7C0mfPXKHxcr8TqxPcEFC4LDBPs+ywRNhIkGE+ZQtVfIS9+3Wmz1
aKUsXiK0DYMiRHoHNY0V0G8Zt6sJNlT0MkFpAVbD3EcHm2vrw8T4G0+9lOslMe01
Pd172hZ+xE9zpouceFNFPHJVWldwSgxrXNvQOV0VdBVTME7BGMf6yWzJrMxLTNj6
z8EY501ZZd3awrva+JMRFnzQS4qS7dRBMgIP7qJ5S8LLH+OuWcJ99a1s1AAgX9hq
x+bsuOugiZITz/GAD8+lbTIfiGeZefIALyekYCEwBH8lgMAqlZRhGc+H/5UsFwiX
1XEgDbaINHOrMWOBFJVAmT6b3pkSt/Rj2mnb0knYjRDVbcmkPyj3P1Px2opQjEkt
adCxpCQYGDQh/Ddy+q0nj7flAkIgGRwQi7jIfLUJRvE00N0QlTNGscbXr+lzbQCr
kh3xrvGsEWhiNluhZAosGmpwQPtcCByV4EBjNpvF4/p3mXEIOm/f+k9X816ian4B
nDJOyjwDhxVFNVfHR7tP991CMPuQnK1SZf8wRj2S91Un9E+QOrtxusAOQch96M0D
4nKYH3vlduzaeqbdhSa5vAzsTVGffICl6PmowWeNGQ4I4c1vcBI=
=x/SS
-END PGP SIGNATURE-

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



Tomcat error at run-time.

2018-07-30 Thread noel joseph
Hi, I am rather new to tomcat, I've been trying to embed tomcat in a java
application.
I further want to convert this into a java web start file so that on
deploying it I can have a separate tomcat server for my application.
The error I am facing is...
   org.apache.catalina.LifecycleException: A child container failed during
start.

I tried a couple of methods to solve it but with no use, the error still
stays.
I am using embedded tomcat 8.5.23, I changed it to the latest tomcat 9.0.10
which fixed the error but then the server didn't start. it just stops at..
WARNING: Creation of secureRandom insatnce.
By reverting back to tomcat 8.5.23 this was solved but again I'm facing the
child container failed error.

Please let me know if there is a fix to my issue or if there is a better
version of tomcat that I can use.

Thanks,
Noel