| Robert Brown 2005-06-20, 2:49 am |
| I had forgotten (and was reminded thanks to Rhett at Daniel IT) that you
must switch to the Full Development Environment to enable other data
sources. One of the many areas that require the Full Environment
configuration.
This link will explain:
http://publib.boulder.ibm.com/infoc...cdetestenvs.htm
I knew other areas (Dynacache, stateful session beans, performance) that
wouldn't work under the new Lightweight Environment but forgot this...so
assume you are still working under the Lightweight setup. Try the Full
configuration.
R
> I did the following changes...
>
> 1. Using DB2 Configuration Assistant, created an Alias for my Remote Database of another app.
> 2. Updated " C:\WCToolkitBE56\properties\com\ibm\comm
erce\litecontainer\DataSources.properties" with the following.
> a. Added 'jdbc/MYDBDS\ DataSource=myDataSource' after 'jdbc/WPM\ DataSource=paymentsDataSource'.
> b. Added the following at the end.
> myDataSource.driver=COM.ibm.db2.jdbc.app.DB2Driver
> myDataSource.url=jdbc:db2:MYDB // Also tried with 'jdbc:db2://abc.de.fgh.com:2998/MYDB'
> myDataSource.user=<userid> // Gave the actual user id
> myDataSource.password=<pwd> // Gave the actual pwd
>
> 3. Added the following Env Var in 'C:\WCToolkitBE56\properties\com\ibm\com
merce\litecontainer\Env.properties'
> "java\:comp/env/jdbc/MYDBDS=jdbc/MYDBDS"
>
> 4. Used the following code to get the Datasource and Connection:
> ========================================
====================
> DataSource ds = JNDILookupSvc.lookupDataSource("jdbc/MYDBDS");
> ECTrace.trace(ECTraceIdentifiers.COMPONENT_ORDER, CLASS_NAME, methodName, "DataSource after Lookup - '"+ds+"'");
> ds.setLoginTimeout(30000);
> ECTrace.trace(ECTraceIdentifiers.COMPONENT_ORDER, CLASS_NAME, methodName, "DataSource after setting Login Timeout - '"+ds+"'; Login Timeout - '"+ds.getLoginTimeout()+"'");
> _gpopConn = ds.getConnection();
> ========================================
====================
>
> Once I executed the same, I got a 'NullPointerException'. And the message was that 'The url cannot be null'.
>
> Please help me in this regard.
>
> Thanks in advance,
> V
|