JRomero
JRomero

Reputation: 4868

Infinispan Cache causes WFLYCTL0180: Services with missing/unavailable dependencies => undefined

Trying to use the Wildfly 10.1.0.Final provided infinispan but following any documentation online simply yields the following results. Seems like there is almost no helpful information in the output.

Any ideas on to how to troubleshoot it further and ultimately resolve the error?

Note: Replacing Cache class with a HashMap (and removing @Resource) causes the issue to go away but obviously I'd like to use the Cache.

Relevant pom.xml

<infinispan.version>8.2.4.Final</infinispan.version>

...

<dependency>
  <groupId>org.infinispan</groupId>
  <artifactId>infinispan-core</artifactId>
  <scope>provided</scope>
</dependency>
<dependency>
  <groupId>org.infinispan</groupId>
  <artifactId>infinispan-commons</artifactId>
  <version>${infinispan.version}</version>
  <scope>provided</scope>
</dependency>

Relevant standalone.xml

<subsystem xmlns="urn:jboss:domain:ee:4.0">
  <global-modules>
    <module name="org.infinispan" slot="main"/>
    <module name="org.infinispan.commons"/>
  </global-modules>
  ...
</subsystem>
...
<subsystem xmlns="urn:jboss:domain:infinispan:4.0">
  ...
  <cache-container name="replicated-cache" default-cache="default" module="org.wildfly.clustering.server" jndi-name="infinispan/replicated-cache">
    <transport lock-timeout="60000"/>
    <replicated-cache name="default" jndi-name="infinispan/replicated-cache/default" mode="SYNC">
      <transaction locking="OPTIMISTIC" mode="FULL_XA"/>
      <eviction strategy="NONE"/>
    </replicated-cache>
  </cache-container>
</subsystem>

Relevant code:

@Path("/")
@NoAuthentication
@Slf4j
@Stateful
public class SomeEndpoint {


  @Resource(lookup = "java:jboss/infinispan/replicated-cache/default")
  private Cache<String, AudioCache> cache;

  // ...
}

Server log Output:

17:32:24,144 INFO  [org.hibernate.hql.internal.QueryTranslatorFactoryInitiator] (ServerService Thread Pool -- 26) HHH000397: Using ASTQueryTranslatorFactory
17:32:24,392 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "tcs.ear")]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined}
17:32:24,394 ERROR [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0021: Deploy of deployment "some.ear" was rolled back with the following failure message: {"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined}
17:32:24,435 INFO  [org.infinispan.eviction.impl.PassivationManagerImpl] (ServerService Thread Pool -- 22) ISPN000029: Passivating all entries to disk
17:32:24,438 INFO  [org.infinispan.eviction.impl.PassivationManagerImpl] (ServerService Thread Pool -- 22) ISPN000030: Passivated 0 entries in 2 milliseconds
17:32:24,439 INFO  [org.infinispan.eviction.impl.PassivationManagerImpl] (ServerService Thread Pool -- 69) ISPN000029: Passivating all entries to disk
17:32:24,440 INFO  [org.infinispan.eviction.impl.PassivationManagerImpl] (ServerService Thread Pool -- 69) ISPN000030: Passivated 0 entries in 0 milliseconds

Upvotes: 0

Views: 2047

Answers (1)

Paul Ferraro
Paul Ferraro

Reputation: 326

Just to clarify, do you have any Infinispan jars bundled with your application? If so remove them.

That's a strange error message, as usually these errors are associated with a list of services that were unable to start.

Are you able to reproduce this with WF11?

Upvotes: 1

Related Questions