Entity bean and inserting into mysql database problem


EJB programming & troubleshooting: Entity bean and inserting into mysql database problem

  1. Hi,
    Can someone help me understand what is wrong with my entity bean please?
    I built a container managed bean using JBuilder6 and when I tried to insert a row into mysql database, I got this output..

    -- Initializing bean access.
    -- Succeeded initializing bean access.
    -- Execution time: 982 ms.
    -- Calling create(simpletest, mydetail)
    -- Succeeded: create(simpletest, mydetail)
    -- Execution time: 190 ms.
    -- Return value from create(simpletest, mydetail): Example1:simpletest.

    The bean works fine so far but when I check the database, it was not added. When I insert the same row a second time, I recieved a duplicate primary key error message. I am puzzled.
    Thanks beforehand for your help.

  2. Try downloading in installing a copy of p6spy http://www.p6spy.com/ (it's free)

    It lets you see the JDBC being sent to the DB, and is really helpful in debugging these kind of problems.

  3. Hi ,
    Sorry for posting this nonrelavent question here .
    I am runing sqlserver7.0 and weblogic 6.1 on same machine .
    I am not able to make database pool.
    plz anybody can help me out to solve this problem .