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

  • Home
  • SEARCH
  • 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 886357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:03:12+00:00 2026-05-15T13:03:12+00:00

I am trying to use JAAS to authenticate my users. My project is in

  • 0

I am trying to use JAAS to authenticate my users. My project is in GWT v2, which runs jetty. I use eclipse for development.

From http://code.google.com/p/google-web-toolkit/issues/detail?id=4462 I found out that jetty doesn’t like any realm definitions in web.xml, so I moved them to jetty-web.xml.

I keep getting ClassNotFound exceptions so I followed the advice here: communitymapbuilder.org/display/JETTY/Problems+with+JAAS+in+Jetty+6.0.0

However, I am still getting ClassNotFoundExceptionsHere in my jetty-web.xml file. How do I configure jetty to work jaas in GWT projects?

My jetty-web.xml file:

<Configure class="org.mortbay.jetty.webapp.WebAppContext">
<Set name="serverClasses">
    <Array type="java.lang.String">
      <Item>-org.mortbay.jetty.plus.jaas.</Item>
      <Item>org.mortbay.jetty</Item>
      <Item>org.slf4j.</Item>
    </Array>
  </Set>

<Get name="securityHandler">
    <Set name="userRealm">
        <New class="org.mortbay.jetty.plus.jaas.JAASUserRealm">
            <Set name="name">xyzrealm</Set>
            <Set name="LoginModuleName">xyz</Set>
            <Set name="config"><SystemProperty name="jetty.home" default="."/>/WEB-INF/classes/jdbcRealm.properties</Set>
        </New>
    </Set>
    <Set name="authenticator">
        <New class="org.mortbay.jetty.security.FormAuthenticator">
            <Set name="loginPage">/login.jsp</Set>
            <Set name="errorPage">/error.jsp</Set>
        </New>
    </Set>
</Get>

Error I am receiving:

[WARN] Failed startup of context com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload@1fcef4f7{/,/home/dev/workspace/project/war}
java.lang.ClassNotFoundException: org.mortbay.jetty.plus.jaas.JAASUserRealm
at java.lang.ClassLoader.findClass(ClassLoader.java:359)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:352)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
at org.mortbay.util.Loader.loadClass(Loader.java:91)
at org.mortbay.xml.XmlConfiguration.nodeClass(XmlConfiguration.java:216)
at org.mortbay.xml.XmlConfiguration.newObj(XmlConfiguration.java:564)
at org.mortbay.xml.XmlConfiguration.itemValue(XmlConfiguration.java:907)
at org.mortbay.xml.XmlConfiguration.value(XmlConfiguration.java:829)
at org.mortbay.xml.XmlConfiguration.set(XmlConfiguration.java:278)
at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:240)
at org.mortbay.xml.XmlConfiguration.get(XmlConfiguration.java:460)
at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:246)
at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:182)
at org.mortbay.jetty.webapp.JettyWebXmlConfiguration.configureWebApp(JettyWebXmlConfiguration.java:109)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1217)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:513)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:447)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:222)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:543)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:421)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1035)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:783)
at com.google.gwt.dev.DevMode.main(DevMode.java:275)
  • 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-05-15T13:03:13+00:00Added an answer on May 15, 2026 at 1:03 pm

    Apparently you need to include the optional ‘plus’ jar from the jetty’s /lib distribution for jaas to work. That made the classnotfound exception go away.

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

Sidebar

Related Questions

I'm trying use mod_rewrite to rewrite URLs from the following: http://www.site.com/one-two-file.php to http://www.site.com/one/two/file.php The
I'm trying use this code to get image resolution from file bool GetImageSizeEx(const char
I am trying use this example http://www.sajithmr.me/jrecorder/example2.html for recording audio and send it to
Trying to use an excpetion class which could provide location reference for XML parsing,
Trying to use this method (gist of which is use self.method_name in the FunnyHelper
I'm trying to use a custom JAAS authentication module for a web based application
I am trying use std::copy to copy from two different iterator. But during course
I'm trying use to selenium with firefox on CentOS from command line like this:
I am trying to use JAAS for my servlet application. I could get a
i'm trying use webview to load a image from sdcard i use this path

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.