Luke Eason
asked on
JSP Crystal Reports XI JNDI
Hi,
I am trying to display crystal reports in a jsp (Java ee) web portal . I don't have much experience with Crystall reports however I've installed Crystal Reports plugin for eclipse from the following link. We are using-
Just for sake of testing, I went to eclipse > new > Crystal Reports Web Project. It created the project and few sample rpt files (screen shot attached).
I added a report that we created and tried to run the jsp file and I got following error:
Error finding JNDI name (DBCON)
DBCON is the name of the ODBC connection we created while creating the report in crystal report professional (software).
Any effort to help will be more than appreciated. Thank you
I am trying to display crystal reports in a jsp (Java ee) web portal . I don't have much experience with Crystall reports however I've installed Crystal Reports plugin for eclipse from the following link. We are using-
eclipse plugin: http://downloads.businessobjects.com/akdlm/crystalreportsforeclipse/2_0/update_site/
Crystal reports XI,
Database:DB2 i5/0S (AS/400),
the web project I want reports to display is on tomcat7
We also have a websphere dedicated to crystal reports.
Just for sake of testing, I went to eclipse > new > Crystal Reports Web Project. It created the project and few sample rpt files (screen shot attached).
I added a report that we created and tried to run the jsp file and I got following error:
Error finding JNDI name (DBCON)
DBCON is the name of the ODBC connection we created while creating the report in crystal report professional (software).
Any effort to help will be more than appreciated. Thank you
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="ISO-8859-1" %>
<%@ taglib uri="/crystal-tags-reportviewer.tld" prefix="crviewer" %>
<crviewer:viewer reportSourceType="reportingComponent" viewerName="CrystalReport1-viewer" reportSourceVar="CrystalReport1" isOwnPage="true">
<crviewer:report reportName="MYREPORT.rpt" />
</crviewer:viewer>
crystal.PNG
I'm not too familiar with BO, but I have a feeling that in this case, in a Java-based environment, you should be using JDBC connectivity, not ODBC. Just a guess - you may need to configure a JNDI datasource in Tomcat with the same name.
ASKER
Thanks for the response Mustaccio.
Yes I understand that I am suppose to use JDBC/JNDI. I know how JDBC works. I have never configured JNDI datasource before, if you can help me with that, it will be great.
Yes I understand that I am suppose to use JDBC/JNDI. I know how JDBC works. I have never configured JNDI datasource before, if you can help me with that, it will be great.
Start here: http://tomcat.apache.org/tomcat-7.0-doc/jndi-datasource-examples-howto.html
You will need to download the DB2 JDBC driver package from here: https://www-304.ibm.com/support/docview.wss?uid=swg27016878
The .jar files to add to the Tomcat CLASSPATH are db2jcc.jar and db2jcc_license_cisuz.jar. The driver class name is com.ibm.db2.jcc.DB2Driver. The URL format would be jdbc:db2//hostname:port/da tabasename
You will need to download the DB2 JDBC driver package from here: https://www-304.ibm.com/support/docview.wss?uid=swg27016878
The .jar files to add to the Tomcat CLASSPATH are db2jcc.jar and db2jcc_license_cisuz.jar. The driver class name is com.ibm.db2.jcc.DB2Driver.
ASKER
I already have jdbc drivers and all that. I have worked with JDBC stuff... just JNDI is new to me. Thanks for the quick response. I will have give it a shot and let you know.
Thanks once again.
Thanks once again.
ASKER
Mustaccio, tell me if I understand this right.
Setting up JNDI data source is just configuring context.xml file in META-INF folder and adding jar files (drivers) in tomcat ? Is that all?
Setting up JNDI data source is just configuring context.xml file in META-INF folder and adding jar files (drivers) in tomcat ? Is that all?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.