java.lang.ClassFormatError: Illegal class modifiers in class scala/Unit: 0x431

49 views
Skip to first unread message

Eugene Burmako

unread,
Jun 8, 2012, 2:23:03 PM6/8/12
to <scala-internals@googlegroups.com>
After submitting a pull request, having tests passed, and rebuilding from a new clone, I'm getting this error.

Rings a bell, anyone?

Paul Phillips

unread,
Jun 8, 2012, 2:29:43 PM6/8/12
to scala-i...@googlegroups.com


On Fri, Jun 8, 2012 at 11:23 AM, Eugene Burmako <eugene....@epfl.ch> wrote:
After submitting a pull request, having tests passed, and rebuilding from a new clone, I'm getting this error.

Rings a bell, anyone?

It's this: 241c7606d0

Don't know why you'd encounter that though.

Eugene Burmako

unread,
Jun 8, 2012, 2:30:55 PM6/8/12
to scala-i...@googlegroups.com
I just build locker and try to use it.

Ahh! Bingo! 241c7606d0 doesn't deploy a starr. I'll submit a pull request shortly.

Miguel Garcia

unread,
Jun 8, 2012, 2:34:35 PM6/8/12
to scala-i...@googlegroups.com
Quoting from the JVMS:

Table 4.1 Class access and property modifiers
Flag Name          Value   Interpretation
ACC_PUBLIC        0x0001   Declared public; may be accessed from outside its package.
ACC_FINAL         0x0010   Declared final; no subclasses allowed.
ACC_SUPER         0x0020   Treat superclass methods specially when invoked by the invokespecial instruction.
ACC_INTERFACE     0x0200   Is an interface, not a class.
ACC_ABSTRACT      0x0400   Declared abstract; must not be instantiated.
ACC_SYNTHETIC     0x1000   Declared synthetic; not present in the source code.
ACC_ANNOTATION    0x2000   Declared as an annotation type.
ACC_ENUM          0x4000   Declared as an enum type.

Paul Phillips

unread,
Jun 8, 2012, 2:34:52 PM6/8/12
to scala-i...@googlegroups.com


On Fri, Jun 8, 2012 at 11:30 AM, Eugene Burmako <eugene....@epfl.ch> wrote:
Ahh! Bingo! 241c7606d0 doesn't deploy a starr. I'll submit a pull request shortly.

It shouldn't have to.  I mean, I bootstrap fine over here.  But I notice I added it to GenJVM and forgot about GenASM, and miguel added it a while later, so maybe it's that.

Eugene Burmako

unread,
Jun 8, 2012, 2:36:38 PM6/8/12
to scala-i...@googlegroups.com
It seems that locker can build quick, but when I use reflection, which invokes Class.forName for Unit, it crashes.

Paul Phillips

unread,
Jun 8, 2012, 2:37:50 PM6/8/12
to scala-i...@googlegroups.com


On Fri, Jun 8, 2012 at 11:36 AM, Eugene Burmako <eugene....@epfl.ch> wrote:
It seems that locker can build quick, but when I use reflection, which invokes Class.forName for Unit, it crashes.

Yeah, I realized that a second ago.  It generates the bad Unit in locker, and usually we'll get away with it long enough to build quick, but if you're actively using locker it might actually load scala.Unit and that's it.

Eugene Burmako

unread,
Jun 8, 2012, 3:46:09 PM6/8/12
to scala-internals
https://github.com/scala/scala/pull/686

On Jun 8, 8:37 pm, Paul Phillips <pa...@improving.org> wrote:
Reply all
Reply to author
Forward
0 new messages