SOS problem using one Entity bean for editing records. please help me

Hello
I have one great problem using one entity bean 2.1 and i am working with this problem several days and i dont solve it.
i am using this jb 2.1 for add new records to one oracle database and for editing records.
I have one great problem for editing records
I have one objets that is as one of my database table. (PersonaObj.java)
     //personaObj.java
     public class PersonaObj implements Serializable{
          private Integer id_persona; //this ishte database table autonumeric
          private java.lang.String nombre;
          now the set/get methods.
     One field of this objets (bean) is the primary key of the table, and this field is one part of the pk from the entity bean.
     From one session bean i call the entity bena passing the objet
     into the entity bean (interface) i have one methods:
          public getPersona getT56aaat04();
     public void setPersona(PersonaObj obj);
     into the entitybean bean i have:
     public PersonaEntityPK ejbCreate(PersonaObj obj) throws CreateException {
          this.setT56aaat04(obj);
          public abstract Integer getId_persona();
     public abstract void setId_persona(Integer Id_persona);
     public abstract java.lang.String getNombre();
     public abstract void setNombre(java.lang.String Nombre);
     public PersonaObj getPersona() {
          PersonaObj obj = new PersonaObj();
          obj.setId_persona(getId_persona());
          obj.setNombre(getNombre());
          return obj;
     public void setPersona(PersonaObj obj) {
          setId_persona(obj.getId_persona());
          setNombre(obj.getNombre());
But i have one graet problem.
adding new record to the database i runs well but if i want to edit one recor appears this error:
=> Error <=
java.rmi.RemoteException: EJB Exception: ; nested exception is: javax.ejb.EJBException: EJB Exception: : java.lang.IllegalStateException:[EJB:010144]The setXXX method for a primary key field may only be called during ejbCreate.
at PersonasEJB_a43o8n__WebLogic_CMP_RDBMS.setId_persona(PersonasEntityEJB_a43o8n__WebLogic_CMP_RDBMS.java:328)
at PersonasEntityBean.setPersona(PersonasEntityBean.java:114)
at PersonasEntityEJB_a43o8n_ELOImpl.setPersona(PersonasEntityEJB_a43o8n_ELOImpl.java:45)
at PersonasSessionBean.editarPersona(PersonasSessionBean.java:849)
at PersonasSessionBean_bszo9t_EOImpl.editarPersona(PersonasSessionBean_bszo9t_EOImpl.java:208)
at PersonasSessionBean_bszo9t_EOImpl_WLSkel.invoke(Unknown Source)
into the session bean i make this (the session recibes one PersonaObj obj):
T56aContactosEntityLocal personaLocal ;
               try {
                    personaLocal = personaHome.findByPrimaryKey(new T56aContactosEntityPK(obj.getId_a04()));
                    T56aaat04Obj objTmp = new T56aaat04Obj();
                    objTmp.setAp1_a04(obj.getAp1_a04());
                    objTmp.setEstado_a04("false");
                    personaLocal.setT56aaat04(obj);
Please can you help me to solve this problem?

Hello Werner,
The mappings seem to be alright at a first glance.
Have you tried out un- and redeploying your application? Sometimes values appear to be cached in the server. So if you have deployed the application before you entered DB_BANK as alias this might solve the problem...
BR
Daniel

Similar Messages

  • How to use the LAN NetStream for peer transmission, please help, write a sample code

    How to use the LAN NetStream for peer transmission, please help, write a sample code

    No reply, I reply, Oh

  • I have a ipod touch 2nd generation 8gb 4.2.1 im new to itunes i made a itunes account but it says i need a payment method is there anyway i can use my paypal if not is there a way to not have to use a payment method for itunes store please help ty

    i have a ipod touch 2nd generation 8gb 4.2.1 im new to itunes i made a itunes account but it says i need a payment method is there anyway i can use my paypal if not is there a way to not have to use a payment method for itunes store please help ty

    Create a NEW account using these instructions. Make sure you follow the instructions. Many do not and if you do not you will not get the None option. You must use an email address that you have not used with Apple before.
    Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card
    Using those instructions you may also be able to select PayPal if that is allowed in your country.

  • Not able to use oracel database 11g express edition ? please help !!!

    after installing oracel database11g express edition , i am not being able to use it ,because when i click on  get started with oracel database 11g express edition it will divert me to ip  http://127.0.0.1:8080/apex/f?p=4950 and after this it show
    Oops! Google Chrome could not connect to 127.0.0.1:8080
    so please help me out , as i am beginner and new to this , so i don't have deep knowledge of this ,so please help me out ,as soon as possible 

    Hi,
    Provide more info like os and its version - https://blogs.oracle.com/shay/entry/10_commandments_for_the_otn_fo
    Did installation complete successfully?
    check if database is up
    start command prompt
    sqlplus / as sysdba
    select open_mode from v$database;
    check the status of listener
    lsnrctl status
    Post the output of above commands here
    Regards
    Yoonas

  • HT4085 Some videos that are taken with my iphone's camera are not making sounds, this problem occured today to all videos i record, please help

    Some videos that are taken with my iphone's camera are not making sounds, this problem occured today to all videos i recorded starting from today, please help

    It also takes time for the photos to be transferred out of your iPhone and into Photo stream on Apple's iCloud servers.
    Note that this can't happen if your iPhone is not connected to a WiFi network:
    When you enable My Photo Stream on your devices, all new photos you take or import to those devices will be automatically added to your photo stream.
    iOS devices: New photos you take are automatically uploaded to your photo stream when you leave the Camera app and are connected to Wi-Fi. My Photo Stream does not push photos over cellular connections.
    Macs: Any new photos you import to iPhoto or Aperture begin uploading automatically when you have a Wi-Fi or Ethernet connection. Or you can change your iPhoto or Aperture preferences so that only photos you manually add to My Photo Stream are uploaded.
    PC with iCloud Control Panel 2.0 or later: Open a Windows Explorer window and under Favorites select iCloud Photos if you are using iCloud Control Panel 3.0 (or Photo Stream if you are using 2.0 to 2.1.2). Open My Photo Stream. Click the "Add photos" button. Select the photos to import to My Photo Stream, then click Open.
    from here: http://support.apple.com/kb/ht4106

  • First time using garageband no signal for live instrument -- please help!

    the project i'm currently working on is remixing 4-track masters on a tascam 424 mkII into digital files on garageband.
    i have an m-audio mobilepre, that i've hooked up and i've changed the audio settings on my computer so that all input and output is through the mobilepre. i can't get a signal to show up from the tascam. i tried plugging my guitar into it and it still wouldn't show a signal.
    i played a quicktime file on my computer and the speakers plugged into the mobilepre worked, so they are definitely interacting.
    so then i decided to unplug the mobile pre and just use a L/R->1/8" jack and changed my input settings to "line in" but still nothing. i then tried again with my guitar plugged straight into my computer, but when i listened with headphones on, it seemed like the internal microphone was the only thing picking anything up -- even though my input settings were set to "line in" and not the built in microphone.
    i would prefer to know how to work this with the mobile pre, but i have enough adapters and everything to plug everything straight into my computer. if anyone can help, that would be much appreciated. i've been messing with this for a couple hours and i'm about at wit's end.

    i've changed my audio setting both from going into Applications->Utilities->audio midi and turning it onto USB mobilepre
    and also by clicking on the apple and going into system preferences->sound
    i checked the correct boxes both when i was using the mobilepre and trying to go line in.
    is there a GB thing that i also need to check out?

  • Problem using java crypto class... Please help me

    Hi, i'm trying to do application that send information via socket, and i have to send the data encrypted,
    i`m trying to implemented the RC4 algorithm.... I read an article that said that the java sdk 1.4 has already
    implemented the securities classes. So I made this little program:
    import javax.crypto.spec.*;
    import javax.crypto.*;
    import java.security.*;
    import java.io.*;
    public class MicroRC4
    public void encriptaClavePublica(String trama)
    Cipher rc4Cipher;
    byte[] rc4KeyByte;
    SecretKey rc4Key;
    String keyStr;
    String messageEncryp;
    byte[] messageEncrypByte;
    rc4Key = null;
    messageEncryp = trama;
    // Clave para encriptar el mensaje
    keyStr = new String();
    keyStr = "12345678";
    rc4KeyByte = new byte[8];
    messageEncrypByte = new byte[255];
    for(int i=0; i < 8; i++)
    rc4KeyByte[i] = (byte)keyStr.charAt(i);
    try
    for(int i=0; i < messageEncryp.length(); i++)
    messageEncrypByte[i] = (byte)messageEncryp.charAt(i);
    rc4Key = (SecretKey)new SecretKeySpec(rc4KeyByte, "RC4");
    rc4Cipher = Cipher.getInstance("RC4");
    rc4Cipher.init(Cipher.ENCRYPT_MODE, rc4Key);
    byte[] result = null;
    result = rc4Cipher.doFinal(messageEncrypByte);
    System.out.println("Usage:"+result);
    catch(Exception e)
    System.out.println(" Error: " + e.getMessage());
    System.out.println("\n........................................\n");
    I don't know what is wrong but when i run the application it show me the following message :
    Error: Algorithm RC4 not available
    Does anybody know what is wrong ??
    Does anybody can help me ??
    or tell me when can i find some source code that implement de RC4 algorithm
    Thank's in advance..
    Alejandro.

    Hi Alejandro,
    In the ends i decided to implement the algorithm by
    myself, i did it... any way thank's again.... If
    anybody want to see the code, send me a mail......
    AlejandroCan I also get the source code? my email id is [email protected]
    Thanks a lot!
    Srik.

  • Entity bean for more than one table

    Can an entity bean represent more than one phyical table in the database? (i.e. span tables) If so, how is it coded up?

    Yes, probably either using BMP entity beans, or creating a database view of the two tables.
    However, the actual implementation depends a lot on your database and EJB container. Since I didn't see any details of these in your post, I suggest you research the documentation for both your EJB container and database.
    [Of-course, I'm assuming that you are already using a database and EJB container :-]
    Are you familiar with the following Web sites:
    http://java.sun.com/j2ee/tutorial/1_3-fcs/
    http://www.theserverside.com
    Have you read the specification?
    http://java.sun.com/j2ee/download.html
    Hope this helps.
    Good Luck,
    Avi.

  • Can anyone describe using entity beans for persitance in Software Architect

    Can anyone describe using entity beans for persitance in Software Architecture you built for a product?

    Although this forum is supposed to help you gain knowledge on entity beans, its not a free rider that's supposed regurgitate everyone's knowledge to you.
    Read something first and then clarify your thoughts with this forum.

  • HT204053 The entire family has used one itunes account for years. How do we all set up separate iCloud accounts now?

    The entire family has used one itunes account for years. How do we all set up separate iCloud accounts now? Or should we? 5 macbooks, 2 ipads, 4 iphones, 2 itouch, 2 imacs.   How does one decide what to sync, share and what not to? Green Jeans.

    You need to start by understanding the distinction between iTunes and iCloud - Apple confuse the issue by referring to 'iTunes Match' as part of iCloud. It isn't.
    You don't have to have the same login (Apple ID) for iTunes and iCloud; many people don't and there's no problem about it.
    Your iCloud ID gets you email, calendars, contacts, iWork documents and PhotoStream syncing between devices.
    Your iTunes ID gets you the iTunes Store, the App Store for iOS, the Mac App Store for OSX,, 'iTunes in the Cloud' (downloading of purchased items to any logged-in device) and 'iTunes Match' (uploading of songs not purchased in the iTunes Store).
    Your family members can easily each get their own iCloud account to keep email etc. separate - in each case they will need a different non-Apple email address (a free one from Yahoo etc. would do) to set up the ID. If they are sharing a Mac they need to be using a separate user account.
    They can have their own iCloud accounts and still all sign into the same iTunes account: or they can open their own iTunes accounts using their new iCloud Apple IDs.
    BUT they cannot transfer items purchased under the present iTunes ID to different iTunes IDs.

  • HT204053 Can I use one Apple ID for two Apple IPhones?

    Can I use one Apple ID for two Apple IPhones? I received an answer of yes.
    Now another question.  I have one ICloud Account, Two IPhones.  Can I use Find my IPhone via the one ICloud Account?  Can I see two IPhones on the map at the same time?  or do I need to view the second phone via some other method.
    Message was edited by: Hunter3D

    Yes.
    Cheers,
    GB

  • Hii i m frm BGD. I m using iphone 5. My carrier BGD ROBI AXIATA. When it was ios 6 it works better . But i recently upgrade to ios 7 and i facing the little problem. One of the ussd call. Plz help or suggest ir doing better about itz as soon as possible.

    Hii i m frm BGD. I m using iphone 5. My carrier BGD ROBI AXIATA. When it was ios 6 it works better . But i recently upgrade to ios 7 and i facing the little problem. One of the ussd call. Plz help or suggest ir doing better about itz as soon as possible.

    I'm not trying to minimize your issues, but I have an iPhone 5S and find that I have not had these types of problems on AT&T. I'm wonding if something has gotten stuck in a loop that is continually trying to use data. If you make a good backup of your phone, try restoring it as new, and do not add anything to the phone right away. Let the device run like this for a little while and see what kind of usage you have. You report you phone is showing usage of 21GB. Did you rese this setting on the phone to begin at your billing period? The reason I ask this is some people believe this setting resets on its own with your billing period, it does not. This has to be manually reset by the user, so it might not be that accurate depending on the last time that you reset it.
    If the phone seems to not use so much extra data during the period the device does not have extra apps on it, then try restoring from your backup and see what happens. If this increases your data usage quite fast again, then there is probably something corrupt in the backup that is causing this issue.

  • How to delete a database record by using EJB entity beans

    Hi, All,
    Does anyone know how to use entity bean to delete a database record? I have all the EJB entity beans created, including access beans to each. I can successfully create records, find and update records, however, I haven't find a way to delete records yet.
    Your response is appreciated.
    Cathy

    Please see EJB Forums for continue discussion on this subject.
    Reference titile: "how to delete database record by using CMP entity beans "

  • Why Interceptors are not used in Entity beans?

    Why Interceptors are not used in Entity beans?
    Interceptors can be used in MDB, Session bean but not in Entity bean....why so?
    Thanks,
    Rahul.

    Hi,
    why batch updations are not prefered in entity beansPlease refer the specification of ejb and find out what the entity bean is meant for.In short the emtity bean represents the object state which can be persisted.
    Talking regarding the batch updations does not make sense , also the entity bean represents the row of the table mapped to the Object(java Object).
    Regards
    Vicky

  • Resource problem when running Entity Bean

    Hi,
    can someone please help me with the following problem I am getting
    weblogic.common.ResourceException: No resources available
    at weblogic.common.internal.ResourceAllocator.reserve(ResourceAllocator.
    java:568)
    at weblogic.common.internal.ResourceAllocator.reserve(ResourceAllocator.
    java:400)
    at weblogic.common.internal.ResourceAllocator.reserveNoWait(ResourceAllo
    cator.java:368)
    at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.j
    ava:166)
    at weblogic.jdbc.common.internal.ConnectionPool.reserveNoWait(Connection
    Pool.java:127)
    at weblogic.jdbc.common.internal.RmiDataSource.getPoolConnection(RmiData
    Source.java:194)
    at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSour
    ce.java:219)
    at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getConnection(RDBMSP
    ersistenceManager.java:313)
    at CatalogueCMPEJB_WebLogic_CMP_RDBMS.__WL_exists(CatalogueCMPEJB_WebLog
    ic_CMP_RDBMS.java:1381)
    at CatalogueCMPEJB_WebLogic_CMP_RDBMS.__WL_create(CatalogueCMPEJB_WebLog
    ic_CMP_RDBMS.java:1351)
    at CatalogueCMPEJB_WebLogic_CMP_RDBMS.ejbPostCreate(CatalogueCMPEJB_WebL
    ogic_CMP_RDBMS.java:1257)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.ejb20.manager.DBManager.create(DBManager.java:583)
    at weblogic.ejb20.manager.DBManager.remoteCreate(DBManager.java:462)
    at weblogic.ejb20.internal.EntityEJBHome.create(EntityEJBHome.java:190)
    at CatalogueCMPBean_knt3og_HomeImpl.create(CatalogueCMPBean_knt3og_HomeI
    mpl.java:84)
    at CatalogueMgrBean.createBook(CatalogueMgrBean.java:32)
    at CatalogueMgrBean_pt5olq_EOImpl.createBook(CatalogueMgrBean_pt5olq_EOI
    mpl.java:259)
    at CatalogueMgrBean_pt5olq_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:288)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerR
    ef.java:93)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
    a:257)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
    .java:22)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    thanks in advance,
    Jason :)

    Increase the max. count on JDBC Connection pool, also as a good practice close
    any openconnection after doing any BMP.
    V
    "ajay" <[email protected]> wrote:
    >
    Hi ,
    this exception might also occur if u r not using an entity bean but using
    the
    conection pool to get connections and not closing them
    what happens is the connection in the pool are exausted and it throws
    a no resources
    available exception.
    regards
    ajay
    "Neeraj" <[email protected]> wrote:
    "Jason" <[email protected]> wrote:
    Hi,
    can someone please help me with the following problem I am getting
    weblogic.common.ResourceException: No resources available
    at weblogic.common.internal.ResourceAllocator.reserve(ResourceAllocator.
    java:568)
    at weblogic.common.internal.ResourceAllocator.reserve(ResourceAllocator.
    java:400)
    at weblogic.common.internal.ResourceAllocator.reserveNoWait(ResourceAllo
    cator.java:368)
    at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.j
    ava:166)
    at weblogic.jdbc.common.internal.ConnectionPool.reserveNoWait(Connection
    Pool.java:127)
    at weblogic.jdbc.common.internal.RmiDataSource.getPoolConnection(RmiData
    Source.java:194)
    at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSour
    ce.java:219)
    at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getConnection(RDBMSP
    ersistenceManager.java:313)
    at CatalogueCMPEJB_WebLogic_CMP_RDBMS.__WL_exists(CatalogueCMPEJB_WebLog
    ic_CMP_RDBMS.java:1381)
    at CatalogueCMPEJB_WebLogic_CMP_RDBMS.__WL_create(CatalogueCMPEJB_WebLog
    ic_CMP_RDBMS.java:1351)
    at CatalogueCMPEJB_WebLogic_CMP_RDBMS.ejbPostCreate(CatalogueCMPEJB_WebL
    ogic_CMP_RDBMS.java:1257)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.ejb20.manager.DBManager.create(DBManager.java:583)
    at weblogic.ejb20.manager.DBManager.remoteCreate(DBManager.java:462)
    at weblogic.ejb20.internal.EntityEJBHome.create(EntityEJBHome.java:190)
    at CatalogueCMPBean_knt3og_HomeImpl.create(CatalogueCMPBean_knt3og_HomeI
    mpl.java:84)
    at CatalogueMgrBean.createBook(CatalogueMgrBean.java:32)
    at CatalogueMgrBean_pt5olq_EOImpl.createBook(CatalogueMgrBean_pt5olq_EOI
    mpl.java:259)
    at CatalogueMgrBean_pt5olq_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:288)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerR
    ef.java:93)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
    a:257)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
    .java:22)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    thanks in advance,
    Jason :)-------------
    Its failing in ejbPostCreate, i.e. entering record in the database involving
    CMR
    fields. Please check your relationships in *.xml files.

Maybe you are looking for