Warning while Running report: Found two components for namespace

jasper-reports, java

Solution

It means that you have several jar files in your JasperReports Library classpath... just use:

- commons-beanutils-1.8.0

- commons-collections-2.1.1

- commons-digester-1.7

- commons-javaflow-20060411

- commons-logging-1.0.4

- groovy-all-1.7.5

- iText-2.1.7

- jasperreports-4.5.0 (any version)

- png-encoder-1.5

- poi-3.7-20101029 (Or poi-3.6)

and problem solved...

Problem

I have problem with report using JasperReports. I ran report on my program, it works, but there were error message just like this ``` net.sf.jasperreports.engine.component.ComponentsEnvironment findComponentBundles ``` `WARNING: Found two components for namespace http://jasperreports.sourceforge.net/jasperreports/components` When I searched any recommendation as same as mine, none is solution. Do you know how to fix this? This' jrxml file ``` <?xml version="1.0" encoding="UTF-8"?> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="imp1_bln" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <parameter name="thn_proses" class="java.lang.String"/> <parameter name="bln_proses" class="java.lang.Integer"/> <queryString> <![CDATA[SELECT DISTINCT m_negara."id_negara" AS ID_Negara, m_negara."nama_negara" AS Nama_Negara, import_det."netto_hs" AS Curr_Net, SUM(import_det.netto_hs)AS Cumm_Net, import_det."cif_hs_us" AS Curr_CIF, SUM(import_det.cif_hs_us)AS Cumm_CIF, batch_hdr."bln_proses" AS batch_hdr_bln_proses, batch_hdr."thn_proses" AS batch_hdr_thn_proses FROM m_hs10digit, m_negara, import_det, batch_hdr, import WHERE "dbo".import.negara_pemasok=dbo.m_negara.id_negara AND dbo.import_det.sk_import=dbo.import.sk_import AND dbo.import.sk_batch=dbo.batch_hdr.sk_batch AND dbo.batch_hdr.bln_proses between 01 and $P{bln_proses} GROUP BY m_negara."id_negara", m_negara."nama_negara", import_det."netto_hs", import_det."cif_hs_us", batch_hdr."bln_proses", batch_hdr."thn_proses"]]> </queryString> <field name="ID_Negara" class="java.lang.String"/> <field name="Nama_Negara" class="java.lang.String"/> <field name="Curr_Net" class="java.lang.Double"/> <field name="Cumm_Net" class="java.lang.Double"/> <field name="Curr_CIF" class="java.lang.Double"/> <field name="Cumm_CIF" class="java.lang.Double"/> <background> <band splitType="Stretch"/> </background> <title> <band height="93" splitType="Stretch"> <image> <reportElement x="1" y="2" width="146" height="91"/> <imageExpression class="java.lang.String"><![CDATA["coffee.jpg"]]></imageExpression> </image> <staticText> <reportElement x="146" y="58" width="410" height="35"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Times New Roman" size="12" isItalic="false" pdfFontName="Times-Roman"/> </textElement> <text><![CDATA[Tabel Impor Menurut Negara Asal (Import By Country of Origin)]]></text> </staticText> </band> </title> <pageHeader> <band height="35" splitType="Stretch"/> </pageHeader> <columnHeader> <band height="79" splitType="Stretch"> <staticText> <reportElement x="0" y="0" width="41" height="19"/> <textElement textAlignment="Left" verticalAlignment="Middle"> <font fontName="Times New Roman" size="12" pdfFontName="Times-Roman"/> </textElement> <text><![CDATA[Bulan :]]></text> </staticText> <staticText> <reportElement x="64" y="0" width="39" height="19"/> <textElement textAlignment="Left" verticalAlignment="Middle"> <font fontName="Times New Roman" size="12" pdfFontName="Times-Roman"/> </textElement> <text><![CDATA[Tahun:]]></text> </staticText> <staticText> <reportElement x="0" y="40" width="56" height="39"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <text><![CDATA[Kode Negara]]></text> </staticText> <staticText> <reportElement x="146" y="59" width="90" height="20"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <text><![CDATA[Bulan Ini]]></text> </staticText> <staticText> <reportElement x="235" y="59" width="129" height="20"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <text><![CDATA[Kumulatif]]></text> </staticText> <staticText> <reportElement x="55" y="40" width="92" height="39"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <text><![CDATA[Negara Asal]]></text> </staticText> <staticText> <reportElement x="363" y="59" width="50" height="20"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <text><![CDATA[Bulan Ini]]></text> </staticText> <staticText> <reportElement x="412" y="59" width="144" height="20"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <text><![CDATA[Kumulatif]]></text> </staticText> <staticText> <reportElement x="146" y="40" width="218" height="20"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <text><![CDATA[Berat Bersih (Netto)]]></text> </staticText> <staticText> <reportElement x="363" y="40" width="193" height="20"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <text><![CDATA[CIF (US $)]]></text> </staticText> <textField> <reportElement x="102" y="0" width="35" height="19"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression class="java.lang.String"><![CDATA[$P{thn_proses}]]></textFieldExpression> </textField> <textField> <reportElement x="40" y="0" width="25" height="19"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression class="java.lang.Integer"><![CDATA[$P{bln_proses}]]></textFieldExpression> </textField> </band> </columnHeader> <detail> <band height="32" splitType="Stretch"> <textField> <reportElement x="1" y="-1" width="55" height="20"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression class="java.lang.String"><![CDATA[$F{ID_Negara}]]></textFieldExpression> </textField> <textField> <reportElement x="146" y="-1" width="90" height="20"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression class="java.lang.Double"><![CDATA[$F{Curr_Net}]]></textFieldExpression> </textField> <textField> <reportElement x="235" y="-1" width="129" height="20"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression class="java.lang.Double"><![CDATA[$F{Cumm_Net}]]></textFieldExpression> </textField> <textField> <reportElement x="55" y="-1" width="92" height="20"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression class="java.lang.String"><![CDATA[$F{Nama_Negara}]]></textFieldExpression> </textField> <textField> <reportElement x="363" y="0" width="50" height="19"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression class="java.lang.Double"><![CDATA[$F{Curr_CIF}]]></textFieldExpression> </textField> <textField> <reportElement x="412" y="-1" width="144" height="20"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression class="java.lang.Double"><![CDATA[$F{Cumm_CIF}]]></textFieldExpression> </textField> </band> </detail> <columnFooter> <band height="45" splitType="Stretch"/> </columnFooter> <pageFooter> <band height="54" splitType="Stretch"/> </pageFooter> <summary> <band height="42" splitType="Stretch"/> </summary> </jasperReport> ```

Original source