ff415501264
ff415501264
采纳率20%
2012-09-23 23:44 阅读 223
已采纳

S2SI框架搭建问题

今天搭建了一个S2SI框架,但是部署到Tomcat里运行时就报错:
信息: Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
2012-9-23 23:35:46 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.NoClassDefFoundError: org/springframework/expression/PropertyAccessor
at org.springframework.context.support.AbstractApplicationContext.prepareBeanFactory(AbstractApplicationContext.java:538)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:439)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
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:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2012-9-23 23:35:46 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2012-9-23 23:35:46 org.apache.catalina.core.StandardContext start
严重: Context [/Fml] startup failed due to previous errors
2012-9-23 23:35:46 org.apache.catalina.core.ApplicationContext log

下面是我的web.xml的配置
<?xml version="1.0" encoding="UTF-8"?>
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
SSI_Test

contextConfigLocation
/WEB-INF/beans.xml


org.springframework.web.context.ContextLoaderListener


struts2
org.apache.struts2.dispatcher.FilterDispatcher


struts2
/*


index.html
index.htm
index.jsp
default.html
default.htm
default.jsp

我在网上看了一些帖子,有的说是缺少jar包,但我我感觉该加的包都加了下面是我的加入包截图

[img]http://dl.iteye.com/upload/attachment/0074/2298/fd40996c-4451-333b-aa86-21de97fdf5e3.png[/img]

希望大家帮我找出问题的原因,看看问题出在哪里!我用的是Eclipse,Tomcat 6。

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

3条回答 默认 最新

  • 已采纳
    fang_fumin fang_fumin 2012-09-24 14:05

    缺少ognl-3.0.4.jar

    点赞 评论 复制链接分享
  • henghanan henghanan 2012-09-23 23:54

    您好,出现这样情况是因为jar包没有真正加到lib里,你部署到tomcat之后项目里的lib目录是没有你加的jar包的,所以会出现java.lang.NoClassDefFoundError。解决办法:在eclipse先remove掉所有jar包,然后打开你项目的lib文件夹,把相关jar手动添加到该文件夹

    点赞 评论 复制链接分享
  • jinnianshilongnian jinnianshilongnian 2012-09-24 06:42

    缺少 org.springframework.expression jar包

    点赞 评论 复制链接分享

相关推荐