重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1172|回复: 1
打印 上一主题 下一主题

奇怪,SQLCL在19.14中无法执行

[复制链接]
跳转到指定楼层
楼主
发表于 2022-7-8 18:37:24 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 郑全 于 2022-7-8 18:41 编辑

一学员说,SQL /nolog 报错:类似下面这样:

                               
登录/注册后可看大图


问问SQLPLUS能否执行:


                               
登录/注册后可看大图

看得出,版本原来是19.14。奇怪了,我19.15都没有这个问题,马上看看我的19.14的环境,原来确实存在这个问题。
查看MOS上,看到改问题再19.14上存在,具体见:
SQLcl fails with java.util.ServiceConfigurationError after applying Database Release Update 19.14(Patch 33515361) (Doc ID 2852276.1)



APPLIES TO:Oracle SQLcl - Version 19.1 and later
Information in this document applies to any platform.
SYMPTOMS
After applying Database Release Update 19.14(Patch 33515361),
SQLcl fails with java.util.ServiceConfigurationError :
$ sql
Exception in thread "main" java.util.ServiceConfigurationError: oracle.dbtools.extension.SQLCLService: Provider
oracle.dbtools.raptor.scriptrunner.commands.liquibase.liquibaseCommand could not be instantiated
at java.util.ServiceLoader.fail(ServiceLoader.java:232)
at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at oracle.dbtools.extension.SQLCLServices.registerServices(SQLCLServices.java:48)
at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.(SqlCli.java:220)
at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:441)
Caused by: java.lang.NoClassDefFoundError: liquibase/exception/DatabaseException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.newInstance(Class.java:412)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
... 5 more
Caused by: java.lang.ClassNotFoundException: liquibase.exception.DatabaseException
at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 10 more


Additional information
if only jackson-databind.jar is missing, SQLcl fails with the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/ObjectMapper
at oracle.dbtools.versions.CheckForUpdates.<clinit>(CheckForUpdates.java:215)
at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.handleUpdates(SqlCli.java:508)
at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:464)
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.databind.ObjectMapper
at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 3 more



CHANGES
After applying Database Release Update 19.14(Patch 33515361)
CAUSE
RDBMS RU19.14(Patch 33515361) removes the following jar files.
$ORACLE_HOME/sqldeveloper/sqldeveloper/lib/ext/liquibase-core.jar
$ORACLE_HOME/sqldeveloper/sqldeveloper/lib/jackson-databind.jar

SOLUTION
Please restore liquibase-core.jar and jackson-databind.jar files from $ORACLE_HOME/.patch_storage
backup files:
$ORACLE_HOME/.patch_storage/33515361_Jan_13_2022_06_14_07/files/sqldeveloper/sqldeveloper/lib/ext/liquibase-core.jar
$ORACLE_HOME/.patch_storage/33515361_Jan_13_2022_06_14_07/files/sqldeveloper/sqldeveloper/lib/jackson-databind.jar


Restore liquibase-core.jar:
$ cd $ORACLE_HOME/.patch_storage/33515361_Jan_13_2022_06_14_07/files/sqldeveloper/sqldeveloper/lib/ext

$ cp liquibase-core.jar $ORACLE_HOME/sqldeveloper/sqldeveloper/lib/ext

Restore jackson-databind.jar:
$ cd $ORACLE_HOME/.patch_storage/33515361_Jan_13_2022_06_14_07/files/sqldeveloper/sqldeveloper/lib

$ cp jackson-databind.jar $ORACLE_HOME/sqldeveloper/sqldeveloper/lib



Bug 33872630 has been fixed in SQLcl version 22.1.0.84.1111

看来是19.14 ru把这两个文件拿掉了,解决办法,从其他版本把这两个文件拿回来即可,测试从19.15上拷回这两个文件,可以解决。

[oracle@dbserver][oracle@dbserver]-rw-r--r-- 1 oracle oinstall 4204927 Jul  8 18:20 /u01/app/oracle/product/19.14.0/db_1/sqldeveloper/sqldeveloper/lib/ext/liquibase-core.jar
[oracle@dbserver][oracle@dbserver][oracle@dbserver ext]$
[oracle@dbserver][oracle@dbserver]-rw-r--r-- 1 oracle oinstall 369 Jul  8 18:24 /u01/app/oracle/product/19.14.0/db_1/sqldeveloper/sqldeveloper/lib/jackson-databind.jar

[oracle@dbserver ext]$ sqlplus /nolog


SQL*Plus: Release 19.0.0.0.0 - Production on Fri Jul 8 18:27:00 2022
Version 19.14.0.0.0


Copyright (c) 1982, 2021, Oracle.  All rights reserved.


SQL> exit
[oracle@dbserver ext]$
[oracle@dbserver ext]$
[oracle@dbserver ext]$ sql /nolog


SQLcl: Release 19.1 Production on Fri Jul 08 18:27:04 2022


Copyright (c) 1982, 2022, Oracle.  All rights reserved.




SQL>
SQL>
SQL> conn / as sysdba

Connected to an idle instance.





分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

沙发
 楼主| 发表于 2022-7-8 18:42:55 | 只看该作者
本帖最后由 郑全 于 2022-7-8 18:44 编辑

图片贴,图片已经删除
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-11-28 14:13 , Processed in 0.116970 second(s), 19 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表