• 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

problem inserting an EJB object using @EJB

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guyz,

I tired to inject a session bean object onto my struts Action class while declaring an object. But I am always getting the object as null. Does jboss not insert an object automatically if i use



i read that jboss does not insert instance of an object in non EJB classes. Can somebody confirm this please?
[ November 12, 2008: Message edited by: paddy Mahadeva Iyer ]
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What version of JBoss AS are you using? 4.2.x does not support @EJB injection, but 5.0.0.CR2 does. Also, what version number is specified in your web.xml file in the web-app tag? I believe that you need 2.5 (and the associated xsi:schemaLocation, to get @EJB to work.
 
paddy Mahadeva Iyer
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

web-app tag has the version no as 2.4. Also jboss is of 4.2.3 .

Seems I will have to look up the object.

Thanks a lot for the reply.
 
Don't MAKE me come back there with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic