Maven: MissingResourceException:, locale en_US


As I have now broken my projects in multiple projects, and things are getting complicated, So I decided it was time to try and build the thing with Maven (which would have come sooner or later, as I want to build a “plugin-based” engine, where the dependencies are downloaded automatically on the client using Maven).

I got a headstart by using GitHub - ahoehma/jme3-maven-helper: JMonkey Maven Helper

I got to the point where my jars are built, with proper Main entry in Manifest, as well as dependencies. The dependencies are also copied in a lib directory under where the jar is created, so that I should only have to do “java -jar client-0.0.1-SNAPSHOT.jar”, but then I get this when I try to run it. Maybe one of you know where I should look for a problem?

Exception in thread "AWT-EventQueue-0" java.util.MissingResourceException: Can't find bundle for base name, locale en_US
        at java.util.ResourceBundle.throwMissingResourceException(Unknown Source)
        at java.util.ResourceBundle.getBundleImpl(Unknown Source)
        at java.util.ResourceBundle.getBundle(Unknown Source)
        at com.jme3.system.JmeDesktopSystem$
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$200(Unknown Source)
        at java.awt.EventQueue$ Source)
        at java.awt.EventQueue$ Source)
        at Method)
        at$1.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at Source)
Caused by: java.lang.NoClassDefFoundError: IllegalName:
        at java.lang.ClassLoader.preDefineClass(Unknown Source)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at Source)
        at Source)
        at$100(Unknown Source)
        at$ Source)
        at$ Source)
        at Method)
        at Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.util.ResourceBundle$Control.newBundle(Unknown Source)
        at java.util.ResourceBundle.loadBundle(Unknown Source)
        at java.util.ResourceBundle.findBundle(Unknown Source)
        at java.util.ResourceBundle.findBundle(Unknown Source)
        at java.util.ResourceBundle.findBundle(Unknown Source)
        ... 18 more

I especially don’t get what it’s got to do with bundles and " locale en_US". I don’t think I have done anything with resource bundles before, so maybe one needs more then just having the jars as dependencies in the manifest, and be there in the appropriate directory?

Here is the generated manifest, and the dependency jars seems to be the right ones, and are there where the manifest expects them. jMonkeyEngine3-3.0.0-SNAPSHOT.jar seems to contain the whole of the JME3 project (even the examples!) I think there are some unused dependencies in there, but I assume it should not be a problem.

Manifest-Version: 1.0
Built-By: monster
Build-Jdk: 1.7.0_11
Class-Path: lib/jMonkeyEngine3-3.0.0-SNAPSHOT.jar lib/ovt-0.6.0.jar li
 b/j-ogg-vorbisd-2003.jar lib/j-ogg-oggd-2003.jar lib/noise-0.0.1-SNAP
 SHOT.jar lib/jme3-thirdparty-lwjgl-2.8.3-natives.jar lib/lwjgl-2.8.3.
 jar lib/jinput-2.0.5.jar lib/jutils-1.0.0.jar lib/asm-all-3.1.jar lib
 /vecmath-1.3.1.jar lib/nifty-1.3.1.jar lib/xpp3-1.1.4c.jar lib/eventb
 us-1.4.jar lib/nifty-default-controls-1.3.1.jar lib/nifty-examples-1.
 3.1.jar lib/nifty-lwjgl-renderer-1.3.1.jar lib/lwjgl_util-2.8.2.jar l
 ib/nifty-style-black-1.3.1.jar lib/jbullet-3.0.0-SNAPSHOT.jar lib/sta
 ck-alloc-3.0.0-SNAPSHOT.jar lib/jsr305-1.3.9.jar lib/edu-umd-cs-findb
 ugs-annotations-1.3.2-201002241900.jar lib/annotations-1.3.2.jar lib/
 javassist-3.16.1-GA.jar lib/hppc-0.4.1.jar lib/slf4j-log4j12-1.6.6.ja
 r lib/slf4j-api-1.6.6.jar lib/log4j-1.2.17.jar lib/commons-io-2.3.jar
  lib/commons-logging-1.1.1.jar lib/commons-lang-2.6.jar lib/guava-14.
 0-rc2.jar lib/commons-vfs2-2.0.jar lib/maven-scm-api-1.4.jar lib/plex
 us-utils-1.5.6.jar lib/maven-scm-provider-svnexe-1.4.jar lib/maven-sc
 m-provider-svn-commons-1.4.jar lib/regexp-1.3.jar lib/ClientCore-0.0.
 1-SNAPSHOT.jar lib/Assets-0.0.1-SNAPSHOT.jar lib/textassets-0.0.1-SNA
 PSHOT.jar lib/jmevoxeleditor-0.0.1-SNAPSHOT.jar
Created-By: Apache Maven 3.0.4
Main-Class: com.blockwithme.client.Main
Archiver-Version: Plexus Archiver

I skimmed over the Deployment section of, but did not see anything about resource bundles.

Also, just to prove that my manifest and dependencies are OK, I have added this as first lines before creating the app in the main, and I can see the output, so I know that SettingsDialog is accessible:

        System.out.println("ACCESSING SettingsDialog ...");

The maven repo contains an old version of jME and is not maintained or supported by the jME developers. Organizing libraries in the SDK works via the Tools->And Libraries menu item.
The content of this post is meant to be read as a straight information or question without an implicit dismissive stance or interest in having the other party feel offended unless theres emotes that hint otherwise or there’s an increased use of exclamation marks and all-capital words.

The more recent versions of SettingsDialog are now dependant on a properties file for i18n.

For some reason you’ve picked up the more recent code but not the properties file, even though they are packaged in the same jar.

1 Like

Thanks @normen. Not sure if that is the issue, but it’s at least something I can look at. Sounds like you’re having a bad day or something… :-/ I know that the core team “does not support Maven”, but I thought it’s likely some other people have tried using it, and might have stumbled on the issue as well (although I could not find anything about it using the site search).

@zarch I think it’s because I use jme3-maven-helper which was base on 3.0.0-SNAPSHOT. I have to “upgrade” it somehow (actually, I already tried but failed; I have to try harder).

I spent the last few hours searching about “JME and ClassLoaders”; I did not see anything in the doc. In the forums, I found these:

It seems that JmeSystem is also of interest when it comes to loading resources. Here’s what I found related to that:

I’m putting the links together here, so I can find this thread gain next time I have a “classpath/loading” issue.

I am not “having a bad day”, I try to inform you that you will probably get outdated files when you try and use this. You mentioned why you try to use maven so I thought I hint at the existing library management solutions. Its also easily possible to install the maven plugin in the SDK and include maven projects and libraries in your project, no need to try and get everything into some maven repo. Thats something many maven users seem to get stuck with, trying to get all external libraries into the framework, somehow counteracting the initial purpose of saving time on library management.
The content of this post is meant to be read as a straight information or question without an implicit dismissive stance or interest in having the other party feel offended unless theres emotes that hint otherwise or there’s an increased use of exclamation marks and all-capital words.

1 Like

@normen, when I said I thought you had a “bad day”, I was only referring to your new “signature” (The content of this post … all-capital words.), not to what you said about Maven.

I’ve come to the conclusion that “jme3-maven-helper” is much less useful then it seems at first glance. It only builds everything correctly for one specific version (3.0.0-SNAPSHOT) Unfortunately, since that version wasn’t even tagged in SVN, there is no (obvious to me) way to get the JME code that goes with the set of dependencies referred in the current version of the included pom.xml. The other option would be to get a specific version of the code, say 3.0-rc2, and adjust the versions of the dependencies in the pom.xml. Unfortunately here again, there is no way to work out which specific version of some libraries were used, for example lwjgl, because the version number is neither included in the jar name, or in it’s manifest or in

In other words, there does not seem to be any way to get a consistent build, based on jme3-maven-helper, unless it gets eventually updated to a newer, tagged, version of the code.

Alternatively, I could just use the dependencies that were together with the version of JME that I downloaded, and somehow stuff them into the local repo. But that feels like cheating, and does not fit with my long-term goal of having Maven-based plugins for my game.

I hint at the existing library management solutions
I could live with using the SDK to build my game (although I must admit that I'm less then impressed with NetBeans debugger), but at some point, I will want to offer my game for people to play, and at that time, I will need them to be able to download the jars from somewhere, in such a way that makes sure they get the correct version, so I don't see any way around have to put the JME jars, and the JME dependencies in my own Maven repo on the Net, when it will come time to offer my game publicly. I don't see any "easy way out" of offering the third-party jars myself (on Maven, or otherwise). Am I seeing this correctly?

Even if the core team does not want (or has not enough time/resource to) create themselves a Maven repo, I think that one thing that would make such an effort easier (for someone else), would be to simply create more SVN tags, say one or two per month. As far as I know, SVN tags are “basically free”. So If tags were created regularly, it would make it easier to create some Maven repo that would contain both the JME jars, and the dependencies as well. Well, maybe not easier, but at least more useful. If the code is not tagged, the game developers will most likely all be basing them game on different versions of JME, which simply depends on when they checked out. If on the other hand, there were regular tags, and the game devs based the build on those tags, then they could sharethe same maven repo for the JME jars and dependencies. Does creating a new SVN tag every month that sound like a reasonable and sensible request?

The content of this post is meant to be read as a straight information or question without an implicit dismissive stance or interest in having the other party feel offended unless theres emotes that hint otherwise or there’s an increased use of exclamation marks and all-capital words. :stuck_out_tongue_winking_eye:

I have that in my posts because I am trying to be fair to people who are actually uncertain about the intent of my sometimes brutal honesty and directness, can’t care about those who actually want to serve me a bad day :wink:

There was some tool (a batch file? and ant file?) that actually checked out jme from svn and did a local maven package so you can use it in your maven projects if you’re so inclined.

I would definitely not try and have my clients install libraries for my application via remote repositories, I think apart from linux’s package managers this would be unheard of? Maybe some “security fix” breaks your game on all computers suddenly… Definitely not the way to go imo. The SDK does what any game SDK does which is create an application that can be run because it includes all dependencies. In the future we will even get rid of the needed java install by adding the option to bundle the JRE as well, this would further improve the stability of your applications as java updates can’t break it anymore either.

We do not want to create a maven repository now because the engine (and especially the project setup and build setup) is still in flux so it would mean an unsurmountable amount of work to have this working all the time during development. Mind you people don’t just want maven from us but all kinds of distro and access formats. So we will at some point after the release also provide an “official” maven repository location where you can download the official jme version with proper versioning, tagging, branched updates and all the shebang we currently only provide within the SDK or via pure SVN, which already has tags as well as branches for all releases we made. Also, what would be the point of monthly tags? svn has date filtering support…?

The content of this post is meant to be read as a straight information or question without an implicit dismissive stance or interest in having the other party feel offended unless theres emotes that hint otherwise or there’s an increased use of exclamation marks and all-capital words.

I assume that

I think apart from linux’s package managers this would be unheard of?
was referring to “manual installation via tool (Maven)” by the user (player). This was not what I had in mind… Maven 3 can be embedded, or so I’ve been told. Basically, it would work kind of like a Webstart application, except my employer has been delivering our accounting software over Webstart for the last 10 years or so, and I can tell you Webstart suck big time. I would trust Maven over Webstart any day, as it uses plain HTTP as a protocol, which allows the use of CDN … with little to no effort. Also, I think Webstart wants to get it’s file all from the same place, and Maven doesn’t require that; in other words, even if I made my own Maven repo, I could define multiple mirrors around the globe, to ensure 100% availability.

It’s my first game (not counting stuff I did like 20 years ago, which no one ever played except me), so I don’t really have a feel for how it’s “normally done”. So it seems “Indie Games” are generally provided as a punctual monolithic set of files (jars). Although I won’t argue that it’s the most reliable and easiest way, it’s not the only option. Steam is the best counter-example, although it didn’t offer Indie games until their recent policy change, to be more open.

In my current “game concept”, the main “feature” that will make my game stand apart is the ability to build the game from a bunch of “plugins”, and the fact that anyone should be able to make plugins for it, not just me. So basing my deployment system on a highly reliable, distributed, “binary release versioning system”, like Maven, fits perfectly in my concept. I am aware that making a reliable application based on third-party plugins is no small feat, but there are things like OSGi out there, and also all web-browsers do it all the time, so it’s workable proposition. I’ve been thinking about this literally for years, and the plugin system design occupies a large part of my game design concept document. I’m totally convinced there is no technical roadblock I haven’t thought of.

But I understand that the core team currently has more urgent priorities, so I’ll just shut up, and wait for the official Maven repo. Cheers!

No, I mean normal applications. Apart from SDKs and/or development kits I never heard of software that installs libraries from some web repository, especially not with some development / build tool… You can manage mirrors for one installer as well :slight_smile:
The content of this post is meant to be read as a straight information or question without an implicit dismissive stance or interest in having the other party feel offended unless theres emotes that hint otherwise or there’s an increased use of exclamation marks and all-capital words.

Hi Monster,

I work with a Java enterprise CMS that requires 150+ jars and has no maven repo for the version we work with. I found a very helpful maven plugin that takes a relative path to your project, say …/lib and creates the pom needed to depend on them in a maven project. The jars also all get added to your local maven repo AUTOMATICALLY. I think it might be perfect for what you want…



We use getdown for HeroDex…It’s got a few…quirks…but other than that it works really well to update and keep up to date… everything has to come from the central server though.

(But I’d be worried about security if executable code could be downloaded from just anywhere as a plugin anyway - I certainly would never install a game that did that)

@adam110100100 Great! That looks like what I want. Thanks! I tried it, and it put all the jars in the local repo. For some reason, the code does not seem to see any dependencies atm, but I don’t think the plugin is at fault. I must have made some mistake in the POM file.

@zarch I looked at getdown a while ago. It seems quite useful, but there was something that it couldn’t do, which made me decide against it. I can’t remember why. About security: I didn’t mean that the content would come from third party sites automatically, I just meant that once I have a working infrastructure that offers plugins from my site, based on some standard protocol (Maven/OSGi/…) then it is a trivial change to offer the players a “directory” of third-party plugins that they could choose from. If the user decides explicitly to install a third-party plugin, then it’s their choice. OTOH, I can provide a greater security, if I offer free hosting for third-party plugins myself, so it will probably be a combination approach.

Cool, I thought that might help. In my project I have a separate maven project that contains only the addjars config… Then my main project declares a dependency on the add jars project. It builds fine on the command line, but I think I had to add the jars to the classpath config in the eclipse project to get code completion etc working. I would think thou shouldn’t have to do that, but pretty sure I did. Not a big deal for me really though, builds fine and once you’v added the jars looks good in eclipse then too. Good luck with your project… :slight_smile:

Final note: it took me almost two days to get this addjars maven plugin to work properly. Eventually, I worked out what the problem was: you must always call mvn clean first, because it caches some “state” in “target”, and then stops working as expected if that cached state is already there when you call it.