0

I integrate tomcat in eclipse. And when i am starting server by simply eclipse option. I am getting below errors

Eclipse version and Tomcat Version are below

Tomcat Version: version 7

Eclipse Java EE IDE for Web Developers.

Version: Luna Service Release 1a (4.4.1) Build id: 20150109-0600

Below error returns when starting tomact

????? ??, ???? ?:??:?? ????????? 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/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib/i386;C:\Program Files\PC Connectivity Solution\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\apache-maven-3.2.5\bin;;C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin;C:\TCWIN45\BIN;C:\eclipse;;.
????? ??, ???? ?:??:?? ????????? org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:CalculationApp' did not find a matching property.
????? ??, ???? ?:??:?? ????????? org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
????? ??, ???? ?:??:?? ????????? org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
????? ??, ???? ?:??:?? ????????? org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1584 ms
????? ??, ???? ?:??:?? ????????? org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
????? ??, ???? ?:??:?? ????????? org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.47
????? ??, ???? ?:??:?? ????????? org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/CalculationApp]]
    at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
    at java.util.concurrent.FutureTask.get(Unknown Source)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
    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$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/CalculationApp]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    ... 7 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/commons/logging/Log;
    at java.lang.Class.getDeclaredFields0(Native Method)
    at java.lang.Class.privateGetDeclaredFields(Unknown Source)
    at java.lang.Class.getDeclaredFields(Unknown Source)
    at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:106)
    at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:263)
    at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:142)
    at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:67)
    at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:405)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:881)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:376)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 7 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.Log
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
    ... 21 more

????? ??, ???? ?:??:?? ????????? org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
    at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
    at java.util.concurrent.FutureTask.get(Unknown Source)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:691)
    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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:456)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    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$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 7 more

????? ??, ???? ?:??:?? ????????? org.apache.catalina.startup.Catalina start
SEVERE: The required Server component failed to start so Tomcat is unable to start.
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:691)
    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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:456)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 11 more

????? ??, ???? ?:??:?? ????????? org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8080"]
????? ??, ???? ?:??:?? ????????? org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
????? ??, ???? ?:??:?? ????????? org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
????? ??, ???? ?:??:?? ????????? org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8080"]
????? ??, ???? ?:??:?? ????????? org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8009"]

pom.xml

<project xmlns="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">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.calculation</groupId>
  <artifactId>CalculationApp</artifactId>
  <packaging>war</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>CalculationApp Maven Webapp</name>
  <url>http://maven.apache.org</url>
    <properties>
        <spring.version>3.0.5.RELEASE</spring.version>
    </properties>

    <dependencies>

        <!-- Spring 3 dependencies -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>${spring.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${spring.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${spring.version}</version>
        </dependency>

    </dependencies>
    <build>
        <finalName>CalculationApp</finalName>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
Milan
  • 1
  • 3
  • Looks like a problem in your tomcat installation rather than being referenced from Eclipse. Have you check if this error happens when you start tomcat w/o eclipse? – Luiggi Mendoza Jan 26 '15 at 04:02
  • @LuiggiMendoza: Yes. You are right. It is working as a starting externally. But how can i resolve problem with Eclipse? – Milan Jan 26 '15 at 04:07
  • There is an application already deployed (CalculationApp) try removing and starting. – sashwat Jan 26 '15 at 04:11
  • 1
    Oh ok, you're deploying this app of yours but lacks a library (or more). Please add all your libraries in WEB-INF/lib folder in your web application project, then restart the deployment of the app. – Luiggi Mendoza Jan 26 '15 at 04:12
  • By the way, this problem occurs in your eclipse only because Eclipse by default uses an external folder to put all the wars to deploy on tomcat, then starts tomcat and makes it deploy the apps in this folder, in this way your applications are never deployed in tomcat directly. You can change this behavior by following the steps shown here: http://stackoverflow.com/q/3515089/1065197 – Luiggi Mendoza Jan 26 '15 at 04:14
  • @dc.sashwat: when i removed the app CalculationApp. It will started. But i cannot access admin panel on web. – Milan Jan 26 '15 at 04:17
  • @LuiggiMendoza: I am using maven. So i believe my application has no need to fill library in WEB-INF/lib. I am wrong please correct me. – Milan Jan 26 '15 at 04:18
  • Well, then check if all the libraries are indeed in WEB-INF/lib folder. Make sure that the libraries marked as `provided` are in fact provided by the application server. – Luiggi Mendoza Jan 26 '15 at 04:19
  • @all: Hey, When i created new app and try to deploy it on server through eclipse it works. So, i conclude that i have problem with my app called CalculationApp. If i am wrong please correct me. – Milan Jan 26 '15 at 04:26
  • That's what I'm saying since my second comment... – Luiggi Mendoza Jan 26 '15 at 04:29
  • @LuiggiMendoza: Yes. You are right. But i make replica of my working project and still not getting resolve error. – Milan Jan 26 '15 at 04:34
  • Again: check if all the libraries are indeed in WEB-INF/lib folder. When I say you should check this, I mean you should check the generated war. After all, a war is just a zip file and can be unzipped with no problems. – Luiggi Mendoza Jan 26 '15 at 04:36
  • @LuiggiMendoza: can you look into this http://www.mkyong.com/spring3/spring-3-mvc-hello-world-example/ . It's maven building and repository tool. – Milan Jan 26 '15 at 04:41
  • I know that tutorial, but the problem is in your project, not in the tutorial. Nobody here knows what you did wrong or what step you missed. Again, please do this: check the generated war from maven (you can check the war in the target folder), copy it to a safe location, change the extension of this file from .war to .zip, unzip the file, check if all the libraries are in WEB-INF/lib. Also, please provide the content of your pom.xml here in your question. – Luiggi Mendoza Jan 26 '15 at 04:47
  • @LuiggiMendoza: I updated my question. I am not saying that problem is with tutorial. I am just stating to refer the tutorial for maven. – Milan Jan 26 '15 at 04:55
  • @LuiggiMendoza: i checked into generated war WEB-INF/lib. it looks good. All library included in the folder. – Milan Jan 26 '15 at 05:09
  • Try deploying your application directly into tomcat. Then start tomcat w/o eclipse. – Luiggi Mendoza Jan 26 '15 at 05:10

0 Answers0