Win a copy of Terraform in Action this week in the Cloud 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

weblogic6.1 connectionpool withSqlserver7.0

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I,ve done configuration for coonectionpool called "supportPool" in the weblogic console as
follows:
url is given as ---- jdbc:weblogic ool
Driver classname-----weblogic.jdbc.pool.Driver
properties---- user=sa
password=
server=Support@Sqlserver:1433
Database name is 'Support, in SQLServer7.0
Machine name is 'Sqlserver'

The sourcecode is:
String user = "sa";
String password1 = " ";
String server = "Support@Sqlserver:1433";
Properties props = new Properties();
props.put("user", user);
props.put("password", password1);
props.put("server", server);

Class.forName("weblogic.jdbc.pool.Driver").newInstance();
con = DriverManager.getConnection("jdbc:weblogic ool:supportPool",props);

when we run this ,we get the following error message:
Pool connect failed: java.lang.SecurityException: Authentication for user sa denied in realm weblogic
Please help me to solve this error.
from Nilesh
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've found some great information on Weblogic through BEA's support page:
BEA Support
Do a search there and see if anyone else has run into the same problem. If you can't find anything relevant, post to one of their newsgroups.
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to the Weblogic forum.
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your code above is not even attempting to utilize the Connection Pool. It is just trying to directly create a JDBC Connection. You should configure a Datasoure to use your Connection Pool and then access the whole sha-bang thru JNDI. See Configuring and Using WebLogic Datasources for more information.
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Nilesh ,
Chris' reference is the best one.
In case you need the steps :
1)Create a TX Data Source from your Admin Console.
For the specific Connection Pool Name.
2)Use the code sample :
import javax.sql.DataSource
import javax.naming.*
DataSource objDS = null;
Connection objCon = null;
Context objCtx = new InitialContext();
objDS = (DataSource)objCtx .lookup("abcd");
objCon = objDS.getConnection();
You have to have classes12.zip in compile time classpath.
Hope this helps.
Regards,
Dipti Rai
 
You showed up just in time for the waffles! And this tiny ad:
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
reply
    Bookmark Topic Watch Topic
  • New Topic