open shift war deployment error - java

getting below error when deploying war to openshift using git command..i was able to deploy correctly earlier but not sure what happened and now not able to deploy and getting this error..in local i am able to run the same wat correctly.
Sep 25, 2014 12:59:53 PM org.apache.catalina.startup.Catalina addClusterRuleSet
INFO: Cluster RuleSet not found due to [java.lang.ClassNotFoundException: org.apache.catalina.ha.ClusterRuleSet]. Cluster configuration disabled.
Sep 25, 2014 12:59:53 PM org.apache.catalina.startup.Catalina addClusterRuleSetINFO: Cluster RuleSet not found due to [java.lang.ClassNotFoundException: org.ap
ache.catalina.ha.ClusterRuleSet]. Cluster configuration disabled.
Sep 25, 2014 12:59:54 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /opt/rh/mysql55/root/usr/lib64:/usr/java/packages/lib/i386:/lib:/usr/lib
Sep 25, 2014 12:59:55 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-127.3.114.129-8080"]
Sep 25, 2014 12:59:55 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2841 ms
Sep 25, 2014 12:59:56 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 25, 2014 12:59:56 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.54
Sep 25, 2014 12:59:56 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /var/lib/openshift/53579b125004465e18000995/app-root/runtime/dependencies/jbossews/webapps/abc.war
Sep 25, 2014 1:00:56 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Sep 25, 2014 1:00:56 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [] startup failed due to previous errors
Sep 25, 2014 1:00:56 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /var/lib/openshift/53579b125004465e18000995/app-root/runtime/dependencies/jbossews/webapps/ROOT.war has finished in
8,534 ms
Sep 25, 2014 1:00:56 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-127.3.114.129-8080"]
Sep 25, 2014 1:00:56 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 60436 ms

Looks like an exception is being thrown from your application. Is this the catalina.out log? How are you deploying the application (via IDE or?).

Related

Changing Server Settings and Adding New Files Are Not Detected in Tomcat

I was trying to learn how to use servlet by following the tutorial in this page:
https://www.ntu.edu.sg/home/ehchua/programming/howto/Tomcat_HowTo.html
When I reached 2.6 STEP 5: Develop and Deploy a WebApp, I was told to restart tomcat so that it'll load the directory I just made. However, the changes I made was not loaded, the assigned port is still 8080 even though I assigned it to 9999 and the hello directory was not found. Here are the messages when I issued startup.bat:
Apr 26, 2019 5:32:04 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.2.21 using APR version 1.6.5.
Apr 26, 2019 5:32:04 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Apr 26, 2019 5:32:04 PM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized (OpenSSL 1.1.1a 20 Nov 2018)
Apr 26, 2019 5:32:04 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-8080"]
Apr 26, 2019 5:32:04 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
Apr 26, 2019 5:32:04 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 494 ms
Apr 26, 2019 5:32:04 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Apr 26, 2019 5:32:04 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.47
Apr 26, 2019 5:32:04 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory G:\Tomcat 2\webapps\docs
Apr 26, 2019 5:32:05 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [146] milliseconds.
Apr 26, 2019 5:32:05 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory G:\Tomcat 2\webapps\examples
Apr 26, 2019 5:32:05 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory G:\Tomcat 2\webapps\host-manager
Apr 26, 2019 5:32:05 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory G:\Tomcat 2\webapps\manager
Apr 26, 2019 5:32:05 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory G:\Tomcat 2\webapps\ROOT
Apr 26, 2019 5:32:05 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-8080"]
Apr 26, 2019 5:32:05 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-apr-8009"]
Apr 26, 2019 5:32:05 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1092 ms
As you can see, the hello directory was not deployed. So, what is exactly happening here?
I just realized that when I issued the startup & shutdown command that there was an information in the console which looked like this:
Using CLASSPATH: "G:\Learning\tomcat9\bin\bootstrap.jar;G:\Learning\tomcat9\bin\tomcat-juli.jar"
It seemed that my classpath was pointing to the wrong path. I deleted CATALINA_HOME in the environment variable settings, and now it is working fine.

ClassNotFoundException while Deploying Application on Tomcat

I am getting ClassNotFoundException while deploying my application on the Tomcat. The class is in the package without any compilation errors. This class actually initializes the application. I have cleaned the project, updated Maven dependencies but no affect. Deployment Assembly has been configured to put all the jars in Web/Inf/lib folder. I am not sure what is causing this error.
Stack trace:
Feb 25, 2016 9:45:56 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.8.0_51\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files (x86)/Java/jre1.8.0_66/bin/client;C:/Program Files (x86)/Java/jre1.8.0_66/bin;C:/Program Files (x86)/Java/jre1.8.0_66/lib/i386;C:\Program Files (x86)\IBM\RationalSDLC\common;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Enterprise Vault\EVClient\;C:\Program Files (x86)\IBM\RationalSDLC\ClearCase\bin;C:\Dev\apache-maven-3.2.3-bin\apache-maven-3.2.3\bin;C:\Program Files (x86)\Java\jre1.8.0_66\bin;C:\Dev\apache-maven-3.2.3-bin\apache-maven-3.2.3\bin;;C:\Dev\sts-3.6.1.RELEASE;;.
Feb 25, 2016 9:45:56 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:VINUISupportApp' did not find a matching property.
Feb 25, 2016 9:45:56 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Feb 25, 2016 9:45:56 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Feb 25, 2016 9:45:56 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 805 ms
Feb 25, 2016 9:45:56 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Feb 25, 2016 9:45:56 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.47
Feb 25, 2016 9:45:58 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\Dev\EIS_V5\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\VINUISupportApp\WEB-INF\lib\servlet-api-2.2.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Feb 25, 2016 9:46:03 AM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Feb 25, 2016 9:46:03 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class mig.vinadmin.StartupListener
java.lang.ClassNotFoundException: mig.vinadmin.StartupListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:532)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:514)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:142)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4854)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
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)
Feb 25, 2016 9:46:03 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
Feb 25, 2016 9:46:03 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Feb 25, 2016 9:46:03 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/EISSupportTools] startup failed due to previous errors
Feb 25, 2016 9:46:03 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Feb 25, 2016 9:46:03 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Feb 25, 2016 9:46:03 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 6879 ms
Any help would be appreciated.
Thanks,

FAIL - Application at context path /Healthlink could not be started [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I want to deploy it with the .war file generated by netbeans in Windows, my project is a web app, and I want to run in in LINUX (LUBUNTU), but I can't start it. I'm using the manager-gui.
Please help me with this error. I'm new in linux.
Sep 18, 2013 12:01:45 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/i386:/lib:/usr/lib
Sep 18, 2013 12:01:46 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Sep 18, 2013 12:01:47 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Sep 18, 2013 12:01:47 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3021 ms
Sep 18, 2013 12:01:47 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 18, 2013 12:01:47 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.42
Sep 18, 2013 12:01:47 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /usr/tomcat/apache-tomcat-7.0.42/webapps/Healthlink.war
Sep 18, 2013 12:01:52 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Sep 18, 2013 12:01:52 AM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [147] milliseconds.
Sep 18, 2013 12:01:52 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/Healthlink] startup failed due to previous errors
Sep 18, 2013 12:01:52 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/Healthlink] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Sep 18, 2013 12:01:53 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/host-manager
Sep 18, 2013 12:01:53 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/ROOT
Sep 18, 2013 12:01:53 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/examples
Sep 18, 2013 12:01:53 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/docs
Sep 18, 2013 12:01:54 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/manager
Sep 18, 2013 12:01:54 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Sep 18, 2013 12:01:54 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Sep 18, 2013 12:01:54 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 7183 ms
Sep 18, 2013 12:03:32 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/i386:/lib:/usr/lib
Sep 18, 2013 12:03:34 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Sep 18, 2013 12:03:34 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Sep 18, 2013 12:03:34 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 4193 ms
Sep 18, 2013 12:03:35 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 18, 2013 12:03:35 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.42
Sep 18, 2013 12:03:35 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /usr/tomcat/apache-tomcat-7.0.42/webapps/Healthlink.war
Sep 18, 2013 12:03:40 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Sep 18, 2013 12:03:51 AM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [10,839] milliseconds.
Sep 18, 2013 12:03:51 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/Healthlink] startup failed due to previous errors
Sep 18, 2013 12:03:51 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/Healthlink] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Sep 18, 2013 12:03:51 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/host-manager
Sep 18, 2013 12:03:51 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/ROOT
Sep 18, 2013 12:03:52 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/examples
Sep 18, 2013 12:03:52 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/docs
Sep 18, 2013 12:03:52 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/manager
Sep 18, 2013 12:03:52 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Sep 18, 2013 12:03:52 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Sep 18, 2013 12:03:52 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 17665 ms
Sep 18, 2013 12:04:09 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Sep 18, 2013 12:04:09 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/Healthlink] startup failed due to previous errors
Sep 18, 2013 12:04:09 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/Healthlink] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Sep 18, 2013 12:06:33 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/i386:/lib:/usr/lib
Sep 18, 2013 12:06:36 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Sep 18, 2013 12:06:36 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Sep 18, 2013 12:06:36 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 5065 ms
Sep 18, 2013 12:06:36 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 18, 2013 12:06:36 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.42
Sep 18, 2013 12:06:36 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /usr/tomcat/apache-tomcat-7.0.42/webapps/Healthlink.war
Sep 18, 2013 12:06:42 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Sep 18, 2013 12:06:42 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/Healthlink] startup failed due to previous errors
Sep 18, 2013 12:06:42 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/Healthlink] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Sep 18, 2013 12:06:42 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/host-manager
Sep 18, 2013 12:06:42 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/ROOT
Sep 18, 2013 12:06:43 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/examples
Sep 18, 2013 12:06:43 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/docs
Sep 18, 2013 12:06:43 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/tomcat/apache-tomcat-7.0.42/webapps/manager
Sep 18, 2013 12:06:43 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Sep 18, 2013 12:06:43 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Sep 18, 2013 12:06:43 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 7305 ms
Here's the most important line of your overzealously long (and repeated) log:
SEVERE: Error listenerStart
This basically means that a ServletContextListener implementation which is registered by either a #WebListener annotation on the class or a <listener> entry in web.xml has thrown an unhandled exception inside the contextInitialized() method. This is usually caused by a developer's mistake (a bug) and needs to be fixed. For example, a NullPointerException.
If you can't figure the cause by just staring at or unit-testing the code inside contextInitialized() method, then you'd need to create a logging.properties file in project's src folder (there where you have your Java classes; it should at least ultimately end up in /WEB-INF/classes folder of the built WAR) with the following contents:
org.apache.catalina.core.ContainerBase.[Catalina].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].handlers = java.util.logging.ConsoleHandler
This will tell Tomcat to log exceptions during starting of listeners (and filters) to the console.

Eclipse is reading Apache Catalina output from standard error

Based on the color of my Eclipse console, it seems as though it's outputting standard console messages to the Standard Error buffer. Why does it do this? And, more importantly, is there a way to change this so that it works properly to make debugging simpler?
May 14, 2013 4:44:12 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;.
May 14, 2013 4:44:12 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
May 14, 2013 4:44:12 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
May 14, 2013 4:44:12 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 681 ms
May 14, 2013 4:44:12 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
May 14, 2013 4:44:12 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.30
May 14, 2013 4:44:13 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
May 14, 2013 4:44:13 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
May 14, 2013 4:44:13 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 396 ms

cargo java api to start tomcat; the container is not coming up

I am trying to start tomcat using cargo api. Everything looks fine from the logs, but when i hit the url(http://localhost:8079/), the tomcat management page is not coming up.
Update: I tried starting tomcat from eclipse. The logs say the exact same thing but i am not able to see the management console. so its not an issue with cargo for sure. I get a 404 when i start the server from eclipse .
the code is this
LocalConfiguration configuration = (LocalConfiguration) new DefaultConfigurationFactory().createConfiguration(
"tomcat6x", ContainerType.INSTALLED, ConfigurationType.STANDALONE);
InstalledLocalContainer container =
(InstalledLocalContainer) new DefaultContainerFactory().createContainer(
"tomcat6x", ContainerType.INSTALLED, configuration);
//container.setHome(installer.getHome());
//container.setHome("C:\\Users\\Kriss\\AppData\\Local\\Temp\\cargo\\installs\\apache-tomcat-7.0.25\\apache-tomcat-7.0.25");
container.setHome("C:\\TOSCA\\apache-tomcat-7.0.25-windows-x86\\apache-tomcat-7.0.25\\");
container.setOutput("C:\\TOSCA\\output.log");
//getting cargo related logging
container.setLogger(fileLogger);
//changing the log settings of the container
// configuration.setProperty(GeneralPropertySet.LOGGING, LoggingLevel.HIGH.getLevel());
configuration.setProperty("cargo.servlet.port", "8079");
logger.info(container.getOutput());
container.setAppend(false);
logger.info("gethome value is" + container.getHome());
// (3) Statically deploy some WAR (optional)
// configuration.addDeployable(new WAR("cargo.war"));
// (4) Start the container
container.start();
logger.info("Container is started");
Thread.sleep(26000);
container.stop();
logger.info("Container is stopped");
The logs look fine(atleast to me :P)
Apr 10, 2012 4:27:54 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [C:\Users\Kriss\AppData\Local\Temp\cargo\conf\common\classes], exists: [false], isDirectory: [false], canRead: [false]
Apr 10, 2012 4:27:54 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [C:\Users\Kriss\AppData\Local\Temp\cargo\conf\common\lib], exists: [false], isDirectory: [false], canRead: [false]
Apr 10, 2012 4:27:54 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [C:\Users\Kriss\AppData\Local\Temp\cargo\conf\shared\classes], exists: [false], isDirectory: [false], canRead: [false]
Apr 10, 2012 4:27:54 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [C:\Users\Kriss\AppData\Local\Temp\cargo\conf\shared\lib], exists: [false], isDirectory: [false], canRead: [false]
Apr 10, 2012 4:27:55 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib/i386;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Broadcom\Broadcom 802.11 Network Adapter\Driver;C:\Program Files\Java\jdk1.7.0_01\bin;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\TortoiseSVN\bin;.
Apr 10, 2012 4:27:55 PM org.apache.catalina.startup.SetAllPropertiesRule begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'emptySessionPath' to 'true' did not find a matching property.
Apr 10, 2012 4:27:55 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8079"]
Apr 10, 2012 4:27:55 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Apr 10, 2012 4:27:55 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 674 ms
Apr 10, 2012 4:27:55 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Apr 10, 2012 4:27:55 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.25
Apr 10, 2012 4:27:55 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor C:\Users\Kriss\AppData\Local\Temp\cargo\conf\conf\Catalina\localhost\manager.xml
Apr 10, 2012 4:27:56 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\Users\Kriss\AppData\Local\Temp\cargo\conf\webapps\cargocpc.war
Apr 10, 2012 4:27:56 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Users\Kriss\AppData\Local\Temp\cargo\conf\webapps\host-manager
Apr 10, 2012 4:27:56 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8079"]
Apr 10, 2012 4:27:56 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Apr 10, 2012 4:27:56 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 610 ms
Minor detail: when i tried to start, bootstrap was missing some classes which were part of tomcat-juli.jar. so i unjarred that and put the classes inside bootstrap.jar. I just thought i should mention that as a side comment though i dont think it is causing some problem..
Also here is the log when i start tomcat using command prompt:
Apr 09, 2012 1:55:36 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.22.
Apr 09, 2012 1:55:36 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], r
andom [true].
Apr 09, 2012 1:55:37 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-8080"]
Apr 09, 2012 1:55:37 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
Apr 09, 2012 1:55:37 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1944 ms
Apr 09, 2012 1:55:37 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Apr 09, 2012 1:55:37 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.25
Apr 09, 2012 1:55:37 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\TOSCA\apache-tomcat-7.0.25-windows-
x86\apache-tomcat-7.0.25\webapps\docs
Apr 09, 2012 1:55:38 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\TOSCA\apache-tomcat-7.0.25-windows-
x86\apache-tomcat-7.0.25\webapps\examples
Apr 09, 2012 1:55:38 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\TOSCA\apache-tomcat-7.0.25-windows-
x86\apache-tomcat-7.0.25\webapps\host-manager
Apr 09, 2012 1:55:38 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\TOSCA\apache-tomcat-7.0.25-windows-
x86\apache-tomcat-7.0.25\webapps\manager
Apr 09, 2012 1:55:38 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\TOSCA\apache-tomcat-7.0.25-windows-
x86\apache-tomcat-7.0.25\webapps\ROOT
Apr 09, 2012 1:55:38 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-8080"]
Apr 09, 2012 1:55:38 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-apr-8009"]
Apr 09, 2012 1:55:38 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 927 ms

Categories