Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370724 - java.util.MissingResourceException occured after changing to RAP1.5M5
Summary: java.util.MissingResourceException occured after changing to RAP1.5M5
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: Workbench (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 1.5 M6   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 371103
Blocks:
  Show dependency tree
 
Reported: 2012-02-06 09:31 EST by David Song CLA
Modified: 2012-02-13 19:51 EST (History)
2 users (show)

See Also:


Attachments
Simple hello world project (13.55 KB, application/octet-stream)
2012-02-09 05:23 EST, Arnaud MERGEY CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Song CLA 2012-02-06 09:31:31 EST
Build Identifier: Version:1.5.0 Build id:M5-20120131-1110

I change the rap runtime 1.5M5 for my app. It works well in eclipse ide develop environment but when I deploy to jboss as 7.02, and it also works on the rap runtime 1.5M4 or version 1.41, but an exception message occured on the new version 1.5M5

!ENTRY org.eclipse.osgi 4 0 2012-02-04 10:09:59.053
!MESSAGE An unexpected runtime error has occurred.
!STACK 0
java.util.MissingResourceException: Resource bundle not found for locale: zh_CN
	at org.eclipse.core.internal.runtime.Activator.getLocalization(Activator.java:243)
...
!ENTRY org.eclipse.equinox.http.registry 4 0 2012-02-04 10:09:59.054
!MESSAGE FrameworkEvent ERROR
!STACK 0
java.util.MissingResourceException: Resource bundle not found for locale: zh_CN
	at org.eclipse.core.internal.runtime.Activator.getLocalization(Activator.java:243)
...

and I already put the Babel Language Packs(RAP zh_CN) labs to the classpath.


Reproducible: Always
Comment 1 Arnaud MERGEY CLA 2012-02-08 04:09:40 EST
Same issue occurs using eclipse launcher as well, I will provide a more detailed stack trace.
Same application worked fine in 1.5 M4, so it is definitely caused by some change in M5. The only way to have the issue gone is to remove the -registryMultiLanguage option in the launcher, but it is not an option for internationalized application.
I have not yet really investigated, but according to the stack trace, it seems to be more related to equinox (configuration admin or declarative service configuration), than rap

java.util.MissingResourceException: Resource bundle not found for locale: fr
at org.eclipse.core.internal.runtime.Activator.getLocalization(Activator.java:243)
at org.eclipse.core.internal.runtime.ResourceTranslator.getResourceBundle(ResourceTranslator.java:69)
at org.eclipse.core.internal.runtime.ResourceTranslator.getResourceString(ResourceTranslator.java:76)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.translate(RegistryStrategyOSGI.java:106)
at org.eclipse.core.internal.registry.ExtensionRegistry.translate(ExtensionRegistry.java:1379)
at org.eclipse.core.internal.registry.ConfigurationElementMulti.getTranslatedAtIndex(ConfigurationElementMulti.java:64)
at org.eclipse.core.internal.registry.ConfigurationElementMulti.getAttribute(ConfigurationElementMulti.java:47)
at org.eclipse.core.internal.registry.ConfigurationElementMulti.getAttribute(ConfigurationElementMulti.java:111)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.getAttribute(ConfigurationElementHandle.java:34)
at org.eclipse.equinox.http.registry.internal.ServletManager.added(ServletManager.java:112)
at org.eclipse.equinox.http.registry.internal.ExtensionPointTracker.open(ExtensionPointTracker.java:75)
at org.eclipse.equinox.http.registry.internal.ServletManager.start(ServletManager.java:62)
at org.eclipse.equinox.http.registry.internal.HttpRegistryManager.start(HttpRegistryManager.java:106)
at org.eclipse.equinox.http.registry.internal.HttpServiceTracker.addingService(HttpServiceTracker.java:58)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:990)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:262)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:234)
at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:951)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
at org.eclipse.equinox.http.servlet.internal.Activator.registerHttpService(Activator.java:81)
at org.eclipse.equinox.http.servlet.internal.Activator.addProxyServlet(Activator.java:60)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.init(ProxyServlet.java:40)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.init(HttpServerManager.java:300)
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:473)
at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:293)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:776)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:258)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:699)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)
at org.eclipse.jetty.server.Server.doStart(Server.java:263)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager.updated(HttpServerManager.java:113)
at org.eclipse.equinox.http.jetty.internal.Activator.start(Activator.java:62)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1177)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Comment 2 David Song CLA 2012-02-08 07:13:42 EST
Ivan said in eclipse forum:

I understand that this happens only when the application is deployed in
an external container (jboss, tomcat...). Working fine from within
Eclipse (with Jetty). Could you confirm this?


Yes, this happens only when the app is deployed in an external container and working fine from within Eclipse (with Jetty).
Comment 3 Arnaud MERGEY CLA 2012-02-08 07:31:50 EST
I have the issue for a deployed application, but I have also it from within eclipse as well, the only way to have it gone is by removing -registryMultiLanguage
Comment 4 Arnaud MERGEY CLA 2012-02-08 07:33:58 EST
David if you lauch the application from eclipse using -registryMultiLanguage -nl zh_CN you should see the issue from there too
Comment 5 David Song CLA 2012-02-08 09:32:38 EST
That is, it does work by removing -registryMultiLanguage.thanks Arnaud MERGEY
Comment 6 Arnaud MERGEY CLA 2012-02-08 12:37:24 EST
Notice that removing -registryMultiLanguage is just a workaround for applications that are not internationalized
Comment 7 David Song CLA 2012-02-08 23:18:16 EST
so hope to fix the bug soon!
Comment 8 Ivan Furnadjiev CLA 2012-02-09 03:06:22 EST
Could someone provide a small test project to reproduce the issue?
Comment 9 Arnaud MERGEY CLA 2012-02-09 05:21:35 EST
I guess you can reproduce it with any RAP application just by adding -registryMultiLanguage in Program arguments of the RAP launcher, as the issue occurs with hello world project created using RAP tooling.

I attach the project, it is the Hello World application with a view created from wen plugin wizard where I just have updated the Launcher configuration
It should start with 1.5 M4 and fails with the exception in 1.5M5
Comment 10 Arnaud MERGEY CLA 2012-02-09 05:23:23 EST
Created attachment 210786 [details]
Simple hello world project
Comment 11 Arnaud MERGEY CLA 2012-02-09 05:28:08 EST
I confirm it seems to be worst than I thought, as I can reproduce it with any RAP application I have tried, and it it is caused by -registryMultiLanguage
Comment 12 Ivan Furnadjiev CLA 2012-02-09 07:05:03 EST
Arnaud, do you have a Bundle-Localization header set in your MANIFEST.MF? I've made your test snippet work by adding for example "Bundle-Localization: plugin" and added empty plugin.properties file in the bundle root.
Comment 13 Arnaud MERGEY CLA 2012-02-09 08:21:24 EST
I confirm it works by adding Bundle-Localization in the manifest of the snippet.

In my real application, I have this header only for bundles where it was required, and I guess adding Bundle-Localization with empty property file everywhere should solve the issue.
As this behavior only occurs since 1.5 M5 is it a normal behavior ?
and I am wondering what about third party bundles without this header.

Thanks
Comment 14 Ivan Furnadjiev CLA 2012-02-09 09:53:16 EST
Arnaud, I did a test with a RCP application ( created from Hello World template ) in Eclipse 4.2M5 and when I added -registryMultiLanguage to the program arguments I got exactly the same exception. It seems an Equinox bug, not RAP.
Comment 15 Arnaud MERGEY CLA 2012-02-09 10:07:55 EST
I agree (see my first comment : "but according to the stack trace, it seems to be more related to equinox than rap" ), how can we proceed ? should I open a new bug against equinox ? or may this bug be reasigned to it ?
Comment 16 Ivan Furnadjiev CLA 2012-02-09 10:17:41 EST
(In reply to comment #15)
> should I open a new bug against equinox ? or may this bug be reasigned to it ?
Please open a new bug against Equinox and make this one dependent on it. Thanks.
Comment 17 Arnaud MERGEY CLA 2012-02-09 11:25:02 EST
I have created 371103 against equinox, but as I am not the reporter of this bug, I have not the right to make this one dependent of the other one I created
Comment 18 Ivan Furnadjiev CLA 2012-02-09 15:13:47 EST
The Equinox bug has been fixed. We will include the fix in 1.5M6 too. Mark this bug as fixed too.