哥哥阿
把信息都写出来。就这么一句,你去jdk的api里面找NoClassDefFoundError这个异常的解释,看看什么时候出来这个异常,你就知道什么原因了。

解决方案 »

  1.   

    有以下几个步骤:
    1。In a terminal window, go to the j2eetutorial/examples/src/ejb/converter directory. 2。Verify that this directory contains the ConverterApp.ear and ConverterAppClient.jar files. 3。Set the APPCPATH environment variable to ConverterAppClient.jar. 4。Type the following command (on a single line): 
       runclient -client ConverterApp.ear -name ConverterClient 
       -textauth
     5。The client container prompts you to log in. Enter guest for the user name and guest123 for the password. 下面是我的输入以及出现的信息:
    E:\book\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\examples\src\ejb\converter>run
    client -client ConverterApp.ear -name ConverterClient -textauth
    Initiating login ...
    Enter Username:guest
    Enter Password:guest123
    Binding name:`java:comp/env/ejb/SimpleConverter`
    Application threw an exception:java.lang.NoClassDefFoundError: ConverterHome
      

  2.   

    就以下5个步骤:
    1。In a terminal window, go to the j2eetutorial/examples/src/ejb/converter directory. 
    2。Verify that this directory contains the ConverterApp.ear and ConverterAppClient.jar files. 
    3。Set the APPCPATH environment variable to ConverterAppClient.jar. 
    4。Type the following command (on a single line): 
       runclient -client ConverterApp.ear -name ConverterClient 
       -textauth
     5。The client container prompts you to log in. Enter guest for the user name and guest123 for the password. 
    下面是我的输入及输出信息:
    E:\book\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\examples\src\ejb\converter>run
    client -client ConverterApp.ear -name ConverterClient -textauth
    Initiating login ...
    Enter Username:guest
    Enter Password:guest123
    Binding name:`java:comp/env/ejb/SimpleConverter`
    Application threw an exception:java.lang.NoClassDefFoundError: ConverterHome
      

  3.   

    你这个错误是客户端程序无法找到ConvertAppClient.jar文件的类抛出的信息。
    你最好重新按《J2EETutorial》上步骤走一遍。
    我的实验是成功的。