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
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.
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.
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