Creating .jar file using weblogic 5.1.0???

Discussions

EJB programming & troubleshooting: Creating .jar file using weblogic 5.1.0???

  1. Creating .jar file using weblogic 5.1.0??? (4 messages)



    hi,
        i encountered an error while creating the jar file using ejb deployer tool in weblogic 5.1.0..

    the error message at console says:

    java.lang.ClassNotFoundException: Unable to load any class from file "C:/ejb/demo/Demo.class"
    at weblogic.ejb.ui.jarbuilder.FileMap.loadPrimaryClass(FileMap.java, Compiled Code)
    at weblogic.ejb.ui.jarbuilder.FileMap.loadFile(FileMap.java:131)
    at weblogic.ejb.ui.jarbuilder.FileMap.<init>(FileMap.java:71)
    at weblogic.ejb.ui.jarbuilder.FileSet.addFiles(FileSet.java, Compiled Code)
    at weblogic.ejb.ui.jarbuilder.EJBJarSpec.newFileList(EJBJarSpec.java, Compiled Code)
    at weblogic.ejb.ui.deployer.ProviderProject.newFileSet(ProviderProject.java:772)
    at weblogic.ejb.ui.deployer.ProviderProjectNode.newFileSet(ProviderProjectNode.java, Compiled Code)
    at weblogic.ejb.ui.jarbuilder.FileSupplementDialog.actionPerformed(FileSupplementDialog.java:121)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1066)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1101)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:378)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:204)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:230)
    at java.awt.Component.processMouseEvent(Component.java, Compiled Code)
    at java.awt.Component.processEvent(Component.java, Compiled Code)
    at java.awt.Container.processEvent(Container.java, Compiled Code)
    at java.awt.Component.dispatchEventImpl(Component.java, Compiled Code)
    at java.awt.Container.dispatchEventImpl(Container.java, Compiled Code)
    at java.awt.Component.dispatchEvent(Component.java, Compiled Code)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java, Compiled Code)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java, Compiled Code)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java, Compiled Code)
    at java.awt.Container.dispatchEventImpl(Container.java, Compiled Code)
    at java.awt.Window.dispatchEventImpl(Window.java, Compiled Code)
    at java.awt.Component.dispatchEvent(Component.java, Compiled Code)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java, Compiled Code)
    at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java, Compiled Code)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:92)
    at java.awt.Dialog.show(Dialog.java:365)
    at java.awt.Component.show(Component.java:834)
    at java.awt.Component.setVisible(Component.java:796)
    at weblogic.ejb.ui.deployer.ProviderProjectNode.addRemoveFiles(ProviderProjectNode.java:111)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.ejb.ui.common.Action.actionPerformed(Action.java:84)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1066)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1101)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:378)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:226)
    at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(BasicMenuItemUI.java:754)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:230)
    at java.awt.Component.processMouseEvent(Component.java, Compiled Code)
    at java.awt.Component.processEvent(Component.java, Compiled Code)
    at java.awt.Container.processEvent(Container.java, Compiled Code)
    at java.awt.Component.dispatchEventImpl(Component.java, Compiled Code)
    at java.awt.Container.dispatchEventImpl(Container.java, Compiled Code)
    at java.awt.Component.dispatchEvent(Component.java, Compiled Code)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java, Compiled Code)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java, Compiled Code)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java, Compiled Code)
    at java.awt.Container.dispatchEventImpl(Container.java, Compiled Code)
    at java.awt.Window.dispatchEventImpl(Window.java, Compiled Code)
    at java.awt.Component.dispatchEvent(Component.java, Compiled Code)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java, Compiled Code)
    at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java, Compiled Code)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:92)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:83)


    i have all the class files in c:\ejb\demo directory...

    what's wrong?? pls. hlp...

    thanX in adv.
    Ganesh
  2. First create a jar file containing your class files and a directory named "META-INF", containing the xml files ejb-jar.xml and weblogic-ejb-jar.xml. Then create the jar file you are trying to create. If you have any futher doubts, go to:

    http://www.weblogic.com/docs51/intro/intro_ejb.html

    Then find "Running the Emp Example" and go through the steps 1-10 in that.

    Hope this helps,
    Pushkar.
  3. Hi pushkar,
                 it was a really good link...thanx..

    ganesh
  4. Hi,
        when i compile my Home interface i get a error msg like the one below..


    C:\ejb\demo>javac DemoHome.java
    DemoHome.java:22: cannot resolve symbol
    symbol : class Demo
    location: interface ejb.demo.DemoHome
        Demo create() throws CreateException, RemoteException;
        ^
    1 error

    what is this error??? my current directory is in my classpath..

    ThanX in adv.
    Ganesh
  5. did you compile Demo.java to Demo.class ?
    it can't find Demo Interface.

    try javac -classpath . *.java

    good luck.