12 Replies Latest reply on Apr 26, 2007 3:45 PM by vladtwilight

    Problems Jboss 4.2.0 RC2

    matienzar

      Hello with this version I've this error:
      org.jboss.deployment.DeploymentException: Cannot create service endpoint; - nested throwable: (org.jboss.ws.WSException: Multiple context root not supported)
      Caused by: org.jboss.ws.WSException: Multiple context root not supported
      at org.jboss.ws.integration.jboss42.ServiceEndpointGeneratorEJB.createJBossWebAppDescriptor(ServiceEndpointGeneratorEJB.java:258)

      An example of EJB, I've this annotations:
      @WebService(
      name = "IAbsentismo",
      targetNamespace = "http://org.muvale.negocio/ws/ifc",
      serviceName = "Absentismo")
      @SOAPBinding(style = SOAPBinding.Style.RPC)

      @Stateless
      @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
      @Interceptors ({KyrianEjbHandler.class})
      @Local(IAbsentismo.class)
      @RolesAllowed("publico")
      @LocalBinding(jndiBinding = "/ws/Absentismo")
      @WebContext(authMethod="BASIC", transportGuarantee="NONE", secureWSDLAccess=false,contextRoot="/ws/Absentismo")
      @SecurityDomain("muvale")


      In Jboss4.2.0 RC1 it works perfectly

        • 1. Re: Problems Jboss 4.2.0 RC2
          matienzar

          I've commented this :
          /*
          @WebService(
          name = "IAbsentismo",
          targetNamespace = "http://org.muvale.negocio/ws/ifc",
          serviceName = "Absentismo")

          @SOAPBinding(style = SOAPBinding.Style.RPC)
          */

          And it works perfectly.

          A lot of thanks,

          Marcial

          • 2. Re: Problems Jboss 4.2.0 RC2
            heiko.braun

            Your deployment seems to contain web service endpoint declarations that refer to different context-root's. These have to be declared outside the scope of the service impl. you posted. I.e. port-component declarations are one possibility. Could you post the deployment descriptor that belongs to this deployment?

            • 3. Re: Problems Jboss 4.2.0 RC2
              matienzar

              Structure:
              kyrian.ear
              --->kyrianWeb.war
              --->kyrianEJb.jar
              --->META-INF
              ---> application.xml
              ---> jboss-app.xml


              application.xml

              <?xml version="1.0" encoding="UTF-8"?>
              <application id="Application_ID" version="1.4" 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/application_1_4.xsd">
               <display-name>kyrian</display-name>
               <module id="EjbModule_1174398988979">
               <ejb>kyrianEJB.jar</ejb>
               </module>
               <module id="WebModule_1174673657682">
               <web>
               <web-uri>kyrianAxis.war</web-uri>
               <context-root>axis</context-root>
               </web>
               </module>
               <module id="WebModule_1174990194749">
               <web>
               <web-uri>kyrianWeb.war</web-uri>
               <context-root>muvalesrv</context-root>
               </web>
               </module>
              </application>
              


              jboss-app.xml
              <!DOCTYPE jboss-app PUBLIC "-//JBoss//DTD J2EE Application 1.4//EN"
               "http://www.jboss.org/j2ee/dtd/jboss-app_4_0.dtd">
              <jboss-app>
               <!--
               <module>
               <service>hibernate-service.xml</service>
               </module>
               -->
               <module>
               <service>gnomo-scheduler-service.xml</service>
               </module>
              </jboss-app>
              



              • 4. Re: Problems Jboss 4.2.0 RC2

                I'm seeing the same thing with JBOSSAS 4.2.0 RC2 but it only seems to fail when I declare more than one class with the @WebService annotation.

                • 5. Re: Problems Jboss 4.2.0 RC2

                  I just installed jbossws-1.2.1.GA onto JBOSSAS 4.0.5 GA, and I'm getting the same exception. I wasn't getting this with the JBossWS-1.2.0.SP1 on 4.0.5GA

                  • 6. Re: Problems Jboss 4.2.0 RC2
                    heiko.braun

                    Could it be that you have more than one ejb tagged @WebService within the jar?
                    If yes, what do the annotations look like? Could it be that you have different context root's specified within the same ejb.jar?

                    • 7. Re: Problems Jboss 4.2.0 RC2

                      The 2 classes are annotated as such (simplest configuratio causing a failure)

                      @Stateless
                      @WebService
                      public class EchoBean implements EchoRemote{
                      


                      And the other:
                      @Stateless
                      @WebService
                      public class foobar {
                      


                      • 8. Re: Problems Jboss 4.2.0 RC2
                        thomas.diesler

                        The CTS requires that the context root is derived in a certain (complicated way)

                        Please explicitly define @WebContext.contextRoot for every ejb endpoint. Note, that all endpoints withain one deployment must share the same context root.

                        http://jira.jboss.org/jira/browse/JBWS-1618

                        • 9. Re: Problems Jboss 4.2.0 RC2
                          matienzar

                          It seems to work.

                          A lot of thanks

                          • 10. Re: Problems Jboss 4.2.0 RC2
                            vladtwilight

                            I've imported all the JBoss 4.2 JARs I can find into my build path in Eclipse. I still cannot see the @WebContext annotation. What do I need to import?

                            Also, would it be possible to show an example of how to set the context root? Finally, how was the default context root derived in JBoss 4.0.5?

                            Thanks!!

                            Dan

                            • 11. Re: Problems Jboss 4.2.0 RC2

                              I have a JBOSS_CLIENT_LIBS User Libraries setup for the eclipse workspace, and I added all jars under %JBOSS_HOME%/client

                              JBOSSWS 1.2.1GA is included in the JBOSSAS 4.2 CR2, and the appropriate jars are in the client lib folder

                              Web context eg.

                              @WebContext(contextRoot="/SomeContext")
                              


                              From a previous post, this needs to be the same for all annotations within the same deployment although I haven't tested varations of the context root.

                              • 12. Re: Problems Jboss 4.2.0 RC2
                                vladtwilight

                                I discovered some interesting behavior. I created a stateless session bean (SLSB) with a @WebService annotation. I added an @WebMethod annotation to a method within my SLSB that returns an Entity Bean. JBoss 4.2.0CR2 then freezes up during startup when it tries to create the SLSB wsdl file. I assume that web service methods should only return Strings, Booleans, etc., but the Jboss behavior is not ideal.