在整合ssh过程中出现的问题和解决方法:
一、
严重: Servlet /loginssh threw load() exception
javax.servlet.UnavailableException: Parsing error processing resource path /WEB-INF/struts-config.xml
分析在struts-config.xml的解析过程中出错,于是查找错误,在配置struts和spring整合中使用了controller属性,设置成
<controller>
<set-property property="processorClass" value="org.springframework.web.struts.DelegatingRequestProcessor"/>
</controller>
成功解决错误,但是eclipse马上报出第二个错误:
二、
nested exception is java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool
根据提示可知是个类文件没有找到,搜索一下,找到 commons-pool-1.3.jar ,放入lib文件夹,问题解决。
三、
严重:javax.servlet.ServletException: java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
原因:hibernate与spring的asm包冲突
解决方案:删除asm-2.X.X的jar包
四、
严重:javax.servlet.UnavailableException: TilesPlugin : Specified RequestProcessor not compatible with TilesRequestProcessor
原因:
TilesPlugin必须满足RequestProcessor是继承了TilesRequestProcessor,所以无法成功,看一下它的源码
Class tilesProcessorClass = org.apache.struts.tiles.TilesRequestProcessor.class;
if(!tilesProcessorClass.isAssignableFrom(configProcessorClass))
{
String msg = "TilesPlugin : Specified RequestProcessor not compatible with TilesRequestProcessor";
if(log.isFatalEnabled())
log.fatal(msg);
throw new ServletException(msg);
} else
{
return;
}
解决方案:把struts-config.xml中的:
<controller
processorClass="org.springframework.web.struts.DelegatingRequestProcessor" />
替换成:
<controller
processorClass="org.springframework.web.struts.DelegatingTilesRequestProcessor" />
搞定
原文引用:http://dev.firnow.com/course/3_program/java/javajs/20090304/157618.html
一、
严重: Servlet /loginssh threw load() exception
javax.servlet.UnavailableException: Parsing error processing resource path /WEB-INF/struts-config.xml
分析在struts-config.xml的解析过程中出错,于是查找错误,在配置struts和spring整合中使用了controller属性,设置成
<controller>
<set-property property="processorClass" value="org.springframework.web.struts.DelegatingRequestProcessor"/>
</controller>
成功解决错误,但是eclipse马上报出第二个错误:
二、
nested exception is java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool
根据提示可知是个类文件没有找到,搜索一下,找到 commons-pool-1.3.jar ,放入lib文件夹,问题解决。
三、
严重:javax.servlet.ServletException: java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
原因:hibernate与spring的asm包冲突
解决方案:删除asm-2.X.X的jar包
四、
严重:javax.servlet.UnavailableException: TilesPlugin : Specified RequestProcessor not compatible with TilesRequestProcessor
原因:
TilesPlugin必须满足RequestProcessor是继承了TilesRequestProcessor,所以无法成功,看一下它的源码
Class tilesProcessorClass = org.apache.struts.tiles.TilesRequestProcessor.class;
if(!tilesProcessorClass.isAssignableFrom(configProcessorClass))
{
String msg = "TilesPlugin : Specified RequestProcessor not compatible with TilesRequestProcessor";
if(log.isFatalEnabled())
log.fatal(msg);
throw new ServletException(msg);
} else
{
return;
}
解决方案:把struts-config.xml中的:
<controller
processorClass="org.springframework.web.struts.DelegatingRequestProcessor" />
替换成:
<controller
processorClass="org.springframework.web.struts.DelegatingTilesRequestProcessor" />
搞定
原文引用:http://dev.firnow.com/course/3_program/java/javajs/20090304/157618.html