cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Report file not found error

Former Member
0 Likes
1,115

We recently upgraded from JBoss 4.2 to JBoss 5.1. Our Crystal reports were working fine in JBoss 4.2, but we've had several issues in 5.1.

after resolving several issues, I have reached a point where the application iis unable to locate the .rpt file. See error below. Here is my configuration:

1. .rpt files in the WEB-INF/classes folder

2. CRConfig.xml - reportLocation tag is removed. It is placed under WEB-INF.

3. My code is as below:

private void init() {

String report = "MyReport.rpt";

IReportSourceFactory2 rptSrcFactory = (IReportSourceFactory2) new JPEReportSourceFactory();

try {

this.reportSource = (IReportSource) rptSrcFactory

.createReportSource(report, l);

} catch (ReportSDKException e) {

log.error(e.getMessage());

e.printStackTrace();

}

}

4. My .ear file has the following files in the lib folder:

antlr-runtime.jar

commons-beanutils.jar

drools-api.jar

drools-compiler.jar

drools-core.jar

janino.jar

core.jar

jboss-el.jar

jboss-seam-remoting.jar

jbpm-jpdl.jar

mvel2.jar

richfaces-api-3.2.2.GA.jar

webreporting-jsf.jar

webreporting.jar

CrystalCommon2.jar

CrystalReportsRuntime.jar

jrcerom.jar

logging.jar

keycodeDecoder.jar

commons-configuration-1.2.jar

commons-lang-2.1.jar

5. My .war file has the follwing files in the WEB-INF/lib folder

commons-digester.jar

jboss-seam-debug.jar

jboss-seam-ioc.jar

jboss-seam-ui.jar

jboss-seam-pdf.jar

jboss-seam-excel.jar

jboss-seam-mail.jar

jsf-facelets.jar

richfaces-impl-3.2.2.GA.jar

richfaces-ui-3.2.2.GA.jar

DatabaseConnectors.jar

JDBInterface.jar

QueryBuilder.jar

XMLConnector.jar

com.azalea.ufl.barcode.1.0.jar

commons-collections-3.1.jar

commons-logging.jar

cvom.jar

icu4j.jar

jai_imageio.jar

keycodeDecoder.jar

logging.jar

pfjgraphics.jar

xpp3.jar

mvel2.jar

jxl.jar

jfreechart.jar

jcommon.jar

jboss-el.jar

logging.jar

xpp3.jar

jrcerom.jar

6. Error from server.log

2011-09-15 19:42:07,139 ERROR [com.businessobjects.reports.sdk.JRCCommunicationAdapter] (http-127.0.0.1-8080-1) The report file was not found

2011-09-15 19:42:07,186 ERROR [edu.cmu.heinz.hcis.view.bean.ReportsBean] (http-127.0.0.1-8080-1) Report file ParameterNew.rpt not found

2011-09-15 19:42:07,186 ERROR [STDERR] (http-127.0.0.1-8080-1) com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Report file ParameterNew.rpt not found---- Error code:-2147215356 Error code name:fileNotOpened

2011-09-15 19:42:07,186 ERROR [STDERR] (http-127.0.0.1-8080-1) at com.businessobjects.reports.sdk.JRCAdapterSDKException.a(SourceFile:92)

2011-09-15 19:42:07,186 ERROR [STDERR] (http-127.0.0.1-8080-1) at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:2299)

2011-09-15 19:42:07,186 ERROR [STDERR] (http-127.0.0.1-8080-1) at com.businessobjects.reports.sdk.JRCCommunicationAdapter.<init>(SourceFile:275)

2011-09-15 19:42:07,186 ERROR [STDERR] (http-127.0.0.1-8080-1) at com.businessobjects.sdk.erom.jrc.a.<init>(SourceFile:43)

2011-09-15 19:42:07,186 ERROR [STDERR] (http-127.0.0.1-8080-1) at com.businessobjects.sdk.erom.jrc.ReportAgentFactory.createAgent(SourceFile:46)

2011-09-15 19:42:07,186 ERROR [STDERR] (http-127.0.0.1-8080-1) at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.<init>(SourceFile:703)

2011-09-15 19:42:07,186 ERROR [STDERR] (http-127.0.0.1-8080-1) at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:662)

2011-09-15 19:42:07,186 ERROR [STDERR] (http-127.0.0.1-8080-1) at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:632)

2011-09-15 19:42:07,186 ERROR [STDERR] (http-127.0.0.1-8080-1) at com.

Where is the Java Reporting Component looking for the files?

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

Have resolved this problem after much grief.

In Jboss 4.2, my .rpt files were under /WebContent/crystalReports

In Jboss 5.1, the .rpt file can only be found if I copy it directly under the .ear directory.

I tried several other places (copying under /WebContent/WEB-INF, /WebContent/WEB-INF/classes, /WEB-CONTENT/WEB-INF/lib, /WebbContent, and so on)

The only thing that has worked is copying directly under my ear directory. Not very elegant, but for now it works.

Former Member
0 Likes

Help me ...

-------------------------------------------------------------------

Ambient:

Crystal Reports Viewer 14.0.0.0

java.vendor = Sun Microsystems Inc.

java.version = 1.6.0_37

os.name = Windows NT (unknown)

os.version = 6.2

os.arch = amd64

------------------------------------------------------------------------

Exception:

com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: com.businessobjects.sdk.erom.jrc.ReportAgentFactory---- Error code:-2147215357 [CRSDK00000026] Error code name:internal

          at com.crystaldecisions.sdk.occa.report.lib.ReportSDKException.throwReportSDKException(ReportSDKException.java:112)

          at com.crystaldecisions.proxy.remoteagent.RemoteAgent.createDefaultAgent(RemoteAgent.java:1000)

          at com.crystaldecisions.sdk.occa.report.application.ClientDocument.initRemoteAgent(ClientDocument.java:770)

          at com.crystaldecisions.sdk.occa.report.application.ClientDocument.open(ClientDocument.java:961)

          at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.open(ReportClientDocument.java:226)

          at src.HelloWorldSwing.createAndShowGUI(HelloWorldSwing.java:54)

          at src.HelloWorldSwing.main(HelloWorldSwing.java:24)

-------------------------------------------------------------------------------------------------------------

Source:

import java.awt.BorderLayout;

import javax.swing.JFrame;

import com.crystaldecisions.ReportViewer.ReportViewerBean;

import com.crystaldecisions.sdk.occa.report.application.DatabaseController;

import com.crystaldecisions.sdk.occa.report.application.OpenReportOptions;

import com.crystaldecisions.sdk.occa.report.application.ReportClientDocument;

import com.crystaldecisions.sdk.occa.report.data.IConnectionInfo;

import com.crystaldecisions.sdk.occa.report.reportsource.IReportSource;

public class HelloWorldSwing {

          /**

           * @param args

           */

          public static void main(String[] args) {

                    HelloWorldSwing pgm = new HelloWorldSwing();

                    try {

                              pgm.createAndShowGUI();

                    } catch (Exception e) {

                              e.printStackTrace();

                              //JOptionPane.showMessageDialog(null, e.toString());

                    }

          }

          /**

           * @throws Exception

           *

           */

          public void createAndShowGUI() throws Exception {

                    // Make sure we have nice window decorations.

                    JFrame.setDefaultLookAndFeelDecorated(false);

                    // Create and set up the window.

                    JFrame frame = new JFrame("HelloWorldSwing");

                    frame.setTitle("Titolo del Report");

                    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

                    ReportViewerBean viewer = new ReportViewerBean();

                    viewer.init(new String[0], null, null, null);

                    ReportClientDocument rpt = new ReportClientDocument();

                    rpt.setReportAppServer(ReportClientDocument.inprocConnectionString); // inproc:jrc

                    rpt.open("Report.rpt", OpenReportOptions._openAsReadOnly);

                    IReportSource rptSource = rpt.getReportSource();

                    viewer.setReportSource(rptSource);

                    frame.getContentPane().add(viewer, BorderLayout.CENTER);

                    frame.setSize(1930, 1030);

                    frame.setVisible(true);

                    viewer.start();

          }

}