Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
I originally wanted to limit the Unit's dropdown on the PSE, based on certain conditions, but after opening a call with PTC realized this is not really possible. So with some info from another ptc/user user I was able to create a custom action which will basically check to make sure that the unit selected is valid for the part.
The problem I'm running into is that I wrote a helper class, which reads in a custom .prop file, but the PSE is constantly throwing the following exception:
Caused by: java.util.MissingResourceException: Can't find bundle for base name com.blah.blah.um_families, locale en_US
The exact same code works without issue where it's being called from the edit bom jsp, and our bom loader. I know it has something to do with the PSE being an applet, but I just cannot get it to work.
I figured I would try adding the values from that um_families file into the wt.part.QuantityUnitRB file, but even that throws the same exception.
Anyone have any ideas/suggestions?
Sounds like you possibly didn't make the classes in question available
directly in codebase but rather only in some jar in WEB-INF/lib or lib.
This is the piece from the helper that grabs the bundle...
public class UMHelper {
private static Hashtable UM_FAMILIES;
private static PropertyResourceBundle PROPS;
private static final String RESOURCE_BUNDLE = "com.lmco.PDM.ProductStructure.um_families";
/**
* Class initialization
*/
static {
PROPS = (PropertyResourceBundle)ResourceBundle.getBundle( RESOURCE_BUNDLE );
UM_FAMILIES = new Hashtable();
//get the family names
String unparsedfamilyNames = PROPS.getString( "FAMILY_NAMES" );
The exception is, obviously, occuring at the PROPS = (PropertyResource... line.
In Reply to Jess Holle:
At this point I guess I'm left wondering about the code you're using to
access this bundle...
Does this work for other resource bundles without _ in their base name?
I'm wondering if there's not something special about _ in base resource
names (whereas obvious _ is used in the locale name suffixes).
So I don't know if this makes any difference but I just noticed that rebuilding the jars isn't affecting the PSE for me.
The jars had been built with the RB name of um_families in my helper class, but I didn't rebuild them after I updated the name (umfamilies) in the class a bit after. When I ran the PSE it threw the missing bundle exception, but instead of saying it couldn't find um_families, it said umfamilies. I've been including these files in the wtAppletCust.jar, but now it seems like it should be a different one?