Exception when calling findByPrimaryKey( )

Discussions

EJB programming & troubleshooting: Exception when calling findByPrimaryKey( )

  1. Exception when calling findByPrimaryKey( ) (4 messages)

    I am getting the following exception when I am calling findByPrimaryKey() method on home interface in a bean managed entity bean on weblogic server.

    The exception is as follows:

    java.rmi.RemoteException: ; nested exception is:
            weblogic.rmi.ServerError: A RemoteException occurred in the server method
     - with nested exception:
    [java.lang.NoSuchMethodError:
    Start server side stack trace:
    java.lang.NoSuchMethodError
            at LoginBeanHomeImpl.findByPrimaryKey(LoginBeanHomeImpl.java:57)
            at LoginBeanHomeImpl_WLSkel.invoke(LoginBeanHomeImpl_WLSkel.java:88)
            at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerObjectAdapter.java:338
    )
            at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicRequestHandler.java:69)
            at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:15)
            at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    End server side stack trace
    ]

    Can anybody explain the reason for this.

    Thanks
  2. Hi,
    Did u Check that your database connection pool is configured correctly and that the EJB is accessing this connection pool perfectly.
    Did U uncomment these lines
    weblogic.jdbc.connectionPool.demoPool=\
           url=jdbc:cloudscape:demo,\
           driver=COM.cloudscape.core.JDBCDriver,\
           initialCapacity=1,\
          maxCapacity=2,\
           capacityIncrement=1,\
           props=user=none;password=none;server=none

    By the way did u uncommment these lines also weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.demoPool=demoPool
    weblogic.jdbc.TXDataSource.demoDataSource=demoPool
    weblogic.allow.reserve.weblogic.jdbc.connectionPool.demoPool=everyone

    in your weblogic.properties file.
    Iam not sure..but this should help u..
    Regards
    Pooja



     
  3. I created the connectionpool and registered the datasource.
    The bean is working fine when I call create() method and throw exception when I call findByPrimaryKey().
  4. Hi,


    There will be some problem in u'r primary key class
    If possible send the home interface, bean and primary key code..

    Saran
  5. In your implementation the method name should be prefixed with ejb which probably you haven't done. So it is ejbFindByPrimaryKey....