7

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

Roma Jain
  • 333
  • 4
  • 13

2 Answers2

7

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.

ecoe
  • 4,994
  • 7
  • 54
  • 72
1

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.

Frederic A.
  • 3,504
  • 10
  • 17