ERROR: Unable To Preview Jasper Report

0

Currently I am working on a project with some older code in it. When trying to preview the JasperReports within JasperSoft Studio 6.5.1 I have run into a slew of errors. After working through a few of them, I seem to have hit a brick wall with this one (shown below this text). I have tried the following solutions:
- Switching the report to Java..which didnt work becuase most of the project is handled with groovy expressions. 
- Switching the groovy jar from the default one given by JasperSoft to a newer version
- Setting the Jasper library to equal the version ex: Jaspersoft Studio 6.5.1 has the Jasper Library Jar 6.5.1

Please help.

ERROR
 java.lang.LinkageError: loader constraint violation: loader (instance of java/net/FactoryURLClassLoader) previously initiated loading for a different type with name "net/sf/jasperreports/engine/JRField"

at net.sf.jasperreports.eclipse.builder.JasperReportCompiler.compileReport(JasperReportCompiler.java:304)
    at com.jaspersoft.studio.editor.preview.view.control.ReportController.compileJasperDesign(ReportController.java:481)
    at com.jaspersoft.studio.editor.preview.view.control.ReportController.access$8(ReportController.java:466)
    at com.jaspersoft.studio.editor.preview.view.control.ReportController$1.run(ReportController.java:369)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)

Caused by: java.lang.LinkageError: loader constraint violation: loader (instance of java/net/FactoryURLClassLoader) previously initiated loading for a different type with name "net/sf/jasperreports/engine/JRField"
at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:814)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    at java.lang.Class.getDeclaredMethods(Class.java:1975)
    at org.codehaus.groovy.vmplugin.v5.Java5.configureClassNode(Java5.java:362)
    at org.codehaus.groovy.ast.ClassNode.lazyClassInit(ClassNode.java:265)
    at org.codehaus.groovy.ast.ClassNode.getUnresolvedSuperClass(ClassNode.java:1004)
    at org.codehaus.groovy.ast.ClassNode.getUnresolvedSuperClass(ClassNode.java:999)
    at org.codehaus.groovy.ast.ClassNode.getSuperClass(ClassNode.java:993)
    at org.codehaus.groovy.ast.ClassNode.isDerivedFrom(ClassNode.java:936)
    at org.codehaus.groovy.classgen.asm.InvocationWriter.castToNonPrimitiveIfNecessary(InvocationWriter.java:858)
    at org.codehaus.groovy.classgen.asm.OperandStack.doConvertAndCast(OperandStack.java:347)
    at org.codehaus.groovy.classgen.asm.OperandStack.doGroovyCast(OperandStack.java:282)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitCastExpression(AsmClassGenerator.java:741)
    at org.codehaus.groovy.ast.expr.CastExpression.visit(CastExpression.java:87)
    at org.codehaus.groovy.classgen.asm.CallSiteWriter.prepareSiteAndReceiver(CallSiteWriter.java:235)
    at org.codehaus.groovy.classgen.asm.CallSiteWriter.prepareSiteAndReceiver(CallSiteWriter.java:224)
    at org.codehaus.groovy.classgen.asm.CallSiteWriter.makeCallSite(CallSiteWriter.java:272)
    at org.codehaus.groovy.classgen.asm.InvocationWriter.makeCachedCall(InvocationWriter.java:307)
    at org.codehaus.groovy.classgen.asm.InvocationWriter.makeCall(InvocationWriter.java:392)
    at org.codehaus.groovy.classgen.asm.InvocationWriter.makeCall(InvocationWriter.java:104)
    at org.codehaus.groovy.classgen.asm.InvocationWriter.makeInvokeMethodCall(InvocationWriter.java:88)
    at org.codehaus.groovy.classgen.asm.InvocationWriter.writeInvokeMethod(InvocationWriter.java:459)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitMethodCallExpression(AsmClassGenerator.java:767)
    at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:66)
    at org.codehaus.groovy.classgen.asm.CallSiteWriter.makeCallSite(CallSiteWriter.java:303)
    at org.codehaus.groovy.classgen.asm.InvocationWriter.writeNormalConstructorCall(InvocationWriter.java:563)
    at org.codehaus.groovy.classgen.asm.InvocationWriter.writeInvokeConstructor(InvocationWriter.java:572)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructorCallExpression(AsmClassGenerator.java:818)
    at org.codehaus.groovy.ast.expr.ConstructorCallExpression.visit(ConstructorCallExpression.java:46)
    at org.codehaus.groovy.classgen.asm.BinaryExpressionHelper.evaluateEqual(BinaryExpressionHelper.java:316)
    at org.codehaus.groovy.classgen.asm.BinaryExpressionHelper.eval(BinaryExpressionHelper.java:84)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitBinaryExpression(AsmClassGenerator.java:638)
    at org.codehaus.groovy.ast.expr.BinaryExpression.visit(BinaryExpression.java:51)
    at org.codehaus.groovy.classgen.asm.StatementWriter.writeExpressionStatement(StatementWriter.java:607)
    at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeExpressionStatement(OptimizingStatementWriter.java:357)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitExpressionStatement(AsmClassGenerator.java:620)
    at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:42)
    at org.codehaus.groovy.classgen.asm.StatementWriter.writeBlockStatement(StatementWriter.java:84)
    at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeBlockStatement(OptimizingStatementWriter.java:158)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:566)
    at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:71)
    at org.codehaus.groovy.classgen.asm.StatementWriter.writeIfElse(StatementWriter.java:288)
    at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeIfElse(OptimizingStatementWriter.java:280)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitIfElse(AsmClassGenerator.java:582)
    at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:43)
    at org.codehaus.groovy.classgen.asm.StatementWriter.writeIfElse(StatementWriter.java:299)
    at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeIfElse(OptimizingStatementWriter.java:280)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitIfElse(AsmClassGenerator.java:582)
    at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:43)
    at org.codehaus.groovy.classgen.asm.StatementWriter.writeIfElse(StatementWriter.java:299)
    at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeIfElse(OptimizingStatementWriter.java:280)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitIfElse(AsmClassGenerator.java:582)
    at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:43)
    at org.codehaus.groovy.classgen.asm.StatementWriter.writeIfElse(StatementWriter.java:299)
    at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeIfElse(OptimizingStatementWriter.java:280)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitIfElse(AsmClassGenerator.java:582)
    at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:43)
    at org.codehaus.groovy.classgen.asm.StatementWriter.writeIfElse(StatementWriter.java:299)
    at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeIfElse(OptimizingStatementWriter.java:280)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitIfElse(AsmClassGenerator.java:582)
    at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:43)
    at org.codehaus.groovy.classgen.asm.StatementWriter.writeIfElse(StatementWriter.java:299)
    at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeIfElse(OptimizingStatementWriter.java:280)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitIfElse(AsmClassGenerator.java:582)
    at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:43)
    at org.codehaus.groovy.classgen.asm.StatementWriter.writeIfElse(StatementWriter.java:299)
    at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeIfElse(OptimizingStatementWriter.java:280)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitIfElse(AsmClassGenerator.java:582)
    at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:43)
    at org.codehaus.groovy.classgen.asm.StatementWriter.writeIfElse(StatementWriter.java:299)
    at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeIfElse(OptimizingStatementWriter.java:280)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitIfElse(AsmClassGenerator.java:582)
    at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:43)
    at org.codehaus.groovy.classgen.asm.StatementWriter.writeIfElse(StatementWriter.java:299)
    at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeIfElse(OptimizingStatementWriter.java:280)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitIfElse(AsmClassGenerator.java:582)
    at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:43)
    at org.codehaus.groovy.classgen.asm.StatementWriter.writeIfElse(StatementWriter.java:299)
    at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeIfElse(OptimizingStatementWriter.java:280)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitIfElse(AsmClassGenerator.java:582)
    at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:43)
    at org.codehaus.groovy.classgen.asm.StatementWriter.writeIfElse(StatementWriter.java:299)
    at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeIfElse(OptimizingStatementWriter.java:280)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitIfElse(AsmClassGenerator.java:582)
    at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:43)
    at org.codehaus.groovy.classgen.asm.StatementWriter.writeIfElse(StatementWriter.java:299)
    at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeIfElse(OptimizingStatementWriter.java:280)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitIfElse(AsmClassGenerator.java:582)
    at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:43)
    at org.codehaus.groovy.classgen.asm.StatementWriter.writeIfElse(StatementWriter.java:299)
    at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeIfElse(OptimizingStatementWriter.java:280)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitIfElse(AsmClassGenerator.java:582)
    at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:43)
    at org.codehaus.groovy.classgen.asm.StatementWriter.writeIfElse(StatementWriter.java:299)
    at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeIfElse(OptimizingStatementWriter.java:280)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitIfElse(AsmClassGenerator.java:582)
    at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:43)
    at org.codehaus.groovy.classgen.asm.StatementWriter.writeIfElse(StatementWriter.java:299)
    at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeIfElse(OptimizingStatementWriter.java:280)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitIfElse(AsmClassGenerator.java:582)
    at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:43)
    at org.codehaus.groovy.classgen.asm.StatementWriter.writeIfElse(StatementWriter.java:299)
    at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeIfElse(OptimizingStatementWriter.java:280)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitIfElse(AsmClassGenerator.java:582)
    at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:43)
    at org.codehaus.groovy.classgen.asm.StatementWriter.writeIfElse(StatementWriter.java:299)
    at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeIfElse(OptimizingStatementWriter.java:280)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitIfElse(AsmClassGenerator.java:582)
    at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:43)
    at org.codehaus.groovy.classgen.asm.StatementWriter.writeIfElse(StatementWriter.java:299)
    at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeIfElse(OptimizingStatementWriter.java:280)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitIfElse(AsmClassGenerator.java:582)
    at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:43)
    at org.codehaus.groovy.classgen.asm.StatementWriter.writeIfElse(StatementWriter.java:299)
    at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeIfElse(OptimizingStatementWriter.java:280)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitIfElse(AsmClassGenerator.java:582)
    at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:43)
    at org.codehaus.groovy.classgen.asm.StatementWriter.writeIfElse(StatementWriter.java:299)
    at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeIfElse(OptimizingStatementWriter.java:280)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitIfElse(AsmClassGenerator.java:582)
    at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:43)
    at org.codehaus.groovy.classgen.asm.StatementWriter.writeBlockStatement(StatementWriter.java:84)
    at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeBlockStatement(OptimizingStatementWriter.java:158)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:566)
    at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:71)
    at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:104)
    at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:115)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitStdMethod(AsmClassGenerator.java:430)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructorOrMethod(AsmClassGenerator.java:387)
    at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:126)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitMethod(AsmClassGenerator.java:507)
    at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1086)
    at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:53)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitClass(AsmClassGenerator.java:233)
    at org.codehaus.groovy.control.CompilationUnit$16.call(CompilationUnit.java:813)
    at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1055)
    at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:591)
    at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569)
    at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546)
    at net.sf.jasperreports.compilers.JRGroovyCompiler.compileUnits(JRGroovyCompiler.java:102)
    at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:203)
    at net.sf.jasperreports.eclipse.builder.JasperReportCompiler.compileReport(JasperReportCompiler.java:286)
 

Brzezinski_Michael's picture
Joined: Jan 30 2018 - 8:05am
Last seen: 1 year 4 months ago

0 Answers:

No answers yet
Feedback