176142998

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  116 Posts :: 0 Stories :: 45 Comments :: 0 Trackbacks

#

转载于在webwork的文章
1 配置struts.properties文件,指定spring作为struts的IoC容器
struts.objectFactory = spring
(1)默认的autowiring模式是:by name
即如果applicationContext.xml文件中的bean id与struts.xml文件中的action name相同,就
(2)如果要改为其他模式:
struts.objectFactory.spring.autoWire = name|type|auto|constructor
2 配置web.xml文件,启动Spring侦听器
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
3 在WEB-INF目录下增加applicationContext.xml文件
例:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans default-autowire="autodetect">
<bean id="personManager" class="com.acme.PersonManager"/>
...
</beans>
4 设置由Spring来初始化action
4.1  在Spring的applicationContext.xml文件中配置bean(即action类)
4.2  将struts.xml中的action的class属性,由class名改为Spring中定义的bean名
例如:
(1)applicationContext.xml中,定义bean id是bar
<beans default-autowire="autodetect">
<bean id="bar" class="com.my.BarClass" singleton="false"/>
...
</beans>
(2)struts.xml中,action的class="bar",而不是通常的类名
<package name="secure" namespace="/secure" extends="default">
<action name="bar" class="bar">
<result>bar.ftl</result>
</action>
</package>
posted @ 2008-07-31 17:28 飞飞 阅读(468) | 评论 (0)编辑 收藏

2008-7-31 16:49:25 org.apache.struts2.config.Settings getLocale
警告: Settings: Could not parse struts.locale setting, substituting default VM locale
2008-7-31 16:49:26 com.opensymphony.xwork2.util.ObjectTypeDeterminerFactory <clinit>
信息: Setting DefaultObjectTypeDeterminer as default ...

错误信息 : WARN [struts2.config.Settings] Settings: Could not parse struts.locale setting, substituting default VM locale
解决方法 : 在 struts.properties 文件中加上 struts.locale=en_US
或者在struts.xml中加入<constant name="struts.locale" value="en_US"/>



信息: Server startup in 23313 ms
2008-7-31 16:59:47 org.apache.struts2.components.Form evaluateExtraParamsServletRequest
警告: No configuration found for the specified action: '/mystruts/sum.action' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
2008-7-31 16:59:50 org.apache.struts2.components.Form evaluateExtraParamsServletRequest
警告: No configuration found for the specified action: '/mystruts/sum.action' in namespace: ''. Form action defaulting to 'action' attribute's literal value.


在struts.xml 中的sction 中取消namespace="/mystruts" 则会无此信息


信息: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/struts2] has not been started
2008-7-31 17:34:12 org.apache.catalina.core.ApplicationContext log
信息: 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.
2008-7-31 17:34:14 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
Cannot locate the chosen ObjectFactory implementation: com.opensymphony.xwork2.ObjectFactory  - [unknown location]
 at org.apache.struts2.config.BeanSelectionProvider.alias(BeanSelectionProvider.java:224)
 at org.apache.struts2.config.BeanSelectionProvider.alias(BeanSelectionProvider.java:195)
 at org.apache.struts2.config.BeanSelectionProvider.register(BeanSelectionProvider.java:153)
 at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131)
 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
 at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
 at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
 at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
 at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
 at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
 at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3693)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4340)
 at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1105)
 at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1203)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
 at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
 at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
 at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
 at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
 at java.lang.Thread.run(Unknown Source)
2008-7-31 17:34:14 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2008-7-31 17:34:14 org.apache.catalina.core.StandardContext start
严重: Context [/struts2] startup failed due to previous errors
2008-7-31 17:34:14 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext


struts.properties 文件设置如下:

         struts.objectFactory = spring


原因:

        缺少 struts2-spring-plugin-2.0.11.1.jar

 

Struts2 中使用 Spring 的 IOC 应加入以下 jar 包

        spring-core-2.0.5.jar

        spring-beans-2.0.5.jar

        spring-context-2.0.5.jar

        spring-web-2.0.5.jar

        struts2-spring-plugin-2.0.11.1.jar

 

/WEB-INF/web.xml 文件中加入SpringContextLoaderListener 监听器,方便Spring与Web容器交互。

        <listener>
             <listener-class>
                   org.springframework.web.context.ContextLoaderListener
             </listener-class>
         </listener>

posted @ 2008-07-31 17:06 飞飞 阅读(1169) | 评论 (0)编辑 收藏

//dao注入
private static String hqlname = "from User u where u.name=?";
 private static String hqlpassword = "from User u where u.password=?";

public boolean isValidUser(String one,int i){
  List userList;
  if(i==0){
    userList=this.getHibernateTemplate().find(hqlname+"",one);
  }else{
    userList=this.getHibernateTemplate().find(hqlpassword+"",one);
   
  }
  if (userList.size() > 0) {
   return true;
  }
  
  return false;
  
 }


//action

  if(userDao.isValidUser(name, password)){
   
   //return mapping.findForward("welcome");
   return new ActionForward("/pages/welcome.jsp");
  }else{
   
   ActionMessages message = new ActionMessages();
   
   if(userDao.isValidUser(name,0)){
    
   }else{
    message.add("name",new ActionMessage("name.error",true));
   }
   if(userDao.isValidUser(password,1)){
    
   }else{
    message.add("password",new ActionMessage("password.error",true));
   }

   this.saveErrors(request,message);
   //return new ActionForward("/pages/login.jsp");
   return mapping.findForward("welcome");
  }

posted @ 2008-07-31 16:15 飞飞 阅读(335) | 评论 (0)编辑 收藏

color=violet][/color][color=violet]本系列教程为转载自http://www.blogjava.net/nokiaguy/archive

在本系列教程中我们将学习到Struts2的各种技术。在本教程中使用的工具和程序库的版本如下:
开发工具:MyEclipse6

Web服务器:Tomcat6

Struts版本:Struts2.0.11.1

JDK版本:JDK1.5.0_12

J2EE版本:Java EE5.0

在本系列教程中Web工程的上下文路径都是struts2,如果在Web根目录有一个index.jsp文件,则访问路径如下:

http://localhost:8080/struts2/index.jsp

由于MyEclipse6目前并不支持Struts2,所以我们需要到struts.apache.org去下载Struts2安装包。要想正常使用Struts2,至少需要如下五个包(可能会因为Struts2的版本不同,包名略有差异,但包名的前半部是一样的)。

struts2-core-2.0.11.1.jar

xwork-2.0.4.jar

commons-logging-1.0.4.jar

freemarker-2.3.8.jar

ognl-2.6.11.jar

Struts2虽然在大版本号上是第二个版本,但基本上在配置和使用上已经完全颠覆了Struts1.x的方式(当然,Struts2仍然是基于MVC模式的,也是动作驱动的,可能这是唯一没变的东西)。Struts2实际上是在Webwork基础上构建起来的MVC框架。我们从Struts2的源代码中可以看到,有很多都是直接使用的xwork(Webwork的核心技术)的包。既然从技术上来说Struts2是全新的框架,那么就让我们来学习一下这个新的框架的使用方法。

如果大家使用过Struts1.x,应该对建立基于Struts1.x的Web程序的基本步骤非常清楚。让我们先来回顾一下建立基于Struts1.x的Web程序的基本步骤。

1. 安装Struts。由于Struts的入口点是ActionServlet,所以得在web.xml中配置一下这个Servlet。

2. 编写Action类(一般从org.apache.struts.action.Action类继承)。

3. 编写ActionForm类(一般从org.apache.struts.action.ActionForm类继承),这一步不是必须的,如果要接收客户端提交的数据,需要执行这一步。

4. 在struts-config.xml文件中配置Action和ActionForm。

5. 如果要采集用户录入的数据,一般需要编写若干JSP页面,并通过这些JSP页面中的form将数据提交给Action。

下面我们就按着编写struts1.x程序的这五步和struts2.x程序的编写过程一一对应,看看它们谁更“酷”。下面我们来编写一个基于Struts2的Web程序。这个程序的功能是让用户录入两个整数,并提交给一个Struts Action,并计算这两个数的代数和,如果代码和为非负数,则跳转到positive.jsp页面,否则跳转到negative.jsp页面。



【第1步】 安装Struts2

这一步对于Struts1.x和Struts2都是必须的,只是安装的方法不同。Struts1的入口点是一个Servlet,而Struts2的入口点是一个过滤器(Filter)。因此,Struts2要按过滤器的方式配置。下面是在web.xml中配置Struts2的代码:

<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>


【第2步】 编写Action类

这一步和Struts1.x也必须进行。只是Struts1.x中的动作类必须从Action类中继承,而Struts2.x的动作类需要从com.opensymphony.xwork2.ActionSupport类继承。下面是计算两个整数代码和的Action类,代码如下:
package action;

import com.opensymphony.xwork2.ActionSupport;

public class FirstAction extends ActionSupport
{
private int operand1;
private int operand2;

public String execute() throws Exception
{
if (getSum() >= 0) // 如果代码数和是非负整数,跳到positive.jsp页面
{
return "positive";
}
else // 如果代码数和是负整数,跳到negative.jsp页面
{
return "negative";
}
}

public int getOperand1()
{
return operand1;
}

public void setOperand1(int operand1)
{
System.out.println(operand1);
this.operand1 = operand1;
}

public int getOperand2()
{
return operand2;
}
public void setOperand2(int operand2)
{
System.out.println(operand2);
this.operand2 = operand2;
}
public int getSum()
{
return operand1 + operand2; // 计算两个整数的代码数和
}
}

从上面的代码可以看出,动作类的一个特征就是要覆盖execute方法,只是Struts2的execute方法没有参数了,而Struts1.x的execute方法有四个参数。而且execute方法的返回值也不同的。Struts2只返回一个String,用于表述执行结果(就是一个标志)。上面代码的其他部分将在下面讲解。



【第3步】 编写ActionForm类

在本例中当然需要使用ActionForm了。在Struts1.x中,必须要单独建立一个ActionForm类(或是定义一个动作Form),而在Struts2中ActionForm和Action已经二合一了。从第二步的代码可以看出,后面的部分就是应该写在ActionForm类中的内容。所以在第2步,本例的ActionForm类已经编写完成(就是Action类的后半部分)。

【第4步】 配置Action类

这一步struts1.x和struts2.x都是必须的,只是在struts1.x中的配置文件一般叫struts-config.xml(当然也可以是其他的文件名),而且一般放到WEB-INF目录中。而在struts2.x中的配置文件一般为struts.xml,放到WEB-INF"classes目录中。下面是在struts.xml中配置动作类的代码:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="struts2" namespace="/mystruts"
extends="struts-default">
<action name="sum" class="action.FirstAction">
<result name="positive">/positive.jsp</result>
<result name="negative">/negative.jsp</result>
</action>
</package>
</struts>

在<struts>标签中可以有多个<package>,第一个<package>可以指定一个Servlet访问路径(不包括动作名),如“/mystruts”。extends属性继承一个默认的配置文件“struts-default”,一般都继承于它,大家可以先不去管它。<action>标签中的name属性表示动作名,class表示动作类名。

<result>标签的name实际上就是execute方法返回的字符串,如果返回的是“positive”,就跳转到positive.jsp页面,如果是“negative”,就跳转到negative.jsp页面。在<struts>中可以有多个<package>,在<package>中可以有多个<action>。我们可以用如下的URL来访问这个动作:

http://localhost:8080/struts2/mystruts/sum.action

注:Struts1.x的动作一般都以.do结尾,而Struts2是以.action结尾。

【第5步】 编写用户录入接口(JSP页面)

1. 主界面(sum.jsp)

在Web根目录建立一个sum.jsp,代码如下:

<%@ page language="java" import="java.util.*" pageEncoding="GBK" %>
<%@ taglib prefix="s" uri="/struts-tags"%>

<html>
<head>
<title>输入操作数</title>
</head>

<body>
求代数和
<br/>
<s:form action="mystruts/sum.action" >
<s:textfield name="operand1" label=" 操作数1"/>
<s:textfield name="operand2" label=" 操作数2" />
<s:submit value="代数和" />
</s:form>
</body>
</html>

在sum.jsp中使用了Struts2带的tag。在Struts2中已经将Struts1.x的好几个标签库都统一了,在Struts2中只有一个标签库/struts-tags。这里面包含了所有的Struts2标签。但使用Struts2的标签大家要注意一下。在<s:form>中最好都使用Struts2标签,尽量不要用HTML或普通文本,大家可以将sum.jsp的代码改为如下的形式,看看会出现什么效果:

... ...

求代数和

<br/>

<s:form action="mystruts/sum.action" >

操作数1:<s:textfield name="operand1" /><br/>

操作数2:<s:textfield name="operand1" /><br/>

<s:submit value="代数和" />

</s:form>

... ...

提示一下,在<s:form>中Struts2使用<table>定位。

2. positive.jsp

<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%@ taglib prefix="s" uri="/struts-tags" %>

<html>
<head>
<title>显示代数和</title>
</head>

<body>
代数和为非负整数<h1><s:property value="sum" /></h1>
</body>
</html>

3. negative.jsp

<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%@ taglib prefix="s" uri="/struts-tags" %>

<html>
<head>
<title>显示代数和</title>
</head>

<body>
代数和为负整数<h1><s:property value="sum" /></h1>

</body>
</html>


这两个jsp页面的实现代码基本一样,只使用了一个<s:property>标签来显示Action类中的sum属性值。<s:property>标签是从request对象中获得了一个对象中得到的sum属性,如我们可以使用如下的代码来代替<s:property value=”sum”/>:


<%

com.opensymphony.xwork2.util.OgnlValueStack ovs =

(com.opensymphony.xwork2.util.OgnlValueStack)request.getAttribute("struts.valueStack");

out.println(ovs.findString("sum"));

%>

启动Tomcat后,在IE中输入如下的URL来测试这个例子:
posted @ 2008-07-31 16:10 飞飞 阅读(226) | 评论 (0)编辑 收藏

<2008-7-30 上午10时05分22秒 CST> <Error> <HTTP> <BEA-101020> <[ServletContext(id=3534409,name=WebRoot,context-path=/WebRoot)] Servlet failed with Exception
java.lang.IllegalStateException: Root context attribute is not of type WebApplicationContext: org.springframework.web.context.support.XmlWebApplicationContext: display name [Root WebApplicationContext]; startup date [Wed Jul 30 10:00:52 CST 2008]; root of context hierarchy; config locations [/WEB-INF/classes/applicationContext.xml,/WEB-INF/classes/applicationContext-lucene.xml,/WEB-INF/classes/applicationContext-webservice.xml,/WEB-INF/classes/applicationContext-manager.xml]
 at org.springframework.web.context.support.WebApplicationContextUtils.getWebApplicationContext(WebApplicationContextUtils.java:66)
 at org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:84)
 at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.lookupSessionFactory(OpenSessionInViewFilter.java:221)
 at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.lookupSessionFactory(OpenSessionInViewFilter.java:207)
 at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:146)
 at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
 at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
 at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:78)
 at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
 at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
 at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6458)
 at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
 at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
 at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3661)
 at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630)
 at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
 at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
>




2008-07-30 14:19:25,015 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - <Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]>
2008-07-30 14:19:25,093 INFO [org.springframework.jdbc.support.SQLErrorCodesFactory] - <SQLErrorCodes loaded: [DB2, HSQL, MS-SQL, MySQL, Oracle, Informix, PostgreSQL, Sybase]>
2008-07-30 14:19:25,296 INFO [org.codehaus.xfire.handler.DefaultFaultHandler] - <Fault occurred!>
org.codehaus.xfire.fault.XFireFault: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from com.centralsoft.domain.XtUser user where user.userName like ?]; nested exception is org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from com.centralsoft.domain.XtUser user where user.userName like ?]
 at org.codehaus.xfire.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:68)
 at org.codehaus.xfire.service.binding.ServiceInvocationHandler.sendMessage(ServiceInvocationHandler.java:271)
 at org.codehaus.xfire.service.binding.ServiceInvocationHandler$1.run(ServiceInvocationHandler.java:85)
 at org.codehaus.xfire.service.binding.ServiceInvocationHandler.execute(ServiceInvocationHandler.java:132)
 at org.codehaus.xfire.service.binding.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:107)
 at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:98)
 at org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:61)
 at org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
 at org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:278)
 at org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:144)
 at org.codehaus.xfire.spring.remoting.XFireServletControllerAdapter.handleRequest(XFireServletControllerAdapter.java:63)
 at org.codehaus.xfire.spring.remoting.XFireExporter.handleRequest(XFireExporter.java:44)
 at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:45)
 at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:796)
 at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:727)
 at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396)
 at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:360)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
 at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
 at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
 at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
 at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
 at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
 at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
 at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:78)
 at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
 at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
 at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6458)
 at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
 at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
 at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3661)
 at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630)
 at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
 at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
Caused by: org.springframework.orm.hibernate3.HibernateQueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from com.centralsoft.domain.XtUser user where user.userName like ?]; nested exception is org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from com.centralsoft.domain.XtUser user where user.userName like ?]
 at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:647)
 at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:413)
 at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:371)
 at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:822)
 at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:818)
 at com.centralsoft.framework.commons.BaseHibernateDao.find(BaseHibernateDao.java:59)
 at com.centralsoft.logic.GsManager.findUserByName(GsManager.java:252)
 at com.centralsoft.logic.GsManager$$FastClassByCGLIB$$e34716b5.invoke(<generated>)
 at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
 at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:710)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
 at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:100)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
 at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:648)
 at com.centralsoft.logic.GsManager$$EnhancerByCGLIB$$cdf7d204.findUserByName(<generated>)
 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:324)
 at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:288)
 at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:165)
 at $Proxy11.findUserByName(Unknown Source)
 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:324)
 at org.codehaus.xfire.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:52)
 ... 35 more
Caused by: org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from com.centralsoft.domain.XtUser user where user.userName like ?]
 at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:57)
 at antlr.CharScanner.setTokenObjectClass(CharScanner.java:340)
 at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(HqlLexer.java:31)
 at antlr.CharScanner.<init>(CharScanner.java:51)
 at antlr.CharScanner.<init>(CharScanner.java:60)
 at org.hibernate.hql.antlr.HqlBaseLexer.<init>(HqlBaseLexer.java:56)
 at org.hibernate.hql.antlr.HqlBaseLexer.<init>(HqlBaseLexer.java:53)
 at org.hibernate.hql.antlr.HqlBaseLexer.<init>(HqlBaseLexer.java:50)
 at org.hibernate.hql.ast.HqlLexer.<init>(HqlLexer.java:26)
 at org.hibernate.hql.ast.HqlParser.getInstance(HqlParser.java:44)
 at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:232)
 at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:155)
 at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:109)
 at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:75)
 at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:54)
 at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71)
 at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
 at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
 at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1583)
 at org.springframework.orm.hibernate3.HibernateTemplate$29.doInHibernate(HibernateTemplate.java:824)
 at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:366)
 ... 59 more



2008/8/1 9:57:2 : ----AFF_NAME & AFF_ACTION & PAGE_URL:com.centralsoft.gs.affair.sldj.QyslsjqyAff   querywdqy   qy_sl_sjqywdcx
weblogic.jdbc.common.internal.RmiDataSource@10fe215
org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space between public and system identifiers
 at [row,col {unknown-source}]: [1,55]
org.codehaus.xfire.fault.XFireFault: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space between public and system identifiers
 at [row,col {unknown-source}]: [1,55]
 at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
 at org.codehaus.xfire.client.Client.onReceive(Client.java:467)
 at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:182)
 at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:67)
 at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
 at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:98)
 at org.codehaus.xfire.client.Client.invoke(Client.java:360)
 at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
 at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
 at $Proxy13.findQyListByIndex(Unknown Source)
 at com.centralsoft.client.GsServiceClent.findQyListByIndex(GsServiceClent.java:85)
 at com.centralsoft.gs.affair.sldj.QyslsjqyAff.querywdqy(QyslsjqyAff.java:571)
 at com.centralsoft.gs.affair.sldj.QyslsjqyAff.goToAction(QyslsjqyAff.java:23)
 at com.centralsoft.gs.affair.Affair.doAct(Affair.java:37)
 at com.centralsoft.gs.dao.JDBCcontainer.doAff(JDBCcontainer.java:93)
 at com.centralsoft.gs.servlet.GSServlet.doAff(GSServlet.java:194)
 at com.centralsoft.gs.servlet.GSServlet.doPost(GSServlet.java:147)
 at com.centralsoft.gs.servlet.GSServlet.doGet(GSServlet.java:58)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
 at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
 at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
 at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
 at com.centralsoft.gs.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:75)
 at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
 at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6458)
 at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
 at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
 at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3661)
 at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630)
 at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
 at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space between public and system identifiers
 at [row,col {unknown-source}]: [1,55]
 at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:600)
 at com.ctc.wstx.sr.BasicStreamReader.startDTD(BasicStreamReader.java:2318)
 at com.ctc.wstx.sr.BasicStreamReader.nextFromPrologBang(BasicStreamReader.java:2234)
 at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:1900)
 at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1026)
 at org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:44)
 at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:98)
 at org.codehaus.xfire.client.Client.onReceive(Client.java:450)
 ... 31 more
posted @ 2008-07-30 10:25 飞飞 阅读(3782) | 评论 (2)编辑 收藏

如果用Hibernate与数据库 Microsoft SQLServer 2000组合,在取子表集合的时候会抛出异常:
org.hibernate.exception.GenericJDBCException: could not initialize a collection:
和异常:SQL Server 2000 Driver for JDBC ResultSet can not re-read row data for column 1
这是因为微软的Microsoft SQLServer驱动有以下问题:
1、如果采用jdbc-odbc驱动,那么就必须按照查询顺序来一次读取(不论有没有image或text类型)

2、如果采用微软提供的ms sql server jdbc driver,如果查询语句中,不存在image或text类型字段,那么可以按照无序获取

3、如果采用微软提供的ms sql server jdbc driver,如果查询语句中,存在image或text类型字段,那么就必须按照顺序读取,否则就会报告Driver]ResultSet can not re-read row data for column之类的错误

4、如果想不查询语句中有没有image或text类型字段,都可以不按照顺序获取,或重复获取。
Hibernate在取子表集合时,它的不是按查询顺序来一次读取的,所以会抛出上述异常.
解决办法:
更换Microsoft SQLServer驱动,我现在用的是jtds-1.2.jar,这个驱动包大家可以到CSDN下载.
它的连接字符串是:jdbc:jtds:sqlserver://localhost:1433;DatabaseName=数据库名
驱动类:net.sourceforge.jtds.jdbc.Driver,
问题解决了. 

posted @ 2008-07-30 10:01 飞飞 阅读(1531) | 评论 (0)编辑 收藏

 前段时间也用XFire(xfire-1.1.1)做WebService,是QName类冲突:  
  stax-api-1.0.jar中的javax.xml.namespace.QName   和   WebLogic:   bea8.1.2\weblogic81\server\lib\目录中的相应jar包中的相同类有版本冲突(在Win2000professional直接搜索包含文字:QName,以查找哪些jar包中包含QName;   注意::Win2003版本改变了查找方式,不能这样查找)  
   
  解决办法:    
          删除WebLogic的上述目录中含有QName类的jar文件中的namespace目录,再将XFire提供的stax-api-1.0.jar文件复制到WebLogic的上述目录中.

以下包有QNAME
weblogic.jar
webserviceclient.jar
webserviceclient+ssl.jar
webserviceclient+ssl_pj.jar
wsclient81.jar
posted @ 2008-07-30 09:53 飞飞 阅读(2479) | 评论 (2)编辑 收藏

信息: Initializing WebApplicationContext for Struts ActionServlet 'action', module ''
2008-7-27 22:26:03 org.apache.catalina.core.ApplicationContext log
严重: action: null
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool
 at java.lang.Class.getDeclaredConstructors0(Native Method)
 at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
 at java.lang.Class.getConstructor0(Unknown Source)
 at java.lang.Class.getDeclaredConstructor(Unknown Source)
 at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:54)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:759)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:724)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:387)
 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
 at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
 at org.springframework.web.struts.ContextLoaderPlugIn.createWebApplicationContext(ContextLoaderPlugIn.java:355)
 at org.springframework.web.struts.ContextLoaderPlugIn.initWebApplicationContext(ContextLoaderPlugIn.java:296)
 at org.springframework.web.struts.ContextLoaderPlugIn.init(ContextLoaderPlugIn.java:225)
 at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:871)
 at org.apache.struts.action.ActionServlet.init(ActionServlet.java:359)
 at javax.servlet.GenericServlet.init(GenericServlet.java:212)
 at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
 at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4042)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4348)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
 at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
 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(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2008-7-27 22:26:03 org.apache.catalina.core.ApplicationContext log
信息: Marking servlet action as unavailable
2008-7-27 22:26:03 org.apache.catalina.core.StandardContext loadOnStartup
严重: Servlet /hyrqSystem threw load() exception
javax.servlet.UnavailableException
 at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:880)
 at org.apache.struts.action.ActionServlet.init(ActionServlet.java:359)
 at javax.servlet.GenericServlet.init(GenericServlet.java:212)
 at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
 at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4042)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4348)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
 at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
 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(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2008-7-27 22:26:03 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2008-7-27 22:26:03 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2008-7-27 22:26:03 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/47  config=null
2008-7-27 22:26:03 org.apache.catalina.startup.Catalina start
信息: Server startup in 8940 ms

今天做了webwork+spring+hibernate框架的集成,
一启动Tomcat服务器就出了一大堆异常
报的错误是java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool
在网上查找错误的原因,说是缺少了一个commons-pool.jar文件
在myeclipse的安装目录下搜索,得到这个文件.放进lib文件夹.
问题解决!



严重: action: null
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [javax.sql.DataSource] for property 'dataSource'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type [javax.sql.DataSource] for property 'dataSource': no matching editors or conversion strategy found
Caused by: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [javax.sql.DataSource] for property 'dataSource'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type [javax.sql.DataSource] for property 'dataSource': no matching editors or conversion strategy found
Caused by: java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type [javax.sql.DataSource] for property 'dataSource': no matching editors or conversion strategy found
 at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:231)
 at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:138)
 at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:380)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1112)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:862)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:424)
 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
 at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284)
 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
 at org.springframework.web.struts.ContextLoaderPlugIn.createWebApplicationContext(ContextLoaderPlugIn.java:355)
 at org.springframework.web.struts.ContextLoaderPlugIn.initWebApplicationContext(ContextLoaderPlugIn.java:296)
 at org.springframework.web.struts.ContextLoaderPlugIn.init(ContextLoaderPlugIn.java:225)
 at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:871)
 at org.apache.struts.action.ActionServlet.init(ActionServlet.java:359)
 at javax.servlet.GenericServlet.init(GenericServlet.java:212)
 at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
 at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4042)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4348)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
 at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
 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(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2008-7-27 22:29:15 org.apache.catalina.core.ApplicationContext log
信息: Marking servlet action as unavailable
2008-7-27 22:29:15 org.apache.catalina.core.StandardContext loadOnStartup
严重: Servlet /hyrqSystem threw load() exception
javax.servlet.UnavailableException
 at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:880)
 at org.apache.struts.action.ActionServlet.init(ActionServlet.java:359)
 at javax.servlet.GenericServlet.init(GenericServlet.java:212)
 at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
 at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4042)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4348)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
 at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
 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(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2008-7-27 22:29:16 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2008-7-27 22:29:16 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2008-7-27 22:29:16 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/47  config=null
2008-7-27 22:29:16 org.apache.catalina.startup.Catalina start
信息: Server startup in 9498 ms

从报错机制可以看出来,spring出现异常不同于普通的java异常,我们查异常的习惯一般是关注第一行,但是sping恰恰相反,要在sping中查错,你必须分解他,因为spring的嵌套层次比较多,它报错是从最高层报起,然后逐层往下,每个层次都会要报错,直到最终出错的地方,因此查sping的错必须逐层分解到最底层,那里才是真正出错的地方。

OK,现在看出来了,真正错误的原因是:
java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type [javax.sql.DataSource] for property 'dataSource'



严重: action: null
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.SecurityException: class "org.apache.commons.collections.SequencedHashMap"'s signer information does not match signer information of other classes in the same package
Caused by: java.lang.SecurityException: class "org.apache.commons.collections.SequencedHashMap"'s signer information does not match signer information of other classes in the same package
 at java.lang.ClassLoader.checkCerts(Unknown Source)
 at java.lang.ClassLoader.preDefineClass(Unknown Source)
 at java.lang.ClassLoader.defineClass(Unknown Source)
 at java.security.SecureClassLoader.defineClass(Unknown Source)
 at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1817)
 at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)
 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325)
 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
 at java.lang.ClassLoader.loadClassInternal(Unknown Source)
 at org.hibernate.mapping.Table.<init>(Table.java:33)
 at org.hibernate.cfg.Mappings.addTable(Mappings.java:165)
 at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:299)
 at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:282)
 at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:153)
 at org.hibernate.cfg.Configuration.add(Configuration.java:386)
 at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:427)
 at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:656)
 at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1202)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:428)
 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
 at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284)
 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
 at org.springframework.web.struts.ContextLoaderPlugIn.createWebApplicationContext(ContextLoaderPlugIn.java:355)
 at org.springframework.web.struts.ContextLoaderPlugIn.initWebApplicationContext(ContextLoaderPlugIn.java:296)
 at org.springframework.web.struts.ContextLoaderPlugIn.init(ContextLoaderPlugIn.java:225)
 at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:871)
 at org.apache.struts.action.ActionServlet.init(ActionServlet.java:359)
 at javax.servlet.GenericServlet.init(GenericServlet.java:212)
 at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
 at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4042)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4348)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
 at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
 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(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2008-7-27 22:36:57 org.apache.catalina.core.ApplicationContext log
信息: Marking servlet action as unavailable
2008-7-27 22:36:57 org.apache.catalina.core.StandardContext loadOnStartup
严重: Servlet /hyrqSystem threw load() exception
javax.servlet.UnavailableException
 at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:880)
 at org.apache.struts.action.ActionServlet.init(ActionServlet.java:359)
 at javax.servlet.GenericServlet.init(GenericServlet.java:212)
 at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
 at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4042)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4348)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
 at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
 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(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2008-7-27 22:36:57 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080

这种问题,我认为是你工程里的commons-collections.jar包与其它包不匹配导致的,例如如果你用commons-beanutils-1.7.0.jar,commons-collections-3.2.jar时会出现你的那种问题,如果是commons-beanutils-1.7.0.jar,commons-collections-3.1.jar就不会就这种问题了
posted @ 2008-07-27 22:27 飞飞 阅读(5145) | 评论 (0)编辑 收藏

如果struts-taglib.jar在classpath上,那么在jsp当中只要这样写就行:

<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html" %>
<%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean" %>
<%@ taglib prefix="logic" uri="http://struts.apache.org/tags-logic"%>
posted @ 2008-07-27 12:43 飞飞 阅读(1263) | 评论 (2)编辑 收藏

org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name 'addUser' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Class that bean class [test.spring.InsertUser] depends on not found; nested exception is java.lang.NoClassDefFoundError: net/sf/hibernate/HibernateException
java.lang.NoClassDefFoundError: net/sf/hibernate/HibernateException
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:242)
        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)
        at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:191)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:295)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:223)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:173)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:148)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
        at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:126)
        at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:269)
        at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
2007-07-02 15:02:49,312 ERROR  Catalina .[localhost].[/jbeingo]:3768  -> Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name 'addUser' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Class that bean class [test.spring.InsertUser] depends on not found; nested exception is java.lang.NoClassDefFoundError: net/sf/hibernate/HibernateException
java.lang.NoClassDefFoundError: net/sf/hibernate/HibernateException
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:242)
        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)
        at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:191)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:295)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:223)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:173)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:148)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
        at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:126)
        at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:269)
        at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:448)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
        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:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
2007-07-02 15:02:49,328 INFO   Catalina .[localhost].[/jbeingo]:647  -> Closing Spring root WebApplicationContext

解决方案:
下载commons-beanutils-1.7.0.zip;
将其中commons-beanutils.jar文件替换Tomcat6.0下WEB-INF/lib/commons-beanutils-1.7;
解决问题.
posted @ 2008-07-27 12:29 飞飞 阅读(1250) | 评论 (0)编辑 收藏

仅列出标题
共12页: First 上一页 4 5 6 7 8 9 10 11 12 下一页