Hi,
I am following the directions at in the Integration Guide for Extending Message Files,
but am having trouble.
I keep getting Cannot find resource.
I copied all of the files from java/src/org/apache/axis/i18n into my package structure:
I updated the copy the MessageConstants class like this:
public class MessagesConstants {
//public static final String projectName = "org.apache.axis".intern();
// #### Change
public static final String projectName = "com.mentor.pubsubservice".intern();
public static final String resourceName = "resource".intern();
public static final Locale locale = null;
//public static final String rootPackageName = "org.apache.axis.i18n".intern();
// #### Change
public static final String rootPackageName =
"com.mentor.pubsubservice.util.i18n".intern();
public static final ResourceBundle rootBundle =
ProjectResourceBundle.getBundle(projectName,
rootPackageName,
resourceName,
locale,
MessagesConstants.class.getClassLoader(),
null);
}
Here is what I get from the log:
2003-04-02 11:30:30,593 [main] DEBUG
com.mentor.pubsubservice.util.i18n.ProjectResourceBundle -
getBundle(com.mentor.pubsubservice,com.mentor.pubsubservice.util.i18n,resource,null,...)
2003-04-02 11:30:30,609 [main] DEBUG
com.mentor.pubsubservice.util.i18n.ProjectResourceBundle - loadBundle: Ignoring
MissingResourceException: Can't find bundle for base name
com.mentor.pubsubservice.util.i18n.resource, locale en_US
2003-04-02 11:30:30,609 [main] DEBUG
com.mentor.pubsubservice.util.i18n.ProjectResourceBundle - loadBundle: Ignoring
MissingResourceException: Can't find bundle for base name
com.mentor.pubsubservice.util.resource, locale en_US
2003-04-02 11:30:30,625 [main] DEBUG
com.mentor.pubsubservice.util.i18n.ProjectResourceBundle - loadBundle: Ignoring
MissingResourceException: Can't find bundle for base name
com.mentor.pubsubservice.resource, locale en_US
java.lang.ExceptionInInitializerError: java.util.MissingResourceException: Cannot find
resource 'com.mentor.pubsubservice.util.i18n.resource'
at
com.mentor.pubsubservice.util.i18n.ProjectResourceBundle.getBundle(ProjectResourceBundle.java:327)
at
com.mentor.pubsubservice.util.i18n.MessagesConstants.<clinit>(MessagesConstants.java:73)
at com.mentor.pubsubservice.util.i18n.Messages.<clinit>(Messages.java:83)
at com.mentor.pubsubservice.util.i18n.MessagesMain.main(MessagesMain.java:15)
Exception in thread "main" Process terminated with exit code 1
I do have the resource.properties in the com.mentor.pubsubservice.util.i18n directory.
I also tried adding resources_en_US.properties, but get the same error. I have been
cursed with ResourceBundles my entire Java programming life ... the saga continues.
Any ideas?
Best regards,
Mike