Ejb - BMP Finder

Hello,
I wrote an appliation which connects to EJB.
I use BMP, and wrote a finder in the CustomerBean which sets
records of customers table to a com.borland.dx.dataset.DataSetData (which is serializable)
I tried to do this:
public DataSetData ejbFindAll() throws FinderException {}
but I get an error that a finder can't return a DataSetData,
only a collection or the bean.
can I write other function which will return DataSetData,
and to write it's definition in the Home interface?
it means not using finders.
Thanks.

Thanks for your reply.
According to your reply, I shouldn't use Entity Beans,
only remote Session Beans.
Is it accepted to write in this way, while using the
EJB technologic?
I write an applet GUI, which contains swing and borland
components like JdbTable.
It will take a long time to add the records to the collection
in the Entity Bean,
and move the collection to dataset in the applet.
I will be happy to hear your advice.
Thanks,
Anat

Similar Messages

  • EJB BMP Starter

    I have some key basic questions on BMP Entity Beans. I have been looking at the sample application at http://developers.sun.com/tools/javatools/documentation/s1s5/accountapp.html.
    1. I have a database that is pre-populated by some external ways other than EJBs. Does my BMP Entity Bean that i mapped to a specific table know about the previous data. In the sample application above, there is a loadRow method (Adding private methods to perform database calls, step 10). In it, it says:
    String selectStatement = "select balance from account where id = ? ";
    PreparedStatement prepStmt = con.prepareStatement(selectStatement);
    prepStmt.setString(1,this.id);
    Where does this.id came from? It is not set anywhere but in the ejbCreate() method. For example, if my client program just wants to list the balance from accounts table bound to an id without inserting new rows into the database, how would that happen? It confuses me since ejbCreate method is called automatically everytime i use a bean and it contains SQL insert statements.
    2. In the same example above, in section (implementing the bean's other methods, steps 3 and 4) it says:
    public void ejbActivate() {
    id = (String) context.getPrimaryKey();
    } What is this id variable? There is no type definition. Is this the id that was defined in AcccountEJB (from db mapping)? If so how do i reference to it without any class names?
    3. After all, i am looking for a clear BMP sample(with session beans using bmp beans, and servlets using session beans to access database data) that can guide me. If someone knows the place of such an example I would be very much greatful.
    I seem to be unable to grab the logic of EJB BMP. Answers to these questions would be helpful.
    Thanks in advance.

    Greetings,
    1. I have a database that is pre-populated by some external ways other than EJBs. Does my BMP
    Entity Bean that i mapped to a specific table know about the previous data. In the sampleThe container will not have any beans representing the new data until the client attempts to find them.
    String selectStatement = "select balance from account where id = ? ";
    PreparedStatement prepStmt = con.prepareStatement(selectStatement);
    prepStmt.setString(1,this.id);
    Where does this.id came from? It is not set anywhereAs shown below, it is grabbed out of the EJBObject (which gets it as a consequence of either a create or finder method call), when a bean instance is "activated" - or, 'swapped in' from the free pool and associated with the EJBObject.
    but in the ejbCreate() method. For example, if myThe ejbCreate method returns an instance of the Primary Key class which the container stores in the EJBObject. In this case, the PK class is type String and referenced by the variable 'id'.
    client program just wants to list the balance from accounts table bound to an id without inserting
    new rows into the database, how would that happen? ItPresumably, the client knows the "primary key" of the entity (the unique tuple from the accounts table which the EB represents), it wants to access and uses that as the argument to a findByPrimaryKey call against the home object.
    confuses me since ejbCreate method is called automatically everytime i use a bean and it contains
    SQL insert statements.Er, no. The bean's ejbCreate method is called by the container as a consequence of the client calling the corresponding create method on the home. It does not happen "automatically", but only as a consequence of the client wanting to create a new entity in the application - and, accordingly, in the underlying persistence resource. If the client does not want to create a new entity but, rather, use an existing one, then it calls an appropriate finder method to locate the instance and get a reference to it.
    2. In the same example above, in section (implementing the bean's other methods, steps 3 and 4)
    it says:
    public void ejbActivate() {
    id = (String) context.getPrimaryKey();
    Refer again to the above...
    What is this id variable? There is no type definition. Is this the id that was defined in AcccountEJB
    (from db mapping)? If so how do i reference to it without any class names?It is indeed the private member of AccountBean (see step 7 under "Adding a create method to the bean" of section 4).
    3. After all, i am looking for a clear BMP sample(with session beans using bmp beans, and
    servlets using session beans to access database data) that can guide me. If someone knows the
    place of such an example I would be very much greatful.It would appear that you require more grounding in the fundamentals of EJB generally - particularly with regard to their lifecycle and state transitions. Start with the specification. Then take a look at J2EE core design patterns...
    I seem to be unable to grab the logic of EJB BMP.
    Answers to these questions would be helpful.
    Thanks in advance.Regards,
    Tony "Vee Schade" Cook

  • Where to Instantiate a DAO in an EJB BMP?

    We are using DAOs with our EJB BMPs..
    My question is what method should the DAO be Instantiated in?
    I have seen it done in the:
    1) ejbActivate (seems to cause a null pointer error on the weblogic server)
    2) setEntityContext method
    3) all methods that use the dao object.

    This depends a bit on how your DAOs are built, but you certainly don't want to instantiate a new DAO every time you need one. Unnecessary object creation is not a Good Thing.
    Generally speaking, an instance variable populated upon bean instantiation works just fine (i.e private MyDao dao = new MyDao();). If your DAO is serializable and doesn't contain any transient info of it's own, you're pretty much done since the DAO will get serialized when the bean is passivated.
    If it does contain transient data/resources (and it probably shouldn't) you can set/remove them during ejbActivate/ejbPassivate.
    If the DAO is not serializable (and it probably should be), then instantiating one during ejbActivate should not be a problem. What was the exact cause of the NPE you got?

  • Ejb BMP never commits even with transactions

    I have serious problems with any EJB running inside the Oracle8i server, Linux Rh6.2/Oracle 8.1.7.0.1
    ALL code does not perist its data, but it sielently fails. For instance take
    $ORACLE_HOME/javavm/demo/examples/ejb/transactions/clientside
    I changed the last line in Client.java from crollback to commit()...
    I run this program twice:
    Beginning salary = 3000.0
    End salary = 3300.0
    Beginning salary = 3000.0
    End salary = 3300.0
    The second invocation should show the beginning salary as 3300.0
    In essance ALL of my EJBs are showing simular behavior. This problem is also seen in ALL of the examples. My environment uesed to work, but I can't figure out what changed to make every EJB-BMP nonpersistant.
    any help would be greatly appreciated.
    thanks,
    -rick

    I don't think my probmem is related to an exception being lost because no exceptions are throws, I have alot of trace information and I always see complete method calls through ejbCreate, ejbStore, et. al.
    My problem is that a transaction never gets commited, even when the JTS is used. Infact I have this piticular problem with ALL Oracle BMP-EJBs
    I'm just going to have to open a ITAR, guess thats want support is for. I'm just perplexed as to why it worked last week, and now the demos can't save their state.
    a bit scarie for something that may one day be in production.

  • CMP Entity Bean with ejb-ql finder methods and INFORMIX database

    Hi,
    I have some CMP Entity Beans with finder methods defined in ejb-ql. In my ejb-jar, within <entity> definitions I have something like:
        <entity>
          <abstract-schema-name>BeanName</abstract-schema-name>
          <cmp-field><field-name>fieldOne</field-name></cmp-field>
          <cmp-field><field-name>fieldTwo</field-name></cmp-field>
          <query>
            <query-method>
              <method-name>findAll</method-name>
              <method-params></method-params>
            </query-method>
            <ejb-ql>SELECT OBJECT(o) FROM BeanName o</ejb-ql>
          </query>
        <entity>
    And in persistent.xml:
    <db-properties>
         <data-source-name>datasource_name</data-source-name>
    </db-properties>
    <entity-bean>
         <ejb-name>BeanName</ejb-name>
         <table-name>table_name</table-name>
         <field-map key-type="NoKey">
         <field-name>fieldOne</field-name>
         <column><column-name>column_one</column-name></column>
          </field-map>
         <field-map key-type="NoKey">
         <field-name>fieldTwo</field-name>
         <column><column-name>column_two</column-name></column>
          </field-map>
          <finder-descriptor>
              <method-name>findAll</method-name>
              <method-params/>
         </finder-descriptor>
    Once deployed, on server side, I can found a java source file (with corresponding compiled class file) in path:
    j2ee/cluster/server0/apps/companyName/MyEARApp/EJBContainer/temp/temp38837373733/route/to/package/
    with names:
    BeanName0_0pm.java
    BeanName0_0PM.class
    and the generated java file contains this code:
      public java.util.Enumeration ejbFindAll() throws javax.ejb.FinderException, javax.ejb.EJBException  {
        TransactionContext tc = pm.getTransactionContext();
        Connection conn = null;
        PreparedStatement pSt = null;
        ResultSet ejb_rs = null;
        int status = javax.transaction.xa.XAResource.TMSUCCESS;
        try {
          conn = pm.getConnectionForFindMethod();
          pSt = conn.prepareStatement("SELECT \"O\".\"COLUMN_ONE\",\"O\".\"COLUMN_TWO\", FROM \"TABLE_NAME\" \"O\"");
          ejb_rs = pSt.executeQuery();
    I'm trying to call this method but it throws a SQLException when preparing the statement.
    It seems that Informix does not like this SQL syntax because of upper case names, doble quotes on table alias, or something else.
    When editing persistent.xml in netweaver, I can define the element <datasource-vendor> as ORACLE, SAPDB, MS_SQL_SERVER, DB2_UDB_AS400 or DB2_UDB_OS390 but INFORMIX is not an accepted value.
    Is there any way to define how this SQL query is build?
    Thanks in advance.

    The return type of the finder method defined in the remote home interface is either the entity bean's remote interface or a collection of objects implementing the entity bean's remote interface. The return type of the finder method defined in the local home interface is either the entity bean's local interface or a collection of objects implementing the entity bean's local interface

  • EJB CMP finder methods

    The Oracle documents suggests that the following definition in the EJBHome is enough to create a finder method
    public Enumeration findByWhere(String where) throws RemoteException, FinderException;
    I get a java.lang.AbstractMethodError on the client when I try to call this - suggesting the the container is not implementing the method for me.
    I see no place in the oracle descriptor to define these finder methods.
    What is the deal with these ? How does one use CMP and Finder methods other than the standard "findByPrimaryKey(....)
    thanks
    null

    Hello,
    Let say you don't want to uyse the defualt finder methods, then you can write your own like:
    (in client servlet/JSP file etc..)
    emps = home.findByLast_name(request.getParameter("searchText")); //find by last name
    where:
    step 1) go to EJB class editor (under your main EJB directory)
    step 2) click on finder tab and click add, to add new finder methods
    step 3) (you can click help now to get more info on this..anyways) findBy<CMB field>
    would automatically check the "Managed by OC4j" check box, this means that you have matched a signature tag for finders (kind of like setXX and getXX if you are doing JavaBean...automatically done for you)
    step 4) else you can make one that is not up like findWildCard(String wildCard):
    i)by specifying the Method name to be: findWildCard
    ii)parameter (String type: wildCard)
    step 5) rebuild the EJB directory after you add this method
    step 6) use it in any of you client servlet/JSP as you would with the defualt findAll() methods etc..
    cheers,
    -Long
    [email protected]

  • EJB bmp persistence

    hi,
    I was reading tutorials on BMP.
    I found that in all the tutorial they have mentioned that it involves writting queries ourself.
    So by using a BMP means 'writing the query alone' or is there any service that has to be provided.
    Also can u broach me abt the services that are taken care in a CMP.

    There some limitations of CMPs.. Some of them are..
    1. Limitations of type of data sources that may be supported by a container for CMPs
    2. EJB QL cant handle complex queries
    Some advantages..
    1. easier to create/manage than BMPs
    2. If you need CMR then you may need to use CMPs
    3. Optmization of SQL by containers
    venkk
    http://www.venkks.net/

  • Ejb-ql finder error

    Hi everyone:
    I have two CMP ejb AuthorBean and ArticleBean. The id property invoke the articleId of the ArticleBean. I add a finder method in AuthorBean:
    select  u,u.articleBean
    from AuthorBean as u When I build the project ,weblogic report error:
    "EJBModule.jar": EJB QL compilation encountered error: [EJB:013008]SELECT target for finder: 'findAllArticles' must evaluate to be the EJB that owns the finder: 'AuthorBean'. Instead, the SELECT target evaluates to: 'ArticleBean'.Why this ejb-ql error? I want to get authorBean and articleBean in the same time. How to correct the ejb-QL? THks!

    If it's called 'findAllArticles' why have all that stuff which is incorrect
    SELECT OBJECT(a) FROM ArcticleBean a

  • EJB BMP slow?

    Hello,
    I don't understand why people use EJB's if it is so slow. I am trying
    to do simple GET and SET methods on the current bean in memory, where
    each GET and SET method calls ejbLoad() and ejbStore() which are
    extremely resource intensive so they are very slow. Are there ways
    around this?
    I don't see why someone would want to do use EJB's when it is so
    slow...doesn't make sense. I must be missing something. Anyone?
    Tim :-)

    ck388 <[email protected]> wrote:
    I don't understand why people use EJB's if it is so slow. I am trying
    to do simple GET and SET methods on the current bean in memory, where
    each GET and SET method calls ejbLoad() and ejbStore() which are
    extremely resource intensive so they are very slow. Are there ways
    around this?
    I don't see why someone would want to do use EJB's when it is so
    slow...doesn't make sense. I must be missing something. Anyone?using bmp, it's up to you to optimize the expensive db calls.
    keep a dirty bit for each field and only commit it in your ejbStore
    when it's actually been changed, etc.
    if your object-relational mappings are not complex, you can bind your
    entity to the db through cmp, and then the container does the sql and
    the optimizations for you.
    ____________________}John Flinchbaugh{______________________
    | [email protected] http://www.hjsoft.com/~glynis/ |
    ~~Powered by Linux: Reboots are for hardware upgrades only~~

  • How to mix BMP into CMP?

    Hi! Is there a way to add a BMP find method into CMP entity bean? For
    example, I want to find the bean instance based on the minimal value of a
    field (a column in the DB table). This cannot be done through EJB QL and
    CMP. So I want my CMP entity bean has one find method that do the BMP with
    JDBC. Is this feasible? Thanks!
    Alvin

    There was a way in 5.1 but if you're in 6.x you can try ... just
    turn -keepgenerated on and look at what it produces / overrides.
    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/
    "alvin" <[email protected]> wrote in message
    news:[email protected]..
    Hi! Is there a way to add a BMP find method into CMP entity bean? For
    example, I want to find the bean instance based on the minimal value of a
    field (a column in the DB table). This cannot be done through EJB QL and
    CMP. So I want my CMP entity bean has one find method that do the BMP with
    JDBC. Is this feasible? Thanks!
    Alvin

  • Getting deep on Entities EJBs life-cicle... need some undertanding!

    Hi,
    i got a question over an Entity EJB (BMP or CMP as they life-cicle is pretty much the same) life-cicle.
    I've search over some books and there's a step that all of them seem to miss (or just don't be to explicit).
    There are 3 stages for an entity EJB.
    - no state
    - pool
    - ready
    The transition i'd like some help is the pool -> ready transition.
    When i use ejbCreate() is pretty simple, that's not the case.
    Then, there're only left one more way, through the ejbActivate() -> ejbLoad() methods.
    Here's my point...
    All the books i read describe the ejbFind() methods being on the pool stage (an arrow coming from it and going to it). This is exactly where i disagree!
    Suppose i have a CMPon pool rigth now and i also have a SessionBean holding a reference to that CMPLocalHome interface. Note that at this point, the CMP is still on pool.
    Then, from my client, i call a method on SessionBean that does something like the following.
              try {
                   CMPLocal cmpLocal = cmpLocalHome.findByPrimaryKey(addressID);
                   if (cmpLocal != null){
                        String data = cmpLocal.getMyDataString();
              } catch (FinderException e) {
                   System.out.println("Error: " + e);
                   e.printStackTrace();
                                              }As u can see, i just obtained a Local interface from the LocalHome interface i had before.
    After that, i called a getter method of the CMP bean, by that its pretty obvious that my CMP bean has got to be transitioned to the ready state, as it was associated with database data.
    Here goes my question,
    When exactly did the container called ejbActivate() -> ejbLoad()??? In other words, how exactly did my CMP bean get to the ready stage?
    Thank you so much,
    ltcmelo

    First of all, what an example! Great!
    But ... i still miss one little part of the process, actually the one i`m really interested to know!
    Follow my thougths.
    When i call the ejbFind() method, i call it on a bean that is on the pool. All the entities EJB life-cicle diagrams i`ve seen, show the bean still on the pool after the ejbFind() method, wich means that just AFTER the ejbFind() the beans is NOT yet associated to any database data. That`s what the literature says.
    The point is... i got returned from ejbFind() method a LocalInterface for a Bean, wich means that the bean is NOW associated with database data, as i have NOW a local interfaces that i can call any business (or setter and getter ) method of that bean.
    As you all said, the bean must have passed through the ejbActivate() -> ejbLoad() methods (supposing there was no other bean in the ready state).
    One way i can think of that is that the container invoked ejbActivate() -> ejbLoad() just AFTER any invokation of any finder method. I cannot view it in other way ( is ther any other way??? ) ! So, why is it not part of the j2ee specification ( i mean, something that specifies to "always call ejbActivate() -> ejbLoad after any finder method"????
    Thanks,
    ltcmelo

  • How to use alternative sql statements in ejb 2.0

    hi
    i have written the alternative sql statement in persistence.xml like  "select max(modifieddate) from tmp_dlv_mgmt".
    i am getting the error
    java.rmi.RemoteException: com.sap.engine.services.ejb.exceptions.BaseRemoteException: Exception in method in.kgs.bean.Dlv_EntityHomeImpl0.findMaxModifiedByUserID(java.lang.String).
         at in.kgs.bean.Dlv_EntityHomeImpl0.findMaxModifiedByUserID(Dlv_EntityHomeImpl0.java:1477)
         at in.kgs.bean.Dlv_EntityHomeImpl0p4_Skel.dispatch(Dlv_EntityHomeImpl0p4_Skel.java:387)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sap.engine.services.ejb.exceptions.BaseEJBException: Exception in method Dlv_EntityBean0.FindMaxModifiedByUserID(java.lang.String).
         at in.kgs.bean.Dlv_EntityBean0PM.ejbFindMaxModifiedByUserID(Dlv_EntityBean0PM.java:900)
         at in.kgs.bean.Dlv_EntityHomeImpl0.findMaxModifiedByUserID(Dlv_EntityHomeImpl0.java:1449)
         ... 10 more
    Caused by: com.sap.sql.log.OpenSQLException: A column with name DLVNO is unknown.
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85)
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124)
         at com.sap.sql.jdbc.common.CommonResultSet.findColumn(CommonResultSet.java:643)
         at com.sap.sql.jdbc.common.CommonResultSet.getLong(CommonResultSet.java:382)
         at in.kgs.bean.Dlv_EntityBean0Persistent.extractPK(Dlv_EntityBean0Persistent.java:213)
         at in.kgs.bean.Dlv_EntityBean0Persistent.extractPrimaryKey(Dlv_EntityBean0Persistent.java:206)
         at com.sap.engine.services.ejb.entity.finder.FindPKCollection.extractSinglePK(FindPKCollection.java:152)
         at com.sap.engine.services.ejb.entity.finder.FindPKCollection.extractAndAddSinglePK(FindPKCollection.java:167)
         at com.sap.engine.services.ejb.entity.finder.FindPKCollection.onlyLoadAllElementsFromRS(FindPKCollection.java:146)
         at com.sap.engine.services.ejb.entity.finder.FindPKCollection.forceLoadingOfAllElementsFromRS(FindPKCollection.java:128)
         at com.sap.engine.services.ejb.entity.finder.FindPKCollection.<init>(FindPKCollection.java:99)
         at in.kgs.bean.Dlv_EntityBean0PM.ejbFindMaxModifiedByUserID(Dlv_EntityBean0PM.java:896)
         ... 11 more
    ; nested exception is:
         javax.ejb.EJBException: com.sap.engine.services.ejb.exceptions.BaseEJBException: Exception in method Dlv_EntityBean0.FindMaxModifiedByUserID(java.lang.String).
         at in.kgs.bean.Dlv_EntityBean0PM.ejbFindMaxModifiedByUserID(Dlv_EntityBean0PM.java:900)
         at in.kgs.bean.Dlv_EntityHomeImpl0.findMaxModifiedByUserID(Dlv_EntityHomeImpl0.java:1449)
         at in.kgs.bean.Dlv_EntityHomeImpl0p4_Skel.dispatch(Dlv_EntityHomeImpl0p4_Skel.java:387)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sap.sql.log.OpenSQLException: A column with name DLVNO is unknown.
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85)
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124)
         at com.sap.sql.jdbc.common.CommonResultSet.findColumn(CommonResultSet.java:643)
         at com.sap.sql.jdbc.common.CommonResultSet.getLong(CommonResultSet.java:382)
         at in.kgs.bean.Dlv_EntityBean0Persistent.extractPK(Dlv_EntityBean0Persistent.java:213)
         at in.kgs.bean.Dlv_EntityBean0Persistent.extractPrimaryKey(Dlv_EntityBean0Persistent.java:206)
         at com.sap.engine.services.ejb.entity.finder.FindPKCollection.extractSinglePK(FindPKCollection.java:152)
         at com.sap.engine.services.ejb.entity.finder.FindPKCollection.extractAndAddSinglePK(FindPKCollection.java:167)
         at com.sap.engine.services.ejb.entity.finder.FindPKCollection.onlyLoadAllElementsFromRS(FindPKCollection.java:146)
         at com.sap.engine.services.ejb.entity.finder.FindPKCollection.forceLoadingOfAllElementsFromRS(FindPKCollection.java:128)
         at com.sap.engine.services.ejb.entity.finder.FindPKCollection.<init>(FindPKCollection.java:99)
         at in.kgs.bean.Dlv_EntityBean0PM.ejbFindMaxModifiedByUserID(Dlv_EntityBean0PM.java:896)
         ... 11 more
    com.sap.sql.log.OpenSQLException: A column with name DLVNO is unknown.
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85)
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124)
         at com.sap.sql.jdbc.common.CommonResultSet.findColumn(CommonResultSet.java:643)
         at com.sap.sql.jdbc.common.CommonResultSet.getLong(CommonResultSet.java:382)
         at in.kgs.bean.Dlv_EntityBean0Persistent.extractPK(Dlv_EntityBean0Persistent.java:213)
         at in.kgs.bean.Dlv_EntityBean0Persistent.extractPrimaryKey(Dlv_EntityBean0Persistent.java:206)
         at com.sap.engine.services.ejb.entity.finder.FindPKCollection.extractSinglePK(FindPKCollection.java:152)
         at com.sap.engine.services.ejb.entity.finder.FindPKCollection.extractAndAddSinglePK(FindPKCollection.java:167)
         at com.sap.engine.services.ejb.entity.finder.FindPKCollection.onlyLoadAllElementsFromRS(FindPKCollection.java:146)
         at com.sap.engine.services.ejb.entity.finder.FindPKCollection.forceLoadingOfAllElementsFromRS(FindPKCollection.java:128)
         at com.sap.engine.services.ejb.entity.finder.FindPKCollection.<init>(FindPKCollection.java:99)
         at in.kgs.bean.Dlv_EntityBean0PM.ejbFindMaxModifiedByUserID(Dlv_EntityBean0PM.java:896)
         at in.kgs.bean.Dlv_EntityHomeImpl0.findMaxModifiedByUserID(Dlv_EntityHomeImpl0.java:1449)
         at in.kgs.bean.Dlv_EntityHomeImpl0p4_Skel.dispatch(Dlv_EntityHomeImpl0p4_Skel.java:387)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
         at com.sap.engine.services.ejb.exceptions.BaseRemoteException.writeReplace(BaseRemoteException.java:276)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at java.io.ObjectStreamClass.invokeWriteReplace(ObjectStreamClass.java:896)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1011)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
         at com.sap.engine.services.rmi_p4.DispatchImpl.throwException(DispatchImpl.java:144)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:322)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: javax.ejb.EJBException: com.sap.engine.services.ejb.exceptions.BaseEJBException: Exception in method Dlv_EntityBean0.FindMaxModifiedByUserID(java.lang.String).
         at in.kgs.bean.Dlv_EntityBean0PM.ejbFindMaxModifiedByUserID(Dlv_EntityBean0PM.java:900)
         at in.kgs.bean.Dlv_EntityHomeImpl0.findMaxModifiedByUserID(Dlv_EntityHomeImpl0.java:1449)
         at in.kgs.bean.Dlv_EntityHomeImpl0p4_Skel.dispatch(Dlv_EntityHomeImpl0p4_Skel.java:387)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sap.sql.log.OpenSQLException: A column with name DLVNO is unknown.
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85)
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124)
         at com.sap.sql.jdbc.common.CommonResultSet.findColumn(CommonResultSet.java:643)
         at com.sap.sql.jdbc.common.CommonResultSet.getLong(CommonResultSet.java:382)
         at in.kgs.bean.Dlv_EntityBean0Persistent.extractPK(Dlv_EntityBean0Persistent.java:213)
         at in.kgs.bean.Dlv_EntityBean0Persistent.extractPrimaryKey(Dlv_EntityBean0Persistent.java:206)
         at com.sap.engine.services.ejb.entity.finder.FindPKCollection.extractSinglePK(FindPKCollection.java:152)
         at com.sap.engine.services.ejb.entity.finder.FindPKCollection.extractAndAddSinglePK(FindPKCollection.java:167)
         at com.sap.engine.services.ejb.entity.finder.FindPKCollection.onlyLoadAllElementsFromRS(FindPKCollection.java:146)
         at com.sap.engine.services.ejb.entity.finder.FindPKCollection.forceLoadingOfAllElementsFromRS(FindPKCollection.java:128)
         at com.sap.engine.services.ejb.entity.finder.FindPKCollection.<init>(FindPKCollection.java:99)
         at in.kgs.bean.Dlv_EntityBean0PM.ejbFindMaxModifiedByUserID(Dlv_EntityBean0PM.java:896)
         ... 11 more
    com.sap.sql.log.OpenSQLException: A column with name DLVNO is unknown.
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85)
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124)
         at com.sap.sql.jdbc.common.CommonResultSet.findColumn(CommonResultSet.java:643)
         at com.sap.sql.jdbc.common.CommonResultSet.getLong(CommonResultSet.java:382)
         at in.kgs.bean.Dlv_EntityBean0Persistent.extractPK(Dlv_EntityBean0Persistent.java:213)
         at in.kgs.bean.Dlv_EntityBean0Persistent.extractPrimaryKey(Dlv_EntityBean0Persistent.java:206)
         at com.sap.engine.services.ejb.entity.finder.FindPKCollection.extractSinglePK(FindPKCollection.java:152)
         at com.sap.engine.services.ejb.entity.finder.FindPKCollection.extractAndAddSinglePK(FindPKCollection.java:167)
         at com.sap.engine.services.ejb.entity.finder.FindPKCollection.onlyLoadAllElementsFromRS(FindPKCollection.java:146)
         at com.sap.engine.services.ejb.entity.finder.FindPKCollection.forceLoadingOfAllElementsFromRS(FindPKCollection.java:128)
         at com.sap.engine.services.ejb.entity.finder.FindPKCollection.<init>(FindPKCollection.java:99)
         at in.kgs.bean.Dlv_EntityBean0PM.ejbFindMaxModifiedByUserID(Dlv_EntityBean0PM.java:896)
         at in.kgs.bean.Dlv_EntityHomeImpl0.findMaxModifiedByUserID(Dlv_EntityHomeImpl0.java:1449)
         at in.kgs.bean.Dlv_EntityHomeImpl0p4_Skel.dispatch(Dlv_EntityHomeImpl0p4_Skel.java:387)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
         at com.sap.engine.services.ejb.exceptions.BaseEJBException.writeReplace(BaseEJBException.java:274)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at java.io.ObjectStreamClass.invokeWriteReplace(ObjectStreamClass.java:896)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1011)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
         ... 11 more

    Hi Guruvulu,
    >
    Guruvulu Bojja wrote:
    > i have written the alternative sql statement in persistence.xml like  "select max(modifieddate) from tmp_dlv_mgmt".
    Could you please explain in detail - what you have done and what you want to achieve? You can also post the code of your persistence.xml for reference...
    Regards,
    Yordan

  • How to find out local or home interface  was used ?

    Hi !
    are there any ways in the code of methods ejbCreate and ejbRemove in my entity EJB to find out were they called via local or home interface provided that my bean has both local or home interfaces ?
    Thenks in advance.

    Why should you care, this logic should only be implemented in the client (SEJB or Servlet). Even then it should only be used to check if there is a LocalHomeInterface. If not you get the RemoteHomeInterface. I don't understand the question completely.

  • Workshop 10.1 - EJB 2.1 and Hibernate

    In Workshop 10.1, we're trying to call Hibernate 3.2 from an EJB 2.1 session bean. At the same time, we would like to use the Hibernate tooling provided by Workshop 10.1 - the Hibernate mapping generation and the HQL testing, specifically.
    Our understanding is that we can get the Hibernate tooling only by including the Hibernate facet. However, we can only include the Hibernate facet in two kinds of project : the Dynamic Web project and the Web Services project.
    Therefore we''ve created our Hibernate code inside a Dynamic Web project and included that project in an EAR with our EJB. By manually altering the EJB MANIFEST file so that it refers to the Web project WAR, we can get the entire EAR project to compile and deploy to a WebLogic 10 server.
    However, when we try to execute the EJB method that calls the Web project code, the EJB throws a RemoteException, with the root cause being a NoClassDefFoundError - the EJB cannot find classes in the Web project at runtime.
    Does anyone know a way to do this in Workshop 10.1? It seems like this would be a pretty standard JEE development approach, so I think there is probably a way to do this.
    Thanks!!!
    ethan

    I am not using JDeveloper, the project was created in Netbeans 5.5. I only use the WAR created and Deploy it using the web administration of Oracle 10.1.3.2

  • EJB handle containing t3://null:7001

    I'm working on a cluster, using in-memory replication, on SunOs 5.6 (WLS
              5.01 sp1).
              I've 102 stateless session bean, and only 1 stateful.
              The stateful has in weblogic-ejb-home.xml the following:
              <weblogic-ejb-jar>
              <weblogic-enterprise-bean>
              <ejb-name>europortal.architecture.Customer.CustomerSession</ejb-name>
              <caching-descriptor>
              <max-beans-in-cache>100</max-beans-in-cache>
              <idle-timeout-seconds>10</idle-timeout-seconds>
              </caching-descriptor>
              <clustering-descriptor>
              <home-is-clusterable>True</home-is-clusterable>
              <home-load-algorithm>round-robin</home-load-algorithm>
              </clustering-descriptor>
              <jndi-name>europortal.architecture.Customer.CustomerSession</jndi-name>
              </weblogic-enterprise-bean>
              </weblogic-ejb-jar>
              I deploy all of the beans on both the instance of the cluster.
              The jsp using the stateful bean get the following error:
              java.rmi.NoSuchObjectException: Unable to locate
              EJBHome:
              'europortal.architecture.Customer.CustomerSession' on
              server: 't3://null:7001
              at java.lang.Throwable.fillInStackTrace(Native
              Method)
              at
              java.lang.Throwable.fillInStackTrace(Compiled Code)
              at java.lang.Throwable.<init>(Compiled Code)
              at java.lang.Exception.<init>(Compiled Code)
              at java.io.IOException.<init>(Compiled Code)
              at
              java.rmi.RemoteException.<init>(RemoteException.java:56)
              at
              java.rmi.NoSuchObjectException.<init>(NoSuchObjectException.java:50)
              at
              weblogic.ejb.internal.HomeHandleImpl.getEJBHome(HomeHandleImpl.java:68)
              at
              weblogic.ejb.internal.HandleImpl.getEJBObject(Compiled
              Code)
              at
              europortal.architecture.Customer.CustomerSessionWrapper.getFreePagesServiceL
              abel(CustomerSessionWrapper.java:261)
              at
              jsp_servlet._NASApp._EPApps._priveligeManager._jspService(Compiled
              Code)
              at
              weblogic.servlet.jsp.JspBase.service(Compiled Code)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled
              Code)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled
              Code)
              at
              weblogic.servlet.internal.RequestDispatcherImpl.include(Compiled
              Code)
              at
              weblogic.servlet.internal.RequestDispatcherImpl.include(Compiled
              Code)
              at EPApps.mainProcess.service(Compiled Code)
              at
              javax.servlet.http.HttpServlet.service(Compiled Code)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled
              Code)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:742)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:686)
              at
              weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
              Manager.java:247)
              at
              weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
              at
              weblogic.socket.MuxableSocketHTTP.execute(Compiled
              Code)
              at weblogic.kernel.ExecuteThread.run(Compiled
              Code),
              while using the handle of the ejb and, finding it == null, tries to start
              again from the lookup.
              I've serialized the handle on a file, as soon as it was created, and inside
              it I can read the following:
              t3://null:7001 (it's not ASCII, but you can read it)
              It looks like an error in getting the address of the server...
              But everything works fine when I use a single WLS instance without cluster.
              Anyone can help?
              I enclose the code (CustomerSessionWrapper.java)
              [CustomerSessionWrapper.java]
              

    I checked with the developer on this and he says that you forgot to set
              weblogic.cluster.dnsName property. Please refer to the ejb documentation for more info on this.
              - Prasad
              Luca Relandini wrote:
              > I'm working on a cluster, using in-memory replication, on SunOs 5.6 (WLS
              > 5.01 sp1).
              > I've 102 stateless session bean, and only 1 stateful.
              > The stateful has in weblogic-ejb-home.xml the following:
              > <weblogic-ejb-jar>
              > <weblogic-enterprise-bean>
              > <ejb-name>europortal.architecture.Customer.CustomerSession</ejb-name>
              > <caching-descriptor>
              > <max-beans-in-cache>100</max-beans-in-cache>
              > <idle-timeout-seconds>10</idle-timeout-seconds>
              > </caching-descriptor>
              > <clustering-descriptor>
              > <home-is-clusterable>True</home-is-clusterable>
              > <home-load-algorithm>round-robin</home-load-algorithm>
              > </clustering-descriptor>
              > <jndi-name>europortal.architecture.Customer.CustomerSession</jndi-name>
              > </weblogic-enterprise-bean>
              > </weblogic-ejb-jar>
              >
              > I deploy all of the beans on both the instance of the cluster.
              > The jsp using the stateful bean get the following error:
              >
              > java.rmi.NoSuchObjectException: Unable to locate
              > EJBHome:
              > 'europortal.architecture.Customer.CustomerSession' on
              > server: 't3://null:7001
              > at java.lang.Throwable.fillInStackTrace(Native
              > Method)
              > at
              > java.lang.Throwable.fillInStackTrace(Compiled Code)
              > at java.lang.Throwable.<init>(Compiled Code)
              > at java.lang.Exception.<init>(Compiled Code)
              > at java.io.IOException.<init>(Compiled Code)
              > at
              > java.rmi.RemoteException.<init>(RemoteException.java:56)
              > at
              > java.rmi.NoSuchObjectException.<init>(NoSuchObjectException.java:50)
              > at
              > weblogic.ejb.internal.HomeHandleImpl.getEJBHome(HomeHandleImpl.java:68)
              > at
              > weblogic.ejb.internal.HandleImpl.getEJBObject(Compiled
              > Code)
              > at
              > europortal.architecture.Customer.CustomerSessionWrapper.getFreePagesServiceL
              > abel(CustomerSessionWrapper.java:261)
              > at
              > jsp_servlet._NASApp._EPApps._priveligeManager._jspService(Compiled
              > Code)
              > at
              > weblogic.servlet.jsp.JspBase.service(Compiled Code)
              > at
              > weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled
              > Code)
              > at
              > weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled
              > Code)
              > at
              > weblogic.servlet.internal.RequestDispatcherImpl.include(Compiled
              > Code)
              > at
              > weblogic.servlet.internal.RequestDispatcherImpl.include(Compiled
              > Code)
              > at EPApps.mainProcess.service(Compiled Code)
              > at
              > javax.servlet.http.HttpServlet.service(Compiled Code)
              > at
              > weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled
              > Code)
              > at
              > weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              > l.java:742)
              > at
              > weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              > l.java:686)
              > at
              > weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
              > Manager.java:247)
              > at
              > weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
              > at
              > weblogic.socket.MuxableSocketHTTP.execute(Compiled
              > Code)
              > at weblogic.kernel.ExecuteThread.run(Compiled
              > Code),
              >
              > while using the handle of the ejb and, finding it == null, tries to start
              > again from the lookup.
              > I've serialized the handle on a file, as soon as it was created, and inside
              > it I can read the following:
              > t3://null:7001 (it's not ASCII, but you can read it)
              > It looks like an error in getting the address of the server...
              >
              > But everything works fine when I use a single WLS instance without cluster.
              > Anyone can help?
              > I enclose the code (CustomerSessionWrapper.java)
              >
              > Name: CustomerSessionWrapper.java
              > CustomerSessionWrapper.java Type: Java file (application/x-unknown-content-type-VisualCafeFile.Document)
              > Encoding: x-uuencode
              

Maybe you are looking for

  • No connection to the apple store / ipod touch no more working

    Hello, i updated itunes to version 10, no more connection to the itunes store, also, the ipod touch can not be found. I tried to restart the pod touch as recommended, but since then the pod shows on the display the cable and itunes, i connected the w

  • Application Sever - Enterprise Manager

    I have forgot the password for Enterprise. Is there any way login into the enterprise manager with some system default userid and password. Can you inform what is the default userid and password for enterprise manager.

  • Are there any standard SAP reports to filter all BP(in SAP ISU)?

    Hi All, 1.Do we have any standard SAP reports to filter all BP(in SAP IU)?I am aware that we can view all the Business Partners in Change/Display mode in the selection screen, but do we have any standard SAP reports to view all the created BP? 2.Do w

  • Capturing the Transport Acknowledgment

    I am sending a PO from a legacy System (File Adapter /)Asynchronous and from XI we are sending to a Vendor using (Asynchronous/HTTP Adapter). I am using a BPM to do the above process. In my Send Step to Vendor, I have the Transport Acknowldgement set

  • Identit-E has verified and approved my student status but won't give me a serial number

    Identit -E has verified and approved my student status for the product I purchased (lightroom 4) but after two days, still has not given me a serial number so that I can use the product.  They say that it is due to a technical issue, but won't tell m