1 Reply Latest reply on Oct 31, 2001 12:13 AM by Andreas Schaefer

    javax.naming.NameNotFoundException: StatelessFinancialNeedCa

    shahzad Newbie

      Hi !
      I am in a problem ?
      when i deploy the session bean the jboss doesnt recognize it properly
      I have made the jar as follows
      jar -cvf myjar.jar F:/j2eebook/Chapter19/Stateless/finCalc/stateless/*.class F:/j2eebook/Chapter19/Stateless/META-INF/*.xml F:/j2eebook/Chapter19/Stateless/finCalc/stateless/*.java

      When i run the client by setting all classpath
      it will through this exception

      javax.naming.NameNotFoundException: StatelessFinancialNeedCalculator not bound at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)

      What should i do please help me.
      When i deploy the jar downloaded from the wrox site it works well and session bean's method is invoked but when i make a jar the problem occurs

        • 1. Re: javax.naming.NameNotFoundException: StatelessFinancialNe
          Andreas Schaefer Apprentice

          I think your problem is how you create the JAR file. I believe that all your files you specifies are packed in the root directory of the JAR file. At tlest the XML deployment descriptors must be added into the META-INF subdirectory. To test is just take your myjar.jar file and expand it with "jar -xvf myjar.jar". You will then see the directory structure in you current directory.

          Just from here I would guess you have to do the following (assuming that the EJBs are in the package "finCalc.stateless"):
          - switch to drive F:
          - change directory to "/j2eebook/Chapter19/Stateless"
          - create your JAR file with "jar -cvf myjar.jar finCalc META-INF"

          This will add all the files in the directory finCalc and META-INF into the JAR file and keep the directory structur in the JAR file.

          Have fun