CMP cache

Hi
I am working on a task which requires creating a cache(using hashtables probably) so that the components donot need to invoke the finder methods of the CMP beans all the time.
Reason for doing this:
1. the finders cannot utilize CMP cache because there are not findByPrimaryKey
2. a large number of calls are being made to these finder methods.
Query:
1. Is it correct that we cannot have CMP cache because these finders are not findByPrimaryKey?
2. If I create cache, is there any mechanism to make sure that the cache information is not inconsistent with the database?

Usually the home interface does this for you...
It is deprecated to use a hashtable because the entity beans you cached can get invalid or deleted. I'm quite sure the server will throw some kind of exception if a requested bean is not present anymore. So i you still want to cache youll have to implement some own logic how to handle inconstencies.
Still the home interface usually does a really good job and it is the only part in CMP which can be cached (ServiceLocator pattern does it BTW).
Finders are compiled at deploytime and use database querries so you wont be able to use them on your cache.
Fazit: consider caching home interfaces because their lookup is expensive (JNDI) and use those to access your entity beans.

Similar Messages

  • How can i refresh all CMP cache?

    Hi,
    In my application i need to delete many rows from DB using direct mySql commands. after i do that, my application server is still using the cached entity beans from before the deletion, and this might cause problems.
    How can i refresh all the entity beans cache completely?

    In my application i need to delete many rows from DB
    using direct mySql commands. after i do that, my
    application server is still using the cached entity
    beans from before the deletion, and this might cause
    problems.
    How can i refresh all the entity beans cache
    completely?Maybe if you were really using EJB you would know the answer. Describe the problems this is causing and explain what you don't respond to your forum post. Do you know how to write a SQL statement? Do you know what CMP stands for? Would you like to know how to create software programs?

  • CMP cache limits and passivation

    Good day,
    We are hitting issues around filling up the EJB cache but we also want
    to limit the memory impact of the deployment. What I mean is that if
    you have max-beans-in-cache set to 50 and you involve more than 50 EB in
    a txn, it throws a cache full exception. We can bump up the cache size,
    but for an unbounded collection, this is an artificial fix, another txn
    may load more than the new size.
    I read in an old posting that the EJB team was looking at passivating EB
    involved in a txn to avoid this issue. Was this incorporated into the
    engine and if so, how is it controlled?
    Thanks,
    Sean

    Sean Garagan wrote:
    Hi Rob,
    Thanks for the response.
    The only issue about not using an unbounded collection is that entity
    beans and finder methods are defined as unbounded collections. If you
    use the WLS example of the bands (or the EJB spec of orders and items)
    all of the collections are unbounded. Without using WLS specific tags,
    there does not seem to be a way to limit the returned values to allow an
    EB to batch operations in smaller chunks to alleviate the problem.Indeed. The max-elements tag is in our descriptors to limit the number
    of rows returned from the database. It would be nice to see this
    standardized.
    -- Rob
    >
    I guess it comes down to another hole in the spec (hopefully one that
    will be patched).
    Sean
    Rob Woollen wrote:
    No, passivation during transactions is on the feature plan for a
    future release.
    That being said, an unbounded collection is probabbly not a great idea
    regardless. you don't want to bring back a huge amount of data from
    the database, and you don't want us to have to passivate your working
    set out of memory.
    -- Rob
    Sean Garagan wrote:
    Good day,
    We are hitting issues around filling up the EJB cache but we also
    want to limit the memory impact of the deployment. What I mean is
    that if you have max-beans-in-cache set to 50 and you involve more
    than 50 EB in a txn, it throws a cache full exception. We can bump
    up the cache size, but for an unbounded collection, this is an
    artificial fix, another txn may load more than the new size.
    I read in an old posting that the EJB team was looking at passivating
    EB involved in a txn to avoid this issue. Was this incorporated into
    the engine and if so, how is it controlled?
    Thanks,
    Sean

  • EJB CMP remove create cache issue? DuplicateKeyException

    EJB CMP remove create cache issue? DuplicateKeyException
    Hi I have an EJB 2.1 application using CMP. Most things work fine. But if I in a transaction tries to remove a bean and create a new one with the same primary key I get a DuplicateKeyException:
    2007-11-16 09:25:31,963 ERROR [RMICallHandler-6] AdminGroupData_ConcreteSubClass147 - Error adding AccessRules:
    javax.ejb.DuplicateKeyException: Exception [EJB - 10007]: Exception creating bean of type [AccessRulesData]. Bean already exists.
    at oracle.toplink.internal.ejb.cmp.EJBExceptionFactory.duplicateKeyException(EJBExceptionFactory.java:195)
    I suspect that the remove call only removes from the cache (until commit), but that the create call checks the database or something?
    My code is simple like the following:
    AdminPreferencesDataLocal apdata1 = adminpreferenceshome.findByPrimaryKey(certificatefingerprint);
    adminpreferenceshome.remove(certificatefingerprint);
    adminpreferenceshome.create(certificatefingerprint,newadminpreference);
    Is there some configuration I can set in toplink-ejb-jar.xml to fix this?
    I use OC4j 10.1.3.3
    Cheers,
    Tomas

    The bean.remove() was executed but the sql DELETE was executed to the database as the result, oc4j manages all sql statements and they are optimized to commit to the database in batch at once when the transaction commit. Oc4j ejb container is smart and preventing you from creating the same entity cached in the transaction because the sql delete was not really committed to the database when the create is called.
    My guess is that the reason it works with IBM WAS was because it issued sql for each remove/create call right away instead of doing them in batch as oc4j, or your WAS remove then create were called in separate transactions.

  • CMP PK Sequence generated by Bean Self Cache !!

    Hi All,
    In WL6.1, one can mention the name of the sequence and the DB in the cmp-rdbms-jar.xml
    to use the sequence generated number to use as a primary key.
    Though my work is being done by the WL server but still WL server is hitting the
    DB for each insert.
    There are a couple of discussions listed on theserverside.com, but most of them
    fail for a clustered environment.
    Can anyone please suggest me a solution where the WL server would cache the keys
    instead of hitting the DB for each insert ?
    Thanks in advance for your help !!
    Regards
    -Rais

    Hi,
    I performed a test and ran 3 scenarios(inserting 1000 records).
    1. SEQUENCE INCREMENT BY 10 And key-cache-size = 1.
    Time taken = 13 seconds
    Records were inserted as 1,11,21,31.....
    2. SEQUENCE INCREMENTED BY 10 And key-cache-size = 10
    Records were inserted as 1,2,3,4,5...
    Time = 8 seconds
    3. SEQUENCE INCREMENTED BY 1 And key-cache-size = 10
    I got the duplicate primary key problem.
    The behaviour in case 2 is ambiguous to me...I was expecting the records to be
    inserted as 1,11,21,31.....
    Can anyone please clarify ??
    Thanks
    -Rais
    "Rais" <[email protected]> wrote:
    >
    Hi Rob,
    The weblogic Docs and the DTD says that "key-cache-size" should be equal
    to the
    INCREMENT VALUE of the Sequence in DB.Lemme point out what I have interpreted
    from that.Please correct me if I am wrong.
    lets say my sequence is
    CREATE SEQUENCE TEMP_SEQ INCREMENT BY 2.
    And my key-cache-size value is also 2.
    I believe that by keeping these two values equal,records would be inserted
    into
    the DB as 1,3,5,7......
    But in a clustered environment,each CMP would still be hitting the DB
    to get the
    sequence number.
    What I mean to say is key-cache-size is actually not meant for caching
    the sequence
    numbers.
    Even if it is ,how would the servers in the cluster maintain the same
    state of
    their individual cache same ??
    Regards
    -Rais
    Rob Woollen <[email protected]> wrote:
    Did you set a key-cache-size in your CMP deployment descriptor?
    -- Rob
    Rais wrote:
    Hi All,
    In WL6.1, one can mention the name of the sequence and the DB in thecmp-rdbms-jar.xml
    to use the sequence generated number to use as a primary key.
    Though my work is being done by the WL server but still WL server
    is
    hitting the
    DB for each insert.
    There are a couple of discussions listed on theserverside.com, butmost of them
    fail for a clustered environment.
    Can anyone please suggest me a solution where the WL server would
    cache
    the keys
    instead of hitting the DB for each insert ?
    Thanks in advance for your help !!
    Regards
    -Rais

  • Caching CMP Entity Beans with 9.0.2

    Hi,
    my CMP Entity Bean is accessed from a JSP-Page through a Stateless Session Bean. The Session-Bean executes findAll() on the Entity-Bean and the JSP-Page iterates over the Collection and displays the Fields through their getter-Methods. It turns out that every getXXX Methods results in a complete load of the Bean from the Database, so for 3 database-records with 4 attributes i get 12 SELECT - statements and 12 Activate/Load/Passivate cycles of the Entity Bean!!!!
    I tried to setup the attributes in orion-ejb-jar.xml correctly, but that didn't show a difference:
    -) exclusive-write-access="true" does only work in "read-only" mode (see oc4j_ejb_guide_r2.pdf)
    -) setting timeouts didnt work
    My Entity Bean settings are:
    exclusive-write-access="true"
    instance-cache-timeout="60"
    max-instances="100"
    max-tx-retries="0"
    pool-cache-timeout="100"
    The EJB-Callbacks are:
    first the Session-Bean is created, and findAll() is executed - then all Entity-Beans are passivated again:
    TestManBean Constructor called 1
    TestManBean.setSessionContext() 1
    TestManBean.ejbCreate() 1
    PersonBean Constructor called 1
    PersonBean.setEntityContext() 1
    PersonBean.ejbActivate() 1
    PersonBean.ejbLoad() 1
    PersonBean Constructor called 2
    PersonBean.setEntityContext() 2
    PersonBean.ejbActivate() 2
    PersonBean.ejbLoad() 2
    PersonBean Constructor called 3
    PersonBean.setEntityContext() 3
    PersonBean.ejbActivate() 3
    PersonBean.ejbLoad() 3
    PersonBean.ejbPassivate() 1
    PersonBean.ejbPassivate() 2
    PersonBean.ejbPassivate() 3
    now for every getXXX-Methods the following occurs:
    PersonBean.ejbActivate() 3
    PersonBean.ejbLoad() 3
    PersonBean.ejbPassivate() 3
    I user OC4J 9.0.2 Production with Oracle 8.1.6.
    How can I turn on Entity-Bean Caching?
    Thanks,
    Gilbert

    Hi Gilbert,
    Someone recently asked a similar question to yours. Perhaps that thread will
    be helpful to you?
    Author: Valeri Kireitchik
    Subject: how to set exclusive-write-access="true"
    Date: May 17, 2002 10:18 PT
    URL:
    Re: Get the Table name by providing the Sequence name
    The same person (Valeri) also asked his question on two other forums:
    http://www.elephantwalker.com/rfa?id=549
    http://www.mail-archive.com/orion-interest%40orionserver.com/msg19037.html
    Good Luck,
    Avi.

  • Caching CMP entity beans in a Weblogic cluster

    We are currently looking for pilot customers for our clustered transactional
              CMP Entity EJB cache. It works with the Weblogic's transaction management
              and CMP implementation to coherently and transactionally cache CMP Entity
              EJBs in a cluster, providing close to zero-latency access to CMP data --
              even for read/write beans.
              Problem Description:
              Performance of J2EE applications using CMP Entity EJBs degrades when running
              in a cluster due to the disabling of Entity EJB caching (i.e. the
              requirement to set db-is-shared=true).
              Requirements:
              1. You are running Weblogic in a cluster
              2. Your application has at least one Weblogic CMP Entity EJB
              3. The data related to your Weblogic CMP Entity EJB is only being updated by
              Weblogic CMP Entity EJBs (i.e. you could set db-is-shared=false if you were
              not clustering)
              Solution Description:
              1. No source code or deployment descriptor changes
              2. One additional automated build step (ANT-compatible)
              3. Configurable cache (e.g. size-limited)
              We plan to begin introduce the product to pilot customers on 28 January
              2002, so if you are interested, please drop me an email at
              [email protected]
              Peace,
              Cameron Purdy
              Tangosol, Inc.
              Clustering Weblogic? You're either using Coherence, or you should be!
              Download a Tangosol Coherence eval today at http://www.tangosol.com/
              

    Could somebody please guide me on this?
    Dipak Jha

  • Can't invalidate the CMP bean's cache. Please help

    Dear all,
    The ClassCastException raised while calling:
    (weblogic.ejb.CachingLocalHome)home).invalidate (Arrays.asList(primaryKeys));
    The CMP bean uses optimistic concurrency and caching between transactions.
    <b> Please advice what weblogic-ejb-jar.xml attributes may be set to cause Weblogic generate proper Home stub that may be cast to CachingLocalHome?</b>
    P.S. weblogic-ejb-jar.xml :
    <weblogic-enterprise-bean>
    <ejb-name>MyEntity</ejb-name>
    <entity-descriptor>
    <entity-cache>
    <concurrency-strategy>Optimistic</concurrency-strategy>
    <cache-between-transactions>True</cache-between-transactions>
    </entity-cache>
    </entity-descriptor>
    </weblogic-enterprise-bean>

    check the documentation for invalidation of RO entity beans there is example code to invalidate on OCE.
    http://e-docs.bea.com/wls/docs81/ejb/entity.html#ChoosingaConcurrencyStrategy

  • Unable to execute the cmp using the weblogic

    I was trying to execute cmp using weblogic server7.0.
    It a simple program,
    The remote interface-
    import javax.ejb.*;
    import java.rmi.RemoteException;
    public interface SportTeam extends EJBObject{
    public void setOwnerName(String ownerName) throws RemoteException;
    public String getOwnerName() throws RemoteException;
    public void setFranchiseName(String franchiseName) throws RemoteException;
    public String getFranchiseName() throws RemoteException;
    }The home interface
    import javax.ejb.*;
    import java.rmi.RemoteException;
    import java.util.Collection;
    public interface SportTeamHome extends EJBHome{
    SportTeam create(String sport,String nickName)throws RemoteException,CreateException;
    SportTeam create(String sport,String nickName,String ownerName,String franchisePlayer)throws RemoteException,CreateException;
    SportTeam findByPrimaryKey(SportTeamPK sportTeam) throws RemoteException,FinderException;
    Collection findByOwnerName(String ownerName) throws RemoteException,FinderException;
    }The bean
    import javax.ejb.*;
    import javax.naming.*;
    import java.rmi.RemoteException;
    import java.sql.*;
    import java.util.*;
    public abstract class SportTeamEJB implements EntityBean{
    public SportTeamPK ejbCreate(String sport,String nickName) throws CreateException {
    setSport(sport);
    setNickName(nickName);
    setOwnerName(null);
    setFranchiseName(null);
    return null;
    public void ejbPostCreate(String sport,String nickName){}
    public SportTeamPK ejbCreate(String sport,String nickName,String ownerName,String franchiseName) throws CreateException {
    setSport(sport);
    setNickName(nickName);
    setOwnerName(ownerName);
    setFranchiseName(franchiseName);
    return null;
    public void ejbPostCreate(String sport,String nickName,String ownerName,String franchiseName){}
    public void ejbLoad(){}
    public void ejbStore(){}
    public void ejbRemove(){}
    public void ejbActivate(){}
    public void ejbPassivate(){}
    public void setEntityContext(EntityContext ctx){}
    public void unsetEntityContext(){}
    abstract public String getSport();
    abstract public void setSport(String sport);
    abstract public String getNickName();
    abstract public void setNickName(String nickName);
    abstract public String getOwnerName();
    abstract public void setOwnerName(String ownerName);
    abstract public String getFranchiseName();
    abstract public void setFranchiseName(String franchiseName);
    }the client side program
    import java.rmi.RemoteException;
    import javax.ejb.*;
    import javax.naming.*;
    import javax.rmi.PortableRemoteObject;
    import java.util.Properties;
    import java.util.Collection;
    import java.util.Iterator;
    public class TestClient{
    public static void main(String[] args){
    try{
         Properties prop=new Properties();
         prop.setProperty(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
         prop.setProperty(Context.PROVIDER_URL,"t3://localhost:7001");
         InitialContext initial=new InitialContext(prop);
         Object objref=initial.lookup("CMPSportBean");
         SportTeamHome home=(SportTeamHome)PortableRemoteObject.narrow(objref,SportTeamHome.class);
         System.out.println("Creating a row.");
         home.create("basketball","Kings","Joe Maloof","Jason Williams");
         System.out.println("Looking up by primary key...");
         SportTeam team=home.findByPrimaryKey(new SportTeamPK("basketball","Kings"));
         System.out.println("Current franchise player:");
         System.out.println(team.getFranchiseName());
         System.out.println("Looking by by owner...");
         Collection col=home.findByOwnerName("Joe Maloof");
         if(     0 == col.size()     ){
              System.out.println("Found no such owner");
         }else {
              Iterator iter=col.iterator();
              while(iter.hasNext()){
              Object objref2=iter.next();
              SportTeam teamRef2=(SportTeam) PortableRemoteObject.narrow(objref2,SportTeam.class);
              System.out.println("Owner name:"+ teamRef2.getOwnerName());
    team.remove();
    }catch(RemoveException re){
         re.printStackTrace();
    }catch(NamingException ne){
         ne.printStackTrace();
    }catch(CreateException ce){
         ce.printStackTrace();
    }catch(FinderException fe){
         fe.printStackTrace();
    }catch(RemoteException re){
                  re.printStackTrace();
    }The primary key class
    //package sportBean.cmp;
    import java.io.Serializable;
    public class SportTeamPK implements Serializable{
    public String sport;
    public String nickName;
    public SportTeamPK(){}
    public SportTeamPK(String sport,String nickName){
    this.sport =sport;
    this.nickName=nickName;
    public String getSport(){
    return sport;
    public String getNickName(){
    return nickName;
    public int hashCode(){
    return (sport+nickName).hashCode();
    public boolean equals(Object other){
         if( (other == null) ||! (other instanceof SportTeamPK) ){
            return false;
         SportTeamPK otherPK=(SportTeamPK)other;
         return sport.equals(otherPK.sport) && nickName.equals(otherPK.nickName);
    The program has complied successfully .
    The META-INF directory has been created automatically
    the ejb-jar.xml file
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <!-- Generated XML! -->
    <ejb-jar>
      <enterprise-beans>
        <entity>
          <ejb-name>CMPSportBean</ejb-name>
          <home>SportTeamHome</home>
          <remote>SportTeam</remote>
          <ejb-class>SportTeamEJB</ejb-class>
          <persistence-type>Container</persistence-type>
          <prim-key-class>SportTeamPK</prim-key-class>
          <reentrant>False</reentrant>
          <abstract-schema-name>SportEJB</abstract-schema-name>
          <cmp-field>
            <field-name>sport</field-name>
          </cmp-field>
          <cmp-field>
            <field-name>nickName</field-name>
          </cmp-field>
          <cmp-field>
            <field-name>ownerName</field-name>
          </cmp-field>
          <cmp-field>
            <field-name>franchiseName</field-name>
          </cmp-field>
          <query>
            <query-method>
              <method-name>findByOwnerName</method-name>
              <method-params>
                <method-param>java.lang.String</method-param>
              </method-params>
            </query-method>
            <ejb-ql><![CDATA[SELECT OBJECT(o) FROM SportEJB AS o WHERE o.ownerName=?1]]></ejb-ql>
          </query>
        </entity>
      </enterprise-beans>
      <assembly-descriptor>
      </assembly-descriptor>
    </ejb-jar>the weblogic-ejb-jar.xml file
    <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN' 'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
    <!-- Generated XML! -->
    <weblogic-ejb-jar>
      <weblogic-enterprise-bean>
        <ejb-name>CMPSportBean</ejb-name>
        <entity-descriptor>
          <pool>
          </pool>
          <entity-cache>
            <max-beans-in-cache>1000</max-beans-in-cache>
            <idle-timeout-seconds>600</idle-timeout-seconds>
            <read-timeout-seconds>600</read-timeout-seconds>
            <cache-between-transactions>False</cache-between-transactions>
          </entity-cache>
          <persistence>
            <persistence-use>
              <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
              <type-version>6.0</type-version>
              <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
            </persistence-use>
          </persistence>
          <entity-clustering>
          </entity-clustering>
        </entity-descriptor>
        <transaction-descriptor>
          <trans-timeout-seconds>2</trans-timeout-seconds>
        </transaction-descriptor>
        <jndi-name>CMPSportBean</jndi-name>
      </weblogic-enterprise-bean>
    </weblogic-ejb-jar>the weblogic-cmp-rdbms-jar.xml file
    <!DOCTYPE weblogic-rdbms-jar PUBLIC  '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB RDBMS Persistence//EN' 'http://www.bea.com/servers/wls700/dtd/weblogic-rdbms20-persistence-700.dtd'>
    <!-- Generated XML! -->
    <weblogic-rdbms-jar>
      <weblogic-rdbms-bean>
        <ejb-name>CMPSportBean</ejb-name>
        <data-source-name>myjdbcjndi</data-source-name>
        <table-map>
          <table-name>sportsteams</table-name>
          <field-map>
            <cmp-field>ownerName</cmp-field>
            <dbms-column>ownername</dbms-column>
          </field-map>
          <field-map>
            <cmp-field>franchiseName</cmp-field>
            <dbms-column>franchisename</dbms-column>
          </field-map>
          <field-map>
            <cmp-field>nickName</cmp-field>
            <dbms-column>nickname</dbms-column>
          </field-map>
          <field-map>
            <cmp-field>sport</cmp-field>
            <dbms-column>sport</dbms-column>
          </field-map>
        </table-map>
        <weblogic-query>
          <query-method>
            <method-name>findByOwnerName</method-name>
            <method-params>
              <method-param>java.lang.String</method-param>
            </method-params>
          </query-method>
        </weblogic-query>
        <check-exists-on-method>False</check-exists-on-method>
      </weblogic-rdbms-bean>
      <create-default-dbms-tables>True</create-default-dbms-tables>
    </weblogic-rdbms-jar>I tried to write config.xml file
    <JDBCDataSource
       Name=" "
       JNDIName="myjdbcjndi"
       PoolName="MyJDBC Connection Pool"
       Targets="myserver"
    />
    <JDBCConnectionPool
       Name="MyJDBC Connection Pool"
       Targets="myserver"
        URL="jdbc:odbc:test"
        DriverName="sun.jdbc.odbc.JdbcOdbcDriver"
        InitialCapacity="1"
        MaxCapacity="10"
    />When i tried to deploy, it showed me errors-
    weblogic.management.ApplicationException: activate failed forcmp
    Start server side stack trace:
    weblogic.management.ApplicationException: activate failed forcmp
    Module Name: cmp, Error: Exception activating module: EJBModule(cmp,status=PREPARED)
    Unable to deploy EJB: CMPSportBean from cmp:
    weblogic.ejb20.WLDeploymentException: The DataSource with the JNDI name: myjdbcjndi 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.
         at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.setup(RDBMSPersistenceManager.java:138)
         at weblogic.ejb20.manager.BaseEntityManager.setupPM(BaseEntityManager.java:211)
         at weblogic.ejb20.manager.BaseEntityManager.setup(BaseEntityManager.java:181)
         at weblogic.ejb20.manager.DBManager.setup(DBManager.java:162)
         at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.activate(ClientDrivenBeanInfoImpl.java:945)
         at weblogic.ejb20.deployer.EJBDeployer.activate(EJBDeployer.java:1296)
         at weblogic.ejb20.deployer.EJBModule.activate(EJBModule.java:349)
         at weblogic.j2ee.J2EEApplicationContainer.activateModule(J2EEApplicationContainer.java:1592)
         at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1029)
         at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1016)
         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:1112)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:732)
         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
    TargetException:
    Unable to deploy EJB: CMPSportBean from cmp:
    weblogic.ejb20.WLDeploymentException: The DataSource with the JNDI name: myjdbcjndi 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.
         at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.setup(RDBMSPersistenceManager.java:138)
         at weblogic.ejb20.manager.BaseEntityManager.setupPM(BaseEntityManager.java:211)
         at weblogic.ejb20.manager.BaseEntityManager.setup(BaseEntityManager.java:181)
         at weblogic.ejb20.manager.DBManager.setup(DBManager.java:162)
         at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.activate(ClientDrivenBeanInfoImpl.java:945)
         at weblogic.ejb20.deployer.EJBDeployer.activate(EJBDeployer.java:1296)
         at weblogic.ejb20.deployer.EJBModule.activate(EJBModule.java:349)
         at weblogic.j2ee.J2EEApplicationContainer.activateModule(J2EEApplicationContainer.java:1592)
         at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1029)
         at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1016)
         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:1112)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:732)
         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
         at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1035)
         at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1016)
         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:1112)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:732)
         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
    End server side stack trace
    Module Name: cmp, Error: Exception activating module: EJBModule(cmp,status=PREPARED)
    Unable to deploy EJB: CMPSportBean from cmp:
    weblogic.ejb20.WLDeploymentException: The DataSource with the JNDI name: myjdbcjndi 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.
         at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.setup(RDBMSPersistenceManager.java:138)
         at weblogic.ejb20.manager.BaseEntityManager.setupPM(BaseEntityManager.java:211)
         at weblogic.ejb20.manager.BaseEntityManager.setup(BaseEntityManager.java:181)
         at weblogic.ejb20.manager.DBManager.setup(DBManager.java:162)
         at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.activate(ClientDrivenBeanInfoImpl.java:945)
         at weblogic.ejb20.deployer.EJBDeployer.activate(EJBDeployer.java:1296)
         at weblogic.ejb20.deployer.EJBModule.activate(EJBModule.java:349)
         at weblogic.j2ee.J2EEApplicationContainer.activateModule(J2EEApplicationContainer.java:1592)
         at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1029)
         at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1016)
         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:1112)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:732)
         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
    TargetException:
    Unable to deploy EJB: CMPSportBean from cmp:
    weblogic.ejb20.WLDeploymentException: The DataSource with the JNDI name: myjdbcjndi 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.
    Start server side stack trace:
    weblogic.ejb20.WLDeploymentException: The DataSource with the JNDI name: myjdbcjndi 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.
         at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.setup(RDBMSPersistenceManager.java:138)
         at weblogic.ejb20.manager.BaseEntityManager.setupPM(BaseEntityManager.java:211)
         at weblogic.ejb20.manager.BaseEntityManager.setup(BaseEntityManager.java:181)
         at weblogic.ejb20.manager.DBManager.setup(DBManager.java:162)
         at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.activate(ClientDrivenBeanInfoImpl.java:945)
         at weblogic.ejb20.deployer.EJBDeployer.activate(EJBDeployer.java:1296)
         at weblogic.ejb20.deployer.EJBModule.activate(EJBModule.java:349)
         at weblogic.j2ee.J2EEApplicationContainer.activateModule(J2EEApplicationContainer.java:1592)
         at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1029)
         at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1016)
         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:1112)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:732)
         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
    End server side stack trace
         <<no stack trace available>>
         <<no stack trace available>>
    I tried to put the file into the directory structure.
    I kept the class files into the WEB-INF/classess
    I could'nt understand whats wrong with it.
    Please help me it is urgent, if i could understand it i can proceed further

    Hi,
    I had the same error as you. I'm agree with arvind_India (previous). You must :
    1. Define a correct Connection Pool (warning: deploy it on your managed server).
    2. Test your connection Pool on your managed server.
    3. Create a DataSource from your connection Pool.
    4. Deploy your DataSource on your managed server.
    5. Verify the JNDI TREE of your managed server (Now, the JNDI name of your dataSource must appair).
    6. Deploy your Entity Bean (the error has disapeared).
    David (Paris-France).

  • Error in Deploying CMP Bean!!!

    i'm writing a CMP Bean. i wrote the Bean , home and remote interfaces. i'm using weblogic 7.0 as my application server.
    1. what is the default data base for the weblogic 7.0.
    2. should v create any table while deploying the CMP bean in a database. i think there is no need because the container will take care of it.
    3. what is the need of <Data-source-name> in the deployment descriptor file weblogic-cmp-ejb-jar.xml. this is a mandatory field. can i give a random name here? if not, how 2 create a data source name.
    please refer my deployment descriptor file.s
    <!DOCTYPE weblogic-rdbms-jar PUBLIC
    '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB RDBMS Persistence//EN'
    'http://www.bea.com/servers/wls700/dtd/weblogic-rdbms20-persistence-700.dtd'>
    <weblogic-rdbms-jar>
    <weblogic-rdbms-bean>
    <ejb-name>Product</ejb-name>
    <data-source-name>examples-dataSource-demoPool</data-source-name>
    <table-map>
    <table-name>TORDER</table-name>
    <field-map>
    <cmp-field>productID</cmp-field>
    <dbms-column>PRODUCTID</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>name</cmp-field>
    <dbms-column>NAME</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>description</cmp-field>
    <dbms-column>DESCRIPTION</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>basePrice</cmp-field>
    <dbms-column>BASEPRICE</dbms-column>
    </field-map>
    </table-map>
    </weblogic-rdbms-bean>
    <create-default-dbms-tables>True</create-default-dbms-tables>
    </weblogic-rdbms-jar>
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <ejb-name>Product</ejb-name>
    <home>examples.ProductHome</home>
    <remote>examples.Product</remote>
    <ejb-class>examples.ProductBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.String</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>ProductBean</abstract-schema-name>
    <cmp-field>
    <field-name>productID</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>name</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>description</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>basePrice</field-name>
    </cmp-field>
    <primkey-field>productID</primkey-field>
    <query>
    <query-method>
    <method-name>findByName</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(p) FROM ProductBean AS p WHERE p.name = ?1]]>
    </ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findByDescription</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(p) FROM ProductBean AS p WHERE p.description = ?1]]>
    </ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findByBasePrice</method-name>
    <method-params>
    <method-param>double</method-param>
    </method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(p) FROM ProductBean AS p WHERE p.basePrice = ?1]]>
    </ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findExpensiveProducts</method-name>
    <method-params>
    <method-param>double</method-param>
    </method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(p) FROM ProductBean AS p WHERE p.basePrice > ?1]]>
    </ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findCheapProducts</method-name>
    <method-params>
    <method-param>double</method-param>
    </method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(p) FROM ProductBean AS p WHERE p.basePrice < ?1]]>
    </ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findAllProducts</method-name>
    <method-params>
    </method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(p) FROM ProductBean AS p WHERE p.productID IS NOT NULL]]>
    </ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>Product</ejb-name>
    <method-intf>Remote</method-intf>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN" "http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd" >
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>Product</ejb-name>
    <entity-descriptor>
    <entity-cache>
         <max-beans-in-cache>1000</max-beans-in-cache>
    </entity-cache>
    <persistence>
         <persistence-type>
         <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
         <type-version>6.0</type-version>
         <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
         </persistence-type>
         <persistence-use>
         <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
         <type-version>6.0</type-version>
         </persistence-use>
    </persistence>
    </entity-descriptor>
    <jndi-name>RemoteProductHome</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    4. when i tried to deploy the following error occurs.. how to fix the errror.
    weblogic.management.ApplicationException: activate failed forrgcmp1
    Module Name: rgcmp1, Error: Exception activating module: EJBModule(rgcmp1,status=PREPARED)
    Unable to deploy EJB: Product from rgcmp1.jar:
    The DataSource with the JNDI name: examples-dataSource-demoPool 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.
    TargetException:
    Unable to deploy EJB: Product from rgcmp1.jar:
    The DataSource with the JNDI name: examples-dataSource-demoPool 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.
         at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1097)
         at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1078)
         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:1144)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:764)
         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)

    i tried to configure my data source and the following error occured.
    After opening the Admin console, in 'connection pool' i created a demo pool and deployed it.(i refered the samples (Weblogic) for doing this ...even to tell more precisely i did a copy/paste).
    Name : demopool
    URL : jdbc:pointbase:server://localhost/demo
    Driver Classname : com.pointbase.xa.xaDataSource
    Properties (key=value); ser=examples                DatabaseName=jdbc:pointbase:server://localhost/demo
    password: weblogic
    open sting password: weblogic
    then i tried to create the data source..
    Name: examples-dataSource-demoPool
    jndi name: rgexample
    pool name: demopool
    Row Prefetch Size : 48
    Stream Chunk Size : 256
    then the following error occured while deployment.
    java.lang.reflect.InvocationTargetException: weblogic.management.DistributedManagementException: Distributed Management [1 exceptions]
    Error creating data source
         at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:653)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:437)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
         at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:928)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:472)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:200)
         at $Proxy18.addDeployment(Unknown Source)
         at weblogic.management.internal.DynamicMBeanImpl.unprotectedUpdateDeployments(DynamicMBeanImpl.java:1802)
         at weblogic.management.internal.DynamicMBeanImpl.access$2(DynamicMBeanImpl.java:1755)
         at weblogic.management.internal.DynamicMBeanImpl$2.run(DynamicMBeanImpl.java:1733)
         at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
         at weblogic.management.internal.DynamicMBeanImpl.updateDeployments(DynamicMBeanImpl.java:1729)
         at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:1053)
         at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:371)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1358)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1333)
         at weblogic.management.internal.RemoteMBeanServerImpl.setAttribute(RemoteMBeanServerImpl.java:874)
         at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:326)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:195)
         at $Proxy14.setTargets(Unknown Source)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.console.info.FilteredMBeanAttribute.doSet(FilteredMBeanAttribute.java:92)
         at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:145)
         at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
         at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1075)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:418)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5517)
         at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3156)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2506)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)
    Distributed update exception
    - remote object: RaghuDomain:Location=egserver,Name=egserver,Type=ServerConfig
    - remote server: weblogic.management.internal.RemoteMBeanServerImpl@673498
    - actionName: addDeployment
    - params: [Ljava.lang.Object;@19f294
    - signature: [Ljava.lang.String;@4f787
    Distributed update exception
    - remote object: RaghuDomain:Location=egserver,Name=egserver,Type=ServerConfig
    - remote server: weblogic.management.internal.RemoteMBeanServerImpl@673498
    java.lang.Exception: weblogic.common.ResourceException: DataSource(rgexample) can't be created with non-existent Pool (connection or multi) (demopool)
         at weblogic.jdbc.common.internal.JdbcInfo.validateConnectionPool(JdbcInfo.java:126)
         at weblogic.jdbc.common.internal.JdbcInfo.startDataSource(JdbcInfo.java:262)
         at weblogic.jdbc.common.internal.JDBCService.addDeploymentx(JDBCService.java:293)
         at weblogic.jdbc.common.internal.JDBCService.addDeployment(JDBCService.java:270)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:375)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:154)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:750)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:732)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:435)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
         at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:928)
         at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:596)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:437)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
         at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:928)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:472)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:200)
         at $Proxy18.addDeployment(Unknown Source)
         at weblogic.management.internal.DynamicMBeanImpl.unprotectedUpdateDeployments(DynamicMBeanImpl.java:1802)
         at weblogic.management.internal.DynamicMBeanImpl.access$2(DynamicMBeanImpl.java:1755)
         at weblogic.management.internal.DynamicMBeanImpl$2.run(DynamicMBeanImpl.java:1733)
         at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
         at weblogic.management.internal.DynamicMBeanImpl.updateDeployments(DynamicMBeanImpl.java:1729)
         at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:1053)
         at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:371)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1358)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1333)
         at weblogic.management.internal.RemoteMBeanServerImpl.setAttribute(RemoteMBeanServerImpl.java:874)
         at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:326)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:195)
         at $Proxy14.setTargets(Unknown Source)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.console.info.FilteredMBeanAttribute.doSet(FilteredMBeanAttribute.java:92)
         at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:145)
         at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
         at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1075)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:418)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5517)
         at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3156)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2506)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)
         at weblogic.jdbc.common.internal.JdbcInfo.startDataSource(JdbcInfo.java:286)
         at weblogic.jdbc.common.internal.JDBCService.addDeploymentx(JDBCService.java:293)
         at weblogic.jdbc.common.internal.JDBCService.addDeployment(JDBCService.java:270)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:375)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:154)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:750)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:732)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:435)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
         at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:928)
         at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:596)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:437)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
         at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:928)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:472)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:200)
         at $Proxy18.addDeployment(Unknown Source)
         at weblogic.management.internal.DynamicMBeanImpl.unprotectedUpdateDeployments(DynamicMBeanImpl.java:1802)
         at weblogic.management.internal.DynamicMBeanImpl.access$2(DynamicMBeanImpl.java:1755)
         at weblogic.management.internal.DynamicMBeanImpl$2.run(DynamicMBeanImpl.java:1733)
         at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
         at weblogic.management.internal.DynamicMBeanImpl.updateDeployments(DynamicMBeanImpl.java:1729)
         at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:1053)
         at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:371)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1358)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1333)
         at weblogic.management.internal.RemoteMBeanServerImpl.setAttribute(RemoteMBeanServerImpl.java:874)
         at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:326)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:195)
         at $Proxy14.setTargets(Unknown Source)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.console.info.FilteredMBeanAttribute.doSet(FilteredMBeanAttribute.java:92)
         at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:145)
         at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
         at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1075)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:418)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5517)
         at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3156)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2506)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)
    --------------- nested within: ------------------
    weblogic.management.DeploymentException: Error creating data source - with nested exception:
    [java.lang.Exception: weblogic.common.ResourceException: DataSource(rgexample) can't be created with non-existent Pool (connection or multi) (demopool)
         at weblogic.jdbc.common.internal.JdbcInfo.validateConnectionPool(JdbcInfo.java:126)
         at weblogic.jdbc.common.internal.JdbcInfo.startDataSource(JdbcInfo.java:262)
         at weblogic.jdbc.common.internal.JDBCService.addDeploymentx(JDBCService.java:293)
         at weblogic.jdbc.common.internal.JDBCService.addDeployment(JDBCService.java:270)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:375)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:154)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:750)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:732)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:435)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
         at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:928)
         at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:596)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:437)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
         at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:928)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:472)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:200)
         at $Proxy18.addDeployment(Unknown Source)
         at weblogic.management.internal.DynamicMBeanImpl.unprotectedUpdateDeployments(DynamicMBeanImpl.java:1802)
         at weblogic.management.internal.DynamicMBeanImpl.access$2(DynamicMBeanImpl.java:1755)
         at weblogic.management.internal.DynamicMBeanImpl$2.run(DynamicMBeanImpl.java:1733)
         at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
         at weblogic.management.internal.DynamicMBeanImpl.updateDeployments(DynamicMBeanImpl.java:1729)
         at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:1053)
         at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:371)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1358)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1333)
         at weblogic.management.internal.RemoteMBeanServerImpl.setAttribute(RemoteMBeanServerImpl.java:874)
         at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:326)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:195)
         at $Proxy14.setTargets(Unknown Source)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.console.info.FilteredMBeanAttribute.doSet(FilteredMBeanAttribute.java:92)
         at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:145)
         at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
         at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1075)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:418)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5517)
         at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3156)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2506)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)
         at weblogic.jdbc.common.internal.JDBCService.addDeploymentx(JDBCService.java:295)
         at weblogic.jdbc.common.internal.JDBCService.addDeployment(JDBCService.java:270)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:375)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:154)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:750)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:732)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:435)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
         at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:928)
         at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:596)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:437)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
         at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:928)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:472)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:200)
         at $Proxy18.addDeployment(Unknown Source)
         at weblogic.management.internal.DynamicMBeanImpl.unprotectedUpdateDeployments(DynamicMBeanImpl.java:1802)
         at weblogic.management.internal.DynamicMBeanImpl.access$2(DynamicMBeanImpl.java:1755)
         at weblogic.management.internal.DynamicMBeanImpl$2.run(DynamicMBeanImpl.java:1733)
         at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
         at weblogic.management.internal.DynamicMBeanImpl.updateDeployments(DynamicMBeanImpl.java:1729)
         at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:1053)
         at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:371)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1358)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1333)
         at weblogic.management.internal.RemoteMBeanServerImpl.setAttribute(RemoteMBeanServerImpl.java:874)
         at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:326)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:195)
         at $Proxy14.setTargets(Unknown Source)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.console.info.FilteredMBeanAttribute.doSet(FilteredMBeanAttribute.java:92)
         at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:145)
         at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
         at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1075)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:418)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5517)
         at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3156)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2506)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)
    --------------- nested within: ------------------
    weblogic.management.DistributedOperationUpdateException: Error creating data source - with nested exception:
    [weblogic.management.DeploymentException: Error creating data source - with nested exception:
    [java.lang.Exception: weblogic.common.ResourceException: DataSource(rgexample) can't be created with non-existent Pool (connection or multi) (demopool)
         at weblogic.jdbc.common.internal.JdbcInfo.validateConnectionPool(JdbcInfo.java:126)
         at weblogic.jdbc.common.internal.JdbcInfo.startDataSource(JdbcInfo.java:262)
         at weblogic.jdbc.common.internal.JDBCService.addDeploymentx(JDBCService.java:293)
         at weblogic.jdbc.common.internal.JDBCService.addDeployment(JDBCService.java:270)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:375)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:154)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:750)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:732)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:435)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
         at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:928)
         at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:596)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:437)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
         at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:928)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:472)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:200)
         at $Proxy18.addDeployment(Unknown Source)
         at weblogic.management.internal.DynamicMBeanImpl.unprotectedUpdateDeployments(DynamicMBeanImpl.java:1802)
         at weblogic.management.internal.DynamicMBeanImpl.access$2(DynamicMBeanImpl.java:1755)
         at weblogic.management.internal.DynamicMBeanImpl$2.run(DynamicMBeanImpl.java:1733)
         at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
         at weblogic.management.internal.DynamicMBeanImpl.updateDeployments(DynamicMBeanImpl.java:1729)
         at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:1053)
         at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:371)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1358)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1333)
         at weblogic.management.internal.RemoteMBeanServerImpl.setAttribute(RemoteMBeanServerImpl.java:874)
         at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:326)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:195)
         at $Proxy14.setTargets(Unknown Source)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.console.info.FilteredMBeanAttribute.doSet(FilteredMBeanAttribute.java:92)
         at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:145)
         at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
         at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1075)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:418)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5517)
         at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3156)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2506)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)
         at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:607)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:437)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
         at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:928)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:472)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:200)
         at $Proxy18.addDeployment(Unknown Source)
         at weblogic.management.internal.DynamicMBeanImpl.unprotectedUpdateDeployments(DynamicMBeanImpl.java:1802)
         at weblogic.management.internal.DynamicMBeanImpl.access$2(DynamicMBeanImpl.java:1755)
         at weblogic.management.internal.DynamicMBeanImpl$2.run(DynamicMBeanImpl.java:1733)
         at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
         at weblogic.management.internal.DynamicMBeanImpl.updateDeployments(DynamicMBeanImpl.java:1729)
         at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:1053)
         at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:371)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1358)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1333)
         at weblogic.management.internal.RemoteMBeanServerImpl.setAttribute(RemoteMBeanServerImpl.java:874)
         at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:326)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:195)
         at $Proxy14.setTargets(Unknown Source)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.console.info.FilteredMBeanAttribute.doSet(FilteredMBeanAttribute.java:92)
         at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:145)
         at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
         at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
         at javax.se--------------- nested within: ------------------
    weblogic.management.console.utils.SetException: An error occurred while updating Targets-Server on Proxy for RaghuDomain:Name=examples-dataSource-demoPool,Type=JDBCDataSource - with nested exception:
    [java.lang.reflect.InvocationTargetException - with target exception:
    [weblogic.management.DistributedManagementException: Distributed Management [1 exceptions]
    Error creating data source]]
         at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:181)
         at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
         at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1075)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:418)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5517)
         at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3156)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2506)
         at weblogic.kernel.Exe

  • AssertionError while trying to deploy a CMP Entity bean

    Following are my deployment-descriptors -
    ===========================================================================
    ejb-jar.xml :-
    ===========
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <!-- Generated XML! -->
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <ejb-name>Product</ejb-name>
    <home>entities.product.ProductHome</home>
    <remote>entities.product.Product</remote>
    <local-home>entities.product.ProductLocalHome</local-home>
    <local>entities.product.ProductLocal</local>
    <ejb-class>entities.product.ProductBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>entities.product.ProductPK</prim-key-class>
    <reentrant>False</reentrant>
    <abstract-schema-name>ProductBean</abstract-schema-name>
    <cmp-field>
    <field-name>productID</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>name</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>description</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>basePrice</field-name>
    </cmp-field>
    <query>
    <query-method>
    <method-name>findAllProducts</method-name>
    <method-params>
    </method-params>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT(o) FROM ProductBean AS o WHERE productID IS NOT NULL]]></ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findByBasePrice</method-name>
    <method-params>
    <method-param>double</method-param>
    </method-params>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT(o) FROM ProductBean AS o WHERE basePrice = ?1]]></ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findByDescription</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT(o) FROM ProductBean AS o WHERE description = ?1]]></ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findByName</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT(o) FROM ProductBean AS o WHERE name = ?1]]></ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findCheapProducts</method-name>
    <method-params>
    <method-param>double</method-param>
    </method-params>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT(o) FROM ProductBean AS o WHERE basePrice < ?1]]></ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findExpensiveProducts</method-name>
    <method-params>
    <method-param>double</method-param>
    </method-params>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT(o) FROM ProductBean AS o WHERE basePrice > ?1]]></ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>Product</ejb-name>
    <method-intf>Remote</method-intf>
              <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    =============================================================================
    weblogic-ejb-jar :-
    ================
    <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN' 'http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd'>
    <!-- Generated XML! -->
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>Product</ejb-name>
    <entity-descriptor>
    <pool>
    </pool>
    <entity-cache>
    </entity-cache>
    <persistence>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>7.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-use>
    </persistence>
    <entity-clustering>
    </entity-clustering>
    </entity-descriptor>
    <transaction-descriptor>
    </transaction-descriptor>
    <jndi-name>ProductBean</jndi-name>
    <local-jndi-name>LocalProductBean</local-jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    =============================================================================
    weblogic-cmp-rdbms-jar.xml :-
    =========================
    <!DOCTYPE weblogic-rdbms-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB RDBMS Persistence//EN' 'http://www.bea.com/servers/wls810/dtd/weblogic-rdbms20-persistence-810.dtd'>
    <!-- Generated XML! -->
    <weblogic-rdbms-jar>
    <weblogic-rdbms-bean>
    <ejb-name>Product</ejb-name>
    <data-source-name>ConnDataSource</data-source-name>
    <table-map>
    <table-name>products</table-name>
    <field-map>
    <cmp-field>productID</cmp-field>
    <dbms-column>id</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>name</cmp-field>
    <dbms-column>name</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>description</cmp-field>
    <dbms-column>description</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>basePrice</cmp-field>
    <dbms-column>baseprice</dbms-column>
    </field-map>
    </table-map>
    <weblogic-query>
    <query-method>
    <method-name>findByName</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    </weblogic-query>
    <weblogic-query>
    <query-method>
    <method-name>findByDescription</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    </weblogic-query>
    <weblogic-query>
    <query-method>
    <method-name>findByBasePrice</method-name>
    <method-params>
    <method-param>double</method-param>
    </method-params>
    </query-method>
    </weblogic-query>
    <weblogic-query>
    <query-method>
    <method-name>findExpensiveProducts</method-name>
    <method-params>
    <method-param>double</method-param>
    </method-params>
    </query-method>
    </weblogic-query>
    <weblogic-query>
    <query-method>
    <method-name>findCheapProducts</method-name>
    <method-params>
    <method-param>double</method-param>
    </method-params>
    </query-method>
    </weblogic-query>
    <weblogic-query>
    <query-method>
    <method-name>findAllProducts</method-name>
    <method-params>
    </method-params>
    </query-method>
    </weblogic-query>
    </weblogic-rdbms-bean>
    <create-default-dbms-tables>CreateOnly</create-default-dbms-tables>
    </weblogic-rdbms-jar>
    =============================================================================
    Deployment of the bean fails, with following message -
    weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Assertion violated
    at weblogic.utils.Debug.assertion(Debug.java:47)
    at weblogic.ejb20.cmp.rdbms.Deployer.adjustDefaults(Deployer.java:240)
    at weblogic.ejb20.cmp.rdbms.Deployer.readTypeSpecificData(Deployer.java:
    365)
    at weblogic.ejb20.persistence.PersistenceType.setTypeSpecificFile(Persis
    tenceType.java:483)
    at weblogic.ejb20.persistence.PersistenceType.setupDeployer(PersistenceT
    ype.java:414)
    at weblogic.ejb20.deployer.CMPInfoImpl.setup(CMPInfoImpl.java:110)
    at weblogic.ejb20.ejbc.EJB20CMPCompiler.generatePersistenceSources(EJB20
    CMPCompiler.java:64)
    at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:245)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:476)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:407)
    at weblogic.ejb20.deployer.EJBDeployer.runEJBC(EJBDeployer.java:493)
    at weblogic.ejb20.deployer.EJBDeployer.compileJar(EJBDeployer.java:763)
    at weblogic.ejb20.deployer.EJBDeployer.compileIfNecessary(EJBDeployer.ja
    va:701)
    at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1277)
    at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:477)
    at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationC
    ontainer.java:2962)
    at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplication
    Container.java:1534)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:1188)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:1031)
    at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.
    prepareContainer(SlaveDeployer.java:2602)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createCon
    tainer(SlaveDeployer.java:2552)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(S
    laveDeployer.java:2474)
    at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(Sla
    veDeployer.java:798)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDepl
    oyer.java:507)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDep
    loyer.java:465)
    at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHan
    dler.java:25)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    =========================================================================
    can somebody please tell me what is it that i am missing or setting incorrectly
    thanks
    parul

    i don't know much about the assertion error...but i have fixed that by just re-configuring my classpaths
    try to check your classpaths if you've missed something
    hope this helps... =)

  • Bad Performance/OutOfMemory Error in CMP Entity Bean with Large DB

    Hello:
    I have an CMP Entity deployed on WLS 7.0
    The entity bean maps to a table that has 97,480 records.
    It has a finder: findAll() -- SELECT OBJECT(e) FROM Equipment e
    I have a JSP client that invokes the findALL()
    The performance is very poor ~ 150 seconds just to perform the findAll() - (Benchmark
    from within the JSP code)
    If more than one simultaneous call is made then I get outOfMemory Error.
    WLS is started with max memory of 512MB
    EJB is deployed with <max-beans-in-cache>100000</max-beans-in-cache>
    (without max-beans-in-cache directive the performance is worse)
    Is there any documentation available to help us in deploying CMP Entity Beans
    with very large number of records (instances) ?
    Any help is greatly appreciated.
    Regards
    Rajan

    Hi
    You should use a Select Method, it does support cursors.
    Or a Home Select Method combination.
    Regards
    Thomas
    WLS is started with max memory of 512MB
    EJB is deployed with <max-beans-in-cache>100000</max-beans-in-cache>>
    (without max-beans-in-cache directive the performance is worse)>
    Is there any documentation available to help us in deploying CMP
    Entity Beans with very large number of records (instances) ? Any help
    is greatly appreciated.>
    Regards>
    Rajan>
    >
    "Rajan Jena" <[email protected]> schrieb im Newsbeitrag
    news:3dadd7d1$[email protected]..
    >
    Hello:
    I have an CMP Entity deployed on WLS 7.0
    The entity bean maps to a table that has 97,480 records.
    It has a finder: findAll() -- SELECT OBJECT(e) FROM Equipment e
    I have a JSP client that invokes the findALL()
    The performance is very poor ~ 150 seconds just to perform the findAll() -(Benchmark
    from within the JSP code)
    If more than one simultaneous call is made then I get outOfMemory Error.
    WLS is started with max memory of 512MB
    EJB is deployed with <max-beans-in-cache>100000</max-beans-in-cache>
    (without max-beans-in-cache directive the performance is worse)
    Is there any documentation available to help us in deploying CMP EntityBeans
    with very large number of records (instances) ?
    Any help is greatly appreciated.
    Regards
    Rajan

  • To CMP or not to CMP....that is the question!

    Hey guys.
    I have a problem which I am hoping you can help me solve.
    Let's say that we are designing a simple J2EE address book web application.
    The application design must follow these requirements:
    1. The application stores all data in a relational database.
    2. The user interface to the application is browser based only.
    3. The application must be independent of the database type (Oracle, MS Sql, Informix).
    4. The application must be independent of the application server type.
    5. The application must be portable between databases and application servers.
    The application allows the user to do the following:
    A. Search for entries in the address book
    B. Display (read only) entry details
    C. Add/edit/delete entry
    Now, what I'm wondering is: Should we use CMPs to encapsulate the address book entries,
    or should we use Java classes with JDBC access to the database (managed through session beans).
    I know that if we use CMPs, we don't have to code the database access calls.
    Not only does this approach save us time, but it makes the bean portable across various database
    servers.
    But if we use CMPs, it seems to me that we face the following problem
    (please correct me if I am wrong):
    The application server creates tables in the database for storing the CMP data. The names of these
    tables are not specified by the J2EE specification (because the persistent storage does not need to
    be a relational database). Therefore if we deploy the application on application server A, and
    then later decide to change to application server B, then B might have other naming rules for tables
    than A (and would therefore be unable to read the data from the database).
    Therefore, by using CMPs, our application is no longer portable between application servers, and
    this violates design requirement number 5.
    Now, I know that many application servers allow you to specify a mapping for CMP to an existing table,
    but the configuration files for specifying these mappings are different between
    application servers. And since we do not want our application to have to know anything about the
    server it is to be deployed on, that solution is unacceptable.
    Another way would be to implement the address book without CMPs, using Java classes with JDBC access
    to the database (caching frequently accessed data, perhaps with the A.C.E. Smart Cache pattern).
    My question is: What exactly is the tradeoff between these two implementations (in this limited web
    access only context)?
    Will the non-CMP implementation come in second in performance (and if so, why?)?
    When the application server tier is clustered, does the application server synchronize the cached
    CMP data in the cluster? This will have to be done manually in the non-CMP implementation.
    Any thoughts on the above issues are greatly appreciated.
    Thanks.
    OGG.

    I entirely agree! I think this is a general problem with java going forward that they didn't think about. Look for my post on problems with JAAS with JavaBeans and EJBs. They have not thought enough about how to truly ensure integration and portability of 3rd party tools. Yes, in this regard M$ is a little better, as their ActiveX integration has produced a pretty rich 3rd party industry, but that's helped by the fact that they don't really worry about security. (Although their COM+ security integration for 3rd party tools is better than JAAS with Java. In COM+, I can take your component and actually set security levels/roles for any method within your component! You can't do that in JAAS - see the JAAS Problems and Misconceptions discussion somewhere in the Java Forums).

  • In EJB3 entities, what is the equiv. of key-cache-size for PK generation?

    We have an oracle sequence which we use to generate primary keys. This sequence is set to increment by 5.
    e.g.:
    create sequence pk_sequence increment by 5;
    This is so weblogic doesn't need to query the sequence on every entity bean creation, it only needs to query the sequence every 5 times.
    With CMP2 entity beans and automatic key generation, this was configured simply by having the following in weblogic-cmp-rdbms-jar.xml:
    <automatic-key-generation>
    <generator-type>Sequence</generator-type>
    <generator-name>pk_sequence</generator-name>
    <key-cache-size>5</key-cache-size>
    </automatic-key-generation>
    This works great, the IDs created are 10, 11, 12, 13, 14, 15, 16, etc and weblogic only needs to hit the sequence 1/5 times.
    However, we have been trying to find the equivalent with the EJB3-style JPA entities:
    We've tried
    @SequenceGenerator(name = "SW_ENTITY_SEQUENCE", sequenceName = "native(Sequence=pk_sequence, Increment=5, Allocate=5)")
    @SequenceGenerator(name = "SW_ENTITY_SEQUENCE", sequenceName = "pk_sequence", allocationSize = 5)
    But with both configurations, the autogenerated IDs are 10, 15, 20, 25, 30, etc - weblogic seems to be getting a new value from the sequence every time.
    Am i missing anything?
    We are using weblogic 10.3

    If you are having a problem it is not clear what it is from what you have said.  If you have sugestions for improving some shortcomings you see in Flash CC then you should submit them to:
    Adobe - Wishlist & Bug Report
    http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • Error In CMP Generated Code

    I have a CMP 2.0 local entity bean, and when I try to create one from a session bean, I get this:
    java.lang.IllegalStateException: Can not call getPrimaryKey() inside ejbCreate(...) methods, the entity does not have an identity yet, see the EJB 2.0 specification chapter 10.5.4
         at com.evermind.server.ejb.EJBUtils.throwGetPrimaryKeyInEJBCreateException(EJBUtils.java:963)
         at WebLine_EntityBeanWrapper2.getPrimaryKey(WebLine_EntityBeanWrapper2.java:2595)
         at WebLineHome_EntityHomeWrapper16.create(WebLineHome_EntityHomeWrapper16.java:497)In other words, the generated code for the home's create method is calling getPrimaryKey on the generated code for the entity, and this is failing because even the container can't call getPrimaryKey at that time. It doesn't seem to matter what's in my ejbCreate method, unless it throws an exception (which prevents this problem, of course). Looks like a problem with the generated code to me.

    Thanks for that tip. Looking at the generated code, I see:
              boolean imIt = false;
              try
                while(!imIt)
                  if(com.evermind.server.ApplicationServer.DEBUG) debug("In while(!imIt)\n");
                  WebLine_EntityBeanWrapper2 other;
                  other = (WebLine_EntityBeanWrapper2)getWrapperInstance(response.getPrimaryKey(), 90000l, false);That last line is where the error happens (line 520 in the stack trace above). It seems like getPrimaryKey is being called intentionally, to see if the entity is already in the cache or something? Anyway, the generated code for the instance call is:
      public Object getPrimaryKey()
        if(this.primaryKey == null) com.evermind.server.ejb.EJBUtils.throwGetPrimaryKeyInEJBCreateException();
        return this.primaryKey;
      }So that seems reasonable, I suppose. The question is, what is causing the instance to have no PK when the home thinks the PK should be there? I've tried a lot of variants of my code, with no improvement, but I could still be doing something wrong. Also, it only seems to be happening with one bean...

Maybe you are looking for

  • New button in lightbox?

    I am trying to add a button inside Lightbox to link to a PDF i created  and the link name would have [PDF Version] so when the button is clciked it would open a new window that would have the PDF in it. What i am trying to do as an overall objective

  • How do I use my ipod in the car without it constantly charging?  I have to use a docking cable into the USB port because the 3.5 mm to 3.5mm jack I bought doesn't work on the ipod.

    How do I use my ipod in the car without it constantly charging?  I have to use a docking cable into the USB port because the 3.5mm to 3.5mm jack I bought doesn't work with the ipod (although it does work with an MP3 player).  My ipod is a 5th generat

  • Can 2 apple ID's be shared with family.

    I have been using my wife's email address and apple ID so when one of us purchases an app we can both use it.  Is there another way that I can create my own apple ID and use my email address, but still be able share app purchases?  I just updated to

  • Indesign CC

    I have updated my OS system to new Maverick, however since then i have issues with Indesign CC. Everytime I send a file to my rip to output only part of the image appears, i checked to see if this was a rip problem by also sending the same file in In

  • Pre order

    Why do I need the money on my card for the album I had pre- ordered? Without it, now I cannot download the album I ALREADYpurchased