• Post Reply Bookmark Topic Watch Topic
  • New Topic

Calling and EJB3 from a servlet using DI  RSS feed

 
Mamadou Touré
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks,

I'm trying to call a simple EJB3 from a servlet using the DI, I'm using glassFish, but I got the following error

Caused by: java.lang.RuntimeException: Cannot resolve reference Unresolved Ejb-Ref com.mamadou.CallEjb/salut@jndi: @null@com.EJBmamadou.ejb.EJBName1Local@Session@null
at com.sun.enterprise.deployment.util.EjbBundleValidator.accept(EjbBundleValidator.java:430)
at com.sun.enterprise.deployment.WebBundleDescriptor.visit(WebBundleDescriptor.java:1415)
at com.sun.enterprise.deployment.archivist.WebArchivist.validate(WebArchivist.java:188)
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:840)
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:794)
at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:365)
... 10 more



Here is my servlet code


Here is my EJB implementation code code


Here is my EJB interface code
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!