Jump to content

Tomcat + JasperReports


Recommended Posts

By: Krzysztof Tobiasz - wulec

Tomcat + JasperReports

2003-10-27 01:50

I'm a beginner user of JasperReports.

I have the following problem: I want to use JasperReports with Tomcat (4.1.24) under Eclipse 2.1. When I add the JasperReports JARs to the project, Tomcat doesn't start. It writes on the console the following:

 

Catalina.start: java.lang.ClassNotFoundException: org.apache.catalina.core.StandardServer

java.lang.ClassNotFoundException: org.apache.catalina.core.StandardServer

at org.apache.commons.digester.Digester.createSAXException(Digester.java:2383)

at org.apache.commons.digester.Digester.createSAXException(Digester.java:2409)

at org.apache.commons.digester.Digester.startElement(Digester.java:1271)

at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)

at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)

at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)

at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown Source)

at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)

at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)

at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)

at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

at org.apache.commons.digester.Digester.parse(Digester.java:1543)

at org.apache.catalina.startup.Catalina.start(Catalina.java:449)

at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)

at org.apache.catalina.startup.Catalina.process(Catalina.java:180)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

 

It writes it, after I add the Digester.jar to the project.

When I don't add it, the JasperReports dont work.

Please HELP ME !!!

 

How should I add the JARs to the project, to make the JasperReports and Tomcat to run together

 

best regards

Krzysztof Tobiasz

 

 

 

 

By: Chuck Deal - cdeal

RE: Tomcat + JasperReports

2003-10-27 10:04

I have seen a number of posts on this topic over the past few weeks. Unfortunately, everyone's situation is slightly different. I will suggest a few things that might help you get back on track.

 

1. Remember, Tomcat is a java application just like JasperReports. Therefore, it has it's own jars that it needs to load (as well as a particular version of those jars). What most of you are seeing is a conflict between the version of the commons-digester.jar that Jasper and Tomcat are using.

 

2. Tomcat has a very specific class-loading hierarchy. Go to the Tomcat site and learn what the order of loading is.

 

3. Since Tomcat already exists, try to "install" JasperReports into Tomcat, by this I mean that not all of JasperReports jars are needed in the WEB-INF/lib directory if Tomcat is already loading them.

 

4. Take some time to figure out what all of the jars JasperReports uses are actually used for. Maybe some of them aren't needed for your application. For example, if you aren't generating PDF, you probably don't need iText.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...