---
title: "Struts Spring 整合时的几种报错情况"
author: "c_c"
date: "2013-06-14T14:51:18Z"
tags: []
categories: ["Web前端"]
slug: "struts-spring"
draft: false
lastmod: "2014-01-23T14:33:25Z"
id: 1886749
url: "https://waddy.iteye.com/blog/1886749"
---

struts应用报错的几种情况 及其原因分析：

**1、报错：**

**There is no Action mapped for action name infoAction. - \[unknown location]**

根本原因是struts框架未能成功加载指定的action及其路径映射关系；

首先可能是因为配置本身不正确；

其次可能是根本没有找到struts.xml配置文件，比如你没有把它放到classpath路径下；

**2、报错：**

**`Unable to instantiate Action, xxxAction,  defined for 'xxx' in namespace '/'`**

**`root cause：java.lang.ClassNotFoundException: xxxAction`**

根本原因是spring没有加载实例化对应的action bean；

首先可能因为配置本身不正确；

其次可能是应用没有找到相应的spring-beans.xml文件；