Weld
  1. Weld
  2. WELD-1123

WELD-000075 error message with AspectJ

    Details

    • Type: Bug Bug
    • Status: 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)
      

        Gliffy Diagrams

          Activity

          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

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development