JBoss: What does the warning EJBTHREE-1246 from the InterceptorRegistry mean?
Asked Answered
L

6

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.

Lapith answered 29/1, 2009 at 9:30 Comment(0)
L
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>
Lapith answered 22/5, 2009 at 12:26 Comment(0)
O
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.

Offenseless answered 22/5, 2009 at 6:34 Comment(1)
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.Lapith
H
3

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

Hwahwan answered 30/12, 2009 at 1:13 Comment(1)
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!Hwahwan
C
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

Cleft answered 11/2, 2011 at 14:27 Comment(0)
P
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

Perdure answered 19/10, 2009 at 15:59 Comment(1)
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 containerConnote
P
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.
Penelopa answered 15/3, 2016 at 6:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.