Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7749273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:00:15+00:00 2026-06-01T11:00:15+00:00

I’m getting the following error when I try to extend SalatDAO or use grater[T].asObject(x):

  • 0

I’m getting the following error when I try to extend SalatDAO or use grater[T].asObject(x):

class file needed by SalatDAO is missing. reference type MongoCollection of
com.mongodb.casbah.TypeImports refers to nonexisting symbol.

I’ve followed the Salat examples but, for some reason, extending SalatDAO and graters asObject do not work for me. I cannot find any reference to this error online.

Here’s my code:

import net.trevor.model.DBConnection._
import com.novus.salat._
import com.novus.salat.global._
import com.mongodb.casbah.Imports._
import com.novus.salat.dao.SalatDAO

//error occurs on following line:
object HandleDAO extends SalatDAO[Handle, ObjectId](DBConnection.db("Handles")){

      def getHandleAsDBObject(handle : Handle) : DBObject = 
         grater[Handle].asDBObject(handle)

      def getHandleFromDBObject(dbObject : DBObject) : Handle =
         //error occurs on following line: 
         grater[Handle].asObject(dbObject)  
 }

I’d really appreciate any help or advice on this. I’m new to Scala and Mongodb.

I’m compiling using sbt compile. Here’s my build.sbt

name := "handle_engine"

version := "1.0"

scalaVersion := "2.9.1"

scalacOptions += "-deprecation"

fork in run := true


resolvers ++= Seq(
    "twitter-repo" at "http://maven.twttr.com",
    "repo.novus rels" at "http://repo.novus.com/releases/",
    "repo.novus snaps" at "http://repo.novus.com/snapshots/",
    "Java.net Maven2 Repository" at "http://download.java.net/maven/2/"
) 


libraryDependencies ++= {
  val liftVersion = "2.4-M5" // Put the current/latest lift version here
  Seq(
    "net.liftweb" %% "lift-webkit" % liftVersion % "compile->default",
    "net.liftweb" %% "lift-mapper" % liftVersion % "compile->default",
    "net.liftweb" %% "lift-amqp" % liftVersion % "compile->default",
    "net.liftweb" %% "lift-mongodb" % liftVersion % "compile->default",
    "net.liftweb" %% "lift-mongodb-record" % liftVersion % "compile->default",
    "net.liftweb" %% "lift-wizard" % liftVersion % "compile->default")
}



libraryDependencies ++= Seq( 
  "org.eclipse.jetty" % "jetty-server" % "8.1.0.RC5", // % "compile,jetty",
  "org.eclipse.jetty" % "jetty-servlet" % "8.1.0.RC5", // % "compile,jetty",
  "org.mongodb" % "mongo-java-driver" % "compile->default",
  "com.rabbitmq" % "amqp-client" % "compile->default",
  "org.mongodb" % "casbah_2.9.0-1" % "3.0.0-M2",
  "com.novus" % "salat-core_2.8.1" % "0.0.7",    //Salat for MongoDB and Casbah
  "org.apache.avro" % "avro" % "1.6.2",
  "com.twitter" % "util-core_2.9.1" % "1.12.8", "com.twitter" % "util-eval_2.9.1" %   "1.12.8",
  "junit" % "junit" % "4.5" % "test->default",
  "javax.servlet" % "servlet-api" % "2.5" % "provided->default",
  "ch.qos.logback" % "logback-classic" % "0.9.26" % "compile->default"
)

seq(webSettings :_*)

libraryDependencies += "org.mortbay.jetty" % "jetty" % "6.1.26" % "test,container"

libraryDependencies += "org.scala-tools.testing" %% "specs" % "1.6.9" % "test"
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T11:00:17+00:00Added an answer on June 1, 2026 at 11:00 am

    It looks like you might be on an older version of Salat. Try changing you version to following:

    “com.novus” %% “salat-core” % “0.0.8-SNAPSHOT”

    or

    “com.novus” % “salat-core_2.9.1” % “0.0.8-SNAPSHOT”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want use html5's new tag to play a wav file (currently only supported
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
In my XML file chapters tag has more chapter tag.i need to display chapters
I am doing a simple coin flipping experiment for class that involves flipping a
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.