on 11-07-2007 1:47 PM
Post Author: Mauro.Garlaschelli
CA Forum: JAVA
Hi all,
I'm using CR XI + Tomcat 5.0.
Every time I click the refresh button on the report toolbar this error occours:
"Error finding JNDI name (localhost)"
Here below the jsp I use to view my reports:
<%@ taglib uri="/crystal-tags-reportviewer.tld" prefix="crviewer" %><html><head><title>viewreport</title></head><body bgcolor="#ffffff"><% String rpt; rpt = request.getParameter("rpt"); if (rpt == null) { rpt = (String)session.getAttribute("rpt"); } else { session.setAttribute("rpt", rpt); } String path = "/reports/" + rpt;%>
<crviewer:viewer viewerName="CrystalViewer" reportSourceType="reportingComponent" displayGroupTree="false" isOwnPage="true" displayToolbarExportButton="true" displayToolbarPrintButton="true" displayToolbarRefreshButton="true" displayToolbarToggleTreeButton="false" displayToolbarCrystalLogo="true" allowParameterPrompting="true" reportSourceVar="<%= path %>">>
<!-- Create the required report tag to specify the report to display and the session variable to cache the report source. --><crviewer:report reportName="<%= path %>"/></crviewer:viewer>
</body> </html> Any help ?
Thanks in advance,
Mauro.
Post Author: Mauro.Garlaschelli
CA Forum: JAVA
Thanks Ted, you are right. I tried with Oracle and all works fine.
I will upgrade to release 2.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post Author: Ted Ueda
CA Forum: JAVA
If you're using JRC XI Release 1, then I would recommend upgrading to XI Release 2 or even CR for Eclipse JRC. JRC XI Release 1 had issues with connecting to JNDI MySQL.
Then I would test first to ensure the JDBC connection works (by blanking out the Optional JNDI Connection name), then try the Optional JNDI name.
When specifying the JNDI, I would recommend making the JNDI for the specific web app (rather than a General JNDI) via the Tomcat Administrator tool. Also, I think you'd define the JNDI name as "jdbc/xspotter", but set the Optional JNDI name as "xspotter".
Sincerely,
Ted Ueda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post Author: Mauro.Garlaschelli
CA Forum: JAVA
When I developed the report I selected "JDBC (JNDI) connection", I defined:
the JDBC URL (jdbc:mysql://localhost:3306/xspotter)
the JDBC class (com.mysql.jdbc.Driver)
and the optionale JNDI connection name (jdbc/xspotter).
In the tomcat configuration I defined the jdbc/xspotter datasource:
<Resource name="jdbc/xspotter" auth="Container" type="javax.sql.DataSource"/>
.......
This is what I see in the log file:
20/11/2007 10:07:33 INFO com.crystaldecisions.reports.reportengineinterface.JPEReportSource - RECEIVED refresh request20/11/2007 10:07:33 INFO com.crystaldecisions.reports.reportengineinterface.JPEReportSource - Attempting to acquire license20/11/2007 10:07:33 INFO com.crystaldecisions.reports.reportengineinterface.JPEReportSource - Successfully acquired license20/11/2007 10:07:33 INFO com.crystaldecisions.reports.reportengineinterface.JPEReportSource - refresh() = waited 0 ms to acquire license20/11/2007 10:07:33 INFO com.crystaldecisions.reports.reportengineinterface.Engine - Engine.refresh request20/11/2007 10:07:33 DEBUG com.crystaldecisions.reports.dataengine.datasource - Invalidating data source20/11/2007 10:07:33 DEBUG com.crystaldecisions.reports.dataengine.datasource - Deleting last saved records20/11/2007 10:07:33 INFO com.crystaldecisions.reports.dataengine.datasource - Invalidating controller20/11/2007 10:07:33 INFO com.crystaldecisions.reports.dataengine.datasource - Invalidating totaller20/11/2007 10:07:33 INFO com.crystaldecisions.reports.reportengineinterface.JPEReportSource - Releasing license20/11/2007 10:07:33 INFO com.crystaldecisions.reports.reportengineinterface.JPEReportSource - successfully processed refresh request20/11/2007 10:07:33 INFO com.crystaldecisions.reports.reportengineinterface.JPEReportSource - RECEIVED request for getPage20/11/2007 10:07:33 INFO com.crystaldecisions.reports.reportengineinterface.JPEReportSource - Attempting to acquire license20/11/2007 10:07:33 INFO com.crystaldecisions.reports.reportengineinterface.JPEReportSource - Successfully acquired license20/11/2007 10:07:33 INFO com.crystaldecisions.reports.reportengineinterface.JPEReportSource - getPage() = waited 0 ms to acquire license20/11/2007 10:07:33 INFO com.crystaldecisions.reports.reportengineinterface.Engine - Engine.needToLogOnServer request20/11/2007 10:07:33 ERROR com.crystaldecisions.reports.reportdefinition.datainterface - Failed to open connection (Connection: databaseType=JDBC (JNDI) serverName=jdbc:mysql://localhost:3306/xspotter state=closed databaseDriverName=crdb_jdbc.dll).com.crystaldecisions.reports.queryengine.al: Errore di ricerca del nome JNDI (localhost)
I really don't know how could It be.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post Author: Ted Ueda
CA Forum: JAVA
You likely are using the Java Reporting Component (JRC) SDK to display a Saved Data report, where the report was refreshed from a non-Java data connection such as ODBC/OLE.
The JRC supports only Java-based connectivity, such as JDBC/JavaBeans/XML. If it encounters a non-Java data source, it tries to look up a JNDI connection with the same name.
Refresh is triggering a re-connection attempt to the database.
If the above does not apply, more info is needed concerning the connectivity in the report.
By the way, do the page navigation buttons work, or do they throw the same error?
Sincerely,
Ted Ueda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.