views:

10490

answers:

7

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.

A: 

No solution, but my comment is I have the error too in JBoss 5.0 GA. You're links are quite useful, at least I known I have to worry a little bit less. Or maybe I should worry more, that we decided to use a .00 release.

Gerbrand
+3  A: 

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.

R. Kettelerij
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
+11  A: 

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
A: 

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

Pedro Riera
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
mjustin
+1  A: 

The warning is still appearing in JBoss 5.1.0.GA. (Java version is : JDK1.5.0_06)

Yogesh
A: 

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

Oscar
which modification of this file did the trick?
mjustin
comment this lines :<aspect name="InterceptorsFactory" factory="org.jboss.ejb3.interceptors.aop.InterceptorsFactory" scope="PER_INSTANCE"/>and <advice name="invoke" aspect="InterceptorsFactory"/>Works for me!
Oscar
A: 

Thanks very much

XieKaiyu

related questions