Weld
  1. Weld
  2. WELD-1123

WELD-000075 error message with AspectJ

    Details

    • Type: Bug Bug
    • Status: Closed Closed (View Workflow)
    • Priority: Major Major
    • Resolution: Rejected
    • Affects Version/s: 1.1.4.Final
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
    • Steps to Reproduce:
      Hide

      1) Please read the readme.txt file under NestedWeb directory
      2) Under eclipse Indigo

      • make a NestedEar project (ear)
      • make NestedWeb project (war)
      • Copy paste the source file into NestedWeb project.
      • Build and deploy the project
        3) Launch the workbench : http://localhost:8080/NestedWeb/index.html
        4) You should see the home page "Integration Bug Hunter" with a tab panel

      Then to reproduce the bug

      • Configure the NestedWeb as an AspectJ project
      • Build and deploy the project, you will get the WELD-000075 Normal scoped managed....

      The question is why to project without AspectJ is running well and with AspectJ is not running? What add AspectJ to the class to trigger such error.

      Note that we use Inter-Type declaration for logging.

      public aspect LoggingBehavior {
      	public interface Loggable { }
      	private final transient Logger Loggable.log = Logger.getLogger(this.getClass());
      	public Logger Loggable.getLog() {
      		return log;
      	}
      
      	declare parents : com.nested.web.controller.BaseController implements Loggable;
      
      

      Note also that the project run perfectly under WAS/RAD with Spring as injection of dependency.

      See the attached files as demo.

      Show
      1) Please read the readme.txt file under NestedWeb directory 2) Under eclipse Indigo make a NestedEar project (ear) make NestedWeb project (war) Copy paste the source file into NestedWeb project. Build and deploy the project 3) Launch the workbench : http://localhost:8080/NestedWeb/index.html 4) You should see the home page "Integration Bug Hunter" with a tab panel Then to reproduce the bug Configure the NestedWeb as an AspectJ project Build and deploy the project, you will get the WELD-000075 Normal scoped managed.... The question is why to project without AspectJ is running well and with AspectJ is not running? What add AspectJ to the class to trigger such error. Note that we use Inter-Type declaration for logging. public aspect LoggingBehavior { public interface Loggable { } private final transient Logger Loggable.log = Logger.getLogger( this .getClass()); public Logger Loggable.getLog() { return log; } declare parents : com.nested.web.controller.BaseController implements Loggable; Note also that the project run perfectly under WAS/RAD with Spring as injection of dependency. See the attached files as demo.
    • Similar Issues:
      Show 10 results 

      Description

      We have an application - Without AspectJ, the application is running smoothly but as soon as we activate aspectJ, if we tried to deploy and run the application we got the following error message:

      GRAVE: Exception while loading the app
      GRAVE: Exception while loading the app : WELD-000075 Normal scoped managed bean implementation class has a public field:  public@Named @RequestScoped class com.nested.web.controller.PanelTwoController
      org.jboss.weld.exceptions.DefinitionException: WELD-000075 Normal scoped managed bean implementation class has a public field:  public@Named @RequestScoped class com.nested.web.controller.PanelTwoController
      	at org.jboss.weld.bean.ManagedBean.checkBeanImplementation(ManagedBean.java:438)
      	at org.jboss.weld.bean.AbstractClassBean.initialize(AbstractClassBean.java:191)
      	at org.jboss.weld.bean.ManagedBean.initialize(ManagedBean.java:322)
      	at org.jboss.weld.bootstrap.AbstractBeanDeployer.deploy(AbstractBeanDeployer.java:115)
      	at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:204)
      	at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:344)
      	at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:179)
      	at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:128)
      	at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:277)
      	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:460)
      	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
      	at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
      	at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
      

        Activity

        Hide
        Jean ANDRE
        added a comment -

        Here the demo - Please, read the readme file. The zip file does not contain libraries.

        Show
        Jean ANDRE
        added a comment - Here the demo - Please, read the readme file. The zip file does not contain libraries.
        Jean ANDRE
        made changes -
        Field Original Value New Value
        Attachment NestedWeb_WELD-000075.zip [ 12353808 ]
        Hide
        Jean ANDRE
        added a comment -

        By the way, is there a link to know how to update GlassFish with Weld 1.1.6 or up, like this I can make some tests - Thank you

        Show
        Jean ANDRE
        added a comment - By the way, is there a link to know how to update GlassFish with Weld 1.1.6 or up, like this I can make some tests - Thank you
        Hide
        Jean ANDRE
        added a comment -

        Please see also the bug report on Eclipse / AJDT.
        https://bugs.eclipse.org/bugs/show_bug.cgi?id=378361

        Show
        Jean ANDRE
        added a comment - Please see also the bug report on Eclipse / AJDT. https://bugs.eclipse.org/bugs/show_bug.cgi?id=378361
        Hide
        Jean ANDRE
        added a comment -

        This the version with AspectJ annotation - This version give an accurate error message as you can see on bug_378361.

        Show
        Jean ANDRE
        added a comment - This the version with AspectJ annotation - This version give an accurate error message as you can see on bug_378361.
        Jean ANDRE
        made changes -
        Attachment NestedWeb_Bug 378361.zip [ 12353871 ]
        Hide
        Jean ANDRE
        added a comment -

        From https://bugs.eclipse.org/bugs/show_bug.cgi?id=378361, it seems that is not a problem of AspectJ but a problem of the CDI due to a "private static final". Could you please check from your side.

        Show
        Jean ANDRE
        added a comment - From https://bugs.eclipse.org/bugs/show_bug.cgi?id=378361 , it seems that is not a problem of AspectJ but a problem of the CDI due to a "private static final". Could you please check from your side.
        Hide
        Ales Justin
        added a comment -

        >> Could you please check from your side.

        Could you create an Arquillian test for this?

        Show
        Ales Justin
        added a comment - >> Could you please check from your side. Could you create an Arquillian test for this?
        Hide
        Jean ANDRE
        added a comment - - edited

        I never did that, waou !
        Why don't use the test demo we sent to you - Andrew from Eclipse/AspectJ compiler did it easily, ready to use, just put the needed libraries (read the readme.txt file from the root directory of NestedWebX directory). Andrew from eclipse/AspectJ did a good part of the work by determining the exact problem and the responsibility of the bug. So it is your turn

        Moreover, if somebody can tell me how to update Weld in GlassFich...

        Show
        Jean ANDRE
        added a comment - - edited I never did that, waou ! Why don't use the test demo we sent to you - Andrew from Eclipse/AspectJ compiler did it easily, ready to use, just put the needed libraries (read the readme.txt file from the root directory of NestedWebX directory). Andrew from eclipse/AspectJ did a good part of the work by determining the exact problem and the responsibility of the bug. So it is your turn Moreover, if somebody can tell me how to update Weld in GlassFich...
        Hide
        Ales Justin
        added a comment -

        >> So it is your turn
        I don't think free OSS works this way.
        Specially with semi-exotic usage ala AspectJ.
        It's been 2004 when I last used it, and unfortunately no time to renew my knowledge.

        >> Moreover, if somebody can tell me how to update Weld in GlassFich...
        Just take Weld bundle from new release and you should be fine - it's back compatible.

        Show
        Ales Justin
        added a comment - >> So it is your turn I don't think free OSS works this way. Specially with semi-exotic usage ala AspectJ. It's been 2004 when I last used it, and unfortunately no time to renew my knowledge. >> Moreover, if somebody can tell me how to update Weld in GlassFich... Just take Weld bundle from new release and you should be fine - it's back compatible.
        Hide
        Jean ANDRE
        added a comment -

        Ok thank you - Just take a look at the workbench, inside aspects folder and you will see that AspectJ has greatly evolved. Now, you can produce java standard class annotated with specific AspectJ annotation. Under Eclipse, AspectJ compiler and editor works pretty fine. At the aspects folder, you can see different AspectJ annotated classes, most of them have their content commented. It is just different styles/way for the same goal, native (with .aj extension) and .java (for annotated).

        As soon as I can, will ugrade Glassfish with the new bundle and will let you know the result.

        Show
        Jean ANDRE
        added a comment - Ok thank you - Just take a look at the workbench, inside aspects folder and you will see that AspectJ has greatly evolved. Now, you can produce java standard class annotated with specific AspectJ annotation. Under Eclipse, AspectJ compiler and editor works pretty fine. At the aspects folder, you can see different AspectJ annotated classes, most of them have their content commented. It is just different styles/way for the same goal, native (with .aj extension) and .java (for annotated). As soon as I can, will ugrade Glassfish with the new bundle and will let you know the result.
        Hide
        Jean ANDRE
        added a comment - - edited

        Could you please assist me because under GlassFish, the WELD is packaging inside the OSGI framework. Then we need to generate the weld-osgi-bundle.jar which contain Weld. Could you please generate this file for testing with the hope, it will be the only file to be replaced. Thank you.

        Show
        Jean ANDRE
        added a comment - - edited Could you please assist me because under GlassFish, the WELD is packaging inside the OSGI framework. Then we need to generate the weld-osgi-bundle.jar which contain Weld. Could you please generate this file for testing with the hope, it will be the only file to be replaced. Thank you.
        Hide
        Jean ANDRE
        added a comment -

        Hello, I've download the source code from the repository, unfortunately, it was the version 1.1.6 (core - weld-core-1.1.6.Final-32-gd28ddf1) and it does not compile... Some classes are missing !??)

        How to get the version 1.1.8 ? Open source ready to compile, the project, not only the source??

        Then I found a bundle osgi at this address below and I did a replace.
        http://mvnrepository.com/artifact/org.jboss.weld/weld-osgi-bundle/1.1.6.Final

        Unfortunately, even if glassFish display the good version - INFO: WELD-000900 1.1.6 (Final) - I got the exception : by java.lang.NoClassDefFoundError: org/jboss/weld/interceptor/proxy/LifecycleMixin

        Any clue?

        Show
        Jean ANDRE
        added a comment - Hello, I've download the source code from the repository, unfortunately, it was the version 1.1.6 (core - weld-core-1.1.6.Final-32-gd28ddf1) and it does not compile... Some classes are missing !??) How to get the version 1.1.8 ? Open source ready to compile, the project, not only the source?? Then I found a bundle osgi at this address below and I did a replace. http://mvnrepository.com/artifact/org.jboss.weld/weld-osgi-bundle/1.1.6.Final Unfortunately, even if glassFish display the good version - INFO: WELD-000900 1.1.6 (Final) - I got the exception : by java.lang.NoClassDefFoundError: org/jboss/weld/interceptor/proxy/LifecycleMixin Any clue?
        Hide
        Ales Justin
        added a comment -

        Source is here: https://github.com/weld/core
        No idea about NCDFE, it's GF, not JBossAS ...

        Show
        Ales Justin
        added a comment - Source is here: https://github.com/weld/core No idea about NCDFE, it's GF, not JBossAS ...
        Hide
        Jean ANDRE
        added a comment -

        Hi Justin, It is what I did first - but the zip or the download button give me only the version 1.1.6
        Is there a 1.1.8 version ? Moreover the zip seems not to be entire since there is some errors under the IDE (some classes are missing.) So, how to download entirely the latest version to be able to build the project and be able to reconstruct the weld-osgi-bundle file ?

        Due to of this problem, I've surfed on Internet and I've found a ready made weld-osgi-bundle.jar for 1.1.6 but it does not work.

        Do you have or know a repository (maven or other) where to find the "ready made" files for GlassFish ?

        Thank you very much - Regards

        Show
        Jean ANDRE
        added a comment - Hi Justin, It is what I did first - but the zip or the download button give me only the version 1.1.6 Is there a 1.1.8 version ? Moreover the zip seems not to be entire since there is some errors under the IDE (some classes are missing.) So, how to download entirely the latest version to be able to build the project and be able to reconstruct the weld-osgi-bundle file ? Due to of this problem, I've surfed on Internet and I've found a ready made weld-osgi-bundle.jar for 1.1.6 but it does not work. Do you have or know a repository (maven or other) where to find the "ready made" files for GlassFish ? Thank you very much - Regards
        Hide
        Jean ANDRE
        added a comment -
        Show
        Jean ANDRE
        added a comment - I got the same execption with 1.1.8 from: http://mvnrepository.com/artifact/org.jboss.weld/weld-osgi-bundle
        Hide
        Jean ANDRE
        added a comment - - edited

        In fact, the problem comes from the structure of the file weld-osgi-bundle.jar.
        At the version bundle with GlassFish (Weld 1.1.4), the package interceptor is outside the weld folder

        • org\jboss\interceptor
        • org\jboss\weld
        • org\slf4j

        and with the version 1.1.8, the interceptor package is inside the "weld" folder. Then, it is probably a problem of classPath. If the file from maven repository is good, it is not back-compatible.... Moving the missing package outside the weld folder, does not solve the problem. Worse, GlassFish recognize the file to be version 1.1.4 even if we put the version 1.1.8 !

        So I'm not able to continue any investigation without any help - Then I cannot tell you if the version above 1.1.4 has the bug too - Sorry.

        Show
        Jean ANDRE
        added a comment - - edited In fact, the problem comes from the structure of the file weld-osgi-bundle.jar. At the version bundle with GlassFish (Weld 1.1.4), the package interceptor is outside the weld folder org\jboss\interceptor org\jboss\weld org\slf4j and with the version 1.1.8, the interceptor package is inside the "weld" folder. Then, it is probably a problem of classPath. If the file from maven repository is good, it is not back-compatible.... Moving the missing package outside the weld folder, does not solve the problem. Worse, GlassFish recognize the file to be version 1.1.4 even if we put the version 1.1.8 ! So I'm not able to continue any investigation without any help - Then I cannot tell you if the version above 1.1.4 has the bug too - Sorry.
        Hide
        Jean ANDRE
        added a comment -

        Finally I've took the ear from:
        https://repository.jboss.org/nexus/content/groups/public-jboss/org/jboss/weld/weld-osgi-bundle/1.1.8.Final/
        Under Eclipse, the project 1.1.6 is not working - many errors - Under NetBean, it sounds good.

        I've update GlassFish with this file - INFO: WELD-000900 1.1.8 (Final) - But it still not working even when the file comes from JBoss... So, it is not back compatible unless something is missing, I mean additional file is required to be updated.

        The error we got is the same as 1.1.6 which is java.lang.NoClassDefFoundError: org/jboss/weld/interceptor/proxy/LifecycleMixin.

        So, Justin, I also found this
        https://community.jboss.org/thread/197617
        and that: https://issues.jboss.org/browse/WELD-807
        and.. http://java.net/jira/browse/GLASSFISH-10787

        Show
        Jean ANDRE
        added a comment - Finally I've took the ear from: https://repository.jboss.org/nexus/content/groups/public-jboss/org/jboss/weld/weld-osgi-bundle/1.1.8.Final/ Under Eclipse, the project 1.1.6 is not working - many errors - Under NetBean, it sounds good. I've update GlassFish with this file - INFO: WELD-000900 1.1.8 (Final) - But it still not working even when the file comes from JBoss... So, it is not back compatible unless something is missing, I mean additional file is required to be updated. The error we got is the same as 1.1.6 which is java.lang.NoClassDefFoundError: org/jboss/weld/interceptor/proxy/LifecycleMixin. So, Justin, I also found this https://community.jboss.org/thread/197617 and that: https://issues.jboss.org/browse/WELD-807 and.. http://java.net/jira/browse/GLASSFISH-10787
        Hide
        Stuart Douglas
        added a comment -

        I don't think this is a weld bug. I think aspectj is adding a public field to the class at load time, and that is what is causing the problem. You need to fix your aspectj setup so this does not happen.

        Show
        Stuart Douglas
        added a comment - I don't think this is a weld bug. I think aspectj is adding a public field to the class at load time, and that is what is causing the problem. You need to fix your aspectj setup so this does not happen.
        Hide
        Jean ANDRE
        added a comment - - edited

        Well, are you really sure ? Because from Andy Clement (AspectJ team), after verification, it was clear for him that the error comes from Weld. It would be good to be SURE and if you can concretely verify the point, I will returned back to AspectJ Team.

        Please read the conversation : https://bugs.eclipse.org/bugs/show_bug.cgi?id=378361

        Show
        Jean ANDRE
        added a comment - - edited Well, are you really sure ? Because from Andy Clement (AspectJ team), after verification, it was clear for him that the error comes from Weld. It would be good to be SURE and if you can concretely verify the point, I will returned back to AspectJ Team. Please read the conversation : https://bugs.eclipse.org/bugs/show_bug.cgi?id=378361
        Hide
        Jean ANDRE
        added a comment -

        We did again the test as your comment put a doubt into my mind. I've also modified the setup of AspectJ compiler, with or without No-Inline, the application works!? Is there a cache problem with the IDE ?

        We also updated JSF to 2.1.11 and RichFaces 4.2.2 but it is not linked.

        Then, you can close the issue. Thank you

        Show
        Jean ANDRE
        added a comment - We did again the test as your comment put a doubt into my mind. I've also modified the setup of AspectJ compiler, with or without No-Inline, the application works!? Is there a cache problem with the IDE ? We also updated JSF to 2.1.11 and RichFaces 4.2.2 but it is not linked. Then, you can close the issue. Thank you
        Stuart Douglas
        made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Rejected [ 2 ]
        Vlastimil Eliáš
        made changes -
        Workflow jira [ 12492393 ] GIT Pull Request workflow [ 12549053 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Jean ANDRE
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: