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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:29:31+00:00 2026-05-27T12:29:31+00:00

I’m seeing odd behavior in my application running on standalone jetty. Starting the application

  • 0

I’m seeing odd behavior in my application running on standalone jetty.

Starting the application throws an error:

2011-12-14 16:46:20.634:WARN::Error starting handlers
java.lang.IllegalAccessError: class
sun.reflect.GeneratedConstructorAccessor2 cannot access its superclass
sun.reflect.ConstructorAccessorImpl at
sun.misc.Unsafe.defineClass(Native Method)

Which is triggered by the line

if (f.getAnnotation(Persist.class) != null) //f is a Field instance (a public one, no less),
Persist is an annotation

Some funny facts about this

  • the code runs fine in tomcat

  • the code runs fine in an ant jetty task

  • the code throws this error on standalone jetty (tried v6 & v8), even if I run it with the identical jetty jars running the jetty ant task.

Running with a minimal jetty.xml (basically just pointing to a directory).

  • 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-27T12:29:31+00:00Added an answer on May 27, 2026 at 12:29 pm

    Since I just came across this, and since it seems a bit … obscure, think it’s worth posting for whatever other poor soul runs into this same pit of seemingly random behavior.

    Came across a message here, the relevant quote of which is

    The problem is the AOP proxy classes are being generated in a separate
    classloader and this is the cause of the visibility issues, as package-private types are
    not visible from other classloaders. Guice tries to detect this to avoid introducing the
    separate classloader, but this seems not to be happening in your example.

    So my application will work if I take all the app jars and dump them directly into the JETTY_HOME/lib, which apparently causes aop to generate the classes in a way guice approves of.

    Correction – as it turns out, this had nothing at all to do with guice, but with the way Jetty loads classes. The actual fix for this is to alter the way jetty loads classes, adding this to the jetty.xml webappcontext definition:

     <Set name="handler">
          <New class="org.mortbay.jetty.webapp.WebAppContext">
         <Set name="parentLoaderPriority">true</Set>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text

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.