2 Replies Latest reply on Nov 23, 2005 5:45 AM by bendowling

    Pronlem deploying a EJB 2.1 Web Service

    bendowling

      I'm getting the following error when trying to deploy my web service on jboss 4.0.3:

      21:22:43,910 WARN [verifier] EJB spec violation:
      Bean : AnnAnnNet
      Section: 22.2
      Warning: The Bean Provider must specify the fully-qualified name of the Java class that implements the enterprise bean's business methods in the <ejb-class> element.
      Info : Class not found on 'org.ac.soton.ecs.annann.ws.AnnAnnWebServiceEJB': No ClassLoaders found for: org.ac.soton.ecs.annann.ws.AnnAnnWebServiceEJB

      I've looked at the sample ws files that are attached to the JBossWS wiki page, and I can't see where I've gone wrong. My ejb-jar file is as follows:

      <?xml version="1.0" encoding="UTF-8"?>
      <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
      version="2.1">
      <enterprise-beans>

      <ejb-name>AnnAnnNet</ejb-name>
      <service-endpoint>org.ac.soton.ecs.annann.ws.AnnAnnWebServiceInterface</service-endpoint>
      <ejb-class>org.ac.soton.ecs.annann.ws.AnnAnnWebServiceEJB</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>

      </enterprise-beans>
      </ejb-jar>

      and the jar file is as follows:

      META-INF/
      META-INF/MANIFEST.MF
      META-INF/annannnet-mapping.xml
      META-INF/ejb-jar.xml
      META-INF/webservices.xml
      META-INF/wsdl/
      META-INF/wsdl/AnnAnnNet.wsdl
      META-INF/jboss.xml
      /
      /org/
      /org/ac/
      /org/ac/soton/
      /org/ac/soton/ecs/
      /org/ac/soton/ecs/annann/
      /org/ac/soton/ecs/annann/ws/
      /org/ac/soton/ecs/annann/ws/AnnAnnWebServiceEJB.class
      /org/ac/soton/ecs/annann/ws/AnnAnnWebServiceInterface.class
      ...[wscompile generated classes]...
      /org/ac/soton/ecs/annann/ws/ServerSideHandler.class

      Any help would be greatly appreciated! Let me know if any more info is required.

      Thanks in advance, Ben

        • 1. Re: Problem deploying a EJB 2.1 Web Service
          bendowling

          I've solved this problem after about 5 hours of trying! The problem was putting the classfiles in /org instead of org! I won't be making that mistake again. Although I've fixed that problem I'm still getting problems deploying. The errors I get now are:


          10:26:21,776 WARN [verifier] EJB spec violation:
          Bean : AnnAnnWebServiceEJB
          Method : public abstract void lock(String, String) throws RemoteException
          Section: 7.11.9
          Warning: For each method defined in the service endpoint interface, there be a matching method in the session bean�s class with the same return type.

          10:26:21,777 WARN [verifier] EJB spec violation:
          Bean : AnnAnnWebServiceEJB
          Method : public abstract void unlock(String, String) throws RemoteException
          Section: 7.11.9
          Warning: For each method defined in the service endpoint interface, there be a matching method in the session bean�s class with the same return type.
          ...
          [for every method in the interface]

          Every method defined in the interface IS implemented in the session bean though, so is it a config problem?

          Thanks for any help, Ben

          • 2. Re: Problem deploying a EJB 2.1 Web Service
            bendowling

            I've just noticed that the warning says that each method in the interface is defined as returning void, which isn't the case. The interface defines most of the return types as boolean. Why would this happen?

            Cheers