1 Reply Latest reply on Oct 7, 2011 3:14 AM by jaikiran pai

    jboss.xml descriptor in JBoss AS 5.1.0.GA

    Radomir Penev Newbie

      Hello everyone,

      I have a problem with the jboss.xml deployment descriptor on JBoss AS 5.1.0.GA. I want to tunnel EJB3 calls over HTTP, but I do not want to use the annotation based approach, but to go with the deployment descriptor, as it allows for dynamic server address(substituted by JBoss, i.e. 'jboss.bind.address'), while the annotation approach uses static.

      My jboss.xml looks like this:

       

      <?xml version="1.0" encoding="UTF-8"?>

      <jboss xmlns="http://www.jboss.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

             xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"

             version="3.0">

          <enterprise-beans>

              <session>

                  <ejb-name>LoginServiceBean</ejb-name>

                  <remote-binding>

                      <client-bind-url>servlet://${jboss.bind.address}:8080/servlet-invoker/ServerInvokerServlet

                      </client-bind-url>

                  </remote-binding>

              </session>

       

       

              <session>

                  <ejb-name>CommandExecutionBean</ejb-name>

                  <remote-binding>

                      <client-bind-url>http://${jboss.bind.address}:8080/servlet-invoker/ServerInvokerServlet

                      </client-bind-url>

                  </remote-binding>

              </session>

          </enterprise-beans>

      </jboss>

       

      I also tried with the header for JBoss 5.1, like this:

       

      <?xml version="1.0" encoding="UTF-8"?>

      <jboss xmlns="http://www.jboss.com/xml/ns/javaee"

             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

             xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss_5_1.xsd"

             version="5.1">

          <enterprise-beans>

              <session>

                  <ejb-name>LoginServiceBean</ejb-name>

                  <remote-binding>

                      <client-bind-url>servlet://${jboss.bind.address}:8080/servlet-invoker/ServerInvokerServlet

                      </client-bind-url>

                  </remote-binding>

              </session>

       

       

              <session>

                  <ejb-name>CommandExecutionBean</ejb-name>

                  <remote-binding>

                      <client-bind-url>http://${jboss.bind.address}:8080/servlet-invoker/ServerInvokerServlet

                      </client-bind-url>

                  </remote-binding>

              </session>

          </enterprise-beans>

      </jboss>

       

      But neither worked. The exception I see is the following:

       


      at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)

      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:177)

      at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

      at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

      at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

      at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)

      at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

      at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)

      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

      at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)

      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)

      at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

      at org.jboss.Main.boot(Main.java:221)

      at org.jboss.Main$1.run(Main.java:556)

      at java.lang.Thread.run(Thread.java:662)

      Caused by: java.lang.NullPointerException


      at java.lang.Class.forName0(Native Method)

      at java.lang.Class.forName(Class.java:247)

      at org.jboss.metadata.process.processor.ejb.jboss.SetDefaultLocalBusinessInterfaceProcessor.process(SetDefaultLocalBusinessInterfaceProcessor.java:114)

      at org.jboss.metadata.process.chain.ejb.jboss.JBossMetaDataProcessorChain.process(JBossMetaDataProcessorChain.java:115)

      at org.jboss.ejb3.deployers.Ejb3MetadataProcessingDeployer.deploy(Ejb3MetadataProcessingDeployer.java:115)

      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

      ... 29 more

       

      Maybe I got something wrong with jboss.xml, as I managed to get it working some time ago, but now I couldn't.

      What I understood from the stack trace, and later looking into the code of SetDefaultLocalBusinessInterfaceProcessor class, the ejb-class element is missing. But if I add it, I get validation problems, pointing that this element is not expected there.

        Any help is appreciated,

      Radomir