Failed Glassfish deploy - "Referencing error: this bundle has no bean of name [ClientBean]"

4.1k Views Asked by At

I'm trying to run the example from this page : GlassFish-to-GlassFish Remote EJB Invocation

But I get this error when I try to deploy the client on glassfish ("asadmin> deploy client-ejb.jar"): "Exception while deploying the app [client-ejb] : Referencing error: This bundle has no bean of name [ClientBean]"

I need help, thanks.

3

There are 3 best solutions below

0
On

I encountered a a similar problem when trying to deploy my application (Exception while deploying the app [my-app] : Referencing error : This bundle has no bean of name [myBeanFacade] ) .Rather weird but all that was needed to solve this was to go to the properties of [my-app] under the build category tree, choose compile and tick the compile on save option. Redeployed my application and viola !! NB [my-app] contains 2 ejb jars and a web application, one of the ejbs is a library in the web app.

0
On

This problem occurred because the guy forgot to add the ServiceIF.class reference in client-ejb.jar.

Execute the command:

jar cvf client-ejb.jar test/ServiceIF.class test/ClientIF.class test/ClientBean.class META-INF/glassfish-ejb-jar.xml

get the new .jar and it will work.

0
On

In case you are using a deployment descriptor, then the EJB name should be the same in both the descriptor file.

 <ejb-jar>
  <enterprise-beans>
    <session>
      <ejb-name>Hello</ejb-name>
      <home>com.ejb.test.HelloHome</home>
      <remote>com.ejb.test.HelloObject</remote>
      <ejb-class>com.ejb.test.HelloBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>
    </session>
  </enterprise-beans>
  <assembly-descriptor>
    <container-transaction>
      <method>
        **<ejb-name>Hello</ejb-name>**
        <method-name>*</method-name>
      </method>
      <trans-attribute>Required</trans-attribute>
    </container-transaction>
  </assembly-descriptor>
</ejb-jar>



<glassfish-ejb-jar>
    <enterprise-beans>
        <ejb>
            **<ejb-name>Hello</ejb-name>**
            <jndi-name>jndi/Hello</jndi-name>
        </ejb>
    </enterprise-beans>
</glassfish-ejb-jar>