4 Replies Latest reply on Jul 3, 2006 4:11 AM by arsathish

    deployment problems

      If you're using ejbdoclet to generate your deployment descriptors, make sure you are using ejbspec="2.1" instead of ejbspec="2.0"

        • 1. Re: deployment problems
          thomas.diesler

          What sample are you referring to? It seems the EJB verifier uses EJB-2.0, whereas in EJB-2.1 it is allowed to just have an SEI and no Remote/Local interface

          • 2. Re: deployment problems
            arsathish

            Hi,

            I am facing the same problem now in JBOSS 4.0.1Sp1.

            I am having an EAR which has all EJB's and they seem to be deployed fine. Now I want to have a expose one of the EJB as a WS. So first tried a with Hello Bean and tried to expose as WS. I am not using any ejb-doclet. I used Sun's JSWDP to create the WSDL, config and mapping xml. But still I am getting this error:

            12:06:27,178 INFO [EARDeployer] Init J2EE application: file:/C:/jboss-4.0.1sp1/
            server/mas/deploy/mas.ear
            12:06:53,205 WARN [verifier] EJB spec violation:
            Bean : HelloBean
            Section: 7.10.1
            Warning: The session bean must implement either a remote home and remote, or a l
            ocal home and a local interface.

            12:06:55,148 ERROR [MainDeployer] could not create deployment: file:/C:/jboss-4.
            0.1sp1/server/mas/tmp/deploy/tmp49186mas.ear-contents/mas-ejb.jar
            org.jboss.deployment.DeploymentException: Verification of Enterprise Beans faile
            d, see above for error messages.
            at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:553)
            at org.jboss.deployment.MainDeployer.create(MainDeployer.java:918)
            at org.jboss.deployment.MainDeployer.create(MainDeployer.java:910)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
            at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
            sorImpl.java:25)


            But if I deploy the same Webservice as a separate JAR file then it seem to work perfectly. Can somebody help me out on this issue ASAP. I have already posted several times in this newsgroup. But no response so far.

            -Sathish

            • 3. Re: deployment problems
              qpool.char

              AFAIK JAXWS 2.0 only works with EJB 3. So be sure your WebService endpoint is written with EJB 3.0. If your application uses EJB 2.1, then seperate EJB 3.0 and EJB 2.1 in different jars, for example application.jar and webservice.ejb3 . You can then deploy them together in one .ear file. That should work.

              • 4. Re: deployment problems
                arsathish

                Atlast it worked. The problem was that in my ejb-jar.xml I was referring to 2_0.dtd. I have changed that to 2.1 and it worked.

                Older ejb-jar.xml had

                <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "C:/jboss-4.0.1sp1/docs/dtd/ejb-jar_2_0.dtd">

                I changed that to:

                <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" version="2.1" 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">

                And it worked.

                Thanks a lot.
                Sathish