Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not resolve substitution to value :$akka.stream-blocking io dispatcher

I am new to akka,kindly help me with this. On running the executable jar, I get the error:Could not resolve substitution to value :$akka.stream-blocking io dispatcher

This is my reference.conf

This is the error on running executable jar created after mvn assembly:single

like image 203
Roma Jain Avatar asked Apr 11 '18 07:04

Roma Jain


2 Answers

The reference.conf and your application.conf are merged, and to facilitate this, you need to tell maven to append the reference.conf so that all of it's substitutions are resolved.

If you're using maven-shade-plugin, then your POM should be configured like so such that reference.conf is being appended by the AppendingTransformer:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.1.1</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <transformers>

                <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                  <resource>reference.conf</resource>
                </transformer>

              </transformers>
            </configuration>
          </execution>
        </executions>
      </plugin>

If you're using maven-assembly-plugin, then see this related question.

like image 145
ecoe Avatar answered Oct 23 '22 13:10

ecoe


Ensure that your assembly merges the various reference.conf together rather than keeping only one.

As a side note, do not put your own configurations in reference.conf, use application.conf instead as described here.

like image 20
Frederic A. Avatar answered Oct 23 '22 14:10

Frederic A.