No configuration setting found for key 'akka'

900 views
Skip to first unread message

elgaz

unread,
Sep 3, 2015, 6:17:24 AM9/3/15
to ElasticMQ
Hi

I'm starting up an embedded ElasticMQ server from a simple Groovy script:


class Deployer{
     
static void main(String... args) {
       
new Deployer().deploy()
   
}
   
void deploy(String version, String feature) {
       
//Restart ElasticMQ
        println
("Starting ElasticMq...")
       
SQSRestServerBuilder.start()
        println
("ElasticMq launched")
       
.....
 
}
}


There is no custom configuration.  When I run this from my IntelliJ, the server starts up with no problem.  When I execute the class from Maven using the GMaven plugin, I'm getting an error:

com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'akka'

at com.typesafe.config.impl.SimpleConfig.findKey(SimpleConfig.java:124)
    at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:147)
    at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:159)
    at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:164)
    at com.typesafe.config.impl.SimpleConfig.getString(SimpleConfig.java:206)
    at akka.actor.ActorSystem$Settings.<init>(ActorSystem.scala:169)
    at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:505)
    at akka.actor.ActorSystem$.apply(ActorSystem.scala:142)
    at akka.actor.ActorSystem$.apply(ActorSystem.scala:109)
    at org.elasticmq.rest.sqs.TheSQSRestServerBuilder$$anonfun$getOrCreateActorSystem$2.apply(SQSRestServerBuilder.scala:172)
    at org.elasticmq.rest.sqs.TheSQSRestServerBuilder$$anonfun$getOrCreateActorSystem$2.apply(SQSRestServerBuilder.scala:171)
    at scala.Option.getOrElse(Option.scala:121)
    at org.elasticmq.rest.sqs.TheSQSRestServerBuilder.getOrCreateActorSystem(SQSRestServerBuilder.scala:171)
    at org.elasticmq.rest.sqs.TheSQSRestServerBuilder.start(SQSRestServerBuilder.scala:81)

I'm not familiar with Scala or the concept of Actor Systems in this context, but I do see that the SQSRestServerBuilder assumes a default Actor System of 'akka'.

GMaven is configured as follows.  The Deployer script launches several more complex services.  ElasticMQ should be the simplest, but I just cannot get it to work!

            <plugin>
               
<groupId>org.codehaus.groovy.maven</groupId>
               
<artifactId>gmaven-plugin</artifactId>
               
<version>1.0</version>
               
<dependencies>
                   
<dependency>
                       
<groupId>org.apache.ant</groupId>
                       
<artifactId>ant-jsch</artifactId>
                       
<version>1.9.0</version>
                   
</dependency>
                   
<dependency>
                       
<groupId>com.jcraft</groupId>
                       
<artifactId>jsch</artifactId>
                       
<version>0.1.51</version>
                   
</dependency>
               
</dependencies>
               
<executions>
                   
<execution>
                       
<id>deploy-to-fuse</id>
                       
<phase>pre-integration-test</phase>
                       
<goals>
                           
<goal>execute</goal>
                       
</goals>
                       
<configuration>
                           
<scriptpath>
                               
<element>src/test/java</element>
                           
</scriptpath>
                           
<source>
                                Deployer.main("${project.parent.version}","ds-all")
                           
</source>
                       
</configuration>
                   
</execution>
               
</executions>
           
</plugin>


Does anyone have any idea why this may be failing in my Maven execution?

Many thanks

Adam Warski

unread,
Sep 4, 2015, 8:50:44 AM9/4/15
to elas...@googlegroups.com
In the jar files of elastimq and akka there are “reference.conf” files with the default configuration.
I think for some reason Maven/GMaven removes them from the classpath - hence the exception.

I’m not sure if I can help any further, as I’m not familiar with such setup.

Adam

--

---
You received this message because you are subscribed to the Google Groups "ElasticMQ" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticmq+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


cscan

unread,
Feb 25, 2016, 6:10:26 PM2/25/16
to ElasticMQ
What's actually happening is that maven is overwriting akka's reference.conf with elasticmq's reference.conf.

I don't use GMaven but I do use Maven Shade. Here's an example plugin conf that appends these reference.confs instead of overwriting them:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-shade-plugin</artifactId>
    <version>2.4.2</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>

Dean Schulze

unread,
Aug 3, 2016, 4:02:47 PM8/3/16
to ElasticMQ
The plugin below didn't work for me.  Neither did the one in the akka docs.  I still get the same error.

Has anyone solved this error?
Reply all
Reply to author
Forward
0 new messages