2 Replies Latest reply on Nov 28, 2003 5:44 AM by Andy Torble

    (another) comp not bound

    Andy Torble Newbie

      Hi people,

      This is my first post on these forums and I'm aware that much has been discussed on this subject in the past but none of the solutions fits in my case.

      Some background:
      IDE JDeveloper 10g
      JBoss 3.2.2
      DB Oracle 9i

      Problem:
      Using Oracle ADF with a Bean Application Module (EjbTestAppModule) which contains a single Bean View (UsersView) which references a single Bean Facade (UsersFacade) which references a single EJB (Users). The Bean Appliation Module is implemented as a Stateful Container Managed Session Bean (EjbTestAppModuleBMBean). Eveything packages ok and deploys without errors and shows in JMX Console as being bound to the Global JNDI Namespace thus:
      +- EjbTestAppModule (proxy: $Proxy62 implements interface t2consulting.co.uk.utx.model.common.ejb.beanmanaged.EjbTestAppModuleHome,interface javax.ejb.Handle)
      +- local (class: org.jnp.interfaces.NamingContext)
      | +- Users (proxy: $Proxy60 implements interface t2consulting.co.uk.utx.model.UsersLocalHome)


      I created a test panel to display data in a JTable. When I run the test app I receive 'comp not bound' (Stack trace below). Debugging the client I see that there is a lookup for 'java:/comp/env/ejb/Users' , but my understaning is that this is not allowed from outside the JBoss VM. To be honest I'm not even sure why the lookup is happening as I was expecting the client to converse only with the session bean. As you can see from the trace the Oracle libs are doing most of the work and actually issue the call for the lookup.

      Has anyone else used ADF in this way with success or can anyone deduce a more generic problem.

      Thanks to all in advance (sorry it was soooo long!)

      Regards
      Andy


      Stack Trace
      --------------

      javax.naming.NameNotFoundException: comp not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
      at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
      at org.jnp.server.NamingServer.lookup(NamingServer.java:253)
      at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
      at sun.rmi.transport.Transport$1.run(Transport.java:148)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
      at java.lang.Thread.run(Thread.java:536)
      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
      at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:528)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at oracle.jbo.server.EntityDefImpl.lookupEJBHome(EntityDefImpl.java:3423)
      at oracle.jbo.server.EntityDefImpl.loadFromXML(EntityDefImpl.java:2379)
      at oracle.jbo.server.EntityDefImpl.loadFromXML(EntityDefImpl.java:2102)
      at oracle.jbo.server.MetaObjectManager.loadFromXML(MetaObjectManager.java:499)
      at oracle.jbo.mom.DefinitionManager.loadLazyDefinitionObject(DefinitionManager.java:469)
      at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:320)
      at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:278)
      at oracle.jbo.server.MetaObjectManager.findMetaObject(MetaObjectManager.java:643)
      at oracle.jbo.server.EntityDefImpl.findDefObject(EntityDefImpl.java:328)
      at oracle.jbo.server.ViewDefImpl.addEntityUsage(ViewDefImpl.java:2560)
      at oracle.jbo.server.ViewDefImpl.loadEntityReference(ViewDefImpl.java:2628)
      at oracle.jbo.server.ViewDefImpl.loadFromXML(ViewDefImpl.java:1931)
      at oracle.jbo.server.ViewDefImpl.loadFromXML(ViewDefImpl.java:1765)
      at oracle.jbo.server.MetaObjectManager.loadFromXML(MetaObjectManager.java:503)
      at oracle.jbo.mom.DefinitionManager.loadLazyDefinitionObject(DefinitionManager.java:469)
      at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:320)
      at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:278)
      at oracle.jbo.server.MetaObjectManager.findMetaObject(MetaObjectManager.java:643)
      at oracle.jbo.server.ViewDefImpl.findDefObject(ViewDefImpl.java:369)
      at oracle.jbo.server.ApplicationModuleImpl.createViewObject(ApplicationModuleImpl.java:2798)
      at oracle.jbo.server.ApplicationModuleDefImpl.loadComponents(ApplicationModuleDefImpl.java:359)
      at oracle.jbo.server.ApplicationModuleImpl.createRootApplicationModule(ApplicationModuleImpl.java:356)
      at oracle.jbo.server.ApplicationModuleHomeImpl.create(ApplicationModuleHomeImpl.java:91)
      at oracle.jbo.common.ampool.DefaultConnectionStrategy.createApplicationModule(DefaultConnectionStrategy.java:135)
      at oracle.jbo.common.ampool.DefaultConnectionStrategy.createApplicationModule(DefaultConnectionStrategy.java:76)
      at oracle.jbo.common.ampool.ApplicationPoolImpl.instantiateResource(ApplicationPoolImpl.java:2124)
      at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:515)
      at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1646)
      at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2488)
      at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:434)
      at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:405)
      at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:400)
      at oracle.adf.model.bc4j.DataControlFactoryImpl.createSession(DataControlFactoryImpl.java:255)
      at oracle.adf.model.bc4j.DataControlFactoryImpl.createSession(DataControlFactoryImpl.java:93)
      at oracle.jbo.uicli.mom.JUMetaObjectManager.loadCpx(JUMetaObjectManager.java:543)
      at t2consulting.co.uk.utx.view.FormUsersView1.main(FormUsersView1.java:331)




        • 1. Re: (another) comp not bound
          jamesstrachan Newbie

          Andy,

          Your problem is obviously somewhere in the layers of code that the Oracle development tool generates.

          My experience is that these Oracle tools are difficult to apply to any real world situation (great for sales demos), and are hampered by being tied very closely to the structure of the underlying database.

          So, rather than solve your problem directly, I attach a complete example of User Maintenance with a Swing client accessing a session bean which in turn accesses the database.

          This won't work out of the box as it uses some library modules that I haven't included, but you may be able to use it as a pattern for your own work.

          James

          • 2. Re: (another) comp not bound
            Andy Torble Newbie

            James,

            Many thanks for the reply.

            Further investigations on my part confirm your suspicions as it appears that the ADF libraries will only recongise remote connections to 9iAS or Weblogic, all others are considered local (hence the com/enc lookup). I've raised this with Oracle and they are looking at it.

            In the meantime I'll take a look at your example code and plan a way forward.

            Again, thanks for your time. Much appreciated.

            Regards
            Andy