20

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.

Simon Lehmann
  • 10,737
  • 4
  • 41
  • 53

6 Answers6

26

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>
Simon Lehmann
  • 10,737
  • 4
  • 41
  • 53
7

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.

Richard Kettelerij
  • 2,049
  • 14
  • 17
  • 3
    Exactly! I don't know why I, as the user of their product have to know about warnings generated by internal parts which I can't control and thus can do nothing about to fix the warning. – Simon Lehmann May 22 '09 at 12:10
3

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

Oscar
  • 31
  • 1
1

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

Buhake Sindi
  • 87,898
  • 29
  • 167
  • 228
0

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

  • 7
    They still appear in JBoss 5.1.0 GA: 15:24:22,083 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container – mjn Nov 11 '09 at 14:26
0

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.
ckruczek
  • 2,361
  • 2
  • 20
  • 23
Mani
  • 1