I hadn't tried reproducing this so far. Today i got this reproduced on 
JBoss-5.0 GA. The issue happens in the following scenario:

1) Your application is packaged as EAR
2) Your application has a jboss-app.xml with classloader configuration (does 
not matter whether it is java2ParentDelegation=false or  
java2ParentDelegation=true)
3) You have an EJB in which there is a @Resource injection happening for a 
application specific type  (i.e. the class/interface belongs to your own 
application)

In this specific scenario, you see this ClassNotFoundException. This is a bug.

"jhsingle" wrote : 
  | There was one other bean with self-injection and I had changed that one 
also before my last post. Just to be sure, here's the code for WorkflowEngine 
with the self-injection removed: 

I am sure there's definitely some other place where the @Resource injection of 
application specific class is happening. Are you sure you deployed the fresh 
files (cleanup existing ones from JBoss).

"jaikiran" wrote : 
  | The code which you posted, shows self-injection
  | 

Based on the test case that i have, this has got nothing to do with 
self-injection. Injecting resource of type myapp.A into myapp.B manifests this 
problem.

Possible workarounds:

1) Probably the easiest - Remove all @Resource injection of application 
specific classes
OR
2) Deploy the application as a standalone jar instead of EAR. The problem does 
not arise in a standalone jar
OR
3) Do not configure classloading through jboss-app.xml - You can leave that 
file empty or remove it. From what you posted, i see that you are not using 
this jboss-app.xml for anything else. 



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200639#4200639

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200639
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to