Getting an error on module upload, any suggestions

Hello,

We have created a module and while uploading it in Ignition below is the Warning coming in the gateway logger:

java.util.MissingResourceException: Can’t find bundle for base name path/AbstractScriptModule, locale en_US

We have created other modules with the exact same structure and never faced this issue. AbstractScriptModule is also created for this module and we are able to see help on click of ctrl + spacebar from Ignition.

Although this is a warning but this keeps coming everytime the module is uploaded or gateway script is changed and saved during the development process.

Any leads on this will help in resolving this issue. Not able to see any relevant help on the internet search also.

thanks,
Rajiv Kumar,
OpteBiz Inc.
Taledo, OH USA

1 Like

I’m also seeing this warning on ignition 8.1, any clues?

I am still facing this problem. Any luck? Please share the workaround if you could find, any. Others also please help on this.

Is there a stack trace associated with this log message?
I believe the system is looking for a resource bundle (property file, or set of files for containing translation keys and terms, generally located in the jar, and in src/main/resources/ in the project source directories) for the purposes of localization, but I’m just guessing based on the logged message.

Thanks Perry,

Regarding stack trace I will work with the client to get this if this is enabled. Do we have to enable it to get this trace and which folder it will reside in?

Regarding the path, I can see the path in the Eclipse project folder and the file “AbstractScriptModule.properties”. Just to confirm, the physical folder is also located similarly as “\src\main\resources\com\optebiz\factogrids95\DataAnalysis” in the project folder. We are able to see help text also using ctrl + for methods which come from this properties file. Hope this helps in getting some clues.

Could you show the path/AbstractScriptModule aswell as where you bind it to the resources.
and maybe a picture of the relavent folder structure

This is the path in Eclipse:

image.png

alright and do you have the code of where you bind it to the component?

We have put help texts in this properties file and added “@ScriptFunction(docBundlePrefix = “AbstractScriptModule”)” in the AbstractScriptModule available in Common. Is this what you are looking for? Else let me know, I will provide that.

Are you using BundleUtil to load the properties file at that prefix? (And unload in your module shutdown hook?)

like it says its missing a file located at path/AbstractScriptModule, its just that that doesnt look like a valid path idk, where is this used xd could you do a search for "path/AbstractScriptModule"? in the files?

Sorry Victor, this “path” in the text " base name path/AbstractScriptModule" is actually the complete path as shown in the screen shot. I had put “<” and “>” which got removed as html conversion it seems.

While doing a search I do find references in:

  1. AbstractScriptModule in common
    static {
    BundleUtil.get().addBundle(
    AbstractScriptModule.class.getSimpleName(),
    AbstractScriptModule.class.getClassLoader(),
    AbstractScriptModule.class.getName().replace(’.’, ‘/’));
    }

  2. GatewayscriptModule in gateway
    a. import com.optebiz.factogrids95.DataAnalysis.AbstractScriptModule;
    b. public class GatewayScriptModule extends AbstractScriptModule {

Ah haha welh the path was the most imporant thing xD The error says its not finding something so either the path is wrong or the thing its looking for isnt inside of it.

I commented this, not the right approach, and when I compiled the project, it stopped giving the help text on ctrl+spacebar but the warning was not there.

And, also this is coming when there are two modules uploaded with this same text in ArchiveScriptModule. When I uploaded the same module standalone, with the same texts, the error was not there even on multiple upload. As soon as I uploaded a different module it started giving this error. And, this same error was coming even after uninstalling the new module.

You should be loading your own bundle named after your own class, not hijacking the bundle named for the AbstractScriptModule. And you should not be loading it statically, or you won’t get changes without a complete gateway restart. Load in hook setup, unload in hook shutdown.

A post was split to a new topic: Unable to load bundle