복붙노트

[SPRING] 바람둥이 시작시 ClassNotFoundException 오류

SPRING

바람둥이 시작시 ClassNotFoundException 오류

이클립스에서 tomcat 서버를 설정하려고하는데,이 오류는 오랫동안 나를 때렸고 어떤 해결책도 찾지 못했습니다.

나는 시도했다 :

이것은 내 web.xml입니다.

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

    <!-- The definition of the Root Spring Container shared by all Servlets and Filters -->
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/spring/root-context.xml</param-value>
    </context-param>

    <!-- Creates the Spring Container shared by all Servlets and Filters -->
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

    <!-- Processes application requests -->
    <servlet>
        <servlet-name>appServlet</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>appServlet</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>

</web-app>

이것은 트랙 트랙입니다.

Nov 03, 2014 5:40:26 PM com.springsource.tcserver.security.PropertyDecoder <init>
INFO: tc Runtime property decoder using memory-based key
Nov 03, 2014 5:40:27 PM com.springsource.tcserver.security.PropertyDecoder <init>
INFO: tcServer Runtime property decoder has been initialized in 153 ms
Nov 03, 2014 5:40:27 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Nov 03, 2014 5:40:28 PM com.springsource.tcserver.serviceability.rmi.JmxSocketListener init
INFO: Started up JMX registry on 127.0.0.1:6969 in 189 ms
Nov 03, 2014 5:40:28 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1258 ms
Nov 03, 2014 5:40:28 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Nov 03, 2014 5:40:28 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: VMware vFabric tc Runtime 2.8.2.RELEASE/7.0.35.B.RELEASE
Nov 03, 2014 5:40:28 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /home/karim/Downloads/.springsource/vfabric-tc-server-developer-2.8.2.RELEASE/base-instance/conf/Catalina/localhost/task-manager.xml
Nov 03, 2014 5:40:28 PM org.apache.catalina.startup.SetContextPropertiesRule begin
WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:task-manager' did not find a matching property.
Nov 03, 2014 5:40:28 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
    at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:527)
    at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:509)
    at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:137)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4733)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5291)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:657)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1637)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

제발, 다른 일이 필요하면 알려주세요.

해결법

  1. ==============================

    1.문제의 수업은 봄 - 웹 - ????? RELEASE.jar에 있습니다. 당신의 전쟁에 가서 winzip 또는 7Zip을 좋아하는 사람들과 함께 열거 나 WEB-INF / lib에서 항아리를 찾으십시오. 제 생각에 그것이 존재하지 않는다는 것입니다. 사용하는 Maven에 종속성이 포함 된 경우 :

    문제의 수업은 봄 - 웹 - ????? RELEASE.jar에 있습니다. 당신의 전쟁에 가서 winzip 또는 7Zip을 좋아하는 사람들과 함께 열거 나 WEB-INF / lib에서 항아리를 찾으십시오. 제 생각에 그것이 존재하지 않는다는 것입니다. 사용하는 Maven에 종속성이 포함 된 경우 :

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

    maven을 사용하지 않고 배포 어셈블리를 언급하면서 Eclipse에서이 작업을 수행하고 있다고 상상해보십시오.이 jar을 컴파일 할 때 사용할 라이브러리를 Eclipse 빌드에 추가해야합니다. 또는 단순히 항아리를 WEB-INF / lib로 옮길 수 있습니다.

    jar 파일을 빌드 한 후 전쟁을 확인하십시오.

  2. from https://stackoverflow.com/questions/26722993/classnotfoundexception-error-when-starting-tomcat by cc-by-sa and MIT license