2013-05-09 69 views
0

.jasper文件,然後在Eclipse中,而我運行下面的構建腳本能夠從的.jrxml得到.jasper文件,然後我得到以下錯誤:如何從.jrxml爲

build.xml:16: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory 

在build.xml:

<?xml version="1.0" encoding="UTF-8"?> 
    <project name="jasperreports" default="compile" basedir="."> 
    <path id="classpath"> 
     <pathelement location="."/> 
     <fileset dir="lib" erroronmissingdir="false"> 
      <include name="**/*.jar"/> 
     </fileset> 
    </path> 
    <target name="compile"> 
      <taskdef name="jrc" classname="net.sf.jasperreports.ant.JRAntCompileTask"> 
       <classpath refid="classpath"/> 
      </taskdef> 
      <jrc 
       destdir="reports" 
       tempdir="reports" 
       keepjava="false"> 
       <src> 
        <fileset dir="reports"> 
         <include name="**/*.jrxml"/> 
        </fileset> 
       </src> 
       <classpath refid="classpath"/> 
      </jrc> 
    </target> 
</project> 
+0

[將參數傳遞給java中沒有數據庫的jasper報告](http://stackoverflow.com/questions)/7888064 /傳遞參數到碧玉報告從 - java的不-DB) – 2013-05-09 07:18:19

回答

0

我已經添加下面的jar lib文件夾和CLASSPATH,它的完成:公共流.jar燒烤-1.5-beta1 barcode4j-2.0 commons-beanutils-1.8.0 commons-collections-2.1 commons-javaflow.jar commons-javaflow-20060411 jline-0.9.94 js-1.7R1 junit-3.8.2 persistence-api- 1.0 saaj-api-1.3 spring-beans-2.5 spring-core-2.5 xml -apis-1.3.04