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 9081473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T20:19:25+00:00 2026-06-16T20:19:25+00:00

I got some strange problems when using sbt to build a simple Scala class.

  • 0

I got some strange problems when using sbt to build a simple Scala class.
The code is simply enough which I copied from internet to start a jetty server:

object JettyEmbedded {

  def main(args: Array[String]) {
    val server = new org.eclipse.jetty.server.Server(9080)
    val context= new org.eclipse.jetty.webapp.WebAppContext()

    context.setServer(server)
    context.setContextPath("/");
    context.setWar("src/main/webapp")
    server.setHandler(context);

    try {
      server.start()
      server.join()
    } catch {
      case e: Exception => {
        e.printStackTrace()
        System.exit(1)
      }
    }
  }
}

to compile with SBT and scala 2.9.2, i got the following error:

[error] /src/main/scala/JettyEmbedded.scala:4: object eclipse is not a member of package org
[error] val server = new org.eclipse.jetty.server.Server(9080)

I can see in build.sbt, i have dependencies like:

"org.eclipse.jetty" % "jetty-webapp" % "8.1.7.v20120910" % "container",
"org.eclipse.jetty.orbit" % "javax.servlet" % "3.0.0.v201112011016" % "container;provided;test" artifacts (Artifact("javax.servlet", "jar", "jar"))

If I just remove this offending file and run the Jetty server with container:start from sbt, it runs no problem!

  • 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-16T20:19:26+00:00Added an answer on June 16, 2026 at 8:19 pm

    Change this line:

    "org.eclipse.jetty" % "jetty-webapp" % "8.1.7.v20120910" % "container",
    

    to:

    "org.eclipse.jetty" % "jetty-webapp" % "8.1.7.v20120910" % "container;provided",
    

    solved the problem.

    sbt don’t put “container” class into the compilation classpath, while in Eclipse it don’t care.

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

Sidebar

Related Questions

I've got a quite strange problem here. I'm calling some simple code via Ajax.Updater:
I got some quite strange errors compiling code under gcc. It tells me that
i got some legacy code using: nonblocking socket, select for timeout, read (2) and
I'm having some strange problems with a site using .net 2.0 and IIS 6.
I've got some strange bug: when I open page first time in some browser
got some problems. Built an applet that has to be used step-by-step. After each
Got some code that is not mine and its producing this warning atm: iehtmlwin.cpp(264)
got some problems deploying a java web application on jboss 7.1... Stepped through the
I got some problems here, I can't make my find_by_sql request to render an
I got some problems in Datagrid WPF I have a datagrid, and I want

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.