facebook

xdoclet/modules/ejb/dd/resources/ejb-ref.xdt

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #258215 Reply

    AmirRizvi
    Member

    Hi,

    I’m having trouble migrating a session ejb from wsad to myEclipse. The XDoclet tag causing error is:

    * @ejb.ejb-ref
    * ejb-name=”Project”
    * view-type=”local”
    * ref-name=”ejb/Project”

    (I’m actually referencing 3 entity beans…but just showing one here)

    The entire error message is:

    Invoking method in class xdoclet.modules.ejb.env.EnvEjbRefTagsHandler failed: forAllEjbRefs, line=11 of template file: file:/C:/Documents and Settings/rizvia2/EGC_INFORMIT/IC_EGCPersistence/xdoclet/modules/ejb/dd/resources/ejb-ref.xdt, exception: null

    I have a couple questions. One, I cannot find this file, “ejb-ref.xdt” anywhere on my machine. I’m assuming that this file must be temporary.

    An apparent fix for the problem (after many Google searches) is to add the following:

    “Following is the fixed snippet to replace at the end of your ejb-ref.xdt file.

    <XDtEjbRef:forAllEjbRefs>
    <XDtClass:ifClassTagValueEquals tagName=”ejb:ejb-ref” paramName=”view-type” value=”local”>
    <ejb-local-ref <XDtId:prefixedId prefix=”EJBLocalRef”/>>
    <ejb-ref-name><XDtEjb:ejbRefName/></ejb-ref-name>
    <ejb-ref-type><XDtEjb:beanType/></ejb-ref-type>
    <local-home><XDtEjbHome:homeInterface type=”local”/></local-home>
    <local><XDtEjbIntf:componentInterface type=”local”/></local>
    <XDtClass:ifHasClassTag tagName=”ejb:ejb-ref” paramName=”link”>
    <ejb-link><XDtClass:classTagValue tagName=”ejb:ejb-ref” paramName=”link”/></ejb-link>
    </XDtClass:ifHasClassTag>
    <XDtClass:ifDoesntHaveClassTag tagName=”ejb:ejb-ref” paramName=”link”>
    <ejb-link><XDtClass:classTagValue tagName=”ejb:ejb-ref” paramName=”ejb-name”/></ejb-link>
    </XDtClass:ifDoesntHaveClassTag>
    </ejb-local-ref>
    </XDtClass:ifClassTagValueEquals>
    </XDtEjbRef:forAllEjbRefs>

    Obviously, I need to access the xdt file in order to modify it.

    My second question is if there is anything else I should know about how to reference Entity beans from a session bean…maybe a tutorial, or a list of steps, or maybe something that is not well known or apparent. The tag is straightforward, but maybe I’m missing something.

    Thanks a lot!

    #258218 Reply

    Riyad Kalla
    Member

    I’ve never seen this error before to be honest, I’m not sure where the xdt files or what XDoclet is complaing about in this particular interest.

    Have any of the tips online helped you get to the bottom of this?

    #258221 Reply

    AmirRizvi
    Member

    No…can’t get past this error so far…except to remove the tags (which doesn’t really help…since I need to reference the entity beans).

    I have seen posts where others have mentioned accessing and modifying the xdt file.

    #258251 Reply

    Greg
    Member

    There is a way to modify the xdt file but its a bit involved. If you want to do it use the following steps.

    1. Go to the following dir. <myeclipse_install_dir>/com.genuitec.jboss.ide.eclipse.xdoclet.core_5.0.0/.
    2. Make a backup copy of xdoclet-ejb-module-1.2.3.jar
    3. Unzip the contents of this jar.
    4. Go to the extracted folder \xdoclet\modules\ejb\dd\resources 
    5. Edit the ejb-jar.xdt with the appropriate edits to fix your error
    6. Rejar the contents of the directory you extracted so it matches the original layout
    7. Place this updated jar back in the com.genuitec.jboss.ide.eclipse.xdoclet.core plugin and overwrite the existing file

    Then you should be able to rerun xdoclet and the updated xdt file will be used during the XDoclet Generation.

    I hope this helps in getting your problem fixed.

    #258284 Reply

    AmirRizvi
    Member

    Thanks a lot Greg!

    I followed your steps and was able to update the ejb-ref.xdt file with the extra link tags!

    Unfortunately, the fix does not work very well. So, I tried to re-arrange the contents of the file a bunch of ways and even removed/added snippets of offending code to see if anything would make it work. Ultimately, I gave up and I am very certain there is something wrong with the @ejb.ejb-ref portion of that template.

    Instead, I’ve decided to follow the advice of another post that suggested to use the ejb-external-ref tag. I might not be using it for the right reason (ie external jar), but at least this tag works properly. Just have to explicitly define the home and local interfaces…no big deal…at least it works!

    Thanks again!

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: xdoclet/modules/ejb/dd/resources/ejb-ref.xdt

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