My company's application was previously on ColdFusion 6.1 and
working fine. We built a reporting feature using JasperReports to
generate reports (which were created with iReport) which also
allowed the ability to export in PDF (iText) or Excel (Apache POI)
and included the use of Barcodes (IDAutomation). All of this was
done either in ColdFusion CFC/CFM files or with Java JAR/class
files.
We were able to upgrade our system to the latest ColdFusion
8. Everything is working fine and so far we don't have any
problems. That is until we decided to use ColdFusion Report Builder
and the CFReport tag. After pounding our heads against the wall we
have figured out that we can use one or the other but not both. If
we use our JasperReport feature, any CFReport that is run, gives an
error. We have tried using a different application scope but that
doesn't seem to do anything. If we instead generate a CFReport
first, then our custom JasperReports code is unable to compile any
new templates. However we have noticed in this scenario that it is
still able to generate a report if the template is already compiled
(.jasper file instead of a .jrxml).
After some research on the web I've come across Java Proxy
(can even see a JavaProxy called in the ColdFusion error dump). I
believe that since the classes have the same name
(net.sf.jasperreports.engine.*) different JARs are being used and
loaded depending which is ran first (our custom jasperreports or
cfreports).
What I'm needing is some help hopefully figuring out a way to
get them both to peacefully coexist. Or at the very least some
insight as to what is happening in hope I can understand it and
figure out a solution.
Our application uses the following JARs:
jasperreports-1.2.6.jar
poi-2.5.1-final-20040804.jar (ability to write out in Excel
file format)
iText-1.3.5.jar (ability to write out in PDF file format)
barbecue-1.1.jar (barcode used in iReport but can't create
valid 2D barcodes)
iReport-1.2.6.jar (has façade/facade class that allows
iReport to generate barcodes using barbecue)
IDAutomation-PDF417-4.10.jar (new 2D barcode meant to replace
barbecue)
IDAutomation-Linear-4.10.jar (new 1D barcode meant to replace
barbecue)