users@glassfish.java.net

No such bean

From: Kenneth Clark <kenneth_at_rabiddog.co.za>
Date: Wed, 01 Nov 2006 10:06:32 +0200

Not having a good week.

Last night everything was working fine but this morning everything has
gone side ways.

Deploying application in domain failed; Error loading deployment
descriptors for module [ModuleName] -- Referencing error: This bundle
has no bean of name [CompanyServiceBean] Error loading deployment
descriptors for module [ModuleName] -- Referencing error: This bundle
has no bean of name [CompanyServiceBean]

sun-ejb-jar.xml (located in META-INF)
<sun-ejb-jar>
  <enterprise-beans>
    <ejb>
      <ejb-name>CompanyServiceBean</ejb-name>
      <webservice-endpoint>
        <port-component-name>CompanyServiceBean</port-component-name>
        <login-config>
          <auth-method>BASIC</auth-method>
        </login-config>
      </webservice-endpoint>
    </ejb>
  </enterprise-beans>
</sun-ejb-jar>

EJB

package com.companyname.webservices.company;
import javax.ejb.Stateless;
import javax.jws.WebMethod;
import javax.jws.WebService;

@Stateless
@WebService(serviceName = "CompanyWebService")
public class CompanyServiceBean implements CompanyService {
  public CompanyServiceBean() {
  }
 
  @WebMethod(operationName="HelloWorld")
  public String sayHello(String name){
    return "Hello there " + name;
  }
 
}