Google App Engine应用 Spring2.5.6基于注解的错误

阅读更多
我的GAE应用:清风记账本( http://www.scholers.co.cc)
升级成spring2.5.6之后,想充分利用spring2.5里面的新的特性:
@Autowired,@Component等,可以大量的减少xml的配置,更加灵活方便。
但是使用这些新特性之后,发现上传上去(我的开发环境是GAE SDK1.4.2)之后,出现错误信息如下:
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name
'org.springframework.context.annotation.internalPersistenceAnnotationProcessor':
Initialization of bean failed; nested exception is
java.lang.NoClassDefFoundError: javax/naming/NamingException


经过GOOGLE一把,发现老外已经发现了此类错误。具体在:
http://code.google.com/p/googleappengine/issues/detail?id=1240
上面提示说,这个问题在使用spring3.0之前的版本都存在,于是我又屁颠屁颠的升级到spring3.0.5,果然这个问题解决掉了。

完整的错误信息:
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name
'org.springframework.context.annotation.internalPersistenceAnnotationProcessor':
Initialization of bean failed; nested exception is
java.lang.NoClassDefFoundError: javax/naming/NamingException
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
	at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
	at
org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:578)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:365)
	at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
	at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
	at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
	at
org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:530)
	at org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
	at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
	at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
	at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
	at
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:190)
	at
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:167)
	at
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:113)
	at
com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:235)
	at
com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:4547)
	at
com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:4545)
	at
com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24)
	at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:359)
	at com.google.net.rpc.impl.Server$2.run(Server.java:792)
	at
com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:56)
	at
com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:489)
	at com.google.net.rpc.impl.Server.startRpc(Server.java:748)
	at com.google.net.rpc.impl.Server.processRequest(Server.java:340)
	at
com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:422)
	at com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:319)
	at com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:290)
	at com.google.net.async.Connection.handleReadEvent(Connection.java:419)
	at
com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:733)
	at com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:207)
	at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:101)
	at com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:249)
	at
com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run(JavaRuntime.java:373)
	at java.lang.Thread.run(Unknown Source)

你可能感兴趣的:(Google,Java,.net,GAE,Bean)