facebook

Missing ejb-jar, jboss.xml and jbosscmp-jdbc.xml

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #227025 Reply

    alashoofi
    Member

    I have tried this over and over and I’m tired, can’t find anything wrong.

    Tried to use xdoclet to generate and deploy ejb onto JBoss.
    The java class was generated and ran in xdoclet without an error but no ejb-jar.xml nor jboss.xml nor jbosscmp-jdbc.xml was generated in the META-INF directory. There was no error, only a warning that ejb-jar was missing. Here is the SimpleBean.java source:

    /*
    * Created on Mar 22, 2005
    *
    * TODO To change the template for this generated file go to
    * Window – Preferences – Java – Code Style – Code Templates
    */
    package de.laliluna.lernen.simpleBean.ejb;

    import java.rmi.RemoteException;

    import javax.ejb.EJBException;
    import javax.ejb.EntityBean;
    import javax.ejb.EntityContext;
    import javax.ejb.RemoveException;

    /**
    * @ejb.bean name=”Simple”
    * display-name=”Name for Simple”
    * description=”Description for Simple”
    * jndi-name=”ejb/Simple”
    * type=”CMP”
    * cmp-version=”2.x”
    * view-type=”both”
    *
    * primkey-field = “id”
    * @ejb.persistence table-name = “tsimplebean”
    * @jboss.persistence
    */
    public abstract class SimpleBean implements EntityBean {
    /** The EntityContext */
    private EntityContext context;
    /**
    * @ejb.interface-method view-type = “both”
    * @ejb.persistence column-name = “fid”
    * @ejb.pk-field
    *
    * @return
    */
    public abstract String getId();
    /**
    * @ejb.interface-method view-type = “both”
    *
    * @param name
    */
    public abstract void setId(String id);
    /**
    * @ejb.interface-method view-type = “both”
    * @ejb.persistence column-name = “fname”
    *
    * @return
    */
    public abstract String getName();
    /**
    * @ejb.interface-method view-type = “both”
    *
    * @param name
    */
    public abstract void setName(String name);

    /**
    *
    */
    public SimpleBean() {
    super();
    // TODO Auto-generated constructor stub
    }

    /* (non-Javadoc)
    * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
    */
    public void setEntityContext(EntityContext arg0)
    throws EJBException,
    RemoteException {
    // TODO Auto-generated method stub

    }

    /* (non-Javadoc)
    * @see javax.ejb.EntityBean#unsetEntityContext()
    */
    public void unsetEntityContext() throws EJBException, RemoteException {
    // TODO Auto-generated method stub

    }

    /* (non-Javadoc)
    * @see javax.ejb.EntityBean#ejbRemove()
    */
    public void ejbRemove()
    throws RemoveException,
    EJBException,
    RemoteException {
    // TODO Auto-generated method stub

    }

    /* (non-Javadoc)
    * @see javax.ejb.EntityBean#ejbActivate()
    */
    public void ejbActivate() throws EJBException, RemoteException {
    // TODO Auto-generated method stub

    }

    /* (non-Javadoc)
    * @see javax.ejb.EntityBean#ejbPassivate()
    */
    public void ejbPassivate() throws EJBException, RemoteException {
    // TODO Auto-generated method stub

    }

    /* (non-Javadoc)
    * @see javax.ejb.EntityBean#ejbLoad()
    */
    public void ejbLoad() throws EJBException, RemoteException {
    // TODO Auto-generated method stub

    }

    /* (non-Javadoc)
    * @see javax.ejb.EntityBean#ejbStore()
    */
    public void ejbStore() throws EJBException, RemoteException {
    // TODO Auto-generated method stub

    }

    }

    It ran fine, no errors.

    Here is the xdoclet-build file:
    <?xml version=”1.0″ encoding=”UTF-8″?>
    <project default=”_xdoclet_generation_” name=”XDoclet Generator”>
    <property file=”xdoclet-build.properties”/>
    <property name=”eclipse.home” value=”C:/eclipse”/>
    <property name=”xdoclet.basedir” value=”${eclipse.home}/plugins/org.jboss.ide.eclipse.xdoclet.core_1.4.1″/>
    <property name=”jboss.net.version” value=”4.0″/>
    <path id=”project.classpath”><pathelement location=”classes”/>
    <pathelement location=”C:/Program Files/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.8.2/data/libraryset/1.4/activation.jar”/>
    <pathelement location=”C:/Program Files/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.8.2/data/libraryset/1.4/javax.servlet.jar”/>
    <pathelement location=”C:/Program Files/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.8.2/data/libraryset/1.4/javax.servlet.jsp.jar”/>
    <pathelement location=”C:/Program Files/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.8.2/data/libraryset/1.4/jboss-j2ee.jar”/>
    <pathelement location=”C:/Program Files/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.8.2/data/libraryset/1.4/jboss-jaxrpc.jar”/>
    <pathelement location=”C:/Program Files/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.8.2/data/libraryset/1.4/jboss-jsr77.jar”/>
    <pathelement location=”C:/Program Files/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.8.2/data/libraryset/1.4/jboss-saaj.jar”/>
    <pathelement location=”C:/Program Files/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.8.2/data/libraryset/1.4/mail.jar”/>
    <pathelement location=”C:/Program Files/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.8.2/data/libraryset/1.4/namespace.jar”/>
    <pathelement location=”C:/Program Files/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.8.2/data/libraryset/1.4/xml-apis.jar”/>
    </path>
    <path id=”xdoclet.classpath”>
    <path refid=”project.classpath”/>
    <fileset dir=”${xdoclet.basedir}”>
    <include name=”*.jar”/>
    <exclude name=”xdoclet-module-jboss-net-*.jar”/>
    </fileset>
    <fileset dir=”${xdoclet.basedir}”>
    <include name=”xdoclet-module-jboss-net-${jboss.net.version}*.jar”/>
    </fileset>
    </path>
    <target name=”_xdoclet_generation_” depends=””/>
    </project>

    The only thing in the META-INF is the manifest.mf. Without these files I can’t deploy the app.
    What is missing.

    – System Setup ——————————-
    Operating System and version: XP
    Eclipse version: 3.0
    Eclipse build id:
    Fresh Eclipse install (y/n): N
    If not, was it upgraded to its current version using the update manager?
    Other installed external plugins: JBOSS
    Number of plugins in the <eclipse>/plugins directory that begin with org.eclipse.pde.*:
    MyEclipse version:
    Eclipse JDK version:
    Application Server JDK version:
    Are there any exceptions in the Eclipse log file?

    If this is a DB related question please answer the following:

    RDBMS vendor and version:
    JDBC driver vendor and version, and access type (thin, type-2, etc):
    Connection URL:
    Eclipse error logs related to com.genuitec.eclipse.sqlexplorer packages:

    – Message Body ——————————-

    #227040 Reply

    Riyad Kalla
    Member

    Are you using the JBossIDE or MyEclipse?

    Did you even add the jboss doclet to generate the files you are missing? Look here: http://myeclipseide.com/enterpriseworkbench/help/index.jsp?topic=/com.genuitec.myeclipse.doc/html/quickstarts/firstejb/index.html, click on section 7.1.2

    #227069 Reply

    alashoofi
    Member

    I am afraid I have both installed, JBossIDE and MyEclipse. Is that bad?
    I added jboss doclet to generate the missing files and that is why I got alarmed when I did not see them.
    What do you advice? Will reinstalling Eclipse help? At lease that might get rid of the JBossIDE.
    The links you sent me did not lead me to section 7.1.2. I couldn’t locate any section there.

    Thanks Riyad

    #227073 Reply

    Riyad Kalla
    Member

    Woops, I added a comma that got added to the url, try it again:
    http://myeclipseide.com/enterpriseworkbench/help/index.jsp?topic=/com.genuitec.myeclipse.doc/html/quickstarts/firstejb/index.html

    Also having JBossIDE and MyEclipse installed together isn’t necessarily a *bad* idea, it just might lead to results that we are not farmiliar with.

    #227163 Reply

    alashoofi
    Member

    Ok Riyad, I think I am on track now.
    I reinstalled both Eclipse and MyEclipse but without JBossIDE and the files were generated for me.
    The next thing I couldn’t get it to do is:
    since my tables, fields and relationships are already defined in the database, how do I get ejbdoclet or MyEclipse to write the getter and setter for me from the DB?(with the relationship, if possible) It is making the connection alright, the datasource is working perfect but I am just not sure what properties of the ejbdoclet I need to set, and to what, to get this done. It will be sad if I have to hand write these because my tables are huge and many.

    Thank a bunch.

    #227168 Reply

    Riyad Kalla
    Member

    Unfortunately for CMP (which I’m assuming you are using) you will need to do this by hand right now. If you wanted to use Hibernate, MyEclipse can generate the hibernate classes for you with relationships and everything… and in our 4.0 release will be *greatly* enhanced as well. But that is Hibernate support, not EJB/CMP support.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Missing ejb-jar, jboss.xml and jbosscmp-jdbc.xml

You must be logged in to post in the forum log in