Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2004
    Posts
    1

    Exclamation Unanswered: cr9 within jbx! reportlocation not specified!

    here is my CrystalReportEngine-config.xml:
    <?xml version="1.0" encoding="utf-8"?>
    <CrystalReportEngine-configuration>
    <reportlocation>E:</reportlocation>
    <timeout>10</timeout>
    <keycode>A2960-01C00E2-U7000F8</keycode>
    </CrystalReportEngine-configuration>

    here is my code:
    Locale locale = Locale.getDefault();
    String report = "test1.rpt";
    IReportSourceFactory2 rsFactory = new JPEReportSourceFactory();
    try {
    IReportSource reportSource =
    (IReportSource) rsFactory.createReportSource(report,locale);
    }
    catch (ReportSDKException rsdke) {
    rsdke.printStackTrace();
    System.err.println(rsdke.getMessage());
    }
    catch(Exception e){
    e.printStackTrace();
    System.err.println(e.getMessage());
    }

    here is what I get:
    log4j:WARN No appenders could be found for logger (com.crystaldecisions.reports.reportengineinterfac e).
    log4j:WARN Please initialize the log4j system properly.
    com.crystaldecisions.sdk.occa.report.lib.ReportSDK Exception: Report location is not specified in the configuration file---- Error code:-2147215356 Error code name:fileNotOpened
    at com.crystaldecisions.sdk.occa.report.lib.ReportSDK Exception.throwReportSDKException(Unknown Source)
    at com.crystaldecisions.reports.reportengineinterface .JPEReportSource.<init>(Unknown Source)
    at com.crystaldecisions.reports.reportengineinterface .JPEReportSource.a(Unknown Source)
    at com.crystaldecisions.reports.reportengineinterface .JPEReportSourceFactory.createReportSource(Unknown Source)
    at com.freely.xgq.cr.XGQViewer.processCR(XGQViewer.ja va:27)
    at com.freely.xgq.cr.XGQViewer.main(XGQViewer.java:41 )
    Report location is not specified in the configuration file

    can anyone give some suggestions?
    It will be very kind of you to give any messages.
    thx

  2. #2
    Join Date
    Apr 2004
    Posts
    1

    reportlocation not specified

    I have experienced this same message in my work with CrystalReports 10 Adv Developer edition. I am working with the Java Reporting Component, and am using both Tomcat 4.1.30 and Resin 2.1.8 enterprise edition.

    The root cause trace I get is:

    javax.servlet.ServletException: Report location is not specified in the configuration file
    at org.apache.jasper.runtime.PageContextImpl.handlePa geException(PageContextImpl.java:536)
    at org.apache.jsp.showReport_jsp._jspService(showRepo rt_jsp.java:62)
    at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:137)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
    at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:210)
    at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:295)
    at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:241)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter

    My source code is:

    <%@page import="com.crystaldecisions.reports.reportenginei nterface.JPEReportSourceFactory,
    com.crystaldecisions.sdk.occa.report.reportsource. IReportSourceFactory2,
    com.crystaldecisions.sdk.occa.report.reportsource. IReportSource,
    com.crystaldecisions.report.web.viewer.CrystalRepo rtViewer" %>

    <%
    IReportSourceFactory2 rptSrcFactory = new JPEReportSourceFactory();

    String report = "C:\\Apache Software Foundation\\Tomcat 4.1\\webapps\\crystal\\Report1.rpt";
    IReportSource reportSource = (IReportSource)rptSrcFactory.createReportSource(re port, request.getLocale());

    CrystalReportViewer viewer = new CrystalReportViewer();
    viewer.setReportSource(reportSource);
    viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), null);

    viewer.dispose();
    %>

    Have you had any success resolving the problem??

  3. #3
    Join Date
    Aug 2004
    Posts
    4

    Thumbs up Update

    I am having the same problem and have tried everything I can think of. The Crystal site is no help and neither is their provided documentation. I'm using CR Advanced Developer 10 and have tried Tomcat and Sun One App Server.

    My report file is in WEB-INF.

    This is the error message:
    root cause

    com.crystaldecisions.sdk.occa.report.lib.ReportSDK Exception: Report location is not specified in the configuration file---- Error code:-2147215356 Error code name:fileNotOpened
    com.crystaldecisions.sdk.occa.report.lib.ReportSDK Exception.throwReportSDKException(Unknown Source)
    com.crystaldecisions.reports.reportengineinterface .JPEReportSource.<init>(Unknown Source)
    com.crystaldecisions.reports.reportengineinterface .JPEReportSource.a(Unknown Source)
    com.crystaldecisions.reports.reportengineinterface .JPEReportSourceFactory.createReportSource(Unknown Source)
    org.apache.jsp.basic_jsp._jspService(basic_jsp.jav a:49)
    org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:94)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:324)
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    org.netbeans.modules.web.monitor.server.MonitorFil ter.doFilter(MonitorFilter.java:362)





    ***EDITED***
    I have resolved the issue and gained an understanding of how the config file works. The CrystalReportEngine-config.xml file was missing from the classpath. (Same problem also occurs when the path to WEB-INF contains spaces). When I exploded the WAR for my application, the config file was not in WEB-INF/classes. After I made the necessary changes to ensure the file was included, checked that no spaces existed in the path, and redeployed my application, everything works great.
    Last edited by jessicaking; 11-02-04 at 15:27.

  4. #4
    Join Date
    Nov 2004
    Posts
    1

    Report location is not specified in the configuration file

    Hi jessicaking,

    I am trying to display a simple crystal report. I'm using tomcat 5.0 and CR 10 Developer version. I've placed all the crystal jar files in D:\tomcat\webapps\ROOT\WEB-INF\lib and this folder also contains CrystalReportEngine-config.xml where the reportlocation points to <reportlocation>../..</reportlocation>. For testing purpose i've also placed my report in the same folder. But i get the below mentioned exception.

    exception

    javax.servlet.ServletException: Report location is not specified in the configuration file
    org.apache.jasper.runtime.PageContextImpl.doHandle PageException(PageContextImpl.java:862)
    org.apache.jasper.runtime.PageContextImpl.handlePa geException(PageContextImpl.java:795)
    org.apache.jsp.parameterFieldsViewReport_jsp._jspS ervice(parameterFieldsViewReport_jsp.java:80)
    org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:133)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:856)
    org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:311)
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:301)
    org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:248)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:856)


    root cause

    com.crystaldecisions.sdk.occa.report.lib.ReportSDK Exception: Report location is not specified in the configuration file---- Error code:-2147215356 Error code name:fileNotOpened
    com.crystaldecisions.sdk.occa.report.lib.ReportSDK Exception.throwReportSDKException(Unknown Source)
    com.crystaldecisions.reports.reportengineinterface .JPEReportSource.(Unknown Source)
    com.crystaldecisions.reports.reportengineinterface .JPEReportSource.a(Unknown Source)
    com.crystaldecisions.reports.reportengineinterface .JPEReportSourceFactory.createReportSource(Unknown Source)
    org.apache.jsp.parameterFieldsViewReport_jsp._jspS ervice(parameterFieldsViewReport_jsp.java:55)
    org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:133)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:856)
    org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:311)
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:301)
    org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:248)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:856)

    Can u pl tell me where i have made my mistake? How can I rectify this? Any help will be appreciated. I've tried checking out in businessobjects.com but i couldn't locate any relevant documentation.

    Regards,

    Jayati

  5. #5
    Join Date
    Aug 2004
    Posts
    4
    Quote Originally Posted by jayati
    I've placed all the crystal jar files in D:\tomcat\webapps\ROOT\WEB-INF\lib and this folder also contains CrystalReportEngine-config.xml where the reportlocation points to <reportlocation>../..</reportlocation>. For testing purpose i've also placed my report in the same folder. But i get the below mentioned exception.

    exception

    javax.servlet.ServletException: Report location is not specified in the configuration file
    Jayati,
    CrystalReportEngine-config.xml should be in WEB-INF\classes. Also, the report location specifies the location with regards to this file. So, if you put ../.., you're telling it to look outside the folder and into WEB-INF. So, try moving the config file to the classes folder, move the report to WEB-INF and then see how it goes. You should be able to call the report without specifying a folder (just "report.rpt").

  6. #6
    Join Date
    Oct 2004
    Posts
    7
    Quote Originally Posted by jessicaking
    ***EDITED***
    I have resolved the issue and gained an understanding of how the config file works. The CrystalReportEngine-config.xml file was missing from the classpath. (Same problem also occurs when the path to WEB-INF contains spaces). When I exploded the WAR for my application, the config file was not in WEB-INF/classes. After I made the necessary changes to ensure the file was included, checked that no spaces existed in the path, and redeployed my application, everything works great.

    Hi jessiecaking,
    What do you mean by 'CrystalReportEngine-config.xml file was missing from the classpath'? Do you mean that I need to the xml file in the classpath?

    I've done what you said, but still the problem persist. I'm using tomcat 4.1.31 as webserver. I place the CrystalReportEngine-config.xml file c:\tomcat4\jakarta-tomcat-4.1.31\webapps\REPORTS\web-inf\classes\ and all the jar files are included in c:\tomcat4\jakarta-tomcat-4.1.31\webapps\REPORTS\web-inf\lib\. I've set the report location to <reportlocation>../..</reportlocation>

    Where did it go wrong? Can somebody help me? Thanks.

  7. #7
    Join Date
    May 2006
    Posts
    1

    Crystal Report Problem(Report location is not specified in the configuration file)

    I face same problem like others.
    I am new in Crystal Report 10. When i working with Crystal Report with java Struts I face following problem.
    ================================================== ===
    javax.servlet.ServletException: Report location is not specified in the configuration file
    org.apache.jasper.runtime.PageContextImpl.doHandle PageException(PageContextImpl.java:825)
    org.apache.jasper.runtime.PageContextImpl.handlePa geException(PageContextImpl.java:758)
    org.apache.jsp.crystalReport_jsp._jspService(cryst alReport_jsp.java:84)
    org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:94)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:324)
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)


    root cause

    com.crystaldecisions.sdk.occa.report.lib.ReportSDK Exception: Report location is not specified in the configuration file---- Error code:-2147215356 Error code name:fileNotOpened
    com.crystaldecisions.sdk.occa.report.lib.ReportSDK Exception.throwReportSDKException(Unknown Source)
    com.crystaldecisions.reports.reportengineinterface .JPEReportSource.<init>(Unknown Source)
    com.crystaldecisions.reports.reportengineinterface .JPEReportSource.a(Unknown Source)
    com.crystaldecisions.reports.reportengineinterface .JPEReportSourceFactory.createReportSource(Unknown Source)
    org.apache.jsp.crystalReport_jsp._jspService(cryst alReport_jsp.java:58)
    org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:94)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:324)
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)

    ================================================== =====

    I configure througt following way

    1> /WEB-INF/classes/CrystalReportEngine-config.xml
    the content of this file is
    --------------------------------------
    <?xml version="1.0" encoding="utf-8"?>
    <CrystalReportEngine-configuration>
    <reportlocation>..</reportlocation>
    <timeout>10</timeout>
    <keycode>AV860-01CS00G-V3200FV</keycode>
    </CrystalReportEngine-configuration>
    -------------------------------------------
    2> All .jar file in /WEB-INF/lib/
    3> WebRoot/crystalreportviewers10
    4> My Report File in /WEB-INF/Report1.rpt
    5> My JSP file WebRoot/crystalReport.jsp
    ----------------------------------------------
    content of jsp file is
    ----------------------------------
    <%@ page import="com.crystaldecisions.report.web.viewer.Cry stalReportViewer" %>
    <%@ page import="com.crystaldecisions.reports.reportenginei nterface.JPEReportSourceFactory"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.repor tsource.IReportSourceFactory2"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.repor tsource.IReportSource"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.lib.* "%>
    <%
    String report = "Report1.rpt";

    IReportSourceFactory2 rptSrcFactory = new JPEReportSourceFactory();
    IReportSource reportSource = (IReportSource) rptSrcFactory.createReportSource(report, request.getLocale());
    CrystalReportViewer viewer = new CrystalReportViewer();
    viewer.setReportSource(reportSource);
    viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), out);
    viewer.dispose();

    %>
    ------------------------------------------------------
    Please Help me.

  8. #8
    Join Date
    Aug 2011
    Posts
    1
    Hello guys,

    Try the following configuration it works for me :

    "remove the slash '/' from '/CrystalReport1.rpt ' in the viewer jsp and try.. this will work if you have your crconfig.xml directly under WEB-INF and the .rpt file under WEB-INF/classes. remember to remove the reportLocation tag from CRConfig.xml...."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •