springside 4 web-init 启动

张洪财 发布于 2012/04/10 17:57
阅读 2K+
收藏 0
2012-04-10 17:48:51,000 [main] ERROR [org.springframework.web.context.ContextLoa
der] - Context initialization failed
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Config
uration problem: Unable to locate Spring NamespaceHandler for XML schema namespa
ce [http://www.springframework.org/schema/data/jpa]
Offending resource: URL [file:/D:/develop/IDE/eclipsejee/workspace/mini-web4/Web
Content/WEB-INF/classes/applicationContext.xml]

以下是问题补充:

@张洪财:??? (2012/04/11 10:41)
@张洪财:我初始化h2数据库, 然后把jar 放到 springside-4.0.0.RC2\examples\mini-web 中 ,最后配置启动tomcat。 就出现这个错。 最开始我用 quick-start.bat ,但总是执行到一半就 挂掉了。 提示spy 包没找到 。 (2012/04/11 14:56)
加载中
0
b
buptwhis
这个是在装载 xml,解析成beandefinition时出错的,应该是你的xml指定了一个schema,而没有对应的beanDefinitionReader.
0
张洪财
张洪财

org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Config
uration problem: Unable to locate Spring NamespaceHandler for XML schema namespa
ce [http://www.springframework.org/schema/data/jpa]
Offending resource: URL [file:/D:/develop/IDE/eclipsejee/workspace/mini-web4/Web
Content/WEB-INF/classes/applicationContext.xml]

        at org.springframework.beans.factory.parsing.FailFastProblemReporter.err
or(FailFastProblemReporter.java:68)
        at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderC
ontext.java:85)
        at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderC
ontext.java:80)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.er
ror(BeanDefinitionParserDelegate.java:316)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.pa
rseCustomElement(BeanDefinitionParserDelegate.java:1416)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.pa
rseCustomElement(BeanDefinitionParserDelegate.java:1409)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe
ader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:184)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe
ader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe
ader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:111)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registe
rBeanDefinitions(XmlBeanDefinitionReader.java:493)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadB
eanDefinitions(XmlBeanDefinitionReader.java:390)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
nDefinitions(XmlBeanDefinitionReader.java:334)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
nDefinitions(XmlBeanDefinitionReader.java:302)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
        at org.springframework.web.context.support.XmlWebApplicationContext.load
BeanDefinitions(XmlWebApplicationContext.java:125)
        at org.springframework.web.context.support.XmlWebApplicationContext.load
BeanDefinitions(XmlWebApplicationContext.java:94)
        at org.springframework.context.support.AbstractRefreshableApplicationCon
text.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)
        at org.springframework.context.support.AbstractApplicationContext.obtain
FreshBeanFactory(AbstractApplicationContext.java:522)
        at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:436)
        at org.springframework.web.context.ContextLoader.configureAndRefreshWebA
pplicationContext(ContextLoader.java:385)
        at org.springframework.web.context.ContextLoader.initWebApplicationConte
xt(ContextLoader.java:284)
        at org.springframework.web.context.ContextLoaderListener.contextInitiali
zed(ContextLoaderListener.java:111)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
t.java:3934)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
429)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

        at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443
)
        at org.apache.catalina.core.StandardService.start(StandardService.java:5
16)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710
)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:589)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2012-4-10 18:25:24 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2012-4-10 18:25:25 org.apache.catalina.core.StandardContext start
严重: Context [/miniweb4] startup failed due to previous errors
2012-04-10 18:25:25,000 [main] WARN  [org.springframework.web.context.support.Xm
lWebApplicationContext] - Exception thrown from ApplicationListener handling Con
textClosedEvent
java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - c
all 'refresh' before multicasting events via the context: Root WebApplicationCon
text: startup date [Tue Apr 10 18:25:23 CST 2012]; root of context hierarchy
        at org.springframework.context.support.AbstractApplicationContext.getApp
licationEventMulticaster(AbstractApplicationContext.java:337)
        at org.springframework.context.support.AbstractApplicationContext.publis
hEvent(AbstractApplicationContext.java:324)
        at org.springframework.context.support.AbstractApplicationContext.doClos
e(AbstractApplicationContext.java:1025)
        at org.springframework.context.support.AbstractApplicationContext.close(
AbstractApplicationContext.java:988)
        at org.springframework.web.context.ContextLoader.closeWebApplicationCont
ext(ContextLoader.java:556)
        at org.springframework.web.context.ContextLoaderListener.contextDestroye
d(ContextLoaderListener.java:142)
        at org.apache.catalina.core.StandardContext.listenerStop(StandardContext
.java:3973)
        at org.apache.catalina.core.StandardContext.stop(StandardContext.java:45
77)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
474)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

        at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443
)
        at org.apache.catalina.core.StandardService.start(StandardService.java:5
16)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710
)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:589)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2012-04-10 18:25:25,078 [main] WARN  [org.springframework.web.context.support.Xm
lWebApplicationContext] - Exception thrown from LifecycleProcessor on context cl
ose
java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refr
esh' before invoking lifecycle methods via the context: Root WebApplicationConte
xt: startup date [Tue Apr 10 18:25:23 CST 2012]; root of context hierarchy
        at org.springframework.context.support.AbstractApplicationContext.getLif
ecycleProcessor(AbstractApplicationContext.java:350)
        at org.springframework.context.support.AbstractApplicationContext.doClos
e(AbstractApplicationContext.java:1033)
        at org.springframework.context.support.AbstractApplicationContext.close(
AbstractApplicationContext.java:988)
        at org.springframework.web.context.ContextLoader.closeWebApplicationCont
ext(ContextLoader.java:556)
        at org.springframework.web.context.ContextLoaderListener.contextDestroye
d(ContextLoaderListener.java:142)
        at org.apache.catalina.core.StandardContext.listenerStop(StandardContext
.java:3973)
        at org.apache.catalina.core.StandardContext.stop(StandardContext.java:45
77)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
474)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

        at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443
)
        at org.apache.catalina.core.StandardService.start(StandardService.java:5
16)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710
)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:589)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2012-4-10 18:25:25 org.apache.coyote.http11.Http11Protocol start

0
张洪财
张洪财

引用来自“buptwhis”的答案

这个是在装载 xml,解析成beandefinition时出错的,应该是你的xml指定了一个schema,而没有对应的beanDefinitionReader.
0
江南白衣
江南白衣
請問你是用什麼啟動應用的? 貌似是包不完整,spring-data-jpa的不在裡面。
0
张洪财
张洪财

我初始化h2数据库, 然后把jar 放到 springside-4.0.0.RC2\examples\mini-web 中 ,最后配置启动tomcat。 就出现这个错。

 最开始我用 quick-start.bat ,但总是执行到一半就 挂掉了。 提示spy 包没找到 。

0
张洪财
张洪财
这里的包,我都放到 web 中了。
返回顶部
顶部