Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Container Not injecting ref for Weblogic 11g, EJB 3.0, jdk160_21, Helios

 
Divs Basu
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[size=12]Hi,

I am trying to run Application Client app for the tutorial example given in Java EE 5. I am using Weblogic 11g, EJB 3.0 and Eclipse (Helios), jdk160_21. I am running the server, launching the App Client, but it's giving me this error, which seems to be an issue that EJB Container is not injecting the reference. Can somebody point out what am I missing?

The exception is below:

Caught an unexpected exception!
java.lang.NullPointerException
at com.learn.ejb.stateless.ConverterClient.doConversion(ConverterClient.java:22)
at com.learn.ejb.stateless.ConverterClient.main(ConverterClient.java:16)



The code is as below for ready reference

Thanks,
DibsLearner[/size]
SessionBean3.0_Helios_Weblogic11g.JPG
Image
[Thumbnail for SessionBean3.0_Helios_Weblogic11g.JPG]
 
shivaram kumar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you need to use JNDI lookup... instead of DI...

try this post
 
Divs Basu
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks shivaram. I have been successful in doing that, but acc to Java EE5 Tutorial this should work even without JNDI, which doesn't seem to be happening. I would like to know why?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic