what hadoop jar do i need to get the WeightAdjuster interface - java

org.apache.hadoop.mapred.WeightAdjuster
and
org.apache.hadoop.mapred.NewJobWeightBooster
I've added all the jars I can find on Maven almost. Here's my current build.gradle:
dependencies {
compile group: 'org.apache.hadoop', name: 'hadoop-core', version: '1.2.1'
compile group: 'org.apache.hadoop', name: 'hadoop-common', version: '2.5.1'
compile group: 'org.apache.hadoop', name: 'hadoop-yarn-common', version: '2.5.1'
compile group: 'org.apache.hadoop', name: 'hadoop-yarn-server-common', version: '2.5.1'
compile group: 'org.apache.hadoop', name: 'hadoop-mapreduce-client-core', version: '2.5.1'
compile group: 'org.apache.hadoop', name: 'hadoop-mapreduce-client-common', version: '2.5.1'
compile group: 'org.apache.hadoop', name: 'hadoop-mapreduce-client-jobclient', version: '2.5.1'
compile group: 'org.apache.hadoop', name: 'hadoop-mapreduce-client-app', version: '2.5.1'
compile group: 'org.apache.hadoop', name: 'hadoop-tools', version: '1.2.1'
}
Which jar should I be grabbing? This link gives a partial description.

After adding every hadoop jar on Maven, I found it:
compile group: 'org.apache.hadoop', name: 'hadoop-yarn-server-resourcemanager', version: '2.5.1'

Related

Spring boot app runs with intelliJ but crashes in docker

I have a spring boot app. It is mainly a Kafka listening app and its only web application part is the health check API through the spring-boot-starter-actuator.
When running locally in IntelliJ, the application runs perfectly, with no errors and no crashes.
However, when trying to run the app through docker, the app starts (i can see the spring logo) and then it imidietly crashes with the next error:
[org.springframework.boot.SpringApplication] - Application run failed
MyApp | 2021-02-25T19:17:17.802342316Z org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
My dependency section in the build.gradle file looks as follows:
dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.kafka:spring-kafka'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '2.4.2'
/*logging*/
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.30'
testCompile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.30'
testCompile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
compile group: 'net.logstash.logback', name: 'logstash-logback-encoder', version: '6.4'
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
compile group: 'ch.qos.logback', name: 'logback-core', version: '1.2.3'
compile group: 'ch.qos.logback', name: 'logback-access', version: '1.2.3'
/*lombok*/
compileOnly 'org.projectlombok:lombok:1.18.16'
annotationProcessor 'org.projectlombok:lombok:1.18.16'
/*metrics*/
compile group: 'io.prometheus', name: 'simpleclient', version: '0.9.0'
compile group: 'io.prometheus', name: 'simpleclient_httpserver', version: '0.9.0'
compile group: 'io.prometheus', name: 'simpleclient_servlet', version: '0.9.0'
compile group: 'io.micrometer', name: 'micrometer-registry-prometheus', version: '1.5.1'
compile group: 'io.micrometer', name: 'micrometer-core', version: '1.5.1'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: '2.4.2'
/*Jetty server*/
compile group: 'org.eclipse.jetty', name: 'jetty-server', version: '9.4.29.v20200521'
compile group: 'org.eclipse.jetty', name: 'jetty-servlet', version: '9.4.29.v20200521'
/* mysql */
compile group: 'mysql', name: 'mysql-connector-java', version: '8.0.22'
/*mongo*/
compile group: 'org.mongodb', name: 'mongo-java-driver', version: '3.12.7'
// generate pojo from avro schema
compile "org.apache.avro:avro-compiler:1.10.0"
//avro serde
compile group: 'io.confluent', name: 'kafka-streams-avro-serde', version: '5.2.1'
compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: '2.12.0'
compile group: 'io.projectreactor', name: 'reactor-core', version: '3.4.0'
implementation('com.fasterxml.jackson.dataformat:jackson-dataformat-avro:2.11.2')
/* cassandra*/
implementation("io.dropwizard.metrics:metrics-core:3.2.2")
compile group: 'com.datastax.cassandra', name: 'cassandra-driver-core', version: '3.8.0'
compile group: 'com.datastax.cassandra', name: 'cassandra-driver-mapping', version: '3.10.2'
/*tests*/
testImplementation 'org.springframework.kafka:spring-kafka-test'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testCompile("junit:junit:4.12")
}
My main application class looks as follows:
#SpringBootApplication()
public class MyApp {
public static void main(String[] args) {
SpringApplication.run(MyApp.class, args);
}
}
Can anyone shed some light on the reason behind this issue and how to fix it?
Why would it run with no problems in IntelliJ but crash with docker?
Any help would be appreciated.
Thank you.

Building War file via including Avro auto generated classes

I've recently started using Avro and Kafka in my spring boot project. Now I've googled this and can't seem to find a straight answer.
When I build my war via my gradle build file, can I include the classes autogenerated from Avro schema?
Look at the war file when its exploded it doesnt seem to include those classes.
Here is my build.gradle file.
Many thanks for reading this question and if you have the time to help!
plugins {
id "org.springframework.boot" version "2.4.2"
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
id 'java'
id "com.commercehub.gradle.plugin.avro" version "0.21.0"
id "idea"
}
group 'com.test.tge-auth-service'
version '1.0'
java {
sourceCompatibility = JavaVersion.VERSION_14
targetCompatibility = JavaVersion.VERSION_14
}
ext {
avroVersion = "1.10.1"
}
repositories {
mavenCentral()
jcenter()
maven {
url "https://packages.confluent.io/maven/"
}
}
avro {
createSetters = true
fieldVisibility = "PRIVATE"
}
//apply plugin: "war"
dependencies {
// providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
compile group: 'co.elastic.logging', name: 'logback-ecs-encoder', version: '0.5.2'
compile group: 'com.amazonaws', name: 'aws-java-sdk', version: '1.11.860'
compile group: 'io.springfox', name: 'springfox-swagger-ui', version: '3.0.0'
compile group: 'io.springfox', name: 'springfox-boot-starter', version: '3.0.0'
compile('org.springframework.boot:spring-boot-starter-data-elasticsearch')
compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-mongodb', version: '2.3.3.RELEASE'
compile group: 'org.springframework.data', name: 'spring-data-elasticsearch', version: '4.0.4.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: '2.3.3.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-security', version: '2.3.3.RELEASE'
compile group: 'org.springframework.security', name: 'spring-security-oauth2-client', version: '5.4.0'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-validation', version: '2.4.2'
compile group: 'org.springframework.kafka', name: 'spring-kafka', version: '2.6.5'
compile group: 'javax.validation', name: 'validation-api', version: '2.0.1.Final'
compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: '2.11.2'
compile group: 'mysql', name: 'mysql-connector-java', version: '8.0.21'
compile group: 'io.jsonwebtoken', name: 'jjwt', version: '0.9.1'
compile group: 'org.openapitools', name: 'jackson-databind-nullable', version: '0.2.1'
compile group: 'commons-io', name: 'commons-io', version: '2.6'
compile group: 'org.apache.commons', name: 'commons-collections4', version: '4.4'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.11'
compile group: 'org.passay', name: 'passay', version: '1.6.0'
compile group: 'com.google.guava', name: 'guava', version: '30.0-jre'
compile group: 'io.confluent', name: 'kafka-schema-registry-client', version: '6.0.0'
compile group: 'io.confluent', name: 'kafka-avro-serializer', version: '6.0.0'
compile group: 'io.confluent', name: 'monitoring-interceptors', version: '6.0.0'
compile(group: 'io.confluent', name: 'kafka-streams-avro-serde', version:'6.0.0') {
exclude(module: 'log4j-over-slf4j')
}
compile "org.apache.avro:avro:1.10.1"
implementation "org.apache.avro:avro:${avroVersion}"
compileOnly 'org.projectlombok:lombok:1.18.12'
annotationProcessor 'org.projectlombok:lombok:1.18.12'
implementation 'com.amazonaws:aws-java-sdk-s3'
implementation 'org.springframework.boot:spring-boot-starter-web'
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompileOnly 'org.projectlombok:lombok:1.18.12'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.12'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
jar {
manifest {
attributes(
'Main-Class': 'com.test.SpringBootPersistenceApplication'
)
}
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}
}
Ok so, for me what worked was a rebuild of the project in Intellij.

AbstractMethodError: org.apache.bval.jsr303.ConfigurationImpl has missing definition for method getDefaultParameterNameProvider()

I am currently working on upgrading our Spring Boot (2.1.5) Application to gradle version '5.4.1' with JAVA 11.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultValidator' defined in class path resource [org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]: Invocation of init method failed; nested exception is java.lang.AbstractMethodError: Receiver class org.apache.bval.jsr303.ConfigurationImpl does not define or inherit an implementation of the resolved method abstract getDefaultParameterNameProvider()Ljavax/validation/ParameterNameProvider; of interface javax.validation.Configuration.
Relevant Dependencies:
hibernate-core: 5.4.3.Final
hibernate-validator: 6.0.17.Final
I have tried downgrading hibernate-validator and tried explicitly specifying a version of validation-api but nothing seems to work.
Build.Gradle
buildscript {
ext {
springBootVersion = '2.1.5.RELEASE'
}
repositories {
mavenCentral()
jcenter()
maven { url 'http://repo.spring.io/plugins-release' }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
compileJava {
sourceCompatibility = '11'
targetCompatibility = '11'
}
apply plugin: 'application'
apply plugin: 'maven'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'org.springframework.boot'
apply plugin: 'war'
apply plugin: 'idea'
mainClassName = 'io.app.ams.Application'
bootJar {
mainClassName 'io.app.ams.Application'
launchScript()
}
springBoot {
mainClassName 'io.app.ams.Application'
buildInfo()
}
bootRun {
sourceResources sourceSets.main
}
apply from: 'liquibase.gradle'
apply from: 'gatling.gradle'
configurations {
providedRuntime
}
defaultTasks 'bootRun'
repositories {
mavenLocal()
maven { url 'http://repo.spring.io/milestone' }
maven { url 'http://repo.spring.io/snapshot' }
maven { url 'https://repository.jboss.org/nexus/content/repositories/releases' }
maven { url 'https://oss.sonatype.org/content/repositories/releases' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url 'http://repo.maven.apache.org/maven2' }
flatDir {
dirs 'libs'
}
}
dependencies {
implementation('org.springframework.boot:spring-boot-starter-validation')
testImplementation 'org.scalatest:scalatest_2.11:3.0.0'
compile group: 'commons-httpclient', name: 'commons-httpclient', version: '3.1'
compile group: 'io.dropwizard.metrics', name: 'metrics-core'
compile group: 'io.dropwizard.metrics', name: 'metrics-graphite'
compile group: 'io.dropwizard.metrics', name: 'metrics-healthchecks'
compile group: 'io.dropwizard.metrics', name: 'metrics-jvm', version: dropwizard_metrics_version
compile group: 'io.dropwizard.metrics', name: 'metrics-servlet', version: dropwizard_metrics_version
compile group: 'io.dropwizard.metrics', name: 'metrics-json', version: dropwizard_metrics_version
compile group: 'io.dropwizard.metrics', name: 'metrics-servlets'
// kafka
compile group: 'org.springframework.kafka', name: 'spring-kafka', version: kafka_version
compile group: 'com.amazonaws', name: 'aws-java-sdk-s3', version: '1.11.18'
compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-json-org', version: jackson_version
compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-hppc', version: jackson_version
compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-joda'
compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-hibernate4', version: jackson_version
compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jdk8'
compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310'
compile group: 'com.fasterxml.jackson.module', name: 'jackson-module-parameter-names'
compile(group: 'com.zaxxer', name: 'HikariCP', version: HikariCP_version) {
exclude(module: 'tools')
}
compile group: 'org.apache.commons', name: 'commons-lang3', version: commons_lang_version
compile group: 'commons-io', name: 'commons-io', version: commons_io_version
compile group: 'javax.inject', name: 'javax.inject', version: javax_inject_version
compile group: 'javax.servlet', name: 'javax.servlet-api', version: '4.0.1'
compile group: 'joda-time', name: 'joda-time', version: '2.10.2'
compile group: 'org.apache.geronimo.javamail', name: 'geronimo-javamail_1.4_mail', version: geronimo_javamail_1_4_mail_version
compile group: 'org.hibernate', name: 'hibernate-core', version: '5.4.3.Final'
compile group: 'org.hibernate.validator', name: 'hibernate-validator', version: '6.1.0.Alpha5'
compile group: 'org.hibernate', name: 'hibernate-envers', version: '5.4.3.Final'
compile group: 'org.hibernate', name: 'hibernate-ehcache' ,version: '5.4.3.Final'
compile group: 'org.hibernate.javax.persistence', name: 'hibernate-jpa-2.1-api', version: '1.0.2.Final'
compile group: 'org.jadira.usertype', name: 'usertype.core', version: '7.0.0.CR1'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-parent', version: '2.1.6.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: '2.1.6.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-properties-migrator', version: '2.1.6.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-autoconfigure'
compile group: 'org.springframework.boot', name: 'spring-boot-loader-tools'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-logging'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-aop'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-security'
compile(group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '2.1.6.RELEASE')
compile group: 'org.springframework.boot', name: 'spring-boot-starter-websocket'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-thymeleaf'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-velocity', version: '1.1.3.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-elasticsearch', version: '2.1.6.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-mongodb'
compile group: 'org.springframework.cloud', name: 'spring-cloud-cloudfoundry-connector'
compile group: 'org.springframework.cloud', name: 'spring-cloud-spring-service-connector'
compile group: 'org.springframework.cloud', name: 'spring-cloud-localconfig-connector'
compile group: 'org.springframework.cloud', name: 'spring-cloud-starter-config', version: '2.1.3.RELEASE'
compile group: 'org.springframework.cloud', name: 'spring-cloud-dependencies', version: 'Greenwich.RELEASE'
compile group: 'org.springframework.cloud', name: 'spring-cloud-starter-netflix-hystrix', version: '2.1.2.RELEASE'
compile group: 'org.springframework.cloud', name: 'spring-cloud-starter-netflix-zuul', version: '2.1.2.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot', version: '2.1.6.RELEASE'
compile group: 'org.springframework', name: 'spring-context', version: '5.1.8.RELEASE'
compile group: 'org.springframework', name: 'spring-context-support'
compile group: 'org.springframework.security', name: 'spring-security-core', version: spring_security_version
compile group: 'org.springframework.security', name: 'spring-security-config', version: spring_security_version
compile group: 'org.springframework.security', name: 'spring-security-data', version: spring_security_version
compile group: 'org.springframework.security', name: 'spring-security-web', version: spring_security_version
compile group: 'org.springframework.security', name: 'spring-security-messaging', version: spring_security_version
compile group: 'org.springframework.security', name: 'spring-security-acl', version: spring_security_version
compile group: 'org.springframework.security.oauth', name: 'spring-security-oauth2', version: spring_security_oauth2_version
compile group: 'org.springframework.ws', name: 'spring-ws-core', version: '3.0.7.RELEASE'
compile group: 'mysql', name: 'mysql-connector-java', version: '8.0.16'
compile group: 'com.h2database', name: 'h2'
compile group: 'org.kairosdb', name: 'client', version: '3.0.0'
compile group: 'org.projectlombok', name: 'lombok', version: lombok_version
compile group: 'org.apache.commons', name: 'commons-lang3', version: commons_lang3_version
compile group: 'commons-validator', name: 'commons-validator', version: commons_validator_version
compile group: 'io.jsonwebtoken', name: 'jjwt', version: jjwt_version
runtime "net.java.dev.jna:jna"
optional "org.springframework.boot:spring-boot-configuration-processor"
}
dependencyManagement {
imports {
mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
mavenBom 'org.springframework:spring-framework-bom:5.1.8.RELEASE'
}
}
compileJava.dependsOn(processResources)
wrapper {
gradleVersion = '5.4.1'
distributionUrl = distributionUrl.replace("bin", "all")
}
The error is linked to bval (apache bean validation implementation), the one you have targets bean validation 1.0. you can upgrade it to bval-jsr for a bean validation 1.1 implementation or exclude/drop it if you want hibernate instead.
Side note: if you are in an old tomee it requires some system.properties tuning if i recall correctly.

Gradle : Could not find org.codehaus.groovy:groovy:1.0.0

I am using gradle to compile my Groovy and Java code. today I update my groovy 2.5.4 and upgrade gradle to version 5.
gradle run command failing now with this error message.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileGroovy'.
> Could not resolve all files for configuration ':detachedConfiguration1'.
> Could not find org.codehaus.groovy:groovy:1.0.0.
Searched in the following locations:
- https://jcenter.bintray.com/org/codehaus/groovy/groovy/1.0.0/groovy-1.0.0.pom
- https://jcenter.bintray.com/org/codehaus/groovy/groovy/1.0.0/groovy-1.0.0.jar
- http://repository.apache.org/snapshots/org/codehaus/groovy/groovy/1.0.0/groovy-1.0.0.pom
- http://repository.apache.org/snapshots/org/codehaus/groovy/groovy/1.0.0/groovy-1.0.0.jar
Required by:
project :
* Try:
Here is the build.gradle file.
plugins {
id 'groovy'
id 'application'
}
repositories {
jcenter()
maven {
url "http://repository.apache.org/snapshots/"
}
}
dependencies {
// Use the latest Groovy version for building this library
implementation 'org.codehaus.groovy:groovy-all:2.5.4'
compile group: 'commons-cli', name: 'commons-cli', version: '1.4'
compile group: 'commons-io', name: 'commons-io', version: '2.6'
compile group: 'com.mashape.unirest', name: 'unirest-java', version: '1.4.9'
compile group: 'org.mongodb', name: 'mongo-java-driver', version: '3.6.1'
compile group: 'org.apache.directory', name: 'groovyldap', version: '0.1-SNAPSHOT'
// https://mvnrepository.com/artifact/ch.qos.logback/logback-classic
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
// https://mvnrepository.com/artifact/org.apache.directory.shared/shared-ldif
compile group: 'org.apache.directory.shared', name: 'shared-ldif', version: '0.9.19'
// https://mvnrepository.com/artifact/org.apache.directory.api/api-ldap-model
compile group: 'org.apache.directory.api', name: 'api-ldap-model', version: '1.0.0-M15'
// https://mvnrepository.com/artifact/com.opencsv/opencsv
compile group: 'com.opencsv', name: 'opencsv', version: '4.0'
// https://mvnrepository.com/artifact/org.jsoup/jsoup
compile group: 'org.jsoup', name: 'jsoup', version: '1.11.2'
compile group: 'mysql', name: 'mysql-connector-java', version: '8.0.11'
// https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc
compile group: 'com.microsoft.sqlserver', name: 'mssql-jdbc', version: '6.4.0.jre8'
// https://mvnrepository.com/artifact/net.sourceforge.jtds/jtds
compile group: 'net.sourceforge.jtds', name: 'jtds', version: '1.3.1'
// https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.6'
// https://mvnrepository.com/artifact/org.yaml/snakeyaml
compile group: 'org.yaml', name: 'snakeyaml', version: '1.21'
// https://mvnrepository.com/artifact/com.rubiconproject.oss/jchronic
compile group: 'com.rubiconproject.oss', name: 'jchronic', version: '0.2.8'
compile group: 'io.github.http-builder-ng', name: 'http-builder-ng-core', version: '1.0.3'
// Use the awesome Spock testing and specification framework
testImplementation 'org.spockframework:spock-core:1.2-groovy-2.5'
}
// Define the main class for the application
mainClassName = 'ssl.test.App'
any help to resolve this error message?
Thanks
SR
You can replace your groovyldap dependency declaration with the following (as already mentioned by #paul-king in the comments):
compile(group: 'org.apache.directory', name: 'groovyldap', version: '0.1-SNAPSHOT') {
exclude group: 'groovy', module: 'groovy'
}
This will at least help you get rid of the dependency resolution error.
I don’t know if your groovyldap dependency will still work with Groovy 2.5.4 but it’s definitely worth a try.

Unable to compile jrxml containing highchart component with JasperCompileManager.compileReport()

I would like to compile a jrxml containing a highchart component (jasper pro) using Java.
Therefore I created a build.gradle with all the dependencies it requires.
My dependencies look like:
dependencies {
compile group: 'commons-beanutils', name: 'commons-beanutils', version: '1.9.3'
compile group: 'commons-collections', name: 'commons-collections', version: '3.2.2'
compile group: 'commons-digester', name: 'commons-digester', version: '2.1'
compile 'net.sf.jasperreports:jasperreports:6.3.1'
compile fileTree(dir: 'lib', include: '**/*.jar')
compile 'org.codehaus.groovy:groovy-all:2.4.1'
compile "org.spockframework:spock-core:1.1-groovy-2.4-rc-2"
testCompile 'junit:junit:4.12'
testCompile 'org.hamcrest:hamcrest-core:1.3'
compile group: 'joda-time', name: 'joda-time', version: '2.9.4'
compile group: 'commons-logging', name: 'commons-logging', version: '1.2'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.8.4'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.8.4'
compile group: 'javax.servlet', name: 'javax.servlet-api', version: '3.1.0'
compile group: 'org.mozilla', name: 'rhino', version: '1.7.7.1'
compile group: 'jfree', name: 'jfreechart', version: '1.0.13'
compile group: 'org.olap4j', name: 'olap4j', version: '1.2.0'
compile group: 'bouncycastle', name: 'bcprov-jdk14', version: '1.50'
compile group: 'com.lowagie', name: 'itext', version: '2.1.7'
}
The JasperReports pro libraries are located in lib.
But I got stuck when compiling as it says the license file is invalid.
I am using my jasperserver.licence file, but somehow it is not capable in reading it properly
net.sf.jasperreports.engine.JRException: Error compiling report design.
at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:247)
at net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:357)
at net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:290)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:575)
at ch.prospective.jasperreports.wekklyreports.WeeklyReports.fetch report(WeeklyReports.groovy:16)
Caused by: com.jaspersoft.jasperreports.license.LicenseException: License is in invalid state
at com.jaspersoft.jasperreports.license.BaseLicenseProviderImpl.requireLicense(BaseLicenseProviderImpl.java:189)
at com.jaspersoft.jasperreports.license.BaseLicenseProviderImpl.requireFeature(BaseLicenseProviderImpl.java:196)
at com.jaspersoft.jasperreports.license.LicenseManager.requireFeature(LicenseManager.java:113)
at com.jaspersoft.jasperreports.highcharts.HighChartsUtils.requireHighchartsFeature(HighChartsUtils.java:43)
at com.jaspersoft.jasperreports.highcharts.charts.StandardChartComponent.(StandardChartComponent.java:73)
at com.jaspersoft.jasperreports.highcharts.charts.ChartCompiler.toCompiledComponent(ChartCompiler.java:69)
at net.sf.jasperreports.engine.base.JRBaseComponentElement.(JRBaseComponentElement.java:59)
at net.sf.jasperreports.engine.base.JRBaseObjectFactory.visitComponentElement(JRBaseObjectFactory.java:1736)
at net.sf.jasperreports.engine.design.JRDesignComponentElement.visit(JRDesignComponentElement.java:105)
at net.sf.jasperreports.engine.JRAbstractObjectFactory.getVisitResult(JRAbstractObjectFactory.java:88)
at net.sf.jasperreports.engine.base.JRBaseElementGroup.(JRBaseElementGroup.java:83)
at net.sf.jasperreports.engine.base.JRBaseBand.(JRBaseBand.java:84)
at net.sf.jasperreports.engine.base.JRBaseObjectFactory.getBand(JRBaseObjectFactory.java:533)
at net.sf.jasperreports.engine.base.JRBaseReport.(JRBaseReport.java:242)
Does someone have got experience in this ?
I've linked the whole project to this question as zip file. Just extract and run.
The zip file can be found here:
https://www.dropbox.com/s/1zvbjgehtnfc1wn/jasper-reports-with-highcharts.zip?dl=0
Simply call
gradle test
or run the testcase within your IDE.

Categories

Resources