Getting ArrayStoreException: Cannot store (valid inner subclass) in array of type (parent class)

Scott Gilbertson scottg@mantatest.com
Wed Apr 30 16:00:00 GMT 2003


In my application, manta.mts5000.application.SoftkeyMenu.EntryCell is a
valid subclass of manta.mts5000.widgets.EntryField, yet in some spots I get
the following exception in the compiled binary. In other places within the
application, the same code (i.e. storing an EntryCell in an EntryField
array) works fine. In the JVM, or interpreted with gcj, it works fine.
Note that EntryCell is an inner class - I've tried making it "static", with
no change. The EntryField array is two-dimensional, in case that matters.
The exception:
java.lang.ArrayStoreException: Cannot store
[Lmanta.mts5000.application.SoftkeyMenu$EntryCell;
in array of type
[Lmanta.mts5000.widgets.EntryField;
 at _Jv_CheckArrayStore
...
I'm compiling from the class files. I've tried both a February snapshot of
the 3.3 branch and yesterday's tip from cvs. I don't know if the same thing
happens compiling from java source. I'd had problems in the past which were
solved by compiling from class files, but I could try it again in case the
compiler has improved in that regard.
Does anyone know why this might be happening?


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /