Skip to Content
avatar image
Former Member

Classloading error: package net.sf.jasperreports.engine does not exist

Hi all!

We are migrating one of our web applications to SAP Web AS (Netweaver CE SR5) but we are facing one problem with finding an external library (Jasper Report).

Our web application uses Spring and Hibernate and works fine in Tomcat 5.5 or higher.

The problem is that the package net.sf.jasperreports.engine cannot be found (stack below) despite the jasper report jar is included inside the WEB-INF/lib dir of our WAR.

Our application´s structure is as follows:

cpl.ear

cpl.ear/lib (hibernate´s and other thirdy party jars)

cpl.ear/Cockpit_oracle9_3_5_0.war

cpl.ear/Cockpit_oracle9_3_5_0.war/WEB-INF/lib/jasperreports-1.3.1.jar

I also tried to move the jasperreports-1.3.1.jar file to the cpl.ear/lib dir but the problem still happened.

Does any body know why the application can´t find the jasper report packages?

Thanks and regards.

Ballock.

##############################################################################################

#1.5 #001EC91DBA01002200000002000007900096BE50A0E2AB09#1219343345836#/System/Server/WebRequests#JavaEE/cpl#com.sap.engine.services.servlets_jsp.server.application.WebEvents#Guest#916####88ee30106eff11dd8e03001ec91dba01#Application 23##0#0#Warning#1#com.sap.engine.services.servlets_jsp.server.application.WebEvents#Plain###Error occured in invoking event "contextInitialized()" on listener class org.springframework.web.context.ContextLoaderListener.

The error is: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'service.load.report' defined in class path resource http://spring/model.services.xml: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class http://br.com.neolog.system.load.LoadReport: Constructor threw exception; nested exception is java.lang.IllegalStateException: net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:

C:

usr

sap

CE1

J00

j2ee

cluster

server0

loadReport_1219343342726_788986.java:4: package net.sf.jasperreports.engine does not exist

import net.sf.jasperreports.engine.*;

^

C:

usr

sap

CE1

J00

j2ee

cluster

server0

loadReport_1219343342726_788986.java:5: package net.sf.jasperreports.engine.fill does not exist

import net.sf.jasperreports.engine.fill.*;

^

C:

usr

sap

CE1

J00

j2ee

cluster

server0

loadReport_1219343342726_788986.java:14: package net.sf.jasperreports.engine does not exist

import net.sf.jasperreports.engine.*;

^

C:

usr

sap

CE1

J00

j2ee

cluster

server0

loadReport_1219343342726_788986.java:15: package net.sf.jasperreports.engine.data does not exist

import net.sf.jasperreports.engine.data.*;

^

C:

usr

sap

CE1

J00

j2ee

cluster

server0

loadReport_1219343342726_788986.java:21: cannot find symbol

symbol: class JREvaluator

public class loadReport_1219343342726_788986 extends JREvaluator

^

C:

usr

sap

CE1

J00

j2ee

cluster

server0

loadReport_1219343342726_788986.java:28: cannot find symbol

symbol : class JRFillParameter

location: class loadReport_1219343342726_788986

private JRFillParameter parameter_REPORT_RESOURCE_BUNDLE = null;

^

C:

usr

sap

CE1

J00

j2ee

cluster

server0

loadReport_1219343342726_788986.java:29: cannot find symbol

symbol : class JRFillParameter

location: class loadReport_1219343342726_788986

private JRFillParameter parameter_REPORT_CLASS_LOADER = null;

(...)

Obs.: The stack above is just a part of the total error log

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Aug 22, 2008 at 06:16 PM

    Hi, all!

    The reason for this problem is described in the following link:

    /message/4314165#4314165

    The error is caused due to the absense of the JDT compiler in our application.

    In the Tomcat release we were using (Tomcat 6.0.16) the JDT compiler was already present in the %TOMCAT_HOME%/lib dir.

    That´s why we didn´t have this problem when running the application in Tomcat.

    I´ve just added the JDT compiler in the WEB-INF/lib dir of our WAR file and the problem stopped happening.

    In our particular case, we have just added the jasper-jdt.jar that could be found in the %TOMCAT_HOME%/lib dir (at least in the Tomcat 6.0.16 release this is the jar name that should be included).

    Regards.

    Ballock.

    Add comment
    10|10000 characters needed characters exceeded