Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Oracle or DB2 configuration with Websphere

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I need to configure my application to use either Oracle9i database or DB2 database. I've tried doing so using only Oracle9ias. Havent succeeded as yet... :roll: Below i'm stating what all i'm doing :
1). Set up a JDBC resource provider for Oracle.
2). Made sure tht the ojdbc14.jar file is in my classpath.
3). Also the JDBC driver class name being implemented is
"oracle.jdbc.pool.OracleConnectionPoolDataSource".
4). Then i setup a datasource i.e jdbc/testOra and filled in all the
parameters as was given by the Custom Properties of the datasource.
5). The URL for Oracle i entered was :- 'jdbc racle:thin:@localhost:1521:sample'
i.e i'm using a Thin Driver.
After doing all this when i run the "Test Connection" button in the Datasource page in the Admin menu of Websphere , it gives me the following error :
Test Connection failed for datasource ChameleonDS on server server1 at node aanchal with the following exception: java.lang.Exception: java.sql.SQLException: invalid arguments in call.
On checking the log files also i didnt get any much information as to what the error is.
So if anyone can help me and tell me where i'm goin wrong it wuld help me on movin ahead with understaning websphere.
aanchal.
 
aanchal mathur
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to add on to what i mentioned above :
I'm using WAS 5.1 , and also my datasource is "ChameleonDS".
I did another test where in i changed the JDBC driver class name to oracle.jdbc.driver.OracleDriver
and when i ran the "TEST CONNECTION" from the datasource window i get the following error :


Test Connection failed for datasource ChameleonDS on server server1 at node aanchal with the following exception: java.lang.Exception: DSRA8101E: DataSource class cannot be used as one-phase: ClassCastException: oracle.jdbc.driver.OracleDriver
 
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you set the authentication alias?
Unlike WebSphere 4.0, WebSphere v 5.0 datasource uses JAAS on datasource.
Can I consider the new 5.0 datasource a instance of JCA
 
aanchal mathur
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Edy,
Thanx for a quick Response. i'm a complete newbie with WAS so you will have to give me more details about what i'm doing wrong.
I checked the Authentication Alias on the Page for the Datasource which i created . There were 2 options there as follows :
Component-managed Authentication Alias : have options as follows -->
1). none
2). aanchal/samples
3). aanchal/psAlias
And the other option is
Container-managed Authentication Alias : having following options -->
1). none
2). aanchal/samples
3). aanchal/psAlias
In both cases i have "None" selected. So not sure whats missing and what i should be doin. Please let me know in detail so i can solve the problem and hopefully move on .
thanx
aanchal.
 
aanchal mathur
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yipeee
thanx Edy i finally figured out why it was giving me that error. But no i'm gettin the error "Invalid username/password". I created 2 properties in the Custom properties where in i entered the username and password as the 2 properties. But still i was getting "Invalid username/password".
I couldnt understand the "Mapping-Configuration Alias" . Each time i would set it to null and it would still defualt it to "defualtPrinicipalMapping".
Wasnt sure whats to be done there. If you could tell me i'd move 1 step ahead .
thanx
aanchal.
 
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are new to J2EE too?
Have you seen this page?
 
Edy Yu
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your WSAD WebSphere Test Enviroment configuration, under security pane, add your username/password as one JAAS authentication entry. Give it an alias name. Use that alias in your datasource setting.
In WebSphere server, there is similar pages for this task ...
 
Would you like to try a free sample? Today we are featuring tiny ads:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic