aspose file tools*
The moose likes JDBC and the fly likes Datasource Configuration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Datasource Configuration" Watch "Datasource Configuration" New topic
Author

Datasource Configuration

Smitha GS
Greenhorn

Joined: Mar 15, 2005
Posts: 2
How do I configure datasource using Oracle type 4 driver in a J2EE1.3 project developed in WSAD5.1
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

You do it as per the documentation. What problems are you experiencing when you try this?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60046
    
  65

"Smitha GS",

We're pleased to have you here with us on the Ranch, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1121

Bear,
Maybe "GS" is the guy's last name?

How would you like it if some bartender asked you to change your display name -- because he thought that "Bear" can't be used as a first name?

Good Luck,
Avi.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29220
    
135

Avi,
Names typically contain vowels. If there is a language where this isn't the case, Smitha can point it out.

If someone questioned Bear's name, he would reply that Bear is his name.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60046
    
  65

If you have issues with the naming policy, please feel free to bring it up in the JavaRanch forum which is the appropriate place for discussion regarding site policies.

With regards to my own name, it was validated long long ago. It appears on my business card and on my office nameplate.

bear
Forum bartender
Smitha GS
Greenhorn

Joined: Mar 15, 2005
Posts: 2
Following is the error I get on trying to connect to a Oracle datasource .
Component-managed authentication alias not specified for connection factory or datasource Data source 1.

Mine is a J2EE1.3 project with Oracle thin driver , Oracle version 8.1.7 .
I have created a v5 datasource .
My code is as below:
InitialContext ctx = null;
javax.sql.DataSource ds = null;
ctx = new InitialContext();
ds = (javax.sql.DataSource) ctx.lookup("java:comp/env/jdbc/ds1");
Connection conn = ds.getConnection("<userId>","<password>");
return con;

I have also tried using com.ibm.websphere.naming.WsnInitialContextFactory
That too doesn't work .
Please let me know the solution in case any of you have faced this earlier.

Thanks
PS: GS is just my initials . I am sorry I did not go through naming policy.I shall do that .
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60046
    
  65

I am sorry I did not go through naming policy.I shall do that .


Please do so. Accounts with invalid display names are subject to removal and I'd hate to see that happen.

thanks,
bear
Forum bartender
[ March 17, 2005: Message edited by: Bear Bibeault ]
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

Originally posted by Smitha GS:

Following is the error I get on trying to connect to a Oracle datasource .
Component-managed authentication alias not specified for connection factory or datasource Data source 1.



Smitha

error itself is telling reason.

how did you define your connection string in WSAD data source

either provide a connection string like

jdbc racle:thin:UserId/Password@IP_ADDRESS:1521:service_name
or
if you have provided it as

jdbc racle:thin:@IP_ADDRESS:1521:service_name

create a j2c entry in WSAD where you can provide an alias name with user id and password , then you can choose same alias in your data source configuration.

hope this will help

Originally posted by Smitha GS:
PS: GS is just my initials . I am sorry I did not go through naming policy.I shall do that


This is my personal opinion that many of us don't like to reply on a post who dont have name according to naming policy.


Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
 
 
subject: Datasource Configuration
 
Similar Threads
JDBC - As/400 CCSID = 65535 problem
Question about ejbActivate and ejbPassivate
What sort of connectivity does JDBC provides.
what kind of object can be bound to JNDI?
servlets and xml