• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 31
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Ranch Hand
Posts: 31
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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}]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic