java.lang.NoSuchMethodError: org.springframework.core.MethodParameter.getNestedParameterType()Ljava/lang/Class;

Spring JIRA | Gregory J Soulsby | 5 years ago
  1. 0

    After re-engineering a simple MVC app in Roo, I added a controller that works fine in another STS, but non Roo, project. At deployment time, I get this error, for which I can find no documentation or examples of causes: {code}java.lang.NoSuchMethodError: org.springframework.core.MethodParameter.getNestedParameterType()Ljava/lang/Class;{code} Maybe there is an issue with the class path set-up within Roo? Or my set-up of course. But then the message means nothing, so I can't track it down. Here's my Java class: {code}package ibp.test.v011.web; import java.security.Principal; import javax.inject.Inject; import javax.inject.Provider; import org.springframework.social.connect.ConnectionRepository; import org.springframework.social.showcase.account.AccountRepository; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; @Controller public class bbb { private final Provider<ConnectionRepository> connectionRepositoryProvider; private final AccountRepository accountRepository; @Inject public bbb(Provider<ConnectionRepository> connectionRepositoryProvider, AccountRepository accountRepository) { this.connectionRepositoryProvider = connectionRepositoryProvider; this.accountRepository = accountRepository; } @RequestMapping("/bb") public String home(Principal currentUser, Model model) { model.addAttribute("connectionsToProviders", getConnectionRepository().findAllConnections()); model.addAttribute(accountRepository.findAccountByUsername(currentUser.getName())); return "home"; } private ConnectionRepository getConnectionRepository() { return connectionRepositoryProvider.get(); } }{code} Here's the runtime output from tcServer: {code}May 22, 2012 11:45:17 AM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor /home/greg/apps/springsource/vfabric-tc-server-developer-2.6.4.RELEASE/test/conf/Catalina/localhost/ibp.test.v011.xml May 22, 2012 11:45:17 AM org.apache.catalina.startup.SetContextPropertiesRule begin WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:ibp.test.v011' did not find a matching property. May 22, 2012 11:45:17 AM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext May 22, 2012 11:45:23 AM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring FrameworkServlet 'ibp.test.v011' May 22, 2012 11:45:23 AM org.apache.catalina.core.ApplicationContext log SEVERE: StandardWrapper.Throwable java.lang.NoSuchMethodError: org.springframework.core.MethodParameter.getNestedParameterType()Ljava/lang/Class; at org.springframework.beans.factory.config.DependencyDescriptor.getDependencyType(DependencyDescriptor.java:213) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:700) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:795) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:723) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:196) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1035) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:939) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464) at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:631) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:588) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:645) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:508) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:449) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:133) at javax.servlet.GenericServlet.init(GenericServlet.java:160) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5015) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5302) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:897) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:873) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1581) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722){code}

    Spring JIRA | 5 years ago | Gregory J Soulsby
    java.lang.NoSuchMethodError: org.springframework.core.MethodParameter.getNestedParameterType()Ljava/lang/Class;
  2. 0

    After re-engineering a simple MVC app in Roo, I added a controller that works fine in another STS, but non Roo, project. At deployment time, I get this error, for which I can find no documentation or examples of causes: {code}java.lang.NoSuchMethodError: org.springframework.core.MethodParameter.getNestedParameterType()Ljava/lang/Class;{code} Maybe there is an issue with the class path set-up within Roo? Or my set-up of course. But then the message means nothing, so I can't track it down. Here's my Java class: {code}package ibp.test.v011.web; import java.security.Principal; import javax.inject.Inject; import javax.inject.Provider; import org.springframework.social.connect.ConnectionRepository; import org.springframework.social.showcase.account.AccountRepository; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; @Controller public class bbb { private final Provider<ConnectionRepository> connectionRepositoryProvider; private final AccountRepository accountRepository; @Inject public bbb(Provider<ConnectionRepository> connectionRepositoryProvider, AccountRepository accountRepository) { this.connectionRepositoryProvider = connectionRepositoryProvider; this.accountRepository = accountRepository; } @RequestMapping("/bb") public String home(Principal currentUser, Model model) { model.addAttribute("connectionsToProviders", getConnectionRepository().findAllConnections()); model.addAttribute(accountRepository.findAccountByUsername(currentUser.getName())); return "home"; } private ConnectionRepository getConnectionRepository() { return connectionRepositoryProvider.get(); } }{code} Here's the runtime output from tcServer: {code}May 22, 2012 11:45:17 AM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor /home/greg/apps/springsource/vfabric-tc-server-developer-2.6.4.RELEASE/test/conf/Catalina/localhost/ibp.test.v011.xml May 22, 2012 11:45:17 AM org.apache.catalina.startup.SetContextPropertiesRule begin WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:ibp.test.v011' did not find a matching property. May 22, 2012 11:45:17 AM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext May 22, 2012 11:45:23 AM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring FrameworkServlet 'ibp.test.v011' May 22, 2012 11:45:23 AM org.apache.catalina.core.ApplicationContext log SEVERE: StandardWrapper.Throwable java.lang.NoSuchMethodError: org.springframework.core.MethodParameter.getNestedParameterType()Ljava/lang/Class; at org.springframework.beans.factory.config.DependencyDescriptor.getDependencyType(DependencyDescriptor.java:213) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:700) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:795) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:723) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:196) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1035) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:939) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464) at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:631) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:588) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:645) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:508) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:449) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:133) at javax.servlet.GenericServlet.init(GenericServlet.java:160) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5015) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5302) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:897) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:873) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1581) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722){code}

    Spring JIRA | 5 years ago | Gregory J Soulsby
    java.lang.NoSuchMethodError: org.springframework.core.MethodParameter.getNestedParameterType()Ljava/lang/Class;
  3. 0

    Spring - java.lang.NoSuchMethodError: org.springframework.web.accept.ContentNegotiationManager.getStrategies()Ljava/util/List;?

    Stack Overflow | 1 year ago | Alex R
    java.lang.NoSuchMethodError: org.springframework.web.accept.ContentNegotiationManager.getStrategies()Ljava/util/List;
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    EnableWebSocket in Spring MVC project

    Stack Overflow | 1 year ago | Андрій Дзигар
    java.lang.NoSuchMethodError: org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler.setRemoveOnCancelPolicy(Z)V
  6. 0

    Bruce Phillips Blog on Java, ColdFusion, Flex and Spry: Using BlazeDS Version 4 To Integrate A Flex Application With A Java Backend Built With Flash Builder

    brucephillips.name | 1 year ago
    java.lang.NoSuchMethodError: flex.messaging.MessageBroker.createThreadLocalObjec ts()V at org.springframework.flex.core.MessageBrokerFactoryBean.initThreadLoca ls(MessageBrokerFactoryBean.java:354) at org.springframework.flex.core.MessageBrokerFactoryBean.afterPropertie sSet(MessageBrokerFactoryBean.java:125) at org.springframework.beans.factory.support.AbstractAutowireCapableBean Factory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477) at org.springframework.beans.factory.support.AbstractAutowireCapableBean Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417) at org.springframework.beans.factory.support.AbstractAutowireCapableBean Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at org.springframework.beans.factory.support.AbstractAutowireCapableBean Factory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb ject(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr y.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe an(AbstractBeanFactory.java:288) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:190) at org.springframework.beans.factory.support.AbstractBeanFactory.isSingl eton(AbstractBeanFactory.java:396) at org.springframework.context.support.AbstractApplicationContext.isSing leton(AbstractApplicationContext.java:1095) at org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.reg isterHandler(AbstractUrlHandlerMapping.java:382) at org.springframework.web.servlet.handler.SimpleUrlHandlerMapping.regis terHandlers(SimpleUrlHandlerMapping.java:129) at org.springframework.web.servlet.handler.SimpleUrlHandlerMapping.initA pplicationContext(SimpleUrlHandlerMapping.java:104) at org.springframework.context.support.ApplicationObjectSupport.initAppl icationContext(ApplicationObjectSupport.java:119) at org.springframework.web.context.support.WebApplicationObjectSupport.i nitApplicationContext(WebApplicationObjectSupport.java:72) at org.springframework.context.support.ApplicationObjectSupport.setAppli cationContext(ApplicationObjectSupport.java:73) at org.springframework.context.support.ApplicationContextAwareProcessor. invokeAwareInterfaces(ApplicationContextAwareProcessor.java:106) at org.springframework.context.support.ApplicationContextAwareProcessor. postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:85) at org.springframework.beans.factory.support.AbstractAutowireCapableBean Factory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanF actory.java:394)

    8 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      org.springframework.core.MethodParameter.getNestedParameterType()Ljava/lang/Class;

      at org.springframework.beans.factory.config.DependencyDescriptor.getDependencyType()
    2. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.factory.config.DependencyDescriptor.getDependencyType(DependencyDescriptor.java:213)
      2. org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:700)
      3. org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:795)
      4. org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:723)
      5. org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:196)
      6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1035)
      7. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:939)
      8. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
      9. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
      10. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
      11. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
      12. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
      13. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
      14. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
      14 frames
    3. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
      2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
      2 frames
    4. Spring MVC
      HttpServletBean.init
      1. org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:631)
      2. org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:588)
      3. org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:645)
      4. org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:508)
      5. org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:449)
      6. org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:133)
      6 frames
    5. JavaServlet
      GenericServlet.init
      1. javax.servlet.GenericServlet.init(GenericServlet.java:160)
      1 frame
    6. Glassfish Core
      HostConfig$DeployDescriptor.run
      1. org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
      2. org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
      3. org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
      4. org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5015)
      5. org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5302)
      6. org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      7. org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:897)
      8. org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:873)
      9. org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
      10. org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
      11. org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1581)
      11 frames
    7. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      2. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      3. java.util.concurrent.FutureTask.run(FutureTask.java:166)
      4. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      5. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      5 frames