Uploaded image for project: 'EJBCA'
  1. EJBCA
  2. ECA-7408

Don't shadow remote EJB client classes in system tests

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: EJBCA 6.14.1
    • Fix Version/s: EJBCA 6.15.1
    • Component/s: None
    • Labels:
      None
    • Environment:
      Wildfly 12 or JBoss EAP 7.1
    • Issue discovered during:
      Integration
    • Sprint:
      EJBCA Sprint 21 Team Alice

      Description

      For remote EJB we need the remote EJB client library from the application server.

      On Wildfly 12 the library will fail (busy at 100% CPU of one thread) to perform remote EJB invocations if we shadow the org,jboss.logging.Logger in the app-servers library (3.3.x) with the one that we bundle for Hibernate (3.1.x).

      The situation also applies with JBoss EAP 7.1.

      [junit] 2018-10-19 12:22:07,874 TRACE [org.xnio.nio.selector] Unexpected failure of selection of key sun.nio.ch.SelectionKeyImpl@74287ea3
      [junit] java.lang.NoSuchMethodError: org.xnio.nio.Log.tracef(Ljava/lang/String;ILjava/lang/Object;)V
      [junit]     at org.xnio.nio.WorkerThread.run(WorkerThread.java:590)
      [junit] 2018-10-19 12:22:07,874 TRACE [org.xnio.nio.selector] Beginning select on sun.nio.ch.EPollSelectorImpl@2af883a5
      [junit] 2018-10-19 12:22:07,874 TRACE [org.xnio.nio] Select, queue is empty
      [junit] 2018-10-19 12:22:07,874 TRACE [org.xnio.nio.selector] Selected on sun.nio.ch.EPollSelectorImpl@2af883a5
      [junit] 2018-10-19 12:22:07,874 TRACE [org.xnio.nio.selector] Selected key sun.nio.ch.SelectionKeyImpl@74287ea3 for java.nio.channels.SocketChannel[connection-pending local=/0:0:0:0:0:0:0:0:44987 remote=localhost/127.0.0.1:4447]
      

      The quick solution to this is to change the order of library inclusion in our system tests from

      	<path id="systemtests.classpath">
      		<path refid="systemtests.classpath.nojee"/>
      		<path refid="lib.jee.classpath"/>
      		<path refid="lib.jee-client.classpath"/>
      		<pathelement path="${clover.jar}"/>
      	</path>
      

      to

      	<path id="systemtests.classpath">
      		<path refid="lib.jee.classpath"/>
      		<path refid="lib.jee-client.classpath"/>
      		<path refid="systemtests.classpath.nojee"/>
      		<pathelement path="${clover.jar}"/>
      	</path>
      

      A potential side effect that needs to be checked is if tests relying on client side Hibernate are affected (..if any.. or these should perhaps even run with a different class path).

      Additionally, the WS Tests are run with

      	<target name="runws" description="Run Web Services system tests">
      		<property name="runone-internal.classpath" value="systemtests.classpath.nojee"/>
      

      instead of systemtests.classpath and apparently this will still hang the overall systems tests with the same problem as before.

      See also
      https://github.com/jboss-logging/jboss-logging/blame/master/src/main/java/org/jboss/logging/Logger.java
      https://github.com/xnio/xnio/blob/3.6/nio-impl/src/main/java/org/xnio/nio/WorkerThread.java

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tomas Tomas Gustavsson
                Reporter:
                johan Johan Eklund
                Verified by:
                Johan Eklund, Tomas Gustavsson
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: