# Unable to load bundle

**URL:** <https://forum.inductiveautomation.com/t/unable-to-load-bundle/68678>\
**Category:** Module Development\
**Created:** [January 16, 2023, 3:13pm UTC](https://forum.inductiveautomation.com/t/unable-to-load-bundle/68678 "2023-01-16T15:13:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben\_Duran](https://avatars.discourse-cdn.com/v4/letter/b/a3d4f5/32.png) [@Ben\_Duran](https://forum.inductiveautomation.com/u/Ben_Duran)\
**Post date:** [January 16, 2023, 3:13pm UTC](https://forum.inductiveautomation.com/t/unable-to-load-bundle/68678/1 "2023-01-16T15:13:35Z")

</div>

Hello, I'm a new module developer still very much learning. I am trying to follow the gateway-webpage example and after I have made all my changes I see the question marks on the gateway config page. The error I get

```auto
java.util.MissingResourceException: Can't find bundle for base name com/gpasettings/GPASettings, locale en_US

```

this is my gateway hook class setup:

```auto
    @Override
    public void setup(GatewayContext gatewayContext) {
        this.context = gatewayContext;

        log.debug("Beginning setup of GPA Settings Module");

        // Register GatewayHook.properties by registering the GatewayHook.class with BundleUtils
        BundleUtil.get().addBundle("GPASettings", getClass(), "GPASettings");

//rest of code

```

I am not sure what I'm missing here. I have a GPASettings.properties in the resource folder.

 ![folder_struc](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/8/184bc0fc05c2b6a7521d6c21a60371fe8590464a.png)

Sorry I did not noticed this was tagged as ignition 7.9. I am doing everything with the most up to date versions of SDK and maven plugin.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 17, 2023, 5:22pm UTC](https://forum.inductiveautomation.com/t/unable-to-load-bundle/68678/2 "2023-01-17T17:22:15Z")

</div>

First question - are you using a new build of your module, and are you sure it has the gateway resources in the correct location? Check the actual built output .modl file; it's just a zip, and you can also open each .jar within as a .zip to check the directory structure.

Your class structure looks like it should be correct. Are you sure the `resources` directory is an actual directory structure, with subfolders? IntelliJ, in its infinite wisdom, doesn't distinguish between an actual directory tree or a directory literally named `com.gpasettings`.

---

<div class="post-metadata">

**Author:** ![Ben\_Duran](https://avatars.discourse-cdn.com/v4/letter/b/a3d4f5/32.png) [@Ben\_Duran](https://forum.inductiveautomation.com/u/Ben_Duran)\
**Post date:** [January 17, 2023, 6:08pm UTC](https://forum.inductiveautomation.com/t/unable-to-load-bundle/68678/3 "2023-01-17T18:08:36Z")

</div>

So after looking at the directory structure you were absolutely right. Intellij was creating the directory com.gpasettings instead of com/gpasettings.

Thank you for the tip! I can't believe I overlooked that.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 17, 2023, 6:09pm UTC](https://forum.inductiveautomation.com/t/unable-to-load-bundle/68678/4 "2023-01-17T18:09:02Z")

</div>

That's bitten me a _number_ of times, so it's one of the first things I check 🙂

---

<div class="post-metadata">

**Author:** ![nicholas.robinson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas.robinson/32/22188_2.png) [@nicholas.robinson](https://forum.inductiveautomation.com/u/nicholas.robinson)\
**Post date:** [June 5, 2023, 8:45pm UTC](https://forum.inductiveautomation.com/t/unable-to-load-bundle/68678/5 "2023-06-05T20:45:34Z")

</div>

This topic bothers me every time I make a new module so I'm trying to get to the bottom of it once and for all. Here is an example of one that is working and one that is not:

**This one works** ( folder structure looks like an actual folder structure, not "." )

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/b/8b3ab0ca69ff349a57a772c63d59cc22f131c633.png)

**This one does not work** ( folder structure in the resource area is "." )

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/1/d119261fc1d3ad467b9fb512652453e14a408317.png)

@paul-griffith If I'm understanding this correct, what do you do to make IntelliJ not do the "." structure where you don't want it?

Thanks,

Nick

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 5, 2023, 8:59pm UTC](https://forum.inductiveautomation.com/t/unable-to-load-bundle/68678/6 "2023-06-05T20:59:04Z")

</div>

If you're making the resource directory from scratch, just use `/` as the delimiter when writing out the package name, instead of `.` IntelliJ will automatically create the intermediate directories.

There is likely a setting to not collapse the directory structure, but I've never gone digging for it because when it _is_ set up the right way, it's helpful to present it the same as the package structure. It's just a problem on setup.

---

<div class="post-metadata">

**Author:** ![nicholas.robinson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas.robinson/32/22188_2.png) [@nicholas.robinson](https://forum.inductiveautomation.com/u/nicholas.robinson)\
**Post date:** [June 5, 2023, 9:15pm UTC](https://forum.inductiveautomation.com/t/unable-to-load-bundle/68678/7 "2023-06-05T21:15:11Z")

</div>

Thanks. Just so everyone can be super clear on this, I did the following:

1. right click on the folder structure in question and chose refactor --\> rename
2. Changed from `com.walmart.ignition.cws` to `com/walmart/ignition/cws`

That doesn't work, give some error message. So I just recreated the folder structure manually then it shows up correctly like this:

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/1/61e12b6d272354873bb463cb3d6a3e8ec8c34c00.png)

After rebuilding the module it works as expected and the labels show up as expected. I have spent so much time on this matter but now I feel like I can remedy it should it rear its head again.

For anyone else who see this same issue, do this:

1. Go to File --\> Project Structure
2. Verify there is a valid folder structure and not dots "."
3. If there are dots, rebuild the folder structure to your property resources

**NO DOTS!!**

Nick
