Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Struts with Oracle

45779May 18 2004
I having difficulty with setting up datasource.

dataSource.getConnection() fails since dataSource is null for some reason.

Here is what i am doing ...

I have a sample struts application compiled under WSAD 5.1.1. I have defined the datasource in the struts-config.xml this way

<data-sources>
<data-source key="env7">
<set-property property="driverClass" value="oracle.jdbc.driver.OracleDriver"/>
<set-property property="url" value="jdbc:oracle:thin:@caps001.fmr.com:1521:ntg1"/>
<set-property property="username" value="test"/>
<set-property property="password" value="test1"/>
</data-source>

For some reason the the datasource is not set. What am i doing wrong. The app server comes up without any errors.
The application compiled with zero errors or warnings.
The issue seems to be with datasource setup.

The sample application i am trying to test is employees application from Professional Jakarta Struts book.

I put the classes12.zip in the runtime lib directory. But still no luck. What am i missing???

-Narendra
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 15 2004
Added on May 18 2004
0 comments
244 views