Adding resource.properties file to org.wso2.carbon.utils.i18n pacakge… #2905
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
… - issue #2904
Purpose
Below exception is thrown when calling org.wso2.carbon.utils.i18n.Messages.getMessage() method.
"'Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.wso2.carbon.utils.i18n.Messages
at com.synchronoss.cloud.oauth2.token.handlers.grant.UserStoreUtils.decrypt(UserStoreUtils.java:146)
at com.synchronoss.cloud.oauth2.token.handlers.grant.CustomRefreshGrantHandler.issue(CustomRefreshGrantHandler.java:104)
at org.wso2.carbon.identity.oauth2.token.AccessTokenIssuer.issue(AccessTokenIssuer.java:301)
at org.wso2.carbon.identity.oauth2.OAuth2Service.issueAccessToken(OAuth2Service.java:254)
at org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint.issueAccessToken(OAuth2TokenEndpoint.java:318)
at org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint.issueAccessToken(OAuth2TokenEndpoint.java:94)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
... 56 more
"
This error occurs because Messages class is not initialized at the run time because of another exception. That exception is as below.
"Caused by: java.util.MissingResourceException: Cannot find resource 'org.wso2.carbon.utils.i18n.resource'
at org.wso2.carbon.utils.i18n.ProjectResourceBundle.getBundle(ProjectResourceBundle.java:251)
at org.wso2.carbon.utils.i18n.MessagesConstants.(MessagesConstants.java:29)
... 69 more
"
This exception happens because the resource.properties file is missing in the "org.wso2.carbon.utils.i18n" package.
Goals
Approach
Added resource.properties file to org.wso2.carbon.utils package. Resource file key values should be reviewed.
User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
Learning