facebook

XDoclet not generating utility class when @ejb:util is used

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #230680 Reply

    JimOHearn
    Member

    Here is the javadoc header for my entity bean:

    /**
    * XDoclet-based CMP 2.x entity bean. This class must be declared
    * public abstract because the concrete class will
    * be implemented by the CMP providers tooling.
    *
    * To generate EJB related classes using XDoclet:
    *
    * – Add Standard EJB module to XDoclet project properties
    * – Customize XDoclet configuration
    * – Run XDoclet
    *
    * Below are the xdoclet-related tags needed for this EJB.
    *
    * @ejb.bean name=”XHQClass”
    * display-name=”Name for XHQClass”
    * description=”Description for XHQClass”
    * jndi-name=”ejb/com/indx/xhq/server/model/ejb/XHQClassHome”
    * local-jndi-name=”ejb/com/indx/xhq/server/model/ejb/XHQClassLocalHome”
    * type=”CMP”
    * cmp-version=”2.x”
    * view-type=”both”
    * primkey-field=”id”
    * @ejb.persistence table-name=”txhqclass”
    * @jboss.persistence table-name=”txhqclass”
    * @ejb:util generate=”physical”
    */

    As you can see, the javadoc specifically calls for the generation of a utility class. However, after successfully running XDoclet, no utility class is generated. Am I doing something wrong? The output from XDoclet is as follows:

    Buildfile: C:\tools\eclipse\eclipse-SDK-3.0.2-win32\eclipse\workspace\XHQ\XHQServer\.xdoclet-build.tmp.xml
    N10004:
    [ejbdoclet] (XDocletMain.start 47 ) Running <remoteinterface/>
    [ejbdoclet] Generating Remote interface for ‘com.indx.xhq.server.model.ejb.XHQClassBean’.
    [ejbdoclet] (XDocletMain.start 47 ) Running <localinterface/>
    [ejbdoclet] Generating Local interface for ‘com.indx.xhq.server.model.ejb.XHQClassBean’.
    [ejbdoclet] (XDocletMain.start 47 ) Running <homeinterface/>
    [ejbdoclet] Generating Home interface for ‘com.indx.xhq.server.model.ejb.XHQClassBean’.
    [ejbdoclet] (XDocletMain.start 47 ) Running <localhomeinterface/>
    [ejbdoclet] Generating Local Home interface for ‘com.indx.xhq.server.model.ejb.XHQClassBean’.
    [ejbdoclet] (XDocletMain.start 47 ) Running <session/>
    [ejbdoclet] (XDocletMain.start 47 ) Running <deploymentdescriptor/>
    [ejbdoclet] Generating EJB deployment descriptor (ejb-jar.xml).
    [ejbdoclet] (XDocletMain.start 47 ) Running <jboss/>
    [ejbdoclet] Generating jboss.xml.
    [ejbdoclet] Generating jbosscmp-jdbc.xml.
    _xdoclet_generation_:
    BUILD SUCCESSFUL
    Total time: 10 seconds

    What I don’t see here in the output is the line:

    [ejbdoclet] Generating Util class for ‘com.indx.xhq.server.model.ejb.XHQClass’

    I’m running MyEclipse v3.8.4+QF2 on Windows XP Professional using
    Eclipse v3.0.2, JBoss v4.0.2 and J2EE v1.4.1

    #230699 Reply

    Riyad Kalla
    Member
    #230706 Reply

    Greg
    Member

    You must also have the utilobject subtask under you ejbdoclet configuration. Open Properties > MyEclipse-XDoclet. Select your EJB configuration and under ejbdoclet, make sure that is a utilobject. If there is not, you will need to add one by right-clicking on ejbdoclet and choosing “Add”. Then select utilobject from the list and check the “cacheHomes” and “includeGUID” options.

    #230715 Reply

    JimOHearn
    Member

    Thanks. Adding the utilobject configuration did the trick.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: XDoclet not generating utility class when @ejb:util is used

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