Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

The correct way of Creating a Data Source for Oracle in WSAD5.0 ??

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have created a Data Source in WSAD5.0 but unable to make it work.
Here are the Steps that i followed . Pls let me know where i am going worng..
1) Created a Web Sphere Test Environment5.0 Server Configuration
2) In the DataSources i have created a new JDBC Provider for Oracle Thin Driver . i used the default implementation Class oracle.jdbc.pool.OracleConnectionPoolDataSource whose class path by default is ${JDBC_ORACLE_DRIVER_PATH}/classes12.zip
3) For the Above JDBC Provider i have created a version4.0 DataSource ds_test with the below properties.
JNDI Name : jdbc/ds1
Database Name : ORCL
Default User Id : scott
Default Password : tiger
Values for minimum pool size, max pool size , connectiontimeout are kept as the default values
4) Now for the Data Source Above the below given resource properties are used.
URL = jdbc racle:thin@:machinename:1521 RCL

And now i tried accessing the above created Data Source in my JSP Page using the below given code..
// Retrieve a DataSource through the JNDI Naming Service
java.util.Properties parms = new java.util.Properties();
parms.setProperty(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
// Create the Initial Naming Context
javax.naming.Context ctx = new javax.naming.InitialContext(parms);
// Lookup through the naming service to retrieve a DataSource object
javax.sql.DataSource ds =(javax.sql.DataSource)ctx.lookup("jdbc/ds_test");
// Obtain a Connection from the DataSource
conn= ds.getConnection(); // query the database
I am getting the below given Exception:
javax.naming.NamingException: ClassNotFoundException: oracle.jdbc.pool.OracleConnectionPoolDataSource
Thanks in advance for your help.
Sateesh
[ July 30, 2003: Message edited by: sateesh kommineni ]
 
mars76
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
The issue is resolved . classes12.zip was not there in the classpath !!
-Sateesh
 
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Would you tell me where did you setup the user and password?

Thanks
Benson
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In WSAD5(WebSphere Application Developer),
the default user ID and password to be used by a DataSource are first entered as a JAAS authentication entry.
In the Server Configuration view, double click on WASV5 to open the configuration editor. Click on the Security tab. Next to the JAAS Authentication Entries list click on Add and add the user.


In WAS(WebSphere Application Server) : After you login to the admin console Click on the security -> JAAS Configuration ->J2C Authentication Data.
Click New and enter.Provide Alias, UserID, and password details. Description is optional.
Click OK.


Hope this helps
 
Destiny's powerful hand has made the bed of my future. And this tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic