*
The moose likes Oracle/OAS and the fly likes Dependency injection/annotation Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "Dependency injection/annotation Error" Watch "Dependency injection/annotation Error" New topic
Author

Dependency injection/annotation Error

Jose Campana
Ranch Hand

Joined: May 28, 2007
Posts: 339
Greetings,

Hello everybody !

This topic's about a problem I'm currently experiencing while trying to deploy a Web Application that makes a call to an EJB using Dependency injection from a Servlet. This is the Stack trace generated when I attempt to deploy my web app:

DeployerRunnable.run Error parsing annotation for class org.servlet.TestServletoracle.oc4j.admin.internal.DeployerException: Error parsing annotation for class org.servlet.TestServlet
at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:126)
at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:619)


Here's a Snippet from the Servlet that's making the call:



Here's the EJB implementation:



Finally, I will post the Container-specific Deployment descriptor:



Up until this moment, I still have no clue, about the reason why I can't inject my EJB in the Web-app's Servlet.

Please Help ! Please........

It's so hard to find info. about this problem on the internet.

Best Regards,

Jose.
Jose Campana
Ranch Hand

Joined: May 28, 2007
Posts: 339
Hello there !

I've corrected this problem by using the same name for the @Stateless annotation and the display-name tag in the ejb-jar file, for @EJB this name should match also.

Good Luck, hope this is helpful in the future.
Janeice DelVecchio
Saloon Keeper

Joined: Sep 14, 2009
Posts: 1660
    
  11

Thanks for posting your solution!


When you do things right, people won't be sure you've done anything at all.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Dependency injection/annotation Error