File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes java.lang.IllegalStateException: Failed to find ContainerDependencyMetaData for interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "java.lang.IllegalStateException: Failed to find ContainerDependencyMetaData for interface" Watch "java.lang.IllegalStateException: Failed to find ContainerDependencyMetaData for interface" New topic
Author

java.lang.IllegalStateException: Failed to find ContainerDependencyMetaData for interface

Ramya Rayasam
Greenhorn

Joined: Sep 27, 2008
Posts: 4
Hello,

I am new to EJB and have done my first application in EJB with Eclipse and JBoss. I have create an EJB Project in Eclipse and have writte my Stateless Session Bean, Home Interface and the Remote Interface. Then I have created a separate Dynamic Web Application in Eclipse to write the EJB Client (Client.jsp). I have included the Home and Remote Interfaces of the EJB Project in the build path of the Web application and I have put an ejb reference in the web.xml of the Web Application. Here is the web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">

<display-name>SampleEJBWeb</display-name>

<ejb-local-ref>
<ejb-ref-name>ejb/abc</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>

<local-home>SessionBeans.HomeInterface</local-home>
<local>SessionBeans.RemoteInterface</local>

<ejb-link>SampleEJB.jar#StatelessEJB</ejb-link>
</ejb-local-ref>
</web-app>

ejb/abc is my jndi name and SessionBeans.HomeInterface is the Home Interface in SessionBeans Package. Same with Remote Interface.
SampleEJB is my EJB project and StatelessEJB is my Session Bean.

Now the problem is when I try to deploy this Web Application the console shows me a Deployment exception.

java.lang.IllegalStateException: Failed to find ContainerDependencyMetaData for interface: SessionBeans.RemoteInterface

Any suggestions and help would be greatly appreciated.

Thanks,
Ramya.
Ramya Rayasam
Greenhorn

Joined: Sep 27, 2008
Posts: 4
Seems like nobody is interested in replying
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10140
    
165

Which version of EJB? Is this EJB2.x or EJB3? Which exact version of JBoss AS? Please post the entire exception stacktrace.

While posting logs or xml content or code, please remember to wrap it in a code block by using the Code button in the message editor window. Please use the Preview button to ensure that your post is correctly formatted.


[My Blog] [JavaRanch Journal]
Vasanth Murugan
Greenhorn

Joined: Feb 18, 2010
Posts: 1
Ramya Rayasam wrote:Seems like nobody is interested in replying


Did you find the solution ?
I also faced the same problem.... reply me...
gourav chouhan
Ranch Hand

Joined: Apr 02, 2010
Posts: 74
Vasanth Murugan wrote:
Ramya Rayasam wrote:Seems like nobody is interested in replying


Did you find the solution ?
I also faced the same problem.... reply me...



Can anybody reply for this i m also getting this exception
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10140
    
165

Gourav and others, it's difficult to provide any help if you don't provide the details. Please see my earlier reply in this thread.
gourav chouhan
Ranch Hand

Joined: Apr 02, 2010
Posts: 74
Jaikiran Pai wrote:Gourav and others, it's difficult to provide any help if you don't provide the details. Please see my earlier reply in this thread.

This is session bean:-

Client code:-


This is jboss.xml;-


And when i m deploying ejb module it is giving following exception:-
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10140
    
165

You are using AS 5.0.0. I would recommend you move to 5.1.0 and try this application there.

And also, while posting logs, code or xml, wrap it in a code block so that it's formatted. For now, I have fixed your earlier post.
 
GeeCON Prague 2014
 
subject: java.lang.IllegalStateException: Failed to find ContainerDependencyMetaData for interface