java - Jasper Reports Error: compiler class not found : org.codehaus.mojo.jasperreports.MavenJavacCompiler -
i working on legacy application uses old version of jasper reports. jul, build failing because jasper reports version 2.0.5 has dependency on itext version [1.02b,) in turn pointing version 4.2.2 not exist in maven repository. more details given in link below
dependency error in jasper-reports itext
on following answers updated jasperreports version 3.5.3
<dependency> <groupid>jasperreports</groupid> <artifactid>jasperreports</artifactid> <version>3.5.3</version> </dependency>
and tried
<dependencies> <dependency> <groupid>jasperreports</groupid> <artifactid>jasperreports</artifactid> <version>2.0.1</version> <exclusions> <exclusion> <groupid>com.lowagie</groupid> <artifactid>itext</artifactid> </exclusion> </exclusions> </dependency> <dependency> <groupid>com.lowagie</groupid> <artifactid>itext</artifactid> <version>2.1.7</version> <scope>compile</scope> </dependency>
...
in both cases build successful when application deployed, during runtime when trying generate report, error
net.sf.jasperreports.engine.jrexception: report compiler class not found : org.codehaus.mojo.jasperreports.mavenjavaccompiler
i not able figure out causing issue. jre version on server 1.5 , have tried building app in both 1.5 , 1.6,it fails on both accounts.
please help.
thanks, tatha
hello all
i don´t know how edit question @tatha, post dependency tree answer here. have big problems in understanding maven related stuff. came fresh old project. tried build maven , got same problems/jrexception tatha had before.
so here pom.xml project, can not build:
<?xml version="1.0" encoding="utf-8"?> <project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelversion>4.0.0</modelversion> <parent> <groupid>de.xyz</groupid> <artifactid>de.xyz.abc</artifactid> <version>2.2.13-rc46-snapshot</version> </parent> <artifactid>de.xyz.abc.batch</artifactid> <name>abc batch</name> <description>batch laufzeitumgebung imports exports usw.</description> <properties> <springbatch.version>2.2.7.release</springbatch.version> </properties> <dependencies> <dependency> <groupid>de.xyz</groupid> <artifactid>de.xyz.abc.common</artifactid> <version>${project.version}</version> </dependency> <dependency> <groupid>de.xyz</groupid> <artifactid>de.xyz.abc.dbsetup</artifactid> <version>${project.version}</version> <scope>provided</scope> <classifier>jar-with-dependencies</classifier> </dependency> <dependency> <groupid>org.springframework.batch</groupid> <artifactid>spring-batch-core</artifactid> <version>${springbatch.version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-jdbc</artifactid> <version>${org.springframework.version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-context</artifactid> <version>${org.springframework.version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-context-support</artifactid> <version>${org.springframework.version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-tx</artifactid> <version>${org.springframework.version}</version> </dependency> <dependency> <groupid>org.jasypt</groupid> <artifactid>jasypt-spring31</artifactid> <version>1.9.0</version> </dependency> <dependency> <groupid>oracle</groupid> <artifactid>oracle-jdbc</artifactid> </dependency> <dependency> <groupid>net.sf.saxon</groupid> <artifactid>saxon</artifactid> <version>8.7</version> </dependency> <dependency> <groupid>org.beanio</groupid> <artifactid>beanio</artifactid> <version>2.1.0</version> </dependency> <!-- testing --> <dependency> <groupid>org.springframework.batch</groupid> <artifactid>spring-batch-test</artifactid> <version>${springbatch.version}</version> <scope>test</scope> </dependency> <dependency> <groupid>org.hsqldb</groupid> <artifactid>hsqldb</artifactid> <version>2.3.2</version> <scope>test</scope> </dependency> <dependency> <groupid>org.dbunit</groupid> <artifactid>dbunit</artifactid> <scope>test</scope> </dependency> <dependency> <groupid>net.sf.jasperreports</groupid> <artifactid>jasperreports</artifactid> <version>${jasperreports.version}</version> </dependency> <dependency> <groupid>commons-digester</groupid> <artifactid>commons-digester</artifactid> <version>1.7</version> </dependency> <dependency> <groupid>commons-cli</groupid> <artifactid>commons-cli</artifactid> <version>1.2</version> </dependency> </dependencies> <profiles> <profile> <id>default</id> <activation> <activebydefault>true</activebydefault> </activation> <properties> <configfile>${project.basedir}/../abc.server/src/main/config/developerbuild.properties</configfile> </properties> </profile> <profile> <id>jenkins</id> <properties> <configfile>${project.basedir}/../abc.server/src/main/config/build.properties</configfile> </properties> </profile> </profiles> <build> <filters> <filter>${configfile}</filter> </filters> <resources> <resource> <directory>${project.basedir}/src/main/resources</directory> <filtering>true</filtering> </resource> <resource> <directory>${project.basedir}/src/test/resources</directory> <filtering>true</filtering> </resource> </resources> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-jar-plugin</artifactid> <version>2.4</version> <configuration> <excludes> <exclude>**/*.properties</exclude> <exclude>**/test*context.xml</exclude> <exclude>**/*.script</exclude> </excludes> </configuration> </plugin> <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> <!-- maven-assembly-plugin --> <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> <plugin> <artifactid>maven-assembly-plugin</artifactid> <version>2.5.3</version> <configuration> <appendassemblyid>false</appendassemblyid> <descriptors> <descriptor>src/main/assembly/assembly.xml</descriptor> </descriptors> </configuration> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <inherited>false</inherited> </execution> </executions> </plugin> <plugin> <groupid>org.codehaus.mojo</groupid> <artifactid>properties-maven-plugin</artifactid> <version>1.0-alpha-2</version> <executions> <execution> <phase>initialize</phase> <goals> <goal>read-project-properties</goal> </goals> <configuration> <files> <file>${configfile}</file> </files> <quiet>false</quiet> <detail>true</detail> </configuration> </execution> </executions> </plugin> <!-- <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-dependency-plugin</artifactid> <version>2.4</version> <executions> <execution> <id>unpack db-script cleanuser</id> <phase>process-test-resources</phase> <goals> <goal>unpack</goal> </goals> <configuration> <artifactitems> <artifactitem> <groupid>de.xyz</groupid> <artifactid>de.xyz.abc.dbsetup</artifactid> <version>${project.version}</version> </artifactitem> </artifactitems> <includes>**/*/cleanuser.sql</includes> <outputdirectory>${project.build.directory}</outputdirectory> </configuration> </execution> </executions> </plugin> <plugin> <groupid>org.codehaus.mojo</groupid> <artifactid>sql-maven-plugin</artifactid> <executions> <execution> <id>clean db-user/-schema before tests</id> <configuration> für die tests benutzen wir $db.test.user und $db.test.pass, deswegen hier überschrieben <username>${db.test.user}</username> <password>${db.test.pass}</password> </configuration> </execution> </executions> </plugin> <plugin> <groupid>org.liquibase</groupid> <artifactid>liquibase-maven-plugin</artifactid> <executions> <execution> <id>create or update db-schema before tests</id> <configuration> für die tests benutzen wir $db.test.user und $db.test.pass, deswegen hier überschrieben <username>${db.test.user}</username> <password>${db.test.pass}</password> </configuration> </execution> </executions> </plugin> --> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-resources-plugin</artifactid> <version>2.5</version> <executions> <execution> <id>default-compile</id> <phase>process-resources</phase> <goals> <goal>copy-resources</goal> </goals> <inherited>false</inherited> <configuration> <resources> <resource> <directory>${basedir}/src/main/resources</directory> <includes> <include>batch.properties</include> <include>logback.xml</include> </includes> <filtering>true</filtering> </resource> </resources> <filters> <filter>${configfile}</filter> </filters> <overwrite>true</overwrite> <outputdirectory>${project.build.directory}/config</outputdirectory> </configuration> </execution> </executions> </plugin> <plugin> <groupid>org.jacoco</groupid> <artifactid>jacoco-maven-plugin</artifactid> <version>0.7.4.201502262128</version> <configuration> <skip>true</skip> </configuration> </plugin> <plugin> <groupid>de.xyz.legacy</groupid> <artifactid>jasperreports-maven-plugin</artifactid> <version>1.0.3</version> <executions> <execution> <goals> <goal>compile-reports</goal> </goals> </execution> </executions> <dependencies> <!--note must repeated here pick correct xml validation --> <dependency> <groupid>net.sf.jasperreports</groupid> <artifactid>jasperreports</artifactid> <version>${jasperreports.version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-aop</artifactid> <version>${org.springframework.version}</version> </dependency> <dependency> <groupid>commons-collections</groupid> <artifactid>commons-collections</artifactid> <version>3.2.2</version> </dependency> </dependencies> </plugin> </plugins> <pluginmanagement> <plugins> <!--this plugin's configuration used store eclipse m2e settings only. has no influence on maven build itself. --> <plugin> <groupid>org.eclipse.m2e</groupid> <artifactid>lifecycle-mapping</artifactid> <version>1.0.0</version> <configuration> <lifecyclemappingmetadata> <pluginexecutions> <pluginexecution> <pluginexecutionfilter> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-dependency-plugin</artifactid> <versionrange>[2.4,)</versionrange> <goals> <goal>unpack-dependencies</goal> </goals> </pluginexecutionfilter> <action> <ignore /> </action> </pluginexecution> <pluginexecution> <pluginexecutionfilter> <groupid>org.liquibase</groupid> <artifactid>liquibase-maven-plugin</artifactid> <versionrange>[2.0.5,)</versionrange> <goals> <goal>dropall</goal> </goals> </pluginexecutionfilter> <action> <ignore /> </action> </pluginexecution> <pluginexecution> <pluginexecutionfilter> <groupid>org.codehaus.mojo</groupid> <artifactid>jasperreports-maven-plugin</artifactid> <versionrange> [0,) </versionrange> <goals> <goal>compile-reports</goal> </goals> </pluginexecutionfilter> <action> <ignore /> </action> </pluginexecution> <pluginexecution> <pluginexecutionfilter> <groupid> de.xyz.legacy </groupid> <artifactid> jasperreports-maven-plugin </artifactid> <versionrange> [1.0.3,) </versionrange> <goals> <goal>compile-reports</goal> </goals> </pluginexecutionfilter> <action> <ignore /> </action> </pluginexecution> </pluginexecutions> </lifecyclemappingmetadata> </configuration> </plugin> </plugins> </pluginmanagement> </build> </project>
--
here output mvn dependency:tree
[info] de.kvwl:de.kvwl.kaev.batch:jar:2.2.13-rc46-snapshot [info] +- de.kvwl:de.kvwl.kaev.common:jar:2.2.13-rc46-snapshot:compile [info] +- de.kvwl:de.kvwl.kaev.dbsetup:jar:jar-with-dependencies:2.2.13-rc46-sna pshot:provided [info] | +- org.liquibase:liquibase-core:jar:3.0.6:provided [info] | | \- org.yaml:snakeyaml:jar:1.13:provided [info] | +- postgresql:postgresql:jar:9.0-801.jdbc4:provided [info] | \- mysql:mysql-connector-java:jar:5.1.33:provided [info] +- org.springframework.batch:spring-batch-core:jar:2.2.7.release:compile [info] | +- org.springframework.batch:spring-batch-infrastructure:jar:2.2.7.rel ease:compile [info] | | \- org.springframework.retry:spring-retry:jar:1.0.2.release:compile [info] | +- com.thoughtworks.xstream:xstream:jar:1.3:compile [info] | | \- xpp3:xpp3_min:jar:1.1.4c:compile [info] | +- org.codehaus.jettison:jettison:jar:1.1:compile [info] | \- org.springframework:spring-beans:jar:3.2.9.release:compile [info] +- org.springframework:spring-jdbc:jar:4.2.3.release:compile [info] +- org.springframework:spring-context:jar:4.2.3.release:compile [info] | \- org.springframework:spring-expression:jar:4.2.3.release:compile [info] +- org.springframework:spring-context-support:jar:4.2.3.release:compile [info] +- org.springframework:spring-tx:jar:4.2.3.release:compile [info] +- org.jasypt:jasypt-spring31:jar:1.9.0:compile [info] | \- org.jasypt:jasypt:jar:1.9.0:compile [info] +- oracle:oracle-jdbc:jar:12.1.0.2:compile [info] +- net.sf.saxon:saxon:jar:8.7:compile [info] +- org.beanio:beanio:jar:2.1.0:compile [info] +- org.springframework.batch:spring-batch-test:jar:2.2.7.release:test [info] | +- org.springframework:spring-test:jar:3.2.9.release:test [info] | +- commons-io:commons-io:jar:1.4:test [info] | \- commons-dbcp:commons-dbcp:jar:1.2.2:test [info] | \- commons-pool:commons-pool:jar:1.3:test [info] +- org.hsqldb:hsqldb:jar:2.3.2:test [info] +- org.dbunit:dbunit:jar:2.4.9:test [info] | \- org.slf4j:slf4j-api:jar:1.7.7:compile [info] +- net.sf.jasperreports:jasperreports:jar:4.8.0:compile [info] | +- commons-logging:commons-logging:jar:1.1.1:compile [info] | +- com.lowagie:itext:jar:2.1.7.js1:compile [info] | | +- bouncycastle:bcmail-jdk14:jar:138:compile [info] | | +- bouncycastle:bcprov-jdk14:jar:138:compile [info] | | \- org.bouncycastle:bctsp-jdk14:jar:1.38:compile [info] | | +- org.bouncycastle:bcprov-jdk14:jar:1.38:compile [info] | | \- org.bouncycastle:bcmail-jdk14:jar:1.38:compile [info] | +- jfree:jcommon:jar:1.0.15:compile [info] | +- jfree:jfreechart:jar:1.0.12:compile [info] | +- xml-apis:xml-apis:jar:1.3.02:compile [info] | +- eclipse:jdtcore:jar:3.1.0:compile [info] | +- org.codehaus.castor:castor:jar:1.2:compile [info] | +- org.apache.poi:poi-ooxml:jar:3.7:compile [info] | | +- org.apache.poi:poi:jar:3.7:compile [info] | | +- org.apache.poi:poi-ooxml-schemas:jar:3.7:compile [info] | | | +- org.apache.xmlbeans:xmlbeans:jar:2.3.0:compile [info] | | | | \- stax:stax-api:jar:1.0.1:compile [info] | | | \- org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar:1.0: compile [info] | | \- dom4j:dom4j:jar:1.6.1:compile [info] | +- com.fasterxml.jackson.core:jackson-core:jar:2.0.5:compile [info] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.0.5:compile [info] | \- com.fasterxml.jackson.core:jackson-annotations:jar:2.0.5:compile [info] +- commons-digester:commons-digester:jar:1.7:compile [info] +- commons-cli:commons-cli:jar:1.2:compile [info] +- ch.qos.logback:logback-classic:jar:1.1.3:compile [info] +- ch.qos.logback:logback-core:jar:1.1.3:compile [info] +- org.slf4j:jcl-over-slf4j:jar:1.7.12:compile [info] +- org.slf4j:log4j-over-slf4j:jar:1.7.12:compile [info] +- de.kvwl:de.kvwl.common.base:jar:2.7.3:compile [info] +- commons-lang:commons-lang:jar:2.5:compile [info] +- commons-collections:commons-collections:jar:3.2.1:compile [info] +- commons-beanutils:commons-beanutils:jar:1.8.3:compile [info] +- commons-codec:commons-codec:jar:1.3:compile [info] +- org.quartz-scheduler:quartz:jar:2.2.1:compile [info] | \- c3p0:c3p0:jar:0.9.1.1:compile [info] +- com.prowidesoftware:pw-swift-core:jar:sru2014-7.6:compile [info] | \- rhino:js:jar:1.7r2:runtime [info] +- org.springframework:spring-core:jar:4.2.3.release:compile [info] +- org.springframework:spring-aop:jar:4.2.3.release:compile [info] | \- aopalliance:aopalliance:jar:1.0:compile [info] +- org.springframework:spring-web:jar:4.2.3.release:compile [info] +- org.springframework:spring-webmvc:jar:4.2.3.release:compile [info] +- net.objectlab.kit:datecalc-common:jar:1.3.0:compile [info] +- net.objectlab.kit:datecalc-joda:jar:1.3.0:compile [info] +- ar.com.fdvs:dynamicjasper-core-fonts:jar:1.0:compile [info] +- com.google.guava:guava:jar:18.0:compile [info] +- javax.xml.bind:jaxb-api:jar:2.2.7:compile [info] +- joda-time:joda-time:jar:1.6:compile [info] +- de.jollyday:jollyday:jar:0.4.7:compile [info] +- xerces:xercesimpl:jar:2.9.0:compile [info] \- junit:junit:jar:4.11:test [info] \- org.hamcrest:hamcrest-core:jar:1.3:test
Comments
Post a Comment