my extension no longer runs or loads from a file.

William Breiland's Avatar

William Breiland

10 Jan, 2025 11:18 PM

I have had a personal extension, getirr.mxt, that I have been using since 2015 on MD. When I updated to version 2024.2 (5172), the extension disappeared from the Extensions list, and I cannot load/install it from a file. Is there a simple fix, or do I have to install devkit-5.1 and re-create the extension. I really do not want to load all the Java baggage needed to do a recompilation.

  1. 1 Posted by Stuart Beesley ... on 10 Jan, 2025 11:25 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    What is help/show console saying?

  2. 2 Posted by William Breilan... on 10 Jan, 2025 11:41 PM

    William Breiland's Avatar

    Attached is the Console Window output. It has been so long since I compiled this extension that I cannot determine whether I am calling classes that no longer exist. This .mxt file was running fine until the newest MD upgrade.

  3. 3 Posted by William Breilan... on 11 Jan, 2025 12:29 AM

    William Breiland's Avatar

    The console window in the previous post is for an attempt to load the getirr.mxt file. Below is a segment of the Console Window when I just open MD. It tries to install the irr extension, but declares it “outdated”.

    20250110-16:21:37.350 initializing extensions...
    20250110-16:21:37.353 Error loading extension: java.lang.IncompatibleClassChangeError: class com.moneydance.modules.features.getirr.Main overrides final method com.moneydance.apps.md.controller.FeatureModule.getBuild()I for module 'getirr'
    Error: class com.moneydance.modules.features.getirr.Main overrides final method com.moneydance.apps.md.controller.FeatureModule.getBuild()I
    java.lang.IncompatibleClassChangeError: class com.moneydance.modules.features.getirr.Main overrides final method com.moneydance.apps.md.controller.FeatureModule.getBuild()I
    at java.base/java.lang.ClassLoader.defineClass1(Native Method)
    at java.base/java.lang.ClassLoader.defineClass(Unknown Source)
    at java.base/java.lang.ClassLoader.defineClass(Unknown Source)
    at com.moneydance.apps.md.controller.ModuleLoader$FMClassLoader.loadClass(ModuleLoader.kt:282)
    at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
    at com.moneydance.apps.md.controller.ModuleLoader.loadFeatureModule(ModuleLoader.kt:139)
    at com.moneydance.apps.md.controller.ModuleLoader.loadFeatureModule(ModuleLoader.kt:29)
    at com.moneydance.apps.md.controller.Main.getExternalFeatureModule(Main.java:451)
    at com.moneydance.apps.md.controller.Main.loadExternalFeatureModule(Main.java:497)
    at com.moneydance.apps.md.controller.Main.loadInstalledExternalFeatureModule(Main.java:511)
    at com.moneydance.apps.md.controller.Main.startApplication(Main.java:705)
    at com.moneydance.apps.md.controller.Main.main(Main.java:195)
    at Moneydance.main(Moneydance.java:7)
    20250110-16:21:37.355 outdated extension: irr

  4. 4 Posted by Stuart Beesley ... on 11 Jan, 2025 12:30 AM

    Stuart Beesley (Mr Toolbox)'s Avatar

    Yup - it's a silly issue and due to a change in the API..

    Exception in thread "AWT-EventQueue-0" java.lang.IncompatibleClassChangeError: class com.moneydance.modules.features.getirr.Main overrides final method com.moneydance.apps.md.controller.FeatureModule.getBuild()
    

    You are overriding getBuild() when it's FINAL and you don't need to.. This info is pulled from meta_info.dict anyway.. I suspect you will find a couple more of those.. You need to fix and recompile with the latest dev kit..

    If you have a repo or the code, I could do it for you if you don't have the setup..?

  5. 5 Posted by Stuart Beesley ... on 11 Jan, 2025 12:35 AM

    Stuart Beesley (Mr Toolbox)'s Avatar

    Also, to fix the outdated extension message, you also need to amend meta_info.dict and add/change the minbuild value to something >= 1000. e.g.

    "minbuild" = "1000"
    
  6. 6 Posted by William Breilan... on 11 Jan, 2025 01:18 AM

    William Breiland's Avatar

    The source code is attached as a zip file. I notice that I had already changed the “minbuild” = “1000” line in meta_info.dict that you suggest back in 2015. This was done when getirr did not work from a 2012 version. I have found the extension to be very useful for comparing investment performance with the “Internal Rate of Return” method, which I find to be an optimum compromise when investments are bought and sold over a time period of interest.

    I am shocked at how foreign all this code seems now, but it has been ten years. You are free to use this code for any purpose, but please do not invest any significant effort on my account. There may be newer classes that would collect the necessary data from the MD database more efficiently, but the extension runs instantly in any case. The display could be fancier, but I only care about the results, so it is adequate. I never registered the code with infinitekind because I intended it to be for my own personal use and did not want to maintain updates and revisions for other users.

  7. 7 Posted by Stuart Beesley ... on 18 Jan, 2025 02:53 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    Sorry. I didn’t get alerted about this. Will take a look.

  8. 8 Posted by William Breilan... on 18 Jan, 2025 04:27 PM

    William Breiland's Avatar

    I decided to risk a rabbit hole adventure with my old code and installed the java SDK and ant. As you suggested, the problem turned out to be relatively trivial. MD calls the method geBuild() when it starts to load an extension. In the 2015 version, I had to overwrite this class with my own getBuild() to provide my own version number that shows up in the Manage Extensions window. getBuild() is now FINAL and can no longer be overwritten. I just removed my version and the extension runs fine, with MD providing the version number. The only other issue is that I call a deprecated class, getUserRateByDateInt(). The extension still runs, so I am not in a big hurry to replace this call with non-deprecated equivalents, getSnapshotForDate(date) and geRate(relativeCurrency).

    I loaded your Toolbox extension and was happy to see that it found and eliminated the two zombie versions of irr and getirr that were part of my MD database. These could not load so they could not be removed from the Manage Extensions window. Toolbox also found two orphaned transactions that I was unaware were in my MD database. Toolbox is an impressive supplement to MD.

    Thank you for taking an interest in my posting and giving me the courage to revive a ten year old java code after not having written a single line of java over this time span.

  9. 9 Posted by Stuart Beesley ... on 18 Jan, 2025 07:12 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    👍

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac