Sudden error generating Jasper Report

0

Hi,

Recently, we encountered some problems in production when users were trying to print invoices.

We are using Jasper Reports plugin, version 4.1.1, embedded into Oracle POS aplication.

 

The error starded to occur yesterday randomly, and dissapearred today, on store opening, after all the systems were restarted.

No binaries were changed or other configuration on the client machines.

If you have any tips on this matter that could help identify the root cause, i will highly appreciate them..

I would like to add that i looked into a lot of answers online and i am currently trying to replicate the issue on testing env.

 

Please find the stacktrace below:

2016-02-22 18:29:05,315 27701245  (StaticCacheThread-5:oracle.retail.stores.foundation.tour.service.Mechanic):
      [oracle.retail.stores.foundation.tour.service.Mechanic.processLetter(Mechanic.java:215)]
      Mechanic received this exception:
java.lang.NoClassDefFoundError
    at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:184)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:78)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:88)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:58)
    at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:142)
    at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:78)
    at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:624)
    at vfro.retail.stores.pos.receipt.JasperReport.VFROJRPrintedDocumentManager.printDocument(VFROJRPrintedDocumentManager.java:179)
    at vfro.retail.stores.pos.services.printing.VFROPrintTransactionDocumentsAisle.traverse(VFROPrintTransactionDocumentsAisle.java:1632)
    at oracle.retail.stores.foundation.tour.engine.Aisle.traverse(Aisle.java:152)
    at oracle.retail.stores.foundation.tour.engine.SiteVertex.driveSite(SiteVertex.java:311)
    at oracle.retail.stores.foundation.tour.engine.AbstractSite.driveSite(AbstractSite.java:152)
    at oracle.retail.stores.foundation.tour.service.BusDriver.processLetter(BusDriver.java:298)
    at oracle.retail.stores.foundation.tour.service.BusDriver.processLetters(BusDriver.java:202)
    at oracle.retail.stores.foundation.tour.service.AbstractCrewMember.run(AbstractCrewMember.java:253)
    at oracle.retail.stores.foundation.manager.thread.StaticCacheThread.run(StaticCacheThread.java:180)

adrian.zah7's picture
Joined: Feb 23 2016 - 2:01am
Last seen: 3 years 8 months ago

@Lucian, the answer seems legit, the only question remaining: how can this occur and then suddenly dissapear the next business day? :-/ Note that the plugin is trying to print a receipt on a microsoft windows 7 environment.

 

adrian.zah7 - 3 years 8 months ago

5 Answers:

1

The error can occur if you have a broken/invalid font extension jar on the application classpath, or if Java/AWT fails to initialize the graphics environment.

If JR runs on a server machine that does not have a graphics environment, run the JVM in headless AWT mode (with -Djava.awt.headless=true).

Regards,

Lucian

lucianc's picture
7146
Joined: Jul 17 2006 - 1:10am
Last seen: 4 days 20 hours ago
0

Hi,

Thanks for your response!

Any ideas of why the sudden occurence?

Can windows updates affect this behaviour? Those are the only changes made on the system recently.

 

Thanks!

 

adrian.zah7's picture
Joined: Feb 23 2016 - 2:01am
Last seen: 3 years 8 months ago
0

The chances of figuring out what has changed without access to the machine are not good.

First of all, were you able to resolve the problem?  Did running Java in headless mode help?  Do you have font extension jars on the application classpath?

Is the Oracle application running as a Windows service?  Or is it a GUI application?

lucianc's picture
7146
Joined: Jul 17 2006 - 1:10am
Last seen: 4 days 20 hours ago
0

Hi,

First of all, thanks again for your input on the matter!

The strange thing is that the problem stopped to occur the next business day, with no changes applied to the system, but a windows restart.

The classpath is correct, and the application is running as a GUI app. The error started to occur suddenly on hundreds of computers, then dissapeared the next day :|

So, untill a root cause if found or i can replicate the issue on testing env, i'm expecting it back with  the same randomness.. And it has a really big impact in our business...

 

P.S: i can gain acces to the production computers and obtain any neccesary data.. as far as i know, until now, is that there were some windows updates targeted for installation in that period of time.

Thanks!

 

 

adrian.zah7's picture
Joined: Feb 23 2016 - 2:01am
Last seen: 3 years 8 months ago
0

If you still have the log files, look to see whether there is a different exception at some point before the java.lang.NoClassDefFoundError lines.

NoClassDefFoundError is thrown after the initial failure to initialize JRStyledTextParser class.  On the first access to JRStyledTextParser, the original cause should have been logged.  So look for JRStyledTextParser in the logs, maybe the original exception would shed some light on what happened.

lucianc's picture
7146
Joined: Jul 17 2006 - 1:10am
Last seen: 4 days 20 hours ago
Feedback
randomness