problem in installing jar on websphere


EJB programming & troubleshooting: problem in installing jar on websphere

  1. problem in installing jar on websphere (3 messages)

    I am trying to learn EJB using Websphere application server.I have my home,remote, bean and deployment descriptor in C:\EJB and client classes lies in C:\EJBClient.Now I putted home,remote ,bean and deployment descriptor in a jar file and trying to install this jar on websphere and it gives following error:

    The EAR file could be corrupt and/or incomplete.

    Please help me!!
  2. Probably i would appreciate if u could provide with more details on what u actually did. However I would suggest following a simple tutorial for weblogic
    EJB and then trying to take it from there.
  3. I am using Websphere and I took some sample code from this server and putted home,remote interfaces ,bean class and deployment descriptor from their samples in C:\EJB.This sample code is a calculator .I created jar file by issuing following command from c prompt:
    C:\>jar cf test1.jar EJB\*.class EJB\ejb-jar.xml(My home,remote and bean class files are in C:\EJB and ejb-jar.xml(deployment descriptor) is also in same directory)
    Here is my ejb-jar.xml:(When I try to install test1.jar on websphere then it gives error).

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "">
       <ejb-jar id="ejb-jar_ID">
          <description>Basic Calculator Stateless Session EJB</description>
          <display-name>Basic Calculator EJB Module</display-name>
             <session id="Session_1">
                <description>Basic Calculator to add, subtract, multiply, divide</description>
                <display-name>Basic Calculator Stateless Session</display-name>
          <assembly-descriptor id="AssemblyDescriptor_1">
             <container-transaction id="MethodTransaction_1">
                <method id="MethodElement_1">
  4. I would suggest you to use sophisticated way of creating ejb jar using WSAD if it is for websphere. Because there can be numerous other things might causing problem in the creation of ur ejb jar. Your deployment description looks perfect. May be problem is in generation of deployed code.
      Simply, drag drop your ejb component in the ejb project in WSAD(resolve dependencies), generate deployed code and export ejb jar and use it for your WAS wherever you want.