1 Reply Latest reply on Apr 7, 2017 11:44 AM by kimba

    Wildlfy 10 http-remoting setup fails at startup

    kimba

      Hi again

       

      I am working on moving old app to Wildfly 10. I have 2 servers that have remote calls to each other. In the past it was implemented by JNDI lookup, but for wildfly 10 i wanted to implement new solution using this instruction:
      EJB invocations from a remote server instance - WildFly 10 - Project Documentation Editor

      After i made changes to my standalone-full and added jboss-ejb-client.xml, this error started to happen on startup (full log attached):

       

      19:32:16,448 INFO  [org.jboss.as.ejb3.deployment] (MSC service thread 1-1) WFLYEJB0473: JNDI bindings for session bean named 'CallbackServiceFacade' in deployment unit 'subdeployment "GL-ejb-2.0.jar" of deployment "GL.ear"' are as follows:

       

              java:global/GL/GL-ejb-2.0/CallbackServiceFacade!com.core.facade.callback.CallbackServiceFacadeRemote

              java:app/GL-ejb-2.0/CallbackServiceFacade!com.core.facade.callback.CallbackServiceFacadeRemote

              java:module/CallbackServiceFacade!com.core.facade.callback.CallbackServiceFacadeRemote

              java:jboss/exported/GL/GL-ejb-2.0/CallbackServiceFacade!com.core.facade.callback.CallbackServiceFacadeRemote

              java:global/GL/GL-ejb-2.0/CallbackServiceFacade!com.core.facade.callback.CallbackServiceFacade

              java:app/GL-ejb-2.0/CallbackServiceFacade!com.core.facade.callback.CallbackServiceFacade

              java:module/CallbackServiceFacade!com.core.facade.callback.CallbackServiceFacade

              java:global/GL/GL-ejb-2.0/CallbackServiceFacade!com.core.facade.callback.CallbackServiceFacadeLocal

              java:app/GL-ejb-2.0/CallbackServiceFacade!com.core.facade.callback.CallbackServiceFacadeLocal

              java:module/CallbackServiceFacade!com.core.facade.callback.CallbackServiceFacadeLocal

       

      19:32:16,869 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) WFLYWELD0006: Starting Services for CDI deployment: GL.ear

      19:32:16,917 INFO  [org.jboss.weld.Version] (MSC service thread 1-1) WELD-000900: 2.3.2 (Final)

      19:32:17,416 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) WFLYWELD0009: Starting weld service for deployment GL.ear

      19:32:18,573 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 84) WFLYJPA0003: Starting Persistence Unit Service 'GL.ear#Core2PersistenceUnit'

      19:32:18,698 INFO  [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 84) HHH000204: Processing PersistenceUnitInfo [

              name: Core2PersistenceUnit

              ...]

      19:32:19,682 INFO  [org.hibernate.Version] (ServerService Thread Pool -- 84) HHH000412: Hibernate Core {4.3.10.Final}

      19:32:19,682 INFO  [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 84) HHH000206: hibernate.properties not found

      19:32:19,682 INFO  [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 84) HHH000021: Bytecode provider name : javassist

      19:32:20,307 INFO  [org.hibernate.annotations.common.Version] (ServerService Thread Pool -- 84) HCANN000001: Hibernate Commons Annotations {4.0.5.Final}

      19:32:21,041 INFO  [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 84) HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect

      19:32:21,135 INFO  [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (ServerService Thread Pool -- 84) HHH000397: Using ASTQueryTranslatorFactory

      19:32:21,369 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "GL.ear")]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => [

          "jboss.deployment.subunit.\"GL.ear\".\"GL-ejb-2.0.jar\".component.CallbackServiceFacade.VIEW.\"com.core.facade.callback.CallbackServiceFacadeRemote\".REMOTE is missing [jboss.ejb3.connector]",

          "jboss.deployment.subunit.\"GL.ear\".\"GL-ejb-2.0.jar\".component.CallbackServiceFacade.CREATE is missing [jboss.ejb.remote-transactions-repository]"

      ]}

      19:32:21,619 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 37) WFLYSRV0010: Deployed "GL.ear" (runtime-name : "GL.ear")

      19:32:21,619 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report

      WFLYCTL0184:    New missing/unsatisfied dependencies:

            service jboss.ejb3.connector (missing) dependents: [service jboss.deployment.subunit."GL.ear"."GL-ejb-2.0.jar".component.InboundFacade.VIEW."com.grouplink.inbound.facade.InboundFacadeRemote".REMOTE, service jboss.deployment.subunit."GL.ear"."GL-ejb-2.0.jar".component.CallbackServiceFacade.VIEW."com.core.facade.callback.CallbackServiceFacadeRemote".REMO

       

      This error appeared only after i made changes to my standalone-full.xml (attached) so i suspect there is something wrong there.

      I have to elaborate what project structure i have:

       

      GL.ear ----

                     | ---GL-ejb.jar---

                     |                        |----ejb-jar.xml
                     |
                     |---GL-war.war

       

      In my ejb-jar.xml i have this:
      <enterprise-beans>

      ....
        <session>
        <ejb-name>CallbackServiceFacade</ejb-name>
        <local>com.core.facade.callback.CallbackServiceFacadeLocal</local>
        <ejb-class>com.core.facade.callback.CallbackServiceFacade</ejb-class>
        <remote>com.core.facade.callback.CallbackServiceFacadeRemote</remote>
        <session-type>Stateless</session-type>
        <transaction-type>Bean</transaction-type>
        </session>
        ....
      </enterprise-beans>

       

      Those classes are located in core.jar under GL.ear/lib folder, and therefore Annotation based config not working (so i use ejb-jar.xml):

       

      @Stateless
      @LocalBean
      @Local(CallbackServiceFacadeLocal.class)

      @Remote(CallbackServiceFacadeRemote.class)

      public class CallbackServiceFacade { ....

        • 1. Re: Wildlfy 10 http-remoting setup fails at startup
          kimba

          Update on this: i found missing elements from my standalone-full:

           

          Under <subsystem xmlns="urn:jboss:domain:ejb3:4.0"> subsystem there should be added <remote connector-ref="http-remoting-connector" thread-pool-name="default"/>
          Under <subsystem xmlns="urn:jboss:domain:remoting:3.0">there should be added <http-connector name="http-remoting-connector" connector-ref="default" security-realm="ApplicationRealm"/>

           

          After that my application started to deploy succesfully. But JNDI still does not work and fails on invocation of method:

          java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:GL, moduleName:GL-ejb-2.0, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@7c10977f

              at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:798)

              at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:128)

              at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:186)

              at org.jboss.ejb.client.EJBInvocationHandler.sendRequestWithPossibleRetries(EJBInvocationHandler.java:255)

              at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:200)

              at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:183)

              at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:146)

              at com.sun.proxy.$Proxy157.sendReservation(Unknown Source)


          Code that makes lookup:

          private Context createContext() throws NamingException{

            Properties properties = new Properties();
            properties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
            return new InitialContext(properties);
          }

           

          public <T> T getRemote (Class<T> remote, String jndiName, String appName, String moduleName) throws NamingException {

            final Context context = createContext();
            final String viewClassName = remote.getName();
            return remote.cast( context.lookup(  "ejb:" +appName + "/" + moduleName + "/" + jndiName + "!" + viewClassName) );
          }

           

          I made changes in the standalone-full and created user for remoting on target server