I have a servlet that loads a resource bundle. When I deploy the WAR file that
contains the servlet, the resource bundle is discovered and loaded by the
following statement:

    bundle = ResourceBundle.getBundle(bundleName);

When I deploy the WAR file as part of an EAR file, the classloader issues seem
to confuse the ResourceBundle class to the point that it will no longer load the
file. I have even tried to use the same classloader that the class loading the
bundle is using. No change in behavior. I get the following exception:

[Auto deploy] java.util.MissingResourceException: Can't find bundle for base
name us.oh.state.dot.pas.web.LocalStrings,locale en_US
[Auto deploy]   at
java.util.ResourceBundle.throwMissingResourceException(Unknown Source)
[Auto deploy]   at java.util.ResourceBundle.getBundleImpl(Unknown Source)
[Auto deploy]   at java.util.ResourceBundle.getBundle(Unknown Source)
[Auto deploy]   at
us.oh.state.dot.common.util.StringManager.<init>(StringManager.java:108)
[Auto deploy]   at
us.oh.state.dot.common.util.StringManager.getManager(StringManager.java:260)
[Auto deploy]   at
us.oh.state.dot.common.util.StringManager.getManager(StringManager.java:254)
[Auto deploy]   at
us.oh.state.dot.common.util.StringManager.getManager(StringManager.java:250)
[Auto deploy]   at
us.oh.state.dot.pas.web.FundReportServlet.<clinit>(FundReportServlet.java:45)
[Auto deploy]   at java.lang.Class.newInstance0(Native Method)
[Auto deploy]   at java.lang.Class.newInstance(Unknown Source)
[Auto deploy]   at
org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:268)
[Auto deploy]   at
org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:289)
[Auto deploy]   at
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInte
rceptor.java:130)
[Auto deploy]   at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491)
[Auto deploy]   at
org.jboss.tomcat.TomcatEntry.initContext(TomcatEntry.java:132)
[Auto deploy]   at
org.jboss.tomcat.EmbeddedTomcatService.deploy(EmbeddedTomcatService.java:103)
[Auto deploy]   at java.lang.reflect.Method.invoke(Native Method)
[Auto deploy]   at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
[Auto deploy]   at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
[Auto deploy]   at
org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:416)
[Auto deploy]   at
org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:178)
[Auto deploy]   at java.lang.reflect.Method.invoke(Native Method)
[Auto deploy]   at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
[Auto deploy]   at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
[Auto deploy]   at org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:358)
[Auto deploy]   at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:221)
[Auto deploy]   at java.lang.Thread.run(Unknown Source)

Any recommendations?

jim



_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to