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).