Question

I am currently developing an EJB 3.0 based application on the JBoss AS 5.0.0.GA and just recently the following warning showed up in the server log:

09:50:19,735 WARN  [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
09:50:19,735 WARN  [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
09:50:19,735 WARN  [InterceptorRegistry] applicable interceptors is non-existent for ...
...

The warnings are generated as soon as an EJB (a stateless session bean) is injected into a backing bean of my JSF web-application. The beans do work without problems though, but I still would like to know where that warning comes from and what I can do to avoid it.

I have already searched a bit around, but haven't found a good answer (some say, bean developers do not have to worry, but its a warning, so I'd like to have a better solution):

So has anyone an explanation what causes the warning (in terms of a bean developer, not application server developer) and what to do to avoid it?

Update: I've just upgraded JBoss to 5.0.1.GA (Download, Release-Notes) but unfortunatly the warning still appears.

Was it helpful?

Solution

As far as I understand all the available sources on this warning, it is nothing a user of JBoss 5 can do anything about and is essentially just a reminder for the developers of JBoss that they use their own classes wrong.

Following the advice from the developers, I am now ignoring it by changing my logging configuration in conf/jboss-log4j.xml. I've just added:

<category name="org.jboss.ejb3.interceptors">
    <priority value="ERROR" />
</category>

OTHER TIPS

Even the JBoss EJB3 tutorial/documentation says you can safely ignore these warnings. Well if everyone can ignore these don't log them! It's frustrating to see this issue isn't being fixed.

I had the same problem, modify the ejb3-interceptors-aop.xml, and now works ok.

I've tried this modification in ejb3-interceptors-aop.xml

I've comment these lines :

<aspect name="InterceptorsFactory" factory="org.jboss.ejb3.interceptors.aop.InterceptorsFactory" scope="PER_INSTANCE"/>  
<advice name="invoke" aspect="InterceptorsFactory"/> 

and it Works

The warnings no longer appear in JBoss 5.1.0, but adding the category as Simon posted eliminates the logging of the warnings in 5.0.x

Just follow the steps

  1. Stop JBoss and right click on the server instance and select clean
  2. right click on the project and select run -> run configurations
  3. select classpath -> add jars
  4. Add Jars from JBoss ASHOME/client - jbossall-client.jar,JBoss ASHome/common/lib - all jars.
  5. Apply and run.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top