2 Replies Latest reply on Feb 8, 2005 3:05 PM by Steven Guy

    "MyCustomerController not bound" error with ant target "run-

    Steven Guy Newbie

      I have successfully deployed the DukesBanking application. It works fine via the web interface. When I try to run the swing client, it fails to properly find the ejbs in the client's jndi space. I looked in the jmx-console and everything looks like it is registered. The server log looks fine too. Any ideas?

      I'm using Jboss 4.01 and java version "1.4.2_06"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
      Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)

      jndi tree snippet (from jboss jmx console):
      ===========================================
      +- ebankNextId (proxy: $Proxy99 implements interface com.sun.ebank.ejb.util.LocalNextIdHome)
      +- bank-client (class: org.jnp.interfaces.NamingContext)
      | +- ejb (class: org.jnp.interfaces.NamingContext)
      | | +- customerController[link -> MyCustomerController] (class: javax.naming.LinkRef)
      | | +- accountController[link -> MyAccountController] (class: javax.naming.LinkRef)


      ant log follows:
      ===========================================

      /c/temp/j2eetutorial14/examples/bank $ant -debug -f jboss-build.xml run-client
      Apache Ant version 1.6.2 compiled on July 16 2004
      Buildfile: jboss-build.xml
      Adding reference: ant.PropertyHelper
      Detected Java version: 1.4 in: c:\Tools\Java\Java_1.4.2_06\jre
      Detected OS: Windows XP
      Adding reference: ant.ComponentHelper
      Setting ro project property: ant.version -> Apache Ant version 1.6.2 compiled on July 16 2004
      Setting ro project property: ant.file -> c:\temp\j2eetutorial14\examples\bank\jboss-build.xml
      Adding reference: ant.projectHelper
      Adding reference: ant.parsing.context
      Adding reference: ant.targets
      parsing buildfile C:\temp\j2eetutorial14\examples\bank\jboss-build.xml with URI = file:///C:/temp/j2eetutorial14/examples/bank/jboss-build.xml
      Setting ro project property: ant.project.name -> jboss-dukes-bank
      Adding reference: jboss-dukes-bank
      Setting ro project property: ant.file.jboss-dukes-bank -> C:\temp\j2eetutorial14\examples\bank\jboss-build.xml
      Project base dir set to: C:\temp\j2eetutorial14\examples\bank
      +Target:
      Adding reference: client.classpath
      Adding reference: axis.classpath
      Adding reference: build.classpath
      Adding reference: hsql.classpath
      +Target: prepare
      +Target: compile
      +Target: package-ejb
      +Target: package-ws
      +Target: package-client
      +Target: package-web
      +Target: wsdl
      +Target: tcpmon
      +Target: deploy-ws
      +Target: run-ws
      +Target: assemble-app
      +Target: deploy
      +Target: run-client
      +Target: db-create-table
      +Target: db-insert
      +Target: db-list
      +Target: db-delete
      +Target: clean
      +Target: db-all
      +Target: all
      [property] Loading C:\temp\j2eetutorial14\jboss-build.properties
      Setting project property: jboss.server -> C:/Tools/jboss4/jboss-4.0.1-src/build/output/jboss-4.0.1/server/default
      Setting project property: jboss.home -> C:/Tools/jboss4/jboss-4.0.1-src/build/output/jboss-4.0.1
      Setting project property: jboss.deploy.dir -> C:/Tools/jboss4/jboss-4.0.1-src/build/output/jboss-4.0.1/server/default/deploy
      Setting project property: lib.dir -> ../../libs
      Setting project property: src.dir -> C:\temp\j2eetutorial14\examples\bank/src
      Setting project property: build.dir -> C:\temp\j2eetutorial14\examples\bank/build
      Could not load a dependent class (com/sun/media/jai/codec/FileSeekableStream) for type image
      Adding reference: client.classpath
      Could not load a dependent class (com/sun/media/jai/codec/FileSeekableStream) for type image
      Adding reference: axis.classpath
      Could not load a dependent class (com/sun/media/jai/codec/FileSeekableStream) for type image
      Adding reference: build.classpath
      Could not load a dependent class (com/sun/media/jai/codec/FileSeekableStream) for type image
      Adding reference: hsql.classpath
      Build sequence for target `run-client' is [run-client]
      Complete build sequence is [run-client, wsdl, prepare, compile, package-ejb, package-web, package-client, assemble-app, deploy, all, db-insert, db-create-table, db-list, db-all, deploy-ws, run-ws, clean, tcpmon, package-ws, db-delete, ]

      run-client:
      [echo] c:/dev/tools/ant/lib/ant-launcher.jar;c:\temp\j2eetutorial14\examples\bank\c;c:\tools\jintegra\lib\jintegra.jar;c:\dev\tools\ant\lib\ant-antlr.jar;c:\dev\tools\ant\lib\ant-apache-bcel.jar;c:\dev\tools\ant\lib\ant-apache-bsf.jar;c:\dev\tools\ant\lib\ant-apache-log4j.jar;c:\dev\tools\ant\lib\ant-apache-oro.jar;c:\dev\tools\ant\lib\ant-apache-regexp.jar;c:\dev\tools\ant\lib\ant-apache-resolver.jar;c:\dev\tools\ant\lib\ant-commons-logging.jar;c:\dev\tools\ant\lib\ant-commons-net.jar;c:\dev\tools\ant\lib\ant-icontract.jar;c:\dev\tools\ant\lib\ant-jai.jar;c:\dev\tools\ant\lib\ant-jakarta-bcel.jar;c:\dev\tools\ant\lib\ant-jakarta-log4j.jar;c:\dev\tools\ant\lib\ant-jakarta-oro.jar;c:\dev\tools\ant\lib\ant-jakarta-regexp.jar;c:\dev\tools\ant\lib\ant-javamail.jar;c:\dev\tools\ant\lib\ant-jdepend.jar;c:\dev\tools\ant\lib\ant-jmf.jar;c:\dev\tools\ant\lib\ant-jsch.jar;c:\dev\tools\ant\lib\ant-junit.jar;c:\dev\tools\ant\lib\ant-launcher.jar;c:\dev\tools\ant\lib\ant-netrexx.jar;c:\dev\tools\ant\lib\ant-nodeps.jar;c:\dev\tools\ant\lib\ant-starteam.jar;c:\dev\tools\ant\lib\ant-stylebook.jar;c:\dev\tools\ant\lib\ant-swing.jar;c:\dev\tools\ant\lib\ant-trax.jar;c:\dev\tools\ant\lib\ant-vaj.jar;c:\dev\tools\ant\lib\ant-weblogic.jar;c:\dev\tools\ant\lib\ant-xalan1.jar;c:\dev\tools\ant\lib\ant-xalan2.jar;c:\dev\tools\ant\lib\ant-xslp.jar;c:\dev\tools\ant\lib\ant.jar;c:\dev\tools\ant\lib\AntelopeTasks.jar;c:\dev\tools\ant\lib\aspectjrt.jar;c:\dev\tools\ant\lib\aspectjtools.jar;c:\dev\tools\ant\lib\bsf.jar;c:\dev\tools\ant\lib\checkstyle-all-3.1.jar;c:\dev\tools\ant\lib\clover.jar;c:\dev\tools\ant\lib\cpptasks.jar;c:\dev\tools\ant\lib\jdepend.jar;c:\dev\tools\ant\lib\jsch-0.1.16.jar;c:\dev\tools\ant\lib\junit.jar;c:\dev\tools\ant\lib\log4j.jar;c:\dev\tools\ant\lib\statcvs.jar;c:\dev\tools\ant\lib\xalan.jar;c:\dev\tools\ant\lib\xercesImpl.jar;c:\dev\tools\ant\lib\xml-apis.jar;c:\Tools\Java\Java_1.4.2_06\lib\tools.jar
      Could not load a dependent class (com/sun/media/jai/codec/FileSeekableStream) for type image
      Could not load class (org.apache.tools.ant.tasksdefs.cvslib.CvsVersion) for type cvsversion
      fileset: Setup scanner in dir C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client with patternSet{ includes: [**/*.jar] excludes: [] }
      fileset: Setup scanner in dir C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client with patternSet{ includes: [**/*.jar] excludes: [] }
      [java] Executing 'C:\Tools\Java\Java_1.4.2_06\jre\bin\java.exe' with arguments:
      [java] '-classpath'
      [java] 'C:\temp\j2eetutorial14\examples\bank\jar\app-client.jar;C:\temp\j2eetutorial14\examples\bank\build;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\activation.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\avalon-framework.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\axis-ws4ee.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\commons-discovery.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\commons-logging.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\concurrent.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\getopt.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jacorb.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jaxr-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jboss-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jboss-common-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jboss-deployment.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jboss-iiop-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jboss-j2ee.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jboss-jaxrpc.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jboss-jsr77-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jboss-saaj.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jboss-system-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jboss-transaction-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jboss-ws4ee-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jbossall-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jbosscx-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jbossha-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jbossjmx-ant.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jbossmq-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jbosssx-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jmx-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jmx-invoker-adaptor-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jnp-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\log4j.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\logkit.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\mail.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\namespace.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\wsdl4j.jar'
      [java] 'com.sun.ebank.appclient.BankAdmin'
      [java]
      [java] The ' characters around the executable and arguments are
      [java] not part of the command.
      fileset: Setup scanner in dir C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client with patternSet{ includes: [**/*.jar] excludes: [] }
      fileset: Setup scanner in dir C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client with patternSet{ includes: [**/*.jar] excludes: [] }
      Execute:Java13CommandLauncher: Executing 'C:\Tools\Java\Java_1.4.2_06\jre\bin\java.exe' with arguments:
      '-classpath'
      'C:\temp\j2eetutorial14\examples\bank\jar\app-client.jar;C:\temp\j2eetutorial14\examples\bank\build;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\activation.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\avalon-framework.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\axis-ws4ee.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\commons-discovery.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\commons-logging.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\concurrent.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\getopt.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jacorb.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jaxr-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jboss-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jboss-common-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jboss-deployment.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jboss-iiop-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jboss-j2ee.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jboss-jaxrpc.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jboss-jsr77-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jboss-saaj.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jboss-system-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jboss-transaction-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jboss-ws4ee-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jbossall-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jbosscx-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jbossha-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jbossjmx-ant.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jbossmq-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jbosssx-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jmx-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jmx-invoker-adaptor-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\jnp-client.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\log4j.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\logkit.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\mail.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\namespace.jar;C:\Tools\jboss4\jboss-4.0.1-src\build\output\jboss-4.0.1\client\wsdl4j.jar'
      'com.sun.ebank.appclient.BankAdmin'

      The ' characters around the executable and arguments are
      not part of the command.
      [java] javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: MyCustomerController not bound]
      [java] at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:999)
      [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:629)
      [java] at org.jboss.naming.client.java.javaURLContextFactory$EncContextProxy.invoke(javaURLContextFactory.java:120)
      [java] at $Proxy0.lookup(Unknown Source)
      [java] at javax.naming.InitialContext.lookup(InitialContext.java:347)
      [java] at com.sun.ebank.util.EJBGetter.getCustomerControllerHome(EJBGetter.java:69)
      [java] at com.sun.ebank.appclient.DataModel.(DataModel.java:126)
      [java] at com.sun.ebank.appclient.EventHandle.(EventHandle.java:51)
      [java] at com.sun.ebank.appclient.BankAdmin.main(BankAdmin.java:587)
      [java] Caused by: javax.naming.NameNotFoundException: MyCustomerController not bound
      [java] at org.jnp.server.NamingServer.getBinding(NamingServer.java:491)
      [java] at org.jnp.server.NamingServer.getBinding(NamingServer.java:499)
      [java] at org.jnp.server.NamingServer.getObject(NamingServer.java:505)
      [java] at org.jnp.server.NamingServer.lookup(NamingServer.java:278)
      [java] at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [java] at java.lang.reflect.Method.invoke(Method.java:324)
      [java] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
      [java] at sun.rmi.transport.Transport$1.run(Transport.java:148)
      [java] at java.security.AccessController.doPrivileged(Native Method)
      [java] at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      [java] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      [java] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
      [java] at java.lang.Thread.run(Thread.java:534)
      [java] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
      [java] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
      [java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
      [java] at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:544)
      [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:520)
      [java] at javax.naming.InitialContext.lookup(InitialContext.java:347)
      [java] at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:993)
      [java] ... 8 more
      [java] javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: MyAccountController not bound]
      [java] at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:999)
      [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:629)
      [java] at org.jboss.naming.client.java.javaURLContextFactory$EncContextProxy.invoke(javaURLContextFactory.java:120)
      [java] at $Proxy0.lookup(Unknown Source)
      [java] at javax.naming.InitialContext.lookup(InitialContext.java:347)
      [java] at com.sun.ebank.util.EJBGetter.getAccountControllerHome(EJBGetter.java:52)
      [java] at com.sun.ebank.appclient.DataModel.(DataModel.java:135)
      [java] at com.sun.ebank.appclient.EventHandle.(EventHandle.java:51)
      [java] at com.sun.ebank.appclient.BankAdmin.main(BankAdmin.java:587)
      [java] Caused by: javax.naming.NameNotFoundException: MyAccountController not bound
      [java] at org.jnp.server.NamingServer.getBinding(NamingServer.java:491)
      [java] at org.jnp.server.NamingServer.getBinding(NamingServer.java:499)
      [java] at org.jnp.server.NamingServer.getObject(NamingServer.java:505)
      [java] at org.jnp.server.NamingServer.lookup(NamingServer.java:278)
      [java] at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [java] at java.lang.reflect.Method.invoke(Method.java:324)
      [java] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
      [java] at sun.rmi.transport.Transport$1.run(Transport.java:148)
      [java] at java.security.AccessController.doPrivileged(Native Method)
      [java] at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      [java] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      [java] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
      [java] at java.lang.Thread.run(Thread.java:534)
      [java] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
      [java] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
      [java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
      [java] at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:544)
      [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:520)
      [java] at javax.naming.InitialContext.lookup(InitialContext.java:347)
      [java] at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:993)
      [java] ... 8 more