SAP Knowledge Base Article - Public

1820462 - How do I configure Websphere JNDI with Crystal Reports?

Symptom

How do I configure Websphere JNDI with Crystal Reports?

Environment

SAP Crystal Reports 2011

Resolution

  1. Open CRConfig.xml in C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\java
  2. Inside the <DataDriverCommon> tag edit the <Classpath> tag and add the path of your jdbc and websphere jars
  3. Inside the <JDBC> tag edit the following tags in addition to <JDBCURL>, <JDBCClassName>, <JDBCUserName>
    1. The <JNDIURL> tag should reference your JNDI server such as <JNDIURL>iiop://myhost.mycompany.com:2809</JNDIURL>
    2. The <JNDIConnectionFactory> tag should reference the driver that your web application server uses to create its JNDI connections such as <JNDIConnectionFactory>com.ibm.websphere.naming.WsnInitialContextFactory</JNDIConnectionFactory> From my reading this should be located in ws_runtime.jar
    3. The <JNDIInitContext> tag should reference the proper context for your web application such as  <JNDIInitContext>/</JNDIInitContext>
    4. The <JNDIUserName> tag should reference your websphere app server user such as <JNDIUserName>system</JNDIUserName>
  4. Open Crystal reports designer and when you create a new connection, choose JDBC / JNDI
  5. In the pop-up choose JNDI (you will see the values for Provider URL, username and context as how you specified in the CRConfig.xml file). Specify the password for websphere user
  6. Hit next and it should show you the available jndi
  7. Choose a JNDI and create the report

Some background reading from IBM that may be useful:

http://pic.dhe.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Finfo%2Fexp%2Fae%2Ftnam_develop_naming.html

http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Frzatz%2F51%2Fprogram%2Fjndicntx.htm



Some related articles on our SAP Community Network that may be useful:


https://community.sap.com/t5/technology-q-a/creating-jndi-connection-through-websphere-crashes-after-selecting-oracle/qaq-p/9254195



 

Keywords

  • JNDI
  • JDBC
  • Websphere
  • IBM
  • Crystal Reports
  • CR
  • DB2
, KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To

Product

SAP Crystal Reports 2011