简体   繁体   中英

Recursive looping error in Scala Intellij

How to fix the error in screenshot?

Scala IDE : Inellij

在此处输入图片说明

The Code in setting.config appear like

package config

import com.typesafe.config.ConfigFactory

object settings {
  private val config=ConfigFactory.load()

  object WebLogGen {
    private val weblogGen = config.getConfig("clickstream")

    lazy val records = weblogGen.getInt("records")
    lazy val timeMultiplier = weblogGen.getInt("time_multiplier")
    lazy val pages = weblogGen.getInt("pages")
    lazy val visitors = weblogGen.getInt("visitors")
    lazy val filepath = weblogGen.getString("file_path")
  }
}

Thanks

Actually you are using the wrong Variable name while assigning the value for:

val visitors = visitors(rnd.nextInt(visitors.length - 1)) 
val pages = pages(rnd.nextInt(pages.length-1)) 
val products = products(rnd.nextInt(products.length - 1))

please use right variables:

val visitors = visitors(rnd.nextInt(Visitors.length - 1)) 
val pages = pages(rnd.nextInt(Pages.length-1)) 
val products = products(rnd.nextInt(Products.length - 1))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM