cancel
Showing results for 
Search instead for 
Did you mean: 

How to set JNDI name in JSP File

Former Member
0 Kudos

Hi all,

I was updated Web.xml

<context-param>

<param-name>connection</param-name>

<param-value>jdbc:oracle:thin:@192.168.1.81:1521:orcl</param-value>

</context-param>

<context-param>

<param-name>JDBCClassName</param-name>

<param-value>C:/jdevstudio10133/jdbc/lib/ojdbc14.jar</param-value>

</context-param>

<context-param>

<param-name>login</param-name>

<param-value>act_db</param-value>

</context-param>

<context-param>

<param-name>password</param-name>

<param-value>act_db</param-value>

</context-param>

Sample .jsp

// ****** BEGIN SET RUNTIME DATABASE CREDENTIALS ****************

{

String connectString = "connection";

String driverName = "JDBCClassName";

* String JNDIName = "ORCL";*

String userName = "login"; // TODO: Fill in database user

String password = "password"; // TODO: Fill in password

// Switch all tables on the main report and sub reports

CRJavaHelper.changeDataSource(clientDoc, userName, password, connectString, driverName, JNDIName);

// logon to database

CRJavaHelper.logonDataSource(clientDoc, userName, password);

}

At the run time it is showing following error

com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: InvalidURLOrClassName---- Error code:-2147467259 Error code name:failed

How to solve these Error Or to set jndi name

Regards ,

Amol Patil

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Which version of JRC you are using?

You never update web.xml for updating driver specific information.

For JRC XIR2 you modify CRConfig.xml file.

Regards,

Tej

Former Member
0 Kudos

Hi,

Thanx for replying...

I am Using these version cr4e-all-in-one-win_2.0.1

while updating CRcofig.xml it is not effectig in jsp fille

Is there Any another way update CRcofig.xml

Regards ,

Amol

Edited by: amolpatil on Sep 10, 2009 9:57 AM

Former Member
0 Kudos

Hi Amol,

If you are using CR4E 2.0.x then you dont have to modify CRConfig.xml .

Can you check your URL again, I dont htink so its in proper format.

For Oracle driver it should be in format :

jdbc:oracle:thin:@servername:port:GDN

Regards,

Tej

Former Member
0 Kudos

Hi Tejaswini,

I am Using jdbc:oracle:thin:@192.168.1.81:1521 it is working fine .these connection string in each report update the following details

String connectString = "jdbc:oracle:thin:@192.168.1.81:1521:orcl";

String driverName = "oracle.jdbc.driver.OracleDriver";

String JNDIName = "orcl";

String userName = "act_db";

String password = "act_db";

I want Set one place in application that may changes in whole application. In which file i have to update these (Web.xml or CRconfig.XML)

Any another way to set these

also ,I want to set multiple Thread or Multiple reports on one instance

or send me any sample example

Thank you,

Regards,

Amol