was SystemOut.log乱码

解决WAS中文乱码问题
本文介绍了解决WebSphere Application Server (WAS) 中文乱码的具体步骤,包括检查操作系统语言设置、调整WAS参数,并给出了具体的参数配置示例。
解决步骤:
1、查操作系统语言locale
2、更改WAS参数,方法如下(以server服务器为例)
然后按如下次序,依次进入
服务器
应用程序服务器
server1
java和进程管理
进程定义
java虚拟机
然后将“ jvm参数”设置成如下
-Dfile.encoding=UTF-8 -Ddefault.client.encoding=UTF-8 -Dclient.encoding.override=UTF-8 -Duser.language=zh -Duser.region=CN -Duser.country=CN
3、最后重启服务器
[root@yfw ~]# cd /opt/openfire [root@yfw openfire]# [root@yfw openfire]# -bash: [root@yfw: command not found [root@yfw openfire]# [root@yfw openfire]# [root@yfw openfire]# [root@yfw openfire]# [root@yfw openfire]# [root@yfw openfire]# [root@yfw openfire]# [root@yfw openfire]# [root@yfw openfire]# pwd /opt/openfire [root@yfw openfire]# mkdir -p ~/openfire-plugin-build/src [root@yfw openfire]# cd ~/openfire-plugin-build [root@yfw openfire-plugin-build]# cat > src/RestApiPlugin.java << 'EOF' > public class RestApiPlugin implements org.jivesoftware.openfire.container.Plugin { > > static { > System.out.println("[PLUGIN-DEBUG] 💡 静态块执行:RestApiPlugin 类已被 JVM 加载!"); ugin.class"));em.out.println("[PLUGIN-DEBUG] 📦 类资源位置: " + RestApiPlugin.class.getResource("RestApiPlu > } > > public RestApiPlugin() { > System.out.println("[PLUGIN-DEBUG] 🆕 构造函数执行:RestApiPlugin 实例已创建"); > } > > @Override > public void initializePlugin(org.jivesoftware.openfire.container.PluginManager manager, java.io.File pluginDirectory) { ath()); System.out.println("[PLUGIN-DEBUG] 🎉 插件初始化成功!插件目录: " + pluginDirectory.getAbsolutePa > } > > @Override > public void destroyPlugin() { > System.out.println("[PLUGIN-DEBUG] 🔌 插件已销毁"); > } > } > EOF [root@yfw openfire-plugin-build]# cat > src/RestApiPlugin.java << 'EOF' > public class RestApiPlugin implements org.jivesoftware.openfire.container.Plugin { > > static { > System.out.println("[PLUGIN-DEBUG] 💡 静态块执行:RestApiPlugin 类已被 JVM 加载!"); ugin.class"));em.out.println("[PLUGIN-DEBUG] 📦 类资源位置: " + RestApiPlugin.class.getResource("RestApiPlu > } > > public RestApiPlugin() { > System.out.println("[PLUGIN-DEBUG] 🆕 构造函数执行:RestApiPlugin 实例已创建"); > } > > @Override > public void initializePlugin(org.jivesoftware.openfire.container.PluginManager manager, java.io.File pluginDirectory) { ath()); System.out.println("[PLUGIN-DEBUG] 🎉 插件初始化成功!插件目录: " + pluginDirectory.getAbsolutePa > } > > @Override > public void destroyPlugin() { > System.out.println("[PLUGIN-DEBUG] 🔌 插件已销毁"); > } > } > EOF [root@yfw openfire-plugin-build]# ls classes/ RestApiPlugin.class [root@yfw openfire-plugin-build]# jar cf restapi.jar -C classes . [root@yfw openfire-plugin-build]# # 删除旧插件和缓存 [root@yfw openfire-plugin-build]# rm -rf /opt/openfire/plugins/restapi [root@yfw openfire-plugin-build]# rm -rf /opt/openfire/work/plugins/restapi* [root@yfw openfire-plugin-build]# [root@yfw openfire-plugin-build]# # 创建新插件目录 [root@yfw openfire-plugin-build]# mkdir -p /opt/openfire/plugins/restapi [root@yfw openfire-plugin-build]# [root@yfw openfire-plugin-build]# # 复制 jar [root@yfw openfire-plugin-build]# cp restapi.jar /opt/openfire/plugins/restapi/ [root@yfw openfire-plugin-build]# [root@yfw openfire-plugin-build]# # 写入 plugin.xml [root@yfw openfire-plugin-build]# cat > /opt/openfire/plugins/restapi/plugin.xml << 'EOF' > <?xml version="1.0" encoding="UTF-8"?> > <plugin> > <className>RestApiPlugin</className> > <name>REST API Plugin</name> > <description>Simple REST API Plugin with Debug Logs</description> > <author>Admin</author> > <version>1.0.0</version> > <date>2025-10-03</date> > <minServerVersion>4.0.0</minServerVersion> > </plugin> > EOF [root@yfw openfire-plugin-build]# [root@yfw openfire-plugin-build]# systemctl restart openfire [root@yfw openfire-plugin-build]# tail -f /opt/openfire/logs/openfire.log 2025.10.03 04:28:01.667 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for LDAP UserDN 2025.10.03 04:28:02.242 INFO [main]: org.jivesoftware.openfire.net.SASLAuthentication - Support added for the 'ANONYMOUS' SASL mechanism. 2025.10.03 04:28:02.242 INFO [main]: org.jivesoftware.openfire.net.SASLAuthentication - Support added for the 'CRAM-MD5' SASL mechanism. 2025.10.03 04:28:02.243 INFO [main]: org.jivesoftware.openfire.net.SASLAuthentication - Support added for the 'DIGEST-MD5' SASL mechanism. 2025.10.03 04:28:02.243 INFO [main]: org.jivesoftware.openfire.net.SASLAuthentication - Support added for the 'EXTERNAL' SASL mechanism. 2025.10.03 04:28:02.243 INFO [main]: org.jivesoftware.openfire.net.SASLAuthentication - Support added for the 'GSSAPI' SASL mechanism. 2025.10.03 04:28:02.243 INFO [main]: org.jivesoftware.openfire.net.SASLAuthentication - Support added for the 'JIVE-SHAREDSECRET' SASL mechanism. 2025.10.03 04:28:02.243 INFO [main]: org.jivesoftware.openfire.net.SASLAuthentication - Support added for the 'PLAIN' SASL mechanism. 2025.10.03 04:28:02.243 INFO [main]: org.jivesoftware.openfire.net.SASLAuthentication - Support added for the 'SCRAM-SHA-1' SASL mechanism. 2025.10.03 04:28:02.334 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Remote Server Configurations 2025.10.03 04:28:21.355 INFO [PluginMonitorTask-2]: org.jivesoftware.openfire.container.PluginMonitor - Plugin 'restapi' was removed from the file system. 2025.10.03 04:28:21.356 ERROR [PluginMonitorTask-2]: org.jivesoftware.openfire.container.PluginMonitor - An unexpected exception occurred: java.lang.NullPointerException: null at org.jivesoftware.openfire.container.PluginManager.unloadPlugin(PluginManager.java:883) ~[xmppserver-4.9.2.jar:4.9.2] at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask.run(PluginMonitor.java:305) [xmppserver-4.9.2.jar:4.9.2] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at java.lang.Thread.run(Thread.java:829) [?:?]
最新发布
10-04
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值