Discussions

EJB programming & troubleshooting: Package examples.ejb.basic.beanManaged ..could not run client

  1. Hi All,
    Iam trying out this example from weblogic EJB examples. http://www.weblogic.com/docs51/examples/ejb/basic/beanManaged/index.html.
    When i tried to run the client i got the following error
    .................................
    .................................
    Mon Jan 15 10:21:43 CST 2001:<I> <EJB> 3 EJB jar files loaded, containing 3 EJBs
    Mon Jan 15 10:21:43 CST 2001:<I> <EJB> 3 deployed, 0 failed to deploy.
    Mon Jan 15 10:21:43 CST 2001:<I> <ZAC> ZAC ACLs initialized
    Mon Jan 15 10:21:43 CST 2001:<I> <ZAC> ZAC packages stored in local directory exports
    Mon Jan 15 10:21:43 CST 2001:<I> <ListenThread> Listening on port: 7001
    Mon Jan 15 10:21:43 CST 2001:<I> <SSLListenThread> Listening on port: 7002
    Mon Jan 15 10:21:44 CST 2001:<I> <WebLogicServer> WebLogic Server started
    Mon Jan 15 10:24:38 CST 2001:<I> <ListenThread> Adding address: localhost/127.0.0.1 to licensed client list
    Mon Jan 15 10:24:38 CST 2001:<I> <NT Performance Pack> Allocating: '2' NT reader threads
    Mon Jan 15 10:24:40 CST 2001:<I> <ServletContext-General> classes: init
    Mon Jan 15 10:24:41 CST 2001:<E> <Adapter> Exception thrown by rmi server: [-1565199410099431107S192.164.164.196:[7001,7001,7002,7002,7001,-1]/260]
    javax.ejb.EJBException
    at examples.ejb.basic.beanManaged.AccountBean.getConnection(AccountBean.java:396)
    at examples.ejb.basic.beanManaged.AccountBean.ejbFindByPrimaryKey(AccountBean.java:275)
    at examples.ejb.basic.beanManaged.AccountBeanHomeImpl.findByPrimaryKey(AccountBeanHomeImpl.java:81)
    at examples.ejb.basic.beanManaged.AccountBeanHomeImpl_WLSkel.invoke(AccountBeanHomeImpl_WLSkel.java:88)
    at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerObjectAdapter.java, Compiled Code)
    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, Compiled Code)
    .................................
    ................................
    Could anyone please explain me the problem and the possible solution.Hoping to get an early reply from some of u.
    Regards,
    Sony.

  2. You have a RuntimeException in the getConnection() method which is where the bean is trying to get a database connection. Check to make sure that your database connection pool is configured correctly and that the EJB is accessing this connection pool correctly.

    Tyler
  3. Hi,
    Thanks for the response.Now i got it.I didn't uncomment the lines.. weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.demoPool=demoPool
    in my weblogic.properties file.

    Sony.