# java.lang.NoSuchFieldError : INSTANCE

**URL:** <https://discuss.kotlinlang.org/t/java-lang-nosuchfielderror-instance/26500>\
**Category:** Support\
**Created:** [March 9, 2023, 1:05am UTC](https://discuss.kotlinlang.org/t/java-lang-nosuchfielderror-instance/26500 "2023-03-09T01:05:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fatalcatharsis](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/fatalcatharsis/32/5388_2.png) [@fatalcatharsis](https://discuss.kotlinlang.org/u/fatalcatharsis)\
**Post date:** [March 9, 2023, 1:05am UTC](https://discuss.kotlinlang.org/t/java-lang-nosuchfielderror-instance/26500/1 "2023-03-09T01:05:43Z")

</div>

I’m starting here instead of a youtrack issue because I cannot recreate the issue in an MRE and I cannot post the project because it is company code. I’m hoping someone can lead me to reproduce it as an MRE here.

I have a normal jvm project with a unit test. This unit test ends up using this object declaration. During runtime, it throws the exception java.lang.NoSuchFieldError : INSTANCE here:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/kotlinlang/original/2X/1/1712e311dcf52d71d2339733a9bd28707e2e1020.png)

My understanding is that object types are compiled to a class with a static member INSTANCE, and when I decompile PageInfo.class, it does not have this member. I use other objects and this weirdness only occurs here as far as I can tell. I have tried plugin version 1.7.10, 1.7.21, 1.8.0, 1.8.10. I have tried with jdk versions 1.8, 15, and 17. I have invalidated all caches, deleted all gradle caches, and rebuilt from scratch entirely, and this error still presents.

I tried reproducing it as best as I can, creating an operator function ! that returns a delegate, and just like this code, also provided a provideDelegate function in a very similar manner to what is on that ObjectType class and nothing like this occurs. Any help is appreciated.

---

<div class="post-metadata">

**Author:** ![Skater901](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/skater901/32/10163_2.png) [@Skater901](https://discuss.kotlinlang.org/u/Skater901)\
**Post date:** [March 20, 2023, 9:16am UTC](https://discuss.kotlinlang.org/t/java-lang-nosuchfielderror-instance/26500/2 "2023-03-20T09:16:49Z")

</div>

I don’t quite understand your issue. Can you break it down a bit more for me?

I’m not sure if your initial issue involves using an `object` as a delegate, or if that’s something you’re trying to do to replicate the initial issue? Also, could you include the code for your `!` function that creates a delegate, or whatever it does?

If your original issue has nothing to do with delegates, can you please remove them to simplify the problem?
