facebook

Code Assist for @ejb not working

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

    julianhall
    Member

    Hi I know that there was a posting in the sticky section, but it seemed to be for eclipse 3.1/W2k etc…

    I just downloaded a clean copy of
    Eclipse 3.2
    MyEclipse 5.0GA.
    (jdk1.4.10)/XPSP2.

    Created a SSEJB and tired to use the code assist for @ejb.ejb-ref and when i do the ctrl+space I do not get any of the attrubutes associated with ejb-ref.
    Do i need to update a package or something?

    Thanks,

    Jules

    #257043 Reply

    Riyad Kalla
    Member

    Jules,
    please show me the skeleton for the class/method you are trying to annotate. Annotations are context-sensative, for example, you cannot throw a method-level annotation on a class declaration, the autocomplete won’t show it. This might be waht’s happening. You can check the XDoclet site (http://xdoclet.sf.net) for details and documentation on the tags.

    #257066 Reply

    julianhall
    Member

    Hi I believe the annotation scope is correct.

    Here is a simple ejb that i’m trying to get the xdoclet code assist for @ejb.ejb-ref or @ejb.ejb-external-ref.

    import java.rmi.RemoteException;
    
    import javax.ejb.EJBException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    
    /**
     * 
     * @ejb.bean name="SimpleBean"
     *           display-name="Name for SimpleBean"
     *           description="Description for SimpleBean"
     *           jndi-name="ejb/SimpleBean"
     *           type="Stateless"
     *           view-type="both"
     *
     * @ejb.ejb-external-ref <no parameter options availabe when I hit ctrl+space for either of these annotations, only html tags available>
     * @ejb.ejb-ref 
     * 
     */
    public class SimpleBean implements SessionBean {
    
        /** The session context */
        private SessionContext context;
    
        public SimpleBean() {
            super();
            // TODO Auto-generated constructor stub
        }
    
    ....
    
    }

    I’ve also done some further tests and it looks like the same issue appears when I use a different version of eclipse/myeclipse. Is is possible that there may be environment settings that may affect the code assist?

    Thanks,

    Jules

    #257114 Reply

    Riyad Kalla
    Member

    Jules,
    If you move the @ejb.ejb-ref tag to the top of the class, does it work then? I wonder if the autocomplete parser is getting confused.

    #257140 Reply

    julianhall
    Member

    Hi Riyad,

    Gave that a go as well, nothing seems to work!
    I believe that it could be some sort of environment issue, as I did the exact same thing on a colleague’s computer and they seem to be ok…
    Is there any external path variables that myeclipse might be using?

    Thanks,

    Jules

    #257149 Reply

    Riyad Kalla
    Member

    Jules,
    Not one that I am aware of, but let’s try a brand new clean install of Eclipse 3.2 and MyEclipse 5.0.1. Can you do this to new directories and a temporary workspace and then try with a test project and see if autocomplete works? It’s good to hear it’s working on your collegues machine so atleast we know where to troubleshoot here.

    #257359 Reply

    julianhall
    Member

    Hi Riyad,
    Yes Iv’e done that a couple times now, and there seems to be no issues…. I still have myeclipse 4.x installed for another version of eclipse as well.. could that be an issue?

    Thanks,

    Jules

    #257360 Reply

    julianhall
    Member

    Sorry just to clarify my above response: there seems to be no issues when i do a fresh insall on another machine. But everytime I do it on mine, the problem still occurs.

    Jules

    #257396 Reply

    Riyad Kalla
    Member

    Jules,
    I’m scratching my head trying to figure out why you would see different autocomplete results… do you have any custom libraries in your JDK’s installation dir or under your JRE’s lib/ext dir… that’s the only thing I can think of. Also any environment variables that seem suspect?

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: Code Assist for @ejb not working

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