NoClassDefFoundError onLoad of plugin implementing API #2407
Replies: 3 comments
-
If you softdepend and Plan is not installed you can't have Plan classes in the main class (JavaPlugin) because the class loader will attempt to find all imports when loading the main class. It's best to to do all Plan imports in a separate class, see https://github.com/plan-player-analytics/Plan/wiki/DataExtension-API---Getting-started#21-create-a-class-to-separate-plan-imports-from-your-main-class for more |
Beta Was this translation helpful? Give feedback.
-
Thank you, I did not catch that when creating my class. Maybe you could add a link to the link from above here (https://github.com/plan-player-analytics/Plan/wiki/APIv5---DataExtension-API#-how-to-register-a-dataextension) |
Beta Was this translation helpful? Give feedback.
-
There is a Getting started link above that section |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the issue
I am quite confused as to why this is happening...
I properly implemented
Plan
in my plugin, added asoftdepend
and catch all exceptions when enabling plan. However at the very start of the server I get ajava.lang.NoClassDefFoundError: com/djrapitops/plan/extension/DataExtension
before the plugin is even loaded.You can find the full source code of my plugin here: https://github.com/raidcraft/rcreferrals/blob/master/src/main/java/de/raidcraft/referrals/RCReferrals.java#L128
And as you can see I have no static initialization of Plan whatsoever. And nontheless it is throwing that exception at startup. Do you have any idea why this would be happening?
Exceptions & Other Logs
Beta Was this translation helpful? Give feedback.
All reactions