我使用命令行运行liquibase,但显示错误。 我使用了以下代码:
liquibase --driver=com.microsoft.sqlserver.jdbc.SQLServerDriver --classpath="D:\01.Application\liquibase\sqljdbc4.jar" --changeLogFile=databaseChangeLog.sql --url="jdbc:sqlserver://localhost:1433;databaseName=TEST" --username=sa --password=sa update
但它显示此错误:
SEVERE 2018/8/26 下午11:38:liquibase: Cannot load class 'liquibase/snapshot/ResultSetCache$ResultSetExtractor$1.class' in classloader: java.net.URLClassLoader@7225790e. Reason: java.lang.IllegalAccessError: class liquibase.snapshot.ResultSetCache$ResultSetExtractor$1 cannot access its superclass liquibase.executor.jvm.ColumnMapRowMapper
java.lang.IllegalAccessError: class liquibase.snapshot.ResultSetCache$ResultSetExtractor$1 cannot access its superclass liquibase.executor.jvm.ColumnMapRowMapper
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1009)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:801)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:699)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:622)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:553)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
at liquibase.servicelocator.DefaultPackageScanClassResolver.addIfMatching(DefaultPackageScanClassResolver.java:375)
at liquibase.servicelocator.DefaultPackageScanClassResolver.loadImplementationsInJar(DefaultPackageScanClassResolver.java:343)
at liquibase.servicelocator.DefaultPackageScanClassResolver.find(DefaultPackageScanClassResolver.java:221)
at liquibase.servicelocator.DefaultPackageScanClassResolver.find(DefaultPackageScanClassResolver.java:113)
at liquibase.servicelocator.DefaultPackageScanClassResolver.findImplementations(DefaultPackageScanClassResolver.java:83)
at liquibase.servicelocator.ServiceLocator.findClassesImpl(ServiceLocator.java:189)
at liquibase.servicelocator.ServiceLocator.findClasses(ServiceLocator.java:164)
at liquibase.servicelocator.ServiceLocator.findClass(ServiceLocator.java:128)
at liquibase.servicelocator.ServiceLocator.newInstance(ServiceLocator.java:177)
at liquibase.logging.LogFactory.getLogger(LogFactory.java:17)
at liquibase.logging.LogFactory.getLogger(LogFactory.java:30)
at liquibase.integration.commandline.Main.doMigration(Main.java:733)
at liquibase.integration.commandline.Main.main(Main.java:134)
我的数据库是sqlserver 2008r2,可以运行吗? 我看不懂谁可以帮助我?