Hi,
   I am getting an error I don't understand when I try to construct an 
ActorSystem using Scala 2.12, Akka 2.5.4, Java 8.  The error message is

*error com.typesafe.config.ConfigException$UnresolvedSubstitution: 
reference.conf: 826: Could not resolve substitution to a value: 
${akka.stream.materializer}*

The app does not use Akka Streams ( unless internally hidden from me ) so I 
am befuddled to see '${akka.stream.materializer}' mentioned in the error 
message.

I am attaching the Scala program that tried to construct an ActorSystem ( 
Agent.scala ), its application.conf and an include referenced by 
application.conf, a list of Akka, etc. jars used, and the execution result 
including stacktrace.  When include was removed same problem.  When 
ActiorSystem was constructed WITHOUT any conf files or parameters IT WORKED 
( but I must have conf files for my app - include is nice but not necessary 
)

Don't know how to get a handle on this.

Thanks,  Joe Mansigian

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
 joe$ ./start
Agent main(): entered
Agent main(): config substitutions resolved? true
 community: recognition
 http_port: 8080
 agent_name: Vehicle
 agent_hostname: 127.0.0.1
 agent_port: 4002
 context_name: ParkingLot
 hub_name: Hub
 hub_hostname: 127.0.0.1
 hub_port: 4000
 protocol: akka.tcp://
 hub_path: 
        akka.tcp://[email protected]:4000/user/Hub
 agent_path: 
        akka.tcp://[email protected]:4002/user/Vehicle
akka.actor.warn-about-java-serializer-usagefalse
 akka.actor.provider: akka.remote.RemoteActorRefProvider
 akka.remote.transport: akka.remote.netty.NettyRemoteTransport
 akka.remote.netty.tcp.hostname: 127.0.0.1
 akka.remote.netty.tcp.port: 4002
 akka.stdout-loglevel: OFF
 akka.loglevel: OFF
Agent main(): community: recognition
error to string com.typesafe.config.ConfigException$UnresolvedSubstitution: 
reference.conf: 826: Could not resolve substitution to a value: 
${akka.stream.materializer}
cause: null
message: reference.conf: 826: Could not resolve substitution to a value: 
${akka.stream.materializer}
com.typesafe.config.ConfigException$UnresolvedSubstitution: reference.conf: 
826: Could not resolve substitution to a value: ${akka.stream.materializer}
        at 
com.typesafe.config.impl.ConfigReference.resolveSubstitutions(ConfigReference.java:87)
        at 
com.typesafe.config.impl.ResolveSource.resolveCheckingReplacement(ResolveSource.java:110)
        at 
com.typesafe.config.impl.ResolveContext.resolve(ResolveContext.java:114)
        at 
com.typesafe.config.impl.SimpleConfigObject$1.modifyChildMayThrow(SimpleConfigObject.java:341)
        at 
com.typesafe.config.impl.SimpleConfigObject.modifyMayThrow(SimpleConfigObject.java:280)
        at 
com.typesafe.config.impl.SimpleConfigObject.resolveSubstitutions(SimpleConfigObject.java:321)
        at 
com.typesafe.config.impl.SimpleConfigObject.resolveSubstitutions(SimpleConfigObject.java:25)
        at 
com.typesafe.config.impl.ResolveSource.resolveCheckingReplacement(ResolveSource.java:110)
        at 
com.typesafe.config.impl.ResolveContext.resolve(ResolveContext.java:114)
        at 
com.typesafe.config.impl.SimpleConfigObject$1.modifyChildMayThrow(SimpleConfigObject.java:341)
        at 
com.typesafe.config.impl.SimpleConfigObject.modifyMayThrow(SimpleConfigObject.java:280)
        at 
com.typesafe.config.impl.SimpleConfigObject.resolveSubstitutions(SimpleConfigObject.java:321)
        at 
com.typesafe.config.impl.SimpleConfigObject.resolveSubstitutions(SimpleConfigObject.java:25)
        at 
com.typesafe.config.impl.ResolveSource.resolveCheckingReplacement(ResolveSource.java:110)
        at 
com.typesafe.config.impl.ResolveContext.resolve(ResolveContext.java:114)
        at 
com.typesafe.config.impl.SimpleConfigObject$1.modifyChildMayThrow(SimpleConfigObject.java:341)
        at 
com.typesafe.config.impl.SimpleConfigObject.modifyMayThrow(SimpleConfigObject.java:280)
        at 
com.typesafe.config.impl.SimpleConfigObject.resolveSubstitutions(SimpleConfigObject.java:321)
        at 
com.typesafe.config.impl.SimpleConfigObject.resolveSubstitutions(SimpleConfigObject.java:25)
        at 
com.typesafe.config.impl.ResolveSource.resolveCheckingReplacement(ResolveSource.java:110)
        at 
com.typesafe.config.impl.ResolveContext.resolve(ResolveContext.java:114)
        at 
com.typesafe.config.impl.SimpleConfigObject$1.modifyChildMayThrow(SimpleConfigObject.java:341)
        at 
com.typesafe.config.impl.SimpleConfigObject.modifyMayThrow(SimpleConfigObject.java:280)
        at 
com.typesafe.config.impl.SimpleConfigObject.resolveSubstitutions(SimpleConfigObject.java:321)
        at 
com.typesafe.config.impl.SimpleConfigObject.resolveSubstitutions(SimpleConfigObject.java:25)
        at 
com.typesafe.config.impl.ResolveSource.resolveCheckingReplacement(ResolveSource.java:110)
        at 
com.typesafe.config.impl.ResolveContext.resolve(ResolveContext.java:114)
        at 
com.typesafe.config.impl.SimpleConfigObject$1.modifyChildMayThrow(SimpleConfigObject.java:341)
        at 
com.typesafe.config.impl.SimpleConfigObject.modifyMayThrow(SimpleConfigObject.java:280)
        at 
com.typesafe.config.impl.SimpleConfigObject.resolveSubstitutions(SimpleConfigObject.java:321)
        at 
com.typesafe.config.impl.SimpleConfigObject.resolveSubstitutions(SimpleConfigObject.java:25)
        at 
com.typesafe.config.impl.ResolveSource.resolveCheckingReplacement(ResolveSource.java:110)
        at 
com.typesafe.config.impl.ResolveContext.resolve(ResolveContext.java:114)
        at 
com.typesafe.config.impl.ResolveContext.resolve(ResolveContext.java:149)
        at 
com.typesafe.config.impl.SimpleConfig.resolveWith(SimpleConfig.java:70)
        at com.typesafe.config.impl.SimpleConfig.resolve(SimpleConfig.java:60)
        at com.typesafe.config.impl.SimpleConfig.resolve(SimpleConfig.java:55)
        at com.typesafe.config.impl.SimpleConfig.resolve(SimpleConfig.java:33)
        at com.typesafe.config.impl.ConfigImpl$1.call(ConfigImpl.java:372)
        at com.typesafe.config.impl.ConfigImpl$1.call(ConfigImpl.java:365)
        at 
com.typesafe.config.impl.ConfigImpl$LoaderCache.getOrElseUpdate(ConfigImpl.java:58)
        at 
com.typesafe.config.impl.ConfigImpl.computeCachedConfig(ConfigImpl.java:86)
        at 
com.typesafe.config.impl.ConfigImpl.defaultReference(ConfigImpl.java:365)
        at 
com.typesafe.config.ConfigFactory.defaultReference(ConfigFactory.java:423)
        at akka.actor.ActorSystem$Settings.<init>(ActorSystem.scala:306)
        at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:650)
        at akka.actor.ActorSystem$.apply(ActorSystem.scala:244)
        at akka.actor.ActorSystem$.apply(ActorSystem.scala:287)
        at akka.actor.ActorSystem$.apply(ActorSystem.scala:262)
        at net.design.emergent.aspire.alfa.agent.Agent$.main(Agent.scala:205)
        at net.design.emergent.aspire.alfa.agent.Agent.main(Agent.scala)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
scala.reflect.internal.util.ScalaClassLoader.$anonfun$run$2(ScalaClassLoader.scala:98)
        at 
scala.reflect.internal.util.ScalaClassLoader.asContext(ScalaClassLoader.scala:32)
        at 
scala.reflect.internal.util.ScalaClassLoader.asContext$(ScalaClassLoader.scala:30)
        at 
scala.reflect.internal.util.ScalaClassLoader$URLClassLoader.asContext(ScalaClassLoader.scala:129)
        at 
scala.reflect.internal.util.ScalaClassLoader.run(ScalaClassLoader.scala:98)
        at 
scala.reflect.internal.util.ScalaClassLoader.run$(ScalaClassLoader.scala:90)
        at 
scala.reflect.internal.util.ScalaClassLoader$URLClassLoader.run(ScalaClassLoader.scala:129)
        at scala.tools.nsc.CommonRunner.run(ObjectRunner.scala:22)
        at scala.tools.nsc.CommonRunner.run$(ObjectRunner.scala:21)
        at scala.tools.nsc.ObjectRunner$.run(ObjectRunner.scala:39)
        at scala.tools.nsc.CommonRunner.runAndCatch(ObjectRunner.scala:29)
        at scala.tools.nsc.CommonRunner.runAndCatch$(ObjectRunner.scala:28)
        at scala.tools.nsc.ObjectRunner$.runAndCatch(ObjectRunner.scala:39)
        at 
scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:66)
        at scala.tools.nsc.MainGenericRunner.run$1(MainGenericRunner.scala:85)
        at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:96)
        at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:101)
        at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
stack trace: 
()

akka-actor_2.12-2.5.4.jar   config-1.2.1.jar
akka-remote_2.11-2.5.4.jar  scala-library.jar

Attachment: Agent.scala
Description: Binary data

    # This is the configuration that will be used by the application.
    # This file, 'application.conf', should be stored at the base of the 
classpath
    # used by the application.

    # Configuration for an agent.

    include file("algorithm.conf")

    akka.stream.materializer = " "

    community = "recognition"
    http_port = 8080     # Jetty embedded HTTP server listens on this port.
    agent_name = "Vehicle"        # algorithm agent name
    agent_hostname = "127.0.0.1"  # algorithm agent actor system runs on this 
host.
    agent_port = 4002             # algorithm agent actor system listens on 
this port.
    context_name = "ParkingLot"   # agent functions in this context
    hub_name = "Hub"              # Hub's actor name.
    hub_hostname = "127.0.0.1"    # Hub's actor system runs on this host.
    hub_port = 4000               # Hub's actor system listens on this port.
    protocol = "akka.tcp://"      # Transport protocol
    
hub_path=${protocol}${community}"@"${hub_hostname}":"${hub_port}"/user/"${hub_name}
    
agent_path=${protocol}${community}"@"${agent_hostname}":"${agent_port}"/user/"${agent_name}

    akka.actor.warn-about-java-serializer-usage = false

    akka 
    {
        actor.provider = "akka.remote.RemoteActorRefProvider"
        remote.transport = "akka.remote.netty.NettyRemoteTransport"
        remote.netty.tcp.hostname = ${agent_hostname}
        remote.netty.tcp.port = ${agent_port}
        stdout-loglevel = "OFF"
        loglevel = "OFF"
        #loglevel = "INFO"
        #loglevel = "DEBUG"
        #log-dead-letters = on
        #log-dead-letters-during-shutdown = on
        #log-config-on-start = on
        remote.log-messages-sent = on
        remote.log-messages-received = on 
    }
   

    

    # This file contains algorithm specific configuration information required 
by
    # the agent that represents the 'Vehicle' algorithm.
    # This file should be stored in the same directory as 'application.conf'.

    goals = "hidden object recognition"
    dependencies = "a, b, c" 
    resources = "a, b, c" 
 
   
   

    

Reply via email to