Announcement Announcement Module
Collapse
No announcement yet.
org.springframework.web.multipart.MultipartResolve r Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • org.springframework.web.multipart.MultipartResolve r

    Hi,

    I'm quite new to the springframework.
    Now i want to set up a project that uses spring mvc with maven.
    I added the dependency:

    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring</artifactId>
    <version>2.5.6</version>
    </dependency>

    now i register my dispatchservlet like this in web.xml:

    <servlet>
    <servlet-name>dispatch</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherSe rvlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
    <servlet-name>dispatch</servlet-name>
    <url-pattern>*.htm</url-pattern>
    </servlet-mapping>

    And in my dispatch-servlet.xml i put:

    - a InternalResourceViewResolver
    - and a SimpleUrlHandlerMapping


    When i run this on tomcat i get the exception:

    SEVERE: Servlet /mvcanno threw load() exception
    java.lang.ClassNotFoundException: org.springframework.web.multipart.MultipartResolve r
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1387)
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1233)
    at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:320)
    at java.lang.Class.getDeclaredFields0(Native Method)
    at java.lang.Class.privateGetDeclaredFields(Class.jav a:2291)
    at java.lang.Class.getDeclaredFields(Class.java:1743)
    at org.apache.catalina.util.DefaultAnnotationProcesso r.processAnnotations(DefaultAnnotationProcessor.ja va:134)
    at org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:1119)
    at org.apache.catalina.core.StandardWrapper.load(Stan dardWrapper.java:992)
    at org.apache.catalina.core.StandardContext.loadOnSta rtup(StandardContext.java:4058)
    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4371)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(Sta ndardService.java:516)
    at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalin a.java:578)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:413)


    Anyone an idea pls? i'm really stuck on this one

    Regards,

    Thomas

  • #2
    Web MVC isn't part of Spring Core.
    You have to remove your dependancy and add this one instead :

    Code:
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
      <version>2.5.6</version>
    </dependency>

    Comment


    • #3
      I use spring core to, so i'm just gonna add that one to

      Comment


      • #4
        Spring-core is a dependancy of spring-webmvc, so it will be automatically downloaded.

        Comment


        • #5
          thank you very much

          Comment

          Working...
          X