最近学习jasperreport,但是在配置完struts.xml后运行tomcat然后总是出现下面的问题,不知道该怎么办了,希望大家看看,帮助小弟一下!
?
struts.xml文件如下
?
<?xml version="1.0" encoding="gbk" ?>
?
<!doctype struts public
?? ?"-//apache software foundation//dtd struts configuration 2.0//en"
?? ?"http://struts.apache.org/dtds/struts-2.0.dtd">
?
?<struts>
?<constant name="struts.custom.i18n.resources" value="messageresource"></constant>
?<constant name="struts.i18n.encoding" value="gb2312"></constant>
?<span style="white-space: pre;"> </span><!-- 自己的包继承jasperreports-default -->
?<span style="white-space: pre;"> </span><package name="struts2" extends="struts-default,jasperreports-default">
?<span style="white-space: pre;"> </span>
?<span style="white-space: pre;"> </span><!-- 定义login的action,其实现类为net.hncu.action.reportaction-->
?<span style="white-space: pre;"> </span><action name="showreport" class="net.hncu.action.reportaction">
?<span style="white-space: pre;"> </span><!-- 定义处理结果与视图资源之间的关系 -->
?<span style="white-space: pre;"> </span><result name="success" type="jasper">
?<span style="white-space: pre;"> </span><!-- 指定报表设计文件所在路径 -->
?<span style="white-space: pre;"> </span><param name="location">jasper\struts_report.jasper</param>
?<span style="white-space: pre;"> </span><!-- 指定生成报表格式 -->
?<span style="white-space: pre;"> </span><param name="format">html</param>
?<span style="white-space: pre;"> </span><!-- 指定报表使用数据源-->
?<span style="white-space: pre;"> </span><param name="datasource">userslist</param>
?<span style="white-space: pre;"> </span></result>
?<span style="white-space: pre;"> </span></action>
?<span style="white-space: pre;"> </span></package>
?<span style="white-space: pre;"> </span><package name="image" extends="struts-default" ?namespace="/images">
?<span style="white-space: pre;"> </span><action name="px">
?<span style="white-space: pre;"> </span><result>px</result>
?<span style="white-space: pre;"> </span></action><span style="white-space: pre;"> </span>
?<span style="white-space: pre;"> </span></package>
?</struts>
<span style="color: #ff0000;">错误如下:</span>
?
信息: detected annotationactionvalidatormanager, initializing it...
2010-12-6 15:20:06 org.apache.catalina.core.standardwrappervalve invoke
严重: servlet.service() for servlet default threw exception
java.lang.classnotfoundexception: org.codehaus.groovy.runtime.callsite.callsitearray
<span style="white-space: pre;"> </span>at java.lang.classloader.findclass(classloader.java:359)
<span style="white-space: pre;"> </span>at java.lang.classloader.loadclass(classloader.java:307)
<span style="white-space: pre;"> </span>at java.lang.classloader.loadclass(classloader.java:252)
<span style="white-space: pre;"> </span>at java.lang.classloader.loadclassinternal(classloader.java:320)
<span style="white-space: pre;"> </span>at struts_report_1291618286815_103122.$createcallsitearray(calculator_struts_report_1291618286815_103122)
<span style="white-space: pre;"> </span>at struts_report_1291618286815_103122.$getcallsitearray(calculator_struts_report_1291618286815_103122)
<span style="white-space: pre;"> </span>at struts_report_1291618286815_103122.<init>(calculator_struts_report_1291618286815_103122)
<span style="white-space: pre;"> </span>at sun.reflect.nativeconstructoraccessorimpl.newinstance0(native method)
<span style="white-space: pre;"> </span>at sun.reflect.nativeconstructoraccessorimpl.newinstance(nativeconstructoraccessorimpl.java:39)
<span style="white-space: pre;"> </span>at sun.reflect.delegatingconstructoraccessorimpl.newinstance(delegatingconstructoraccessorimpl.java:27)
<span style="white-space: pre;"> </span>at java.lang.reflect.constructor.newinstance(constructor.java:513)
<span style="white-space: pre;"> </span>at java.lang.class.newinstance0(class.java:355)
<span style="white-space: pre;"> </span>at java.lang.class.newinstance(class.java:308)
<span style="white-space: pre;"> </span>at net.sf.jasperreports.engine.design.jrabstractjavacompiler.loadevaluator(jrabstractjavacompiler.java:98)
<span style="white-space: pre;"> </span>at net.sf.jasperreports.engine.design.jrabstractcompiler.loadevaluator(jrabstractcompiler.java:320)
<span style="white-space: pre;"> </span>at net.sf.jasperreports.engine.jaspercompilemanager.loadevaluator(jaspercompilemanager.java:240)
<span style="white-space: pre;"> </span>at net.sf.jasperreports.engine.fill.jrfilldataset.createcalculator(jrfilldataset.java:420)
<span style="white-space: pre;"> </span>at net.sf.jasperreports.engine.fill.jrbasefiller.<init>(jrbasefiller.java:432)
<span style="white-space: pre;"> </span>at net.sf.jasperreports.engine.fill.jrverticalfiller.<init>(jrverticalfiller.java:77)
<span style="white-space: pre;"> </span>at net.sf.jasperreports.engine.fill.jrverticalfiller.<init>(jrverticalfiller.java:87)
<span style="white-space: pre;"> </span>at net.sf.jasperreports.engine.fill.jrverticalfiller.<init>(jrverticalfiller.java:57)
<span style="white-space: pre;"> </span>at net.sf.jasperreports.engine.fill.jrfiller.createfiller(jrfiller.java:142)
<span style="white-space: pre;"> </span>at net.sf.jasperreports.engine.fill.jrfiller.fillreport(jrfiller.java:78)
<span style="white-space: pre;"> </span>at net.sf.jasperreports.engine.jasperfillmanager.fillreport(jasperfillmanager.java:624)
<span style="white-space: pre;"> </span>at org.apache.struts2.views.jasperreports.jasperreportsresult.doexecute(jasperreportsresult.java:240)
<span style="white-space: pre;"> </span>at org.apache.struts2.dispatcher.strutsresultsupport.execute(strutsresultsupport.java:178)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation.executeresult(defaultactioninvocation.java:348)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation.invoke(defaultactioninvocation.java:253)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.interceptor.defaultworkflowinterceptor.dointercept(defaultworkflowinterceptor.java:221)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.interceptor.methodfilterinterceptor.intercept(methodfilterinterceptor.java:86)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:224)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:223)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.util.profiling.utiltimerstack.profile(utiltimerstack.java:455)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation.invoke(defaultactioninvocation.java:221)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.validator.validationinterceptor.dointercept(validationinterceptor.java:150)
<span style="white-space: pre;"> </span>at org.apache.struts2.interceptor.validation.annotationvalidationinterceptor.dointercept(annotationvalidationinterceptor.java:48)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.interceptor.methodfilterinterceptor.intercept(methodfilterinterceptor.java:86)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:224)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:223)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.util.profiling.utiltimerstack.profile(utiltimerstack.java:455)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation.invoke(defaultactioninvocation.java:221)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.interceptor.conversionerrorinterceptor.intercept(conversionerrorinterceptor.java:123)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:224)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:223)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.util.profiling.utiltimerstack.profile(utiltimerstack.java:455)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation.invoke(defaultactioninvocation.java:221)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.interceptor.parametersinterceptor.dointercept(parametersinterceptor.java:167)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.interceptor.methodfilterinterceptor.intercept(methodfilterinterceptor.java:86)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:224)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:223)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.util.profiling.utiltimerstack.profile(utiltimerstack.java:455)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation.invoke(defaultactioninvocation.java:221)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.interceptor.staticparametersinterceptor.intercept(staticparametersinterceptor.java:105)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:224)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:223)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.util.profiling.utiltimerstack.profile(utiltimerstack.java:455)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation.invoke(defaultactioninvocation.java:221)
<span style="white-space: pre;"> </span>at org.apache.struts2.interceptor.checkboxinterceptor.intercept(checkboxinterceptor.java:83)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:224)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:223)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.util.profiling.utiltimerstack.profile(utiltimerstack.java:455)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation.invoke(defaultactioninvocation.java:221)
<span style="white-space: pre;"> </span>at org.apache.struts2.interceptor.fileuploadinterceptor.intercept(fileuploadinterceptor.java:207)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:224)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:223)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.util.profiling.utiltimerstack.profile(utiltimerstack.java:455)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation.invoke(defaultactioninvocation.java:221)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.interceptor.modeldriveninterceptor.intercept(modeldriveninterceptor.java:74)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:224)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:223)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.util.profiling.utiltimerstack.profile(utiltimerstack.java:455)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation.invoke(defaultactioninvocation.java:221)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.interceptor.scopedmodeldriveninterceptor.intercept(scopedmodeldriveninterceptor.java:127)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:224)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:223)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.util.profiling.utiltimerstack.profile(utiltimerstack.java:455)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation.invoke(defaultactioninvocation.java:221)
<span style="white-space: pre;"> </span>at org.apache.struts2.interceptor.profilingactivationinterceptor.intercept(profilingactivationinterceptor.java:107)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:224)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:223)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.util.profiling.utiltimerstack.profile(utiltimerstack.java:455)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation.invoke(defaultactioninvocation.java:221)
<span style="white-space: pre;"> </span>at org.apache.struts2.interceptor.debugging.debugginginterceptor.intercept(debugginginterceptor.java:206)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:224)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:223)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.util.profiling.utiltimerstack.profile(utiltimerstack.java:455)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation.invoke(defaultactioninvocation.java:221)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.interceptor.chaininginterceptor.intercept(chaininginterceptor.java:115)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:224)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:223)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.util.profiling.utiltimerstack.profile(utiltimerstack.java:455)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation.invoke(defaultactioninvocation.java:221)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.interceptor.i18ninterceptor.intercept(i18ninterceptor.java:143)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:224)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:223)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.util.profiling.utiltimerstack.profile(utiltimerstack.java:455)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation.invoke(defaultactioninvocation.java:221)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.interceptor.prepareinterceptor.dointercept(prepareinterceptor.java:121)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.interceptor.methodfilterinterceptor.intercept(methodfilterinterceptor.java:86)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:224)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:223)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.util.profiling.utiltimerstack.profile(utiltimerstack.java:455)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation.invoke(defaultactioninvocation.java:221)
<span style="white-space: pre;"> </span>at org.apache.struts2.interceptor.servletconfiginterceptor.intercept(servletconfiginterceptor.java:170)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:224)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:223)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.util.profiling.utiltimerstack.profile(utiltimerstack.java:455)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation.invoke(defaultactioninvocation.java:221)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.interceptor.aliasinterceptor.intercept(aliasinterceptor.java:123)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:224)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:223)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.util.profiling.utiltimerstack.profile(utiltimerstack.java:455)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation.invoke(defaultactioninvocation.java:221)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.interceptor.exceptionmappinginterceptor.intercept(exceptionmappinginterceptor.java:176)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:224)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling(defaultactioninvocation.java:223)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.util.profiling.utiltimerstack.profile(utiltimerstack.java:455)
<span style="white-space: pre;"> </span>at com.opensymphony.xwork2.defaultactioninvocation.invoke(defaultactioninvocation.java:221)
<span style="white-space: pre;"> </span>at org.apache.struts2.impl.strutsactionproxy.execute(strutsactionproxy.java:50)
<span style="white-space: pre;"> </span>at org.apache.struts2.dispatcher.dispatcher.serviceaction(dispatcher.java:504)
<span style="white-space: pre;"> </span>at org.apache.struts2.dispatcher.filterdispatcher.dofilter(filterdispatcher.java:419)
<span style="white-space: pre;"> </span>at org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:235)
<span style="white-space: pre;"> </span>at org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:206)
<span style="white-space: pre;"> </span>at org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:233)
<span style="white-space: pre;"> </span>at org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:191)
<span style="white-space: pre;"> </span>at org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:127)
<span style="white-space: pre;"> </span>at org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:102)
<span style="white-space: pre;"> </span>at org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:109)
<span style="white-space: pre;"> </span>at org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:298)
<span style="white-space: pre;"> </span>at org.apache.coyote.http11.http11aprprocessor.process(http11aprprocessor.java:861)
<span style="white-space: pre;"> </span>at org.apache.coyote.http11.http11aprprotocol$http11connectionhandler.process(http11aprprotocol.java:579)
<span style="white-space: pre;"> </span>at org.apache.tomcat.util.net.aprendpoint$worker.run(aprendpoint.java:1584)
<span style="white-space: pre;"> </span>at java.lang.thread.run(thread.java:619)