JB中 EJB designer选的database source一定要和weblogic里配置的database source的JNDI名一致。

解决方案 »

  1.   

    楼上说的有理!你的连接池和CMP没关联对
      

  2.   

    weblogic内没有配置数据源,或数据源名字不是hhjxc
      

  3.   

    trumplet(检查) ,anson2003(老蒋) , serf() 
    你们好,我知道它的意思是我没有配置数据源,JB中 EJB designer选的database source一定要和weblogic里配置的database source的JNDI名一致。我没有填写错是一致的,可是部署老是说我没有配置好数据源现在是我的数据源配置方法错了吗?我是按书上的连接池和数据源的配置方法来配置的啊,请帮我看看我错在哪里?我参考很多配置资料,发现在配置WEBLOGIC的数据源时大家用了两种说法:配置一个"Tx Data Sources"和配置一个" Data Sources"
    大家有没有在WEBLOGIC中设置SQLSER2000为数据连接池的方法和教程啊?
      

  4.   

    Creating and Configuring a JDBC Connection Pool1. Click to expand the Services and JDBC nodes. 
    2. Right-click the Connection Pools node and select Configure a New JDBC Connection Pool. The JDBC Connection Pool Assistant opens in the right pane. 
    3. In Choose Database, follow these steps: 
       a. Database type, select the DBMS of the database that you want to connect to. If your DBMS is not listed, select Other. 
       b. In Database driver, select the JDBC driver you want to use to connect to the database. The list includes common JDBC drivers for the selected DBMS. Click Continue. 
    Note: You must install JDBC drivers in order to use them to create database connections in a connection pool. Drivers are listed in the JDBC Assistant with known required configuration options to help you configure a connection pool. Driver installation also includes setting system Path, Classpath, and other environment variables. 4. In Define Connection Properties, follow these steps: 
       a. In Name, enter a name for the new connection pool. The name should be unique within the domain. 
       b. Under Connection Properties, provide the information requested. The required attributes vary by the DBMS and JDBC driver you selected in the previous step. Many attributes include a common default value. Verify these values for your environment. 
       c. Click Continue. 
    5. In Test Database Connection, verify the connection properties and then click Test Driver Configuration. WebLogic Server attempts to load the driver and create a direct connection to the database server using the connection properties you provided. The JDBC driver must be installed and configured on the server (on the Administration server in multi-server environments) for the test to succeed. 
    If the test is successful, the Create and Deploy page is displayed. If the test is unsuccessful, an error message is displayed at the top of the page. Check the values on the page and correct any errors, then test the connection again.You can click Skip this Step to skip the test and continue configuring the connection pool. Note that if you create and deploy a connection pool with errors, the connection pool configuration will be created, but the connection pool will not actually be deployed to servers or clusters. Also, when you restart servers, the servers will start with errors.6. In Create and Deploy, select the servers and clusters on which you want to deploy the connection pool. If you only have one server in your domain, the connection pool is automatically deployed to the server. Click Create and Deploy to complete the process. 
    In most cases, you should create a data source to use with a connection pool. To create a data source, see Creating and Configuring a JDBC Data Source.
    Creating and Configuring a JDBC Data Source1. In the left pane, click to expand the JDBC node. 
    2. Click the Data Sources node. The Data Sources table displays in the right pane showing all the data sources defined in your domain. 
    3. Click the Configure a New JDBC Data Source text link. The JDBC Data Source Assistant opens in the right pane. 
    4. Enter the following information: 
    Name—Enter a name for this JDBC data source. This name is used in the configuration file (config.xml) and throughout the Administration Console whenever referring to this data source.JNDI Name—Enter the JNDI path to where this JDBC data source will be bound. You can specify multiple names separated by semi-colons (;).Honor Global Transactions—Select this check box (the default) to enable global transactions using this data source. Clear this check box to disable (ignore) global transactions using this data source. In most cases, you should leave the option selected. See When to Enable Global Transactions in a Data Source.Emulate Two-Phase Commit for non-XA Driver—Select this check box to enable connections from the associated non-XA connection pool to participate in global transactions by emulating two-phase commit. Use caution when selecting this option. See Limitations and Risks When Using a Non-XA Driver in Global Transactions.Click Next to continue.5. Select the connection pool to which the data source will point. Applications get a connection from the underlying connection pool by looking up the data source on the JNDI tree and then requesting a connection from the data source. The pool you select will be used to provide the connection when applications request a connection from this data source. 
    Click Next to continue.6. Select the servers and clusters on which you want to create and deploy the new data source. You should deploy the data source to the same servers and clusters on which the underlying connection pool is deployed. By default, the JDBC Data Source Assistant selects the deployment targets on which the underlying connection pool is deployed. In almost all cases, you should accept the default selections. 
    7. Click Create.
      

  5.   

    trumplet(检查)你好:
    谢谢你找的资料,我英文差,不过我在BEA论坛找到一个SQL-SERVER2000与Weblogic8.1数据源及连接池配置连接完整指南 http://dev2dev.bea.com.cn/bbs/thread.jspa?forumID=123&threadID=16363&tstart=0
    我就是按上面来配置数据源和连接池的,我现在不明白的就是我怎么部署它老是说
    F:\bea\jdk141_03\bin\javaw  -classpath F:\bea\weblogic81\server\lib\weblogic_sp.jar;F:\bea\weblogic81\server\lib\weblogic.jar;F:\bea\weblogic81\server\lib\webservices.jar; weblogic.Deployer  -user weblogic  -adminurl http://a61:7001  -password 111222333   -activate  -name wewq -upload  -source D:\java-lianxi\wewq\wewq.ear -targets myserver
    Initiated Task: [0] [Deployer:149026]Deploy application wewq on myserver.
    Task 0 failed: [Deployer:149026]Deploy application wewq on myserver.
    Deployment failed on Server myserver
    weblogic.management.DeploymentException: 
    Exception:weblogic.management.ApplicationException: activate failed for Untitled1.jar
    Module: Untitled1.jar Error: Exception activating module: EJBModule(Untitled1.jar,status=PREPARED)
    Unable to deploy EJB: Czyd from Untitled1.jar:
    [EJB:011028]The DataSource with the JNDI name: hhjxc could not be located. Please ensure that the DataSource has been deployed successfully and that the JNDI name in your EJB Deployment descriptor is correct.