Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dependency injection using Ejb3 in jboss-5.0.1.GA (and jdk 5)

 
Pradeep Bhat
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to deploy 2 stateless beans here.

One is PlaceBidBean
Other is DepInject (which has a dependency injection of PlaceBidBean)


The source code is as follows









I also tried it with simply @EJB instead of @EJB(beanName="ejb3inaction.example.buslogic.PlaceBidBean")
When i am deploying it gives me the following error :

12:09:11,158 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "jboss.j2ee:jar=DepInject.jar,name=DepInjectImpl,service=EJB3" is missing the following dependencies:
Dependency "<UNKNOWN jboss.j2ee:jar=DepInject.jar,name=DepInjectImpl,service=EJB3>" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'jboss.j2ee:name=ejb3inaction.example.buslogic.PlaceBidBean,service=EJB3,* **")

DEPLOYMENTS IN ERROR:
Deployment "<UNKNOWN jboss.j2ee:jar=DepInject.jar,name=DepInjectImpl,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'jboss.j2ee:name=ejb3inaction.example.buslogic.PlaceBidBean,service=EJB3,* **





I also placed the classes related to PladeBidBean in C:\jboss-5.0.1.GA\server\default\lib .
What could be the problem here.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@EJB(beanName="ejb3inaction.example.buslogic.PlaceBidBean")


The beanName is the name of the bean. So it should be:

 
Pradeep Bhat
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still not working....but I did notice the following warning while deploying

21:41:07,328 WARN [MappedReferenceMetaDataResolverDeployer] Unresolved references exist in JBossMetaData:[#DepInjectImpl:AnnotatedEJBReferenceMetaData{name=dep.DepInjectImpl/placebid,ejb-ref-type=null,link=PlaceBidBean,ignore-dependecy=false,mapped/jndi-name=null,resolved-jndi-name=null,beanInterface=interface ejb3inaction.example.buslogic.PlaceBid}]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic