接分,1你的jndi的lookup的examples-dataSource-demoPool因改是你的数据源myds的jndi名称demods,为什么却lookup “examples-dataSource-demoPool”

解决方案 »

  1.   

    你的代码不正确,修改如下:
               /*  Create  a  connection  to  the  WebLogic  JNDI  Naming  Service:  
                 */ 
      String url="t3://localhost:7001";localhost=127.0.0.1可能你的改一下
      Properties h = new Properties ();
      h.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
               ctx  =  new  InitialContext(h);  
     
               /*  Create  a  new  DataSource  by  Locating  It  in  the  Naming  Service:  
                 */  
               ds  =  (javax.sql.DataSource)    
                   ctx.lookup  ("examples-dataSource-demoPool");  
     
           }  catch  (Exception  E)  {  
               /*    
                     Handle  exception  here.    
               */  
               System.out.println("Init  Error:  "  +  E);  
           }  
       }  
     成功后,给分喽
      

  2.   

    我得JNDI名字设置是正确的,而且按照 netcobol(初学者)的方法试过,可怎么还不正确呢,我刚学weblogic,各位不吝赐教啊
    studyhard1314(studyhard1314) ,你的ftp可以访问,但没有文件啊?
      

  3.   

    你用的是什么数据库?
    在weblogic中如何配的连接池