日期:2014-05-19  浏览次数:20687 次

maven项目编译过了,用jetty跑的时候出现以下异常?求解?
09:14:06.046 [main] ERROR o.s.web.context.ContextLoader - Context initialization failed
org.springframework.security.authentication.AuthenticationServiceException: Unable to find salt method on user Object. Does the class 'org.springframework.security.core.userdetails.User' have a method or getter named 'salt' ?
at org.springframework.security.authentication.dao.ReflectionSaltSource.findSaltMethod(ReflectionSaltSource.java:86) ~[spring-security-core-3.0.7.RELEASE.jar:3.0.7.RELEASE]
at org.springframework.security.authentication.dao.ReflectionSaltSource.getSalt(ReflectionSaltSource.java:66) ~[spring-security-core-3.0.7.RELEASE.jar:3.0.7.RELEASE]
at net.prhin.recetas.security.UserBootstrap.onApplicationEvent(UserBootstrap.java:53) ~[classes/:na]
at net.prhin.recetas.security.UserBootstrap.onApplicationEvent(UserBootstrap.java:19) ~[classes/:na]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97) ~[spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:324) ~[spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:929) ~[spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:467) ~[spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385) ~[spring-web-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284) ~[spring-web-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111) [spring-web-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548) [jetty-6.1.12.jar:6.1.12]
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136) [jetty-6.1.12.jar:6.1.12]
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1234) [jetty-6.1.12.jar:6.1.12]
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517) [jetty-6.1.12.jar:6.1.12]
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:460) [jetty-6.1.12.jar:6.1.12]
at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:124) [maven-jetty-plugin-6.1.12.jar:6.1.12]
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) [jetty-util-6.1.12.jar:6.1.12]
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) [jetty-6.1.12.jar:6.1.12]
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156) [jetty-6.1.12.jar:6.1.12]
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) [jetty-util-6.1.12.jar:6.1.12]
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) [jetty-6.1.12.jar:6.1.12]
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) [jetty-util-6.1.12.jar:6.1.12]
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) [jetty-6.1.12.jar:6.1.12]
at org.mortbay.jetty.Server.doStart(Server.java:222) [jetty-6.1.12.jar:6.1.12]
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) [jetty-util-6.1.12.jar:6.1.12]
at org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132) [mave