Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
Major
-
Resolution: Complete
-
Affects Version/s: 1.2.1.RELEASE
-
Fix Version/s: 1.2.2.RELEASE
-
Component/s: SPRING PLATFORM
-
Labels:None
-
Environment:STS, windows 64 bit
Description
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:
java.lang.NoSuchMethodError: org.springframework.core.MethodParameter.getNestedParameterType()Ljava/lang/Class;
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:
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(); } }
Here's the runtime output from tcServer:
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)