Problem with entity bean

Hi friends, i am using cmp entity bean to access my relational data base. In my table i am using a sequence (oracle) to generate a sequentiel number as a unique identifier so in my entity bean i am not inserting a primery key. The problem is that i need to get the primary key of the bean after creating and storing it to use the key for other treatment. Any idea, thank a lot

Hi,
It seems you just need to move all "after creation" stuff (including getId()) into ejbPostCreate method.
If I don't miss anything, think that's all.
Good luck

Similar Messages

  • Problem with entity passed as argument

    Hello !
    I have this code :
    Public Class myclass
    Private cont As MyentEntities
    Public Sub New( ByRef cnx As MyentEntities)
    cont = cnx
    End Sub
    Public Sub test
    If cont.mytable1.Count=1 then
    end if
    End Sub
    End class
    'On my main form :
    Dim E1 as MyEntEntities
    Dim m1 as myclass
    Private Sub MainForm_Load(sender As System.Object, e As System.EventArgs) Handles Me.Load
    E1=New MyentEntities
    m1=new MyClass(E1)
    End Sub
    Private sub fill_entity
    E1.MyTable1.Tolist
    End sub
    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
    m1.test
    End Sub
    When I click the button , I get an error :
    ....the entity of type 'MyTable1'  does not exist in the context.
    But I passed E1 with ByRef ?
    What's wrong ?
    Thank you !

    Hello,
    >>Problem with entity passed as argument
    With your provided code, I tested with my database, it is ok, below is the test demo which is similar with yours except the used databse:
    Public Class Form1
    Dim E1 As DFDBEntities
    Dim m1 As TestClass
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    E1 = New DFDBEntities
    m1 = New TestClass(E1)
    End Sub
    Private Sub fill_entity()
    E1.Orders.Tolist()
    End Sub
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    m1.test()
    End Sub
    End Class
    Public Class TestClass
    Private cont As DFDBEntities
    Public Sub New(ByRef cnx As DFDBEntities)
    cont = cnx
    End Sub
    Public Sub test()
    If cont.Orders.Count = 1 Then
    End If
    End Sub
    End Class
    Since we do not know your exact table structure, it is hard to know why this exception is thrown in your side, one reason I know is the .edmx file is not mapped correctly, you could check this link which describes various possibilities for the
    caused reason of this exception:
    http://stackoverflow.com/questions/5634392/ef-4-1-code-first-error-the-entity-type-sometype-is-not-part-of-the-model-for
    Or you could provide information as what database you are using, the table you are working with and the Entity Framework version.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Problems with managed beans on included JSPs

    I've got a problem with managed beans within an included JSP
    The included page looks as follows:
    <f:subview id="includedPage" binding="#{testBean.component}">
         <h:outputText value="Hallo from the included page"/>
         <h:outputText value="#{testBean.msg}" />
    </f:subview>The including page is also very simple
    <f:view>
         <html>
              <head>
                   <title>Test include</title>
              </head>
              <body>
                   <h:outputText value="Hello from the including page"/>               
                   <jsp:include page="included.jsp"/>
              </body>
         </html>
    </f:view>The testBean is a managed bean with page scope and looks as follows:
    public class TestBean {
        public UIComponent fComponent;
        public TestBean() {
            System.out.println("TestBean Constructor called " + toString() );
        public String getMsg() {
            return "Component = " + fComponent ;
        public void setComponent(UIComponent component) {
            System.out.println("setComponent called " + component);       
            fComponent = component;
        public UIComponent getComponent() {
            System.out.println("getComponent called " + fComponent);
            return fComponent;
    }The output to the console is:
    TestBean Constructor called de.kvb.athena.web.beans.TestBean@1bc16f0
    getComponent called null
    TestBean Constructor called de.kvb.athena.web.beans.TestBean@18622f3
    setComponent called javax.faces.component.UINamingContainer@160877b
    TestBean Constructor called de.kvb.athena.web.beans.TestBean@5eb489
    and the page displays
    Hello from the include page
    Hello from the included page Component = null
    Can anyone explain this behavior ? What's the reason that the page displays
    Component = null
    and is it possible to display the parent naming container (subview) this way ?
    how ?
    Thanks

    By "page scope" I assume you mean "none"? If so JSF creates a new bean for each place it's referenced. The closest to the behavior you want, once per "page", is really request scope.
    (I'm not sure why the constructor is being called thrice, though. I should look into this.)
    I assume you want a bean-per-subview scenario. This should be doable, and one way that allows a dynamic number of subviews would be as follows:
    --create a "manager" bean in request scope
    --give it get/set methods that retrieves a Map of "TestBean" instances; the idea is that each subview use a different key "s1", "s2", etc
    back the manager method with Map implementation that checks if there's already a TestBean associated with the key returns it if yes, else null.
    If that seems messy, the component solution is hairy :-) See http://forum.java.sun.com/thread.jspa?threadID=568937&messageID=2812561
    --A                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Caching data with Entity Bean

    Hello,
    I am performing some tests concerning the benefit of caching data with Entity Bean.
    Here is the case :
    I have an Entity Bean with a business method getName() to retrieve a name field in the EJB.
    I understand that in order to cach data, I have to set the NOT_SUPPORTED transaction attr for this method. In this way, when this method is called, the ejbReload() is not called and the data is retreived from the EJB ready instance (and not from the database).
    Is it true and is it the good way to use the cach mechanism ?
    Now if we consider that this instance is the only one in the ready stage, and it is never pooled (it seems so !), what about a modification of the database from a tier (or from an other EB instance)? The Entity Bean is not able to see this modification seence it does not call the ejbLoad method.
    Is there a way to force an Entity Bean to be periodically polled in order to recover data from the data store when activated ?
    Thanks in advance,
    Thierry

    No, This is wrong way of doing what you want. Most of the application servers provide various configuration settings for this. Eg. caching mechanism, interval on when to call ejbLoad and ejbStore, read only beans. You have to check the documentation for this.
    --Ashwani

  • Report with entity beans - BIG performance problem

    I have several EJBs (CMP entity beans).
    I need to build a report using linked EJBs and show this report
    to a user (so, updates are not needed - report is only for web page demonstration).
    the problem is: such report is generated too slow.
    I have ~100 records in table 'TestResult' and ~500 records in table 'TestObject'.
    these tables are linked like this:
    one testobject <--> many testresults
    for each testresult I need to show a line with some info which should be retrieved
    from bound EJBs (e.g. testresult-testobject-assigneduser-prioritylevel)
    how to optimize such report generation?
    I have heard something about session beans with Value Objects.
    do I need to use such session beans here?
    what is a general solution for generating reports using linked EJBs?
    I tried to solve the problem by using DB View, but it didn't help.
    I have used 'TestResultView' - info is retrieved fast enough from this view
    (several msecs), but displaying this info is still very costly.
    please, help!
    Oracle 8.1.7,
    WebLogic 6.1

    Hi,
    because I have checked the time required to
    1) retrieve EJBS (several msec)Let me share some of my views with you.Once you retrieve the EJBS ie ie the collection of remote interface from the finder method the container is firing single "select " query and gets all the primary keys back.
    2) cycle through it - get fields and display them
    (~4000 msec)Now the cycle of getting the value you are getting the bean from the PooledState to ready state which will get the fields by firing the "select" query (ejbload()). Now in the instance you are invoking the multiple methods and at the end it will remain there in ready till you call the remove which u are not doing so the time out will bring it back to the pooledstate.
    And if you are calling the bean very frequently then all the instances will go to the ready state and the activation & passivation will start developing ......
    So at the end when the bean moves back to the pooled state after timeout the ejbStore() fires the "update " query!!!!
    Let us consider the activation/passivation not appearing for simple understanding !!!!!!!!
    So for each iteration you are firing 2 queries to the database.So if you have 500 records then the queries generatted will be 1(select from finder)+2(1 by select(ejbload)+1 by update(ejbStore))*500. So the flow is calling 1001 queries ...Thus quering about 1000 queries will definetly take some time...
    So what is the solution????
    Any way you dont require to fire the update query as you are just viewing the data...So u can stop calling the ejbStore().
    Hence you queries will drop to half.Now how we can do this is by using the BMP.....
    The other solution is using the Sessionbean and store the data all 500 records in the Object which can be called across the n/w. This object should implements the Serializable interface and this tech is the Transfer Object feature.....
    Hope you find this useful..
    regards
    Vicky

  • Deployment problem sdk 1.4 with entity bean

    hallo!
    i have a big problem with the j2ee sdk 1.4. when i want to add an entity bean to my ear-file, everything goes good, but when i put the sql-ql for the finder-method and save the file i got an error like this
    xxxxxxx.ear is corrupt or cannot be read
    when i dont save and will show the descriptor it generates an empty descriptor for this entity bean.
    the problem is, that the deployment tool cannot generate the deployment desciptor for entity beans. with session bean there was no problems.
    hope somebody can help me.
    thanks

    There's bug in non-U.S. locales. The workaround is described in this thread:
    http://forum.java.sun.com/thread.jsp?forum=136&thread=472692&tstart=15&trange=15
    -Ian Evans
    Sun Microsystems
    J2EE Tutorial team

  • Problem woking with entity beans on WL 8.1

    Hi,
    I'm evaluating WL8.1.I'm able to deploy session beans & MDBs & test successfully.Similarly
    , I' m able to deploy entity beans but, not able to test it successfully.It says
    there was a problem in identifying the bean using the specified JNDI name.The
    underlying table name contains '_'(underscorre).Does this create problem.Is there
    any patch for this from bea?
    It 'll be greate if some one respond with the details.
    Thanks
    Raja

    Thanks for ur info.Is this 'CR122524_81sp1.jar' available from bea site?
    Regards
    Raja
    "Deepak Vohra" <[email protected]> wrote:
    >
    >
    CR122524_81sp1.jar
    is required if a table has a underscore(_).
    "raja" <[email protected]> wrote:
    Hi,
    I'm evaluating WL8.1.I'm able to deploy session beans & MDBs & testsuccessfully.Similarly
    , I' m able to deploy entity beans but, not able to test it successfully.It
    says
    there was a problem in identifying the bean using the specified JNDI
    name.The
    underlying table name contains '_'(underscorre).Does this create problem.Is
    there
    any patch for this from bea?
    It 'll be greate if some one respond with the details.
    Thanks
    Raja

  • Problem with transaction with Entity Beans in R2

    I had a transaction (initiated by a session bean (requires new)) that takes two entity beans (two bank accounts) and trasfer funds from one to another. It looks like the container is waiting for the transaction, i don't know, here comes the exception I get (this code used to work with a lot of simultaneous clients with R1) :
    com.evermind.server.ejb.TimeoutExpiredException: timeout expired waiting for an instance
    at com.evermind.server.ejb.DBEntityWrapperPool.getWrapperInstance(DBEntityWrapperPool.java:189)
    at com.evermind.server.ejb.DBEntityEJBHome.getWrapperInstance(DBEntityEJBHome.java:135)
    error: Remote: Database error, IO failure: com.evermind.server.rmi.OrionRemoteException: Error enlisting connection resource: javax.transaction.RollbackException: The transaction has been marked for rollback (timed out); nested exception is:
    javax.transaction.RollbackException: The transaction has been marked for rollback (timed out); nested exception is:
    com.evermind.server.rmi.OrionRemoteException: Error enlisting connection resource: javax.transaction.RollbackException: The transaction has been marked for rollback (timed out); nested exception is:
    javax.transaction.RollbackException: The transaction has been marked for rollback (timed out)
    above goes the ejb-jar.xml
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.2//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_2.dtd">
    <ejb-jar>
    <description>
    </description>
    <enterprise-beans>
    <session>
    <description>
    </description>
    <ejb-name>ContaFacadeEJB</ejb-name>
    <home>contacorrente.ContaFacadeHome</home>
    <remote>contacorrente.ContaFacade</remote>
    <ejb-class>contacorrente.ContaFacadeBean</ejb-class>
    <ejb-ref>
    <ejb-ref-name>ContaCorrenteEJB</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <home>contacorrente.ContaCorrenteHome</home>
    <remote>contacorrente.ContaCorrente</remote>
    </ejb-ref>
    </session>
    <entity>
    <description>
    </description>
    <ejb-name>ContaCorrenteEJB</ejb-name>
    <home>contacorrente.ContaCorrenteHome</home>
    <remote>contacorrente.ContaCorrente</remote>
    <ejb-class>contacorrente.ContaCorrenteBean</ejb-class>
    <primkey-class>java.lang.String</primkey-class>
    <reentrant>True</reentrant>
    <persistence-type>Container</persistence-type>
    <cmp-field><field-name>id_conta</field-name></cmp-field>
    <cmp-field><field-name>saldo</field-name></cmp-field>
    <cmp-field><field-name>senha</field-name></cmp-field>
    <primkey-field>id_conta</primkey-field>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>ContaFacadeEJB</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>RequiresNew</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>ContaCorrenteEJB</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Mandatory</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    and the code of the beans (just the method used)
    Entity (account)
    public void debita(double valor) throws ContaCorrenteException
    double saldoOld=saldo;
    saldo=saldo-valor;
    if (saldo<0)
    throw new ContaCorrenteException("Saldo insuficiente:"+saldoOld);
    Session :
    public void transfere(String idConta1, String idConta2, double valor, String senha) throws ContaCorrenteException
         try
    Context cx=new InitialContext();
    Object homeObject=cx.lookup("java:comp/env/ContaCorrenteEJB");
    ContaCorrenteHome home=(ContaCorrenteHome) PortableRemoteObject.narrow(homeObject,ContaCorrenteHome.class);
    ContaCorrente c1=null;
    ContaCorrente c2=null;
    try
    c1=home.findByPrimaryKey(idConta1);
    c2=home.findByPrimaryKey(idConta2);
    if (!c1.getSenha().equals(senha)) { throw new ContaCorrenteException("Senha incorreta");}
    catch(FinderException e)
    System.out.println("erro ao localizar conta :"+e.getMessage());
    context.setRollbackOnly();
    throw new ContaCorrenteException("Conta inexistente");
    catch(java.rmi.RemoteException e)
    System.out.println("erro Remote: "+e.getMessage());
    context.setRollbackOnly();
    throw new ContaCorrenteException("Erro ao conectar objeto remoto");
    try
    c1.debita(valor);
    c2.credita(valor);
    catch(ContaCorrenteException e)
    context.setRollbackOnly();
    throw new ContaCorrenteException(e.getMessage());
    catch(java.rmi.RemoteException e)
    throw new ContaCorrenteException("Erro de conexco");
         catch (NamingException e)
    System.out.println("erro de localizagco:"+e.getMessage());
    throw new ContaCorrenteException("Erro de acesso remoto na localizacao da conta");
    please, someone help me...
    Thanks in advance

    I forgot : when i try to shut the server down i get the message :
    Shutting down...
    Error serializing bean: Deadlock detected, timing out call after 15 seconds wait for transaction [Transaction d9:fa:4f:b6:ff:ff:ff:ff:4a:0:0:0:0:0:0:0:0:4b:0:ec:6d:ce:c0:16]
    Error serializing bean: Deadlock detected, timing out call after 15 seconds wait for transaction [Transaction d9:fa:4f:b6:ff:ff:ff:ff:4c:0:0:0:0:0:0:0:0:4d:0:ec:6d:d2:d9:d2]
    Error serializing bean: Deadlock detected, timing out call after 15 seconds wait for transaction [Transaction d9:fa:4f:b6:ff:ff:ff:ff:4e:0:0:0:0:0:0:0:0:4f:0:ec:6d:d4:21:a3]
    and it doesn't shutdown.

  • Problems deploying entity beans with local interfaces on Jboss?

    I'm trying to deploy a simple entity bean using local interfaces on Jboss 3.2.1 and I obtain the following exception:
    19:08:51,875 WARN [verifier] EJB spec violation:
    Bean : UsersEJB
    Section: 9.2.2
    Warning: The entity bean class must not be defined as abstract.
    19:08:51,875 WARN [verifier] EJB spec violation:
    Bean : UsersEJB
    Section: 9.4.7.1
    Warning: The primkey-field element must name a public field in the bean implemen
    tation class.
    Any idea?
    Thanks,
    Marco

    I guess you are missing <cmp-version>2.x</cmp-version> for your first warning and <primkey-field>primary key field </primkey-field> for you second warning in your ejb-jar.xml

  • Strange behavior with entity beans and servlets in a cluster

    We have 2 WebLogic 4.5.1 servers in a cluster with none of the Service
              Packs installed. When a client uses the deployed entity beans or
              servlets they work every other time. The times they do not work nothing
              happens. No exceptions, no responses to the client ( i.e. HTTP 404s ),
              nothing. I suspect something in the cluster setup since we do not have
              these same problems on non-clustered entity beans or servlets. We have
              made sure all the entity beans have the Shared Database flag set on and
              added the delayUpdatesUntilEndOfTx false to the enviroment of the DD.
              That didn't fix the problem. Any ideas?
              Thanks in advance,
              Dallas Dempsey
              DEM - Houston, TX
              

    Do you have log files?
              - Prasad
              Chris Dempsey wrote:
              > We have 2 WebLogic 4.5.1 servers in a cluster with none of the Service
              > Packs installed. When a client uses the deployed entity beans or
              > servlets they work every other time. The times they do not work nothing
              > happens. No exceptions, no responses to the client ( i.e. HTTP 404s ),
              > nothing. I suspect something in the cluster setup since we do not have
              > these same problems on non-clustered entity beans or servlets. We have
              > made sure all the entity beans have the Shared Database flag set on and
              > added the delayUpdatesUntilEndOfTx false to the enviroment of the DD.
              > That didn't fix the problem. Any ideas?
              >
              > Thanks in advance,
              > Dallas Dempsey
              > DEM - Houston, TX
              

  • Problem with CMP bean and MySQL: please help me!!!

    Hi,
    I am using J2EE Sun server 1.3 and Mysql 4.0 database with its MySQL Connector/J 3.0.
    The driver connection to the database is fine since "Generate Default SQL" in deploytool gives "SQL generation complete".
    However, I can't have a simple row with one text field called test being created in my mysql table called test.
    Of course , the mysql server is started and the test table set for use.
    Here is my code (I try to access my database from a servlet using a CMP Entity bean):
    try{
    Context initial = new InitialContext();
    Object objref = initial.lookup(EntityHome.JNDI_NAME);
    EntityHome home = (EntityHome)PortableRemoteObject.narrow(objref,EntityHome.class);     
    Entity test= home.create("zob");               
    /*EntityHome home = (EntityHome)PortableRemoteObject.narrow(objref,EntityHome.class);     
    catch (Exception ex){                                                                out.println("exception message : " + ex.getMessage()+"</body></html>");}
    I get the following exception message :
    RemoteException occurred in server thread; nested exception is: java.rmi.RemoteException: nested exception is: java.sql.SQLException: Syntax error or access violation, message from server: "You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '"EntityCMPTable" WHERE "test" = 'zob'' at line 1"; nested exception is: java.sql.SQLException: Syntax error or access violation, message from server: "You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '"EntityCMPTable" WHERE "test" = 'zob'' at line 1"
    I would be very grateful for help since I have a close deadline for this!!!!!!!!
    Thank you very much in advance dear java experts!!!!!!!
                                       

    Hallo
    I have the same problem and the same configuration.
    Do you have a solution for this problem ??
    Thanks
    Georg

  • Jprobe Memory Debugger with Entity Bean

    hi,
    I m testing an EJB application(Bean Managed) using Jprobe Memory debugger.
    While testing it gives me that objects referred by entity bean are loitering . for eg if somewhere in my code i created an integer using new Integer and if I m letting it passed to ejbCreate .then that object is pointed as loitering while debugging. further it happens with srtring and data access Objects and otheres as well.
    so is there a memory Leak or The debugger is handling the entity bean in such a way.
    version of jprobe used is 5.2.3 on windows
    Please provide me help regarding the same

    Actually, what one or the developers in my group found out is two things:
    1) The clone is a shallow copy.They copy the references but not objects themselves. This has been causing problems for us.
    2) It seems that you don't work on a copy and you work on the original and they keep a copy. Now, this is fine IF you don't have multiple threads working on the same Entity bean and we moved our application from Weblogic where it throws an exception if that Entity bean is in use to OC4J which is suppose to copy the bean and doesn't so you have multiple threads possibly modifying the same object.

  • Problem with CMP BEAN ON SUN JAVA APPLICATION SERVER 1.3.1

    I am trying to deploy an entity bean with container managed persistence on sun java app. server 1.3.1. When I go for Deploy, the error 'SQL code not generated for following beans' is comming, when verified with verifier tool, the error shown is 'transaction attributes are not specified' , What should be the problem ?

    Which appserver are you using exactly? the J2EE 1.3.1 RI, SJAS 7.0, SJSAS 7.1....etc
    You need to make sure for that you have specified the correct deployment attributes for your CMP methods. You can pull the ear/jar into deploytool and review it there

  • Is there a problem with Entity EJBs on 8.1.7?

    Oracle 8.1.7 on Solaris 7:
    Bean Managed persistence:
    TX Attribute - Required:
    UserTransaction bound into JNDI:
    I have tried numerous times and numerous ways to get my Entity beans working. Ejbs that represent tables with 3 columns work fine, but another EJB with 15 columns doesn't - ejbCreate, ejbFindByPrimaryKey work fine, but whenever make some changes and subsequently commit, ejbStore doesn't execute, I even had my client sleep for 15 secs, but still nothing. I know there is a problem with deploying EJBs using JDeveloper 3.2, but I have deployed all these EJBs using deployejb command line tool on the server itself!
    We are right now trying to find out whether Oracle is our right choice for EJBs, any input is highly appreciated.
    Thanks in Advance.
    Ashish.

    Upon further investigation this is what I have found:
    1. Created another EJB for the 15 column table, but this time represented just 3 of its columns - so I have 3 instance variables in the Bean, and a getter/setter method for each except a setter for the primary key.
    2. Undoubtedly it worked fine.
    3. Increased the number of columns to 4 and GUESS WHAT, upon calling setXXX for the newly added setter method and committing, it started failing, the value just wouldn't change in the DB. But when I call all the setXXX methods, it works just fine, I finally narrowed it down to just 1 setXXX method, if I use this method with any other setXXX methods, all the values get updated, otherwise none of them get updated.
    CLEARER PICTURE:
    Supposing I have the following instance variables in the Bean:
    String id;
    String dt;
    String vol;
    String price;
    String beg_day;
    String end_day;
    and the following get/set methods
    String getId()
    String getDt()
    String setDt()
    String getVol()
    String setVol()
    String getPrice()
    String setPrice()
    String getBeg_day()
    String setBeg_day()
    String getEnd_day()
    String setEnd_day()
    Now if I do the following:
    HomeInterface hm = ...JNDI lookup
    UserTransaction ut = ...JNDI lookup
    ut.begin();
    RemoteInterface rm = hm.findByPrimaryKey("1");
    rm.setBeg_day("01-DEC-00");
    ut.commit();
    nothing happens, the date in the underlying table is still the same, BUT.....
    if I do this:
    ut.begin();
    rm = hm.findByPrimaryKey("1");
    rm.setDt("01-DEC-00");
    rm.setBeg_day("01-DEC-00");
    ut.commit();
    IT WORKS..... using setDt() with any other method works for that setXXX method also...
    Anybody experience this at all.....
    Thanks in advance for your help.
    Ashish.
    PS: setDt() is the last method in the stBean.java file with the maximum __method_index, does that make any difference??

  • Problems with Enterprise Beans

    I am trying to deploy a simple CMP Entity Bean (without relationships, only 3 fields).
    The code is based on The J2EE Tutorial from Sun lesson "Container-Managed Persistence Examples".
    I current use JDK 1.4.0 and JDeveloper Preview 9.0.3.988.
    My project compiles OK, the EJB-JAR file is OK but when I deploy it I receive to OC4J I receive this:
    error: Invalid class file format in C:\ojd9i\j2ee\home\applications\TpProgramaApp\TpProgramaEJB.jar(com/parceria/ejb/TpProgramaLocalHome.class). The major.minor version '48.0' is too recent for this tool to understand.
    I tried to deploy it to J2EE RI but a strange error message is displayed at verifier tool:
    Error : Primary key field set accessor method [ cdTpPrograma ] is exposed through the remote interface [com.parceria.ejb.TpProgramaLocal ].
    (I dont have Remote Interfaces)
    What might be wrong?
    Could be the JDK Version?
    Tanks in advance
    Rafael

    I corrected the datasource missing information.
    In orion-ejb-jar.xml I filled the data source information for my Entity bean as: "jdbc/ParceriaDBDS" where ParceriaDB is the name of my connection to Oracle database in the JDeveloper environment.
    However when I try to deploy I receive this message:
    ---- Deployment started. ---- 21/10/2002 12:12:21
    Wrote EJB JAR file to J:\menu\TpPrograma\deploy\Oracle\TpPrograma.jar
    Wrote EAR file to J:\menu\TpPrograma\deploy\Oracle\TpPrograma.ear
    Invoking OC4J admin tool...
    C:\ojd9i\jdk\jre\bin\javaw.exe -jar C:\ojd9i\j2ee\home\admin.jar ormi://rafael/ admin **** -deploy -file J:\menu\TpPrograma\deploy\Oracle\TpPrograma.ear -deploymentName TpPrograma
    Auto-unpacking C:\ojd9i\j2ee\home\applications\TpPrograma.ear... done.
    Auto-deploying TpPrograma (Assembly had been updated)...
    SQL error: Excegco de E/S: The Network Adapter could not establish the connection
    SQL error: Excegco de E/S: The Network Adapter could not establish the connection
    Error creating table: Excegco de E/S: The Network Adapter could not establish the connection
    Exit status of OC4J admin tool (-deploy): 0
    Elapsed time for deployment: 1 minute, 51 seconds
    ---- Deployment finished. ---- 21/10/2002 12:14:13
    After, I executed this command at windows command line:
    C:\ojd9i\j2ee\home>java -jar admin.jar ormi://rafael/ admin admin -application TpPrograma -listDataSource
    DataSource info:
    Location : jdbc/ParceriaDBCoreDS
    ClassName : com.evermind.sql.DriverManagerDataSource
    URL : jdbc:oracle:thin:@zeus:1521:PARC
    ConnDriver : oracle.jdbc.driver.OracleDriver
    Username : parceria
    Pooled location : jdbc/ParceriaDBPooledDS
    XA location : jdbc/xa/ParceriaDBXADS
    EJB location : jdbc/ParceriaDBDS
    Inactivity timeout : 30
    Connect retry interval : 1
    Max connections : 0
    Min connections : 0
    Max connect attempts : 3
    Wait timeout : 60
    Location : jdbc/xa/ParceriaDBXADS
    ClassName : com.evermind.sql.DriverManagerXADataSour
    ce
    Source location : jdbc/ParceriaDBCoreDS
    Inactivity timeout : 30
    Connect retry interval : 1
    Max connections : 0
    Min connections : 0
    Max connect attempts : 3
    Wait timeout : 60
    Location : jdbc/ParceriaDBPooledDS
    ClassName : com.evermind.sql.OrionPooledDataSource
    Source location : jdbc/ParceriaDBCoreDS
    Inactivity timeout : 30
    Connect retry interval : 1
    Max connections : 0
    Min connections : 0
    Max connect attempts : 3
    Wait timeout : 60
    Location : jdbc/ParceriaDBDS
    ClassName : com.evermind.sql.OrionCMTDataSource
    URL : jdbc:oracle:thin:@zeus:1521:PARC
    Pooled location : jdbc/ParceriaDBPooledDS
    XA source location : jdbc/xa/ParceriaDBXADS
    Inactivity timeout : 30
    Connect retry interval : 1
    Max connections : 0
    Min connections : 0
    Max connect attempts : 3
    Wait timeout : 60
    Note that the jdbc/ParceriaDBDS was listed and in JDeveloper environment I get the connection with no problems.
    Any tip...
    Thanks in advance
    Rafael

Maybe you are looking for

  • Closing Report Preview window closes all parent windows

    I have a form 6.0 calling a report 6.0 with several user parameters using run_report_object in preview mode. After the finishing previewing, the user closes the report preview window. Then the preview window closes all the parent windows. Need help!

  • How do I move an entire app to a dual monitor? Not just a window?

    How do I move an entire app to a dual monitor? Not just a window? I can drag single windows, but if I move a window to the second monitor and hit a button, like 'New', that opens a new window, then it opens the window in the first monitor. I want it

  • Automatic clearing in EBS

    Hi All When I am uploading the statement in FEBP through IDOC, I am getting error" F5263, difference is too large to clear". and not able to clear the posting are 2 i.e. subledger clearing not happening. If any come acrossed the same situation reques

  • All Photo's GONE

    I went to add a few more pic's to my iPad and noticed my entire iPhoto Library is empty (i synched my iPad just a few days ago and all of my pics were there - 6 years worth of my children growing up). At first I thought no big deal since I am running

  • Email Inbox Missing!

    When I try to open email, no messages older than today are in there since the first time messages were checked. They're all just....gone. Not in any other folder. Can I get them back?