解决Could not load [oracle/sql/converter_xcharset/lx20354.glb].

416 阅读2分钟

​本文已参与「新人创作礼」活动,一起开启掘金创作之路。

 项目场景简介:

使用的oracle数据库,java程序普通web-tomcat部署 每天都会启动项目,今天突然就爆了错误,启动失败,那就先从报错信息入手吧。


报错信息如下

信息: Illegal access: this web application instance has been stopped already. Could not load [oracle/sql/converter_xcharset/lx20354.glb]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [oracle/sql/converter_xcharset/lx20354.glb]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
	at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1372)
	at org.apache.catalina.loader.WebappClassLoaderBase.getResource(WebappClassLoaderBase.java:1042)

原因分析:

重点信息截取:Could not load [oracle/sql/converter_xcharset/lx20354.glb] 基本可以锁定问题在数据库。

数据库的问题有以下几种可能: 1、数据库驱动包问题:比如jar包缺失或者冲突。 2、数据库用户密码过期(其实早在这次报错之前的几天就有收到过oracle的提示,登陆plsql就会有提示,只是我没太注意)所以本次问题因该是这个,因为之前都好好的,不会突然少了多了jar包驱动之类的。


解决方案:

如何修改oracle数据库的密码呢? 因为我只是Windows本地环境安装的oracle,管理员账号,以下方法适用于此。

第一步:使用 cmd 打开黑窗口

第二步:输入: sqlplus / as sysdba; (以管理员身份登入)

第三步:输入sql : ALTER USER 自己的用户名 ACCOUNT UNLOCK;(先给自己的账号解个锁,因为密码过期会锁用户)

第四步:修改该密码sql:

alter user 自己登陆数据库的用户名 identified by 自己的密码

第五步:oracle默认是定期几个月就要修改账户密码的,如果不想这么麻烦(环境安全的情况下)可以把用户的密码有效期设置为无限期,这样就不用定期修改被锁账户了。sql如下:

Alter PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;