4 Replies Latest reply on Nov 20, 2008 12:58 PM by Max Andersen

    Injection vs. Eclipse debug

    Ingo Jobling Master

      Hi, Sorry if this is a dumb question!  When debugging in Eclipse, fields in injected components are always displayed as having a null value.  Is this a limitation of Eclipse, or Javassist?  Is this to be expected when debugging proxied objects?


      Good old System.out works fine:


      @In 
      RolePickListBean rolePickListBean;
      
      System.out.println(rolePickListBean.getResult());
      21:29:57,873 INFO  [STDOUT] [1, 2, 3, 4, 5]



      Oops, Eclipse Debug Variables view displays the field as null.


      rolePickListBean       org.agritrace.action.admin.user.RolePickListBean_$$_javassist_11  (id=347)      
              handler         org.jboss.seam.intercept.JavaBeanInterceptor  (id=346)  
              result          null    
      



      The component:



      @Name("RolePickListBean ")
      public class RolePickListBean {
              
              private List<String> result;
      
              public List<String> getResult() {
                      return result;
              }
      }


        • 1. Re: Injection vs. Eclipse debug
          Ingo Jobling Master

          Sorry, should be


          @Name("rolePickListBean")





          • 2. Re: Injection vs. Eclipse debug
            Diego Coronel Apprentice

            Try expanding handle variable and after expand target variable.

            • 3. Re: Injection vs. Eclipse debug
              Ingo Jobling Master

              Ah yes, I can see the value under hander/bean/result.  Thanks!


              rolePickListBean                             org.agritrace.action.admin.user.RolePickListBean_$$_javassist_11  (id=347)     
                   handler                                     org.jboss.seam.intercept.JavaBeanInterceptor  (id=346)     
                        bean                    org.agritrace.action.admin.user.RolePickListBean  (id=337)     
                             result               java.util.Arrays$ArrayList<E>  (id=2760)     
                        beanClass               java.lang.Class<T> (org.agritrace.action.admin.user.RolePickListBean) (id=260)     
                        component               org.jboss.seam.Component  (id=503)     
                        componentName                  "rolePickListBean" (id=505)     
                        dirty                             true     
                        isSeamComponent                  true     
                        type                    org.jboss.seam.annotations.intercept.InterceptorType  (id=507)     
                        userInterceptors             java.util.ArrayList<E>  (id=509)     
                   result                                     null     
              
              


              • 4. Re: Injection vs. Eclipse debug
                Max Andersen Newbie

                This question reminded me that Eclipse Debuggers actually have a notion of showing Logical Structures instead of the raw form of the object.


                See here for a good explanation of it http://blog.jcake.com/2008/03/09/eclipse-debugger-part-ii-logical-structures/


                Unfortunately the user UI just matches on qualified type names which is a not scalable for $$javaassist classes;
                but it might be doable to do it programmatically.


                I've created https://jira.jboss.org/jira/browse/JBIDE-3229 to track if for JBoss Tools.


                Feel free to contribute a patch/comment ;)