Announcement Announcement Module
Collapse
No announcement yet.
Portlet Spring 3.0.5 InjectionMetaData.<init> NoSuchMethodError Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Portlet Spring 3.0.5 InjectionMetaData.<init> NoSuchMethodError

    Hi,

    I'm using spring webflow for portlets and trying to do some ajax. I am following this guide:

    https://wiki.jasig.org/display/PLT/T...+Flow+Portlets

    i.e. added a servlet to the web.xml:

    Code:
    	<servlet>
    	  <servlet-name>spring</servlet-name>
    	  <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    	  <load-on-startup>2</load-on-startup>
    	</servlet>   
    
    	<servlet-mapping>
    	  <servlet-name>spring</servlet-name>
    	  <url-pattern>/ajax/*</url-pattern>
    	</servlet-mapping>
    And adding a controller like this:

    Code:
    package org.jasig.portlet.example.web;
     
    import java.util.List;
     
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.stereotype.Controller;
    import org.springframework.ui.ModelMap;
    import org.springframework.web.bind.annotation.RequestMapping;
    import org.springframework.web.bind.annotation.RequestParam;
    import org.springframework.web.servlet.View;
     
    @Controller
    public class WidgetController {
     
        private WidgetService widgetService;
     
        @Autowired
        public void setWidgetService(WidgetService widgetService) {
            this.widgetService = widgetService;
        }
     
        @RequestMapping("/ajax/widgets")
        public String getWidgetsAsJson(@RequestParam("query") String searchString, final ModelMap model) {
            List<Widget> widgets = this.widgetService.searchForWidgets(searchString);
            model.addAttribute("widgets", widgets);
            return "jsonView";
        }
    }
    works fine on pluto, but on liferay which I am using for deployment I get the following:

    Code:
    javax.servlet.ServletException: Servlet.init() for servlet spring threw exception
    	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    	org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
    	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    	org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
    	org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
    	org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:300)
    	java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    	java.lang.Thread.run(Thread.java:619)
    
    root cause
    
    java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.InjectionMetadata.<init>(Ljava/lang/Class;)V
    	org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:350)
    	org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:296)
    	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:798)
    	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:493)
    Any ideas?
Working...
X