当前位置: 代码迷 >> Java Web开发 >> spring1.2 + struts weblogic8 找不到类,该如何处理
  详细解决方案

spring1.2 + struts weblogic8 找不到类,该如何处理

热度:381   发布时间:2016-04-17 12:41:49.0
spring1.2 + struts weblogic8 找不到类
系统: windows2003  
应用服务器: weblogic8.1
工具:jbuilder2006
jdk: 1.4
spring1.2 
struts1.1
以上是我所用的  
我用的是spring管理struts的action
web.xml配置如下

<context-param>
  <param-name>contextConfigLocation</param-name>
  <param-value>/WEB-INF/beans.xml</param-value>
  </context-param>
  <listener>
  <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>
struts-config.xml配置如下:

<struts-config>
  <form-beans>
  <!-- 登入用 -->
  <form-bean name="loginActionForm" type="cn.com.lsss.struts.forms.LoginActionForm"/>
  </form-beans>
  <action-mappings>
  <!-- 登入 -->
  <action path="/loginAction" type="org.springframework.web.struts.DelegatingActionProxy" name="loginActionForm">
  <forward name="success" path="/index.jsp"/>
  </action>
  </action-mappings>
  <message-resources parameter="ApplicationResources"/>
  <!--######################### spring ############################ -->
  <plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
  <set-property property="contextConfigLocation" value="/WEB-INF/beans.xml"/>
  </plug-in>
</struts-config>
bean.xml配置如下:
<beans>
  <bean name="/loginAction" class="cn.com.lsss.struts.action.LoginAction" singleton="false"> </bean>
</beans>

为什么我向weblogic8.1 发布时报错
2007-10-15 16:32:09 org.springframework.web.context.ContextLoader initWebApplicationContext
信息: Root WebApplicationContext: initialization started
2007-10-15 16:32:10 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from ServletContext resource [/WEB-INF/beans.xml]
2007-10-15 16:32:10 org.springframework.web.context.ContextLoader initWebApplicationContext
严重: Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name '/loginAction' defined in ServletContext resource [/WEB-INF/beans.xml]: Bean class [cn.com.lsss.struts.action.LoginAction] not found; nested exception is java.lang.ClassNotFoundException: cn.com.lsss.struts.action.LoginAction
java.lang.ClassNotFoundException: cn.com.lsss.struts.action.LoginAction
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:199)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:41)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:108)
at org.springframework.beans.factory.support.BeanDefinitionReaderUtils.createBeanDefinition(BeanDefinitionReaderUtils.java:65)
at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(DefaultXmlBeanDefinitionParser.java:426)
at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(DefaultXmlBeanDefinitionParser.java:392)
at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions(DefaultXmlBeanDefinitionParser.java:307)
  相关解决方案