File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dependency injection/annotation Error

 
Jose Campana
Ranch Hand
Posts: 339
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 339
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1800
12
Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for posting your solution!
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic