EJB programming & troubleshooting: weblogic.ejbc

  1. weblogic.ejbc (2 messages)

    I am using WEblogic 6.1 and JDK1.3.1_02. I have created the jar file from the class files and then when i run the command :
    java weblogic.ejbc Helloworld.jar myHello.jar
    I get the error:
    Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/ejbc
    The weblogic 6.1 is installed in c:\weblogic
    I have included all the necessary files in the claspath.
    Helloworld.jar is a jar file made of the first HelloWorld example in Roman's book.
    Please help!!!!!!!!
    This is my first EJB and its not working.

    Threaded Messages (2)

  2. weblogic.ejbc[ Go to top ]

    In case of weblogic, ejbc.class file is packaged in weblogic.jar so make sure that your classpath is including weblogic.jar ie the classpath should have the entry like <weblogic_istall_drive>\bea\wlserver6.1\lib\weblogic.jar.

  3. weblogic.ejbc[ Go to top ]

      Include these lines to your autoexec.bat (as last lines) and restart the computer.
    Set classpath=%classpath%; c:\weblogic\lib\weblogicaux.jar; c:\weblogic\lib\weblogicbeans.jar; c:\weblogic\classes; c:\weblogic\lib\jConnect.jar; c:\weblogic\lib\tengahbeans.jar; c:\weblogic\lib\poolorb.jar;.;
    And Create one .bat file in your directory example(c:\hello) using the below commands. Create 3 java files and 2 xml files and run the batch file from the same directory.
    @echo on
    run c:\weblogic\setenv.bat
    set WL_HOME=c:\weblogic
    set JAVAC=javac
    set JAVA=c:\jdk1.2\bin\java -cp %CLASSPATH%
    @echo on
    %JAVAC% *.java
    mkdir ejbtemp
    mkdir ejbtemp\META-INF
    copy *.xml ejbtemp\META-INF
    copy *.class ejbtemp
    cd ejbtemp\
    jar cf jarFileName.jar *.class META-INF
    ejbc -compiler javac jarFileName.jar -d ..\deployedFileName.jar

    Arun James