tags:

views:

87

answers:

1

Hello, first of all, i like to say that i have read the other two questions regarding the same problem, and the solutions outlined in them did not help me. i tried cleaning, rebuilding, re-opening but it ddnt work out. I use eclipse for scala dev. This is the sample prog that i am trying to get an output from, its just casbah.

package com.examples.casbah

import com.novus.casbah.mongodb.MongoConnection

object newObject {
  def main(args: Array[String]): Unit = {

    val mongoConn = MongoConnection()
    val mongoDB = mongoConn("casbah_test")

    val builder = MongoDBObject.newBuilder
    builder += "foo" -> "bar"
    builder += "x" -> "y"
    builder += ("pie" -> 3.14)
    builder += ("spam" -> "eggs", "mmm" -> "bacon")
    // You must explicitly cast the result to a DBObject
    // to receive it as such; you can also request it 'asDBObject'
    val newObj = builder.result.asDBObject

    Console.println(("A", "ProGGram"))
  }
}

I get the following error in the eclipse error log:

An unexpected exception was thrown

this is the stack trace

i read one comment about trying to run via clicking on the root of source project. But i only see Run as Java Applet and Run as Java Application. There is no option to run as Scala application. I have to run it using Alt+Shift+X S

TIA.

+1  A: 

The best place for questions like this is the Scala IDE user mailing list.

Miles Sabin