Philip K. Adetiloye
Philip K. Adetiloye

Reputation: 3270

Scala IDE: method XXXX is defined twice conflicting symbols both originated in file

I just downloaded the Scala eclipse IDE but am getting some errors after importing my project

method getTableConfig is defined twice conflicting symbols both originated in file '....'

Here is the sample code, any reason why this error pops up - code compiled successfully though

package com.mavencode.app.config

import java.io.{BufferedReader, File, InputStream, InputStreamReader}

import ...

object ConfigUtil
{
  def getTableConfig(configKey:String) (implicit config: Config) : ConnectionConfig = {
    val report: Config = config.getConfig(s"tables.$configKey")
    val db: Config = config.getConfig(s"db.${report.getString("db")}")
    ConnectionConfig(
      db.getString("host"),
      db.getInt("port"),
      db.getString("database"),
      similarity.getString("table"),
      db.getString("user"),
      db.getString("password"),
      report.getInt("lowerBound"),
      report.getInt("upperBound"),
      report.getInt("numPartitions")
    )
  }

Upvotes: 2

Views: 1046

Answers (2)

Philip K. Adetiloye
Philip K. Adetiloye

Reputation: 3270

I think it's a bug in the latest version of Scala IDE I downloaded, I opened my project on an older scala IDE and it worked fine

Bug with this version

Scala IDE build of Eclipse SDK
Build id: 4.5.0-vfinal-2016-12-13T10:59:29Z-Typesafe

Worked on older version

Scala IDE build of Eclipse SDK
Build id: 4.4.1-vfinal-2016-05-04T11:16:00Z-Typesafe

Upvotes: 2

Sami Badawi
Sami Badawi

Reputation: 1032

There is a Scala project creating wizard coming with the Scala-ide. This does not work so well with SBT. If you are using SBT you are better off creating the Scala project yourself. You can use Giter8 for that. Here are the Giter8 templates:

https://github.com/foundweekends/giter8/wiki/giter8-templates

Then generate the Eclipse project using the Sbt Eclipse plugin:

https://github.com/typesafehub/sbteclipse

Run

sbt eclipse

Import the existing project into Eclipse

Here is a more detailed description of the process:

http://www.nodalpoint.com/development-and-deployment-of-spark-applications-with-scala-eclipse-and-sbt-part-1-installation-configuration/

Upvotes: 0

Related Questions