views:

239

answers:

1

Hello,

JBoss 4.2.3, an application deployed as a ear. Works. Then I enable classloader isolation by adding a loader-repository tag into jboss-app.xml. In multiple beans @Resource TimerService stops being injected and the code throws NullPointerException.

What could possibly be the reason of such behavior? I have no clue.

Thanks,
Artem B

+1  A: 

Well, I don't have an answer but thanks to you I found the solution. I had this same problem occur in 5.1.0.GA. In my SLSB containing :

@PersistenceContext
EntityManager entityManager;

@Resource
TimerService timerService;

my entityManager would be injected just fine but timerService was yielding an NPE. Once I commented out the <loader-repository>...</loader-repository> element in my jboss-app.xml voila, timerService was valid. Thanks for the tip!

adam
but wasnt the point of this to enable loader isolation?
djangofan
indeed it was, but alas that seems to be akin to having your cake and getting to eat it too
adam