异常信息如下:
2009-08-09 10:35:40 [org.directwebremoting.servlet.ExceptionHandler : org.directwebremoting.util.CommonsLoggingOutput.warn(CommonsLoggingOutput.java:59)]-[WARN] Error: java.lang.SecurityException: No class by name: validates
2009-08-09 10:35:40 [org.directwebremoting.servlet.ExceptionHandler : org.directwebremoting.util.CommonsLoggingOutput.warn(CommonsLoggingOutput.java:67)]-[WARN] Sent 501
java.lang.SecurityException: No class by name: validates
at org.directwebremoting.impl.DefaultCreatorManager.getCreator(DefaultCreatorManager.java:189)
at org.directwebremoting.impl.DefaultRemoter.generateInterfaceScript(DefaultRemoter.java:158)
at org.directwebremoting.servlet.InterfaceHandler.handle(InterfaceHandler.java:45)
at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101)
at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146)
at org.directwebremoting.servlet.DwrServlet.doGet(DwrServlet.java:132)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.citsoft.comm.EncodingFilter.doFilter(EncodingFilter.java:45)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:595)
解决方法:
(1)去掉加载页面中 <script type="text/javascript" src="/qy/dwr/interface/validates.js"></script>的引用
(2)从dwr.jar中org.directwebremoting包中找到dwr.xml配置文件,然后copy 如下代码片段
<!DOCTYPE dwr PUBLIC
"-//GetAhead Limited//DTD Direct Web Remoting 2.0//EN"
"http://getahead.org/dwr/dwr20.dtd">
到你的应用中(WEB-INF/dwr.xml)中