我正在尝试使用mysql v8.0.11和驱动程序“ mysql-connector-java-8.0.11”初始化hybris v6.7
我创建了方案“ y” utf8-utf8_bin并通过local.properties对其进行了配置
local.properties
db.url=jdbc:mysql://localhost/y?useConfigs=maxPerformance&characterEncoding=utf8
db.driver=com.mysql.jdbc.Driver
db.username=root
db.password=hell0w0rld!
db.tableprefix=
db.customsessionsql=SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
mysql.optional.tabledefs=CHARSET=utf8 COLLATE=utf8_bin
mysql.tabletype=InnoDB
$ ant清理所有初始化
[java] INFO [main] [Initialization] ###############################################################
[java] INFO [main] [Initialization] Initialize system ...
[java] INFO [main] [Initialization] ###############################################################
[java] INFO [main] [Initialization] Please wait. This step can take some minutes to complete.
[java] INFO [main] [Initialization] If you do not receive any feedback on this page in this time, consult the applicationserver logs for possible errors.
[java] INFO [main] [Initialization] Dropping old and creating new empty system ...
[java] INFO [main] [Initialization] ### Starting type system initialization
[java] INFO [main] [Initialization] >>> Creating schema and type system ...
[java] INFO [main] [HybrisSchemaGenerator] Reading type system Information.
[java] INFO [main] [HybrisSchemaGenerator] Read type system Information. Time taken 2.335 s
[java] INFO [main] [HybrisSchemaGenerator] Preparing Db model.
[java] INFO [main] [DatabaseModelGenerator] Prepared Database Model with (1588) tables.
[java] INFO [main] [HybrisSchemaGenerator] Prepared Db model. Time taken 11.53 s
[java] INFO [main] [HybrisSchemaGenerator] Preparing Statements
[java] INFO [main] [HybrisSchemaGenerator] Prepared Statements. Time taken 4.756 s
[java] INFO [main] [DefaultDbScriptsExecutor] ###### Executing DDL Drop Statements in batch mode ##########
[java] INFO [main] [DefaultDbScriptsExecutor] Executed 880 Statements. Time taken: 1.145 s
[java] INFO [main] [DefaultDbScriptsExecutor] ###### Executing DDL Statements in batch mode ###############
[java] Sat Jul 14 19:31:45 EET 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
[java] INFO [main] [DefaultDbScriptsExecutor] Executed 2680 Statements. Time taken: 33.69 s
[java] INFO [main] [DefaultDbScriptsExecutor] ###### Executing DML Statements in batch mode ###############
[java] INFO [main] [DefaultDbScriptsExecutor] Executed 33034 Statements. Time taken: 2.273 min
[java] INFO [main] [HybrisSchemaGenerator] DDL DROP Script generated to: /Users/aghoneim/Workspace/Hybris/y/hybris/temp/hybris/init_master_drop_schema.sql
[java] INFO [main] [HybrisSchemaGenerator] DDL CREATE Script generated to: /Users/aghoneim/Workspace/Hybris/y/hybris/temp/hybris/init_master_schema.sql
[java] INFO [main] [HybrisSchemaGenerator] DML Script generated to: /Users/aghoneim/Workspace/Hybris/y/hybris/temp/hybris/init_master_data.sql
[java] INFO [main] [Initialization] >>> Reloading persistence ...
[java] INFO [main] [Initialization] >>> Clearing cache ...
[java] INFO [main] [Initialization] >>> Initializing media storages ...
[java] INFO [main] [Initialization] ### Done type system initialization in 0d 00h:03m:22s:651ms.
[java] INFO [main] [Initialization] Restarting system internals ....
[java] INFO [main] [DefaultTaskService] Task engine already stopped.
[java] ERROR [main] [AbstractAntPerformable] Error occurred while performing ant task
[java] org.springframework.jdbc.BadSqlGrammarException: ConnectionCallback; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'HAVING TABLE_TYPE IN ('TABLE',null,null,null,null) ORDER BY TABLE_TYPE, TABLE_SC' at line 1
[java] at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:231) ~[spring-jdbc-4.3.14.RELEASE.jar:4.3.14.RELEASE]
[java] at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73) ~[spring-jdbc-4.3.14.RELEASE.jar:4.3.14.RELEASE]
[java] at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:360) ~[spring-jdbc-4.3.14.RELEASE.jar:4.3.14.RELEASE]
[java] at de.hybris.bootstrap.ddl.tools.persistenceinfo.PersistenceInformation.getAllTableNamesFromDatabase(PersistenceInformation.java:289) ~[ybootstrap.jar:?]
[java] at de.hybris.bootstrap.ddl.tools.persistenceinfo.PersistenceInformation.allTables(PersistenceInformation.java:276) ~[ybootstrap.jar:?]
[java] at de.hybris.bootstrap.ddl.tools.persistenceinfo.PersistenceInformation.containsTypeSystemPropsTable(PersistenceInformation.java:95) ~[ybootstrap.jar:?]
[java] at de.hybris.bootstrap.ddl.tools.MigrateTypeSystemProps.containsTypeSystemPropsTable(MigrateTypeSystemProps.java:72) ~[ybootstrap.jar:?]
[java] at de.hybris.bootstrap.ddl.tools.MigrateTypeSystemProps.getStatementsToExecute(MigrateTypeSystemProps.java:50) ~[ybootstrap.jar:?]
[java] at de.hybris.bootstrap.ddl.tools.TypeSystemHelper.assureTypeSystemStructureIsUpToDate(TypeSystemHelper.java:123) ~[ybootstrap.jar:?]
[java] at de.hybris.platform.core.AbstractTenant.assureTypeSystemStructureIsUpToDate(AbstractTenant.java:830) ~[coreserver.jar:?]
[java] at de.hybris.platform.core.AbstractTenant.doStartupSafe(AbstractTenant.java:737) ~[coreserver.jar:?]
[java] at de.hybris.platform.core.AbstractTenant.doStartUp(AbstractTenant.java:685) ~[coreserver.jar:?]
[java] at de.hybris.platform.core.Registry.destroyAndForceStartupTenant(Registry.java:274) ~[coreserver.jar:?]
[java] at de.hybris.platform.core.Registry.destroyAndForceStartup(Registry.java:263) ~[coreserver.jar:?]
[java] at de.hybris.platform.core.Initialization$SessionRecoveryAfterRegistryStartupAwareExecutor.doAfter(Initialization.java:681) ~[coreserver.jar:?]
[java] at de.hybris.platform.core.Initialization$SessionRecoveryAfterRegistryStartupAwareExecutor.execute(Initialization.java:691) ~[coreserver.jar:?]
[java] at de.hybris.platform.core.Initialization.doInitializeImpl(Initialization.java:565) ~[coreserver.jar:?]
[java] at de.hybris.platform.core.Initialization.access$5(Initialization.java:487) ~[coreserver.jar:?]
[java] at de.hybris.platform.core.Initialization$5.call(Initialization.java:804) ~[coreserver.jar:?]
[java] at de.hybris.platform.core.Initialization$5.call(Initialization.java:1) ~[coreserver.jar:?]
[java] at de.hybris.platform.core.system.InitializationLockHandler.performLocked(InitializationLockHandler.java:80) ~[coreserver.jar:?]
[java] at de.hybris.platform.core.Initialization.doInitialize(Initialization.java:836) ~[coreserver.jar:?]
[java] at de.hybris.ant.taskdefs.InitPlatformAntPerformableImpl.performImpl(InitPlatformAntPerformableImpl.java:106) ~[coreserver.jar:?]
[java] at de.hybris.ant.taskdefs.AbstractAntPerformable.doPerform(AbstractAntPerformable.java:92) [coreserver.jar:?]
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161]
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_161]
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_161]
[java] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_161]
[java] at bsh.Reflect.invokeMethod(Reflect.java:134) [bsh-2.0b5.jar:2.0b5 2005-06-12 04:50:41]
[java] at bsh.Reflect.invokeObjectMethod(Reflect.java:80) [bsh-2.0b5.jar:2.0b5 2005-06-12 04:50:41]
[java] at bsh.Name.invokeMethod(Name.java:858) [bsh-2.0b5.jar:2.0b5 2005-06-12 04:50:41]
[java] at bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:75) [bsh-2.0b5.jar:2.0b5 2005-06-12 04:50:41]
[java] at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:102) [bsh-2.0b5.jar:2.0b5 2005-06-12 04:50:41]
[java] at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47) [bsh-2.0b5.jar:2.0b5 2005-06-12 04:50:41]
[java] at bsh.BSHBlock.evalBlock(BSHBlock.java:130) [bsh-2.0b5.jar:2.0b5 2005-06-12 04:50:41]
[java] at bsh.BSHBlock.eval(BSHBlock.java:80) [bsh-2.0b5.jar:2.0b5 2005-06-12 04:50:41]
[java] at bsh.BSHBlock.eval(BSHBlock.java:46) [bsh-2.0b5.jar:2.0b5 2005-06-12 04:50:41]
[java] at bsh.BSHTryStatement.eval(BSHTryStatement.java:86) [bsh-2.0b5.jar:2.0b5 2005-06-12 04:50:41]
[java] at bsh.Interpreter.eval(Interpreter.java:645) [bsh-2.0b5.jar:2.0b5 2005-06-12 04:50:41]
[java] at bsh.Interpreter.eval(Interpreter.java:739) [bsh-2.0b5.jar:2.0b5 2005-06-12 04:50:41]
[java] at bsh.Interpreter.eval(Interpreter.java:728) [bsh-2.0b5.jar:2.0b5 2005-06-12 04:50:41]
[java] at de.hybris.platform.util.ClientExecuter.execute(ClientExecuter.java:49) [coreserver.jar:?]
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161]
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_161]
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_161]
[java] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_161]
[java] at de.hybris.bootstrap.loader.Loader.execute(Loader.java:142) [ybootstrap.jar:?]
[java] at de.hybris.bootstrap.loader.Loader.main(Loader.java:118) [ybootstrap.jar:?]
[java] Caused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'HAVING TABLE_TYPE IN ('TABLE',null,null,null,null) ORDER BY TABLE_TYPE, TABLE_SC' at line 1
[java] at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:118) ~[mysql-connector-java-8.0.11.jar:8.0.11]
[java] at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:95) ~[mysql-connector-java-8.0.11.jar:8.0.11]
[java] at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.11.jar:8.0.11]
[java] at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:960) ~[mysql-connector-java-8.0.11.jar:8.0.11]
[java] at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1019) ~[mysql-connector-java-8.0.11.jar:8.0.11]
[java] at com.mysql.cj.jdbc.DatabaseMetaDataUsingInfoSchema.executeMetadataQuery(DatabaseMetaDataUsingInfoSchema.java:62) ~[mysql-connector-java-8.0.11.jar:8.0.11]
[java] at com.mysql.cj.jdbc.DatabaseMetaDataUsingInfoSchema.getTables(DatabaseMetaDataUsingInfoSchema.java:835) ~[mysql-connector-java-8.0.11.jar:8.0.11]
[java] at de.hybris.bootstrap.ddl.tools.persistenceinfo.PersistenceInformation$4.doInConnection(PersistenceInformation.java:296) ~[ybootstrap.jar:?]
[java] at de.hybris.bootstrap.ddl.tools.persistenceinfo.PersistenceInformation$4.doInConnection(PersistenceInformation.java:1) ~[ybootstrap.jar:?]
[java] at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:353) ~[spring-jdbc-4.3.14.RELEASE.jar:4.3.14.RELEASE]
[java] ... 45 more
[java] shutting down hybris registry..
[java] INFO [main] [DefaultTaskService] Task engine already stopped.
[java] INFO [main] [TenantStartupNotifier] Using default implementation of TenantStartupNotifier for tenant <<junit>>[1689000681]
[java] INFO [main] [TenantStartupNotifier] Instantiating de.hybris.platform.core.BlockingTenantStartupNotifier for tenant <<junit>>[1689000681].
[java] INFO [main] [TenantStartupNotifier] Using default implementation of TenantStartupNotifier for tenant <<t1>>[-246065169]
[java] INFO [main] [TenantStartupNotifier] Instantiating de.hybris.platform.core.BlockingTenantStartupNotifier for tenant <<t1>>[-246065169].
[java] INFO [main] [TenantStartupNotifier] Using default implementation of TenantStartupNotifier for tenant <<t2>>[1485094517]
[java] INFO [main] [TenantStartupNotifier] Instantiating de.hybris.platform.core.BlockingTenantStartupNotifier for tenant <<t2>>[1485094517].
[java] INFO [main] [TenantStartupNotifier] Using default implementation of TenantStartupNotifier for tenant <<foo>>[1562070837]
[java] INFO [main] [TenantStartupNotifier] Instantiating de.hybris.platform.core.BlockingTenantStartupNotifier for tenant <<foo>>[1562070837].
[java] INFO [AfterSaveEventPublisher-master] [DefaultAfterSaveListenerRegistry] AfterSaveEventPublisher-master has been interrupted - stopping now: sleep interrupted
[java] INFO [AfterSaveEventPublisher-master] [DefaultAfterSaveListenerRegistry] AfterSaveEventPublisher-master has been interrupted/terminated but without InterruptedException - stopping now.
[java] INFO [main] [DefaultCacheController] Removed listener from cache controller. Currently registered 1
[java] INFO [main] [DefaultSolrServerService] Stopping Solr servers ...
[java] INFO [main] [DefaultSolrServerService] Stopping Solr server for instance [name: default, hostname: localhost, port: 8983]
[java] Sending stop command to Solr running on port 8983 ... waiting up to 180 seconds to allow Jetty process 12266 to stop gracefully.
[java] INFO [main] [DefaultClusterNodeManagementService] Unregistering assigned cluster node id 0...
[java] Exception in thread "main" java.lang.reflect.InvocationTargetException
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:498)
[java] at de.hybris.bootstrap.loader.Loader.execute(Loader.java:142)
[java] at de.hybris.bootstrap.loader.Loader.main(Loader.java:118)
[java] Caused by: Sourced file: inline evaluation of: ``try { de.hybris.ant.taskdefs.AntPerformable p = new de.hybris.a . . . '' : Method Invocation p.doPerform : at Line: 4 : in file: inline evaluation of: ``try { de.hybris.ant.taskdefs.AntPerformable p = new de.hybris.a . . . '' : p .doPerform ( )
[java]
[java] Target exception: org.springframework.jdbc.BadSqlGrammarException: ConnectionCallback; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'HAVING TABLE_TYPE IN ('TABLE',null,null,null,null) ORDER BY TABLE_TYPE, TABLE_SC' at line 1
[java]
[java] at bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:97)
[java] at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:102)
[java] at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47)
[java] at bsh.BSHBlock.evalBlock(BSHBlock.java:130)
[java] at bsh.BSHBlock.eval(BSHBlock.java:80)
[java] at bsh.BSHBlock.eval(BSHBlock.java:46)
[java] at bsh.BSHTryStatement.eval(BSHTryStatement.java:86)
[java] at bsh.Interpreter.eval(Interpreter.java:645)
[java] at bsh.Interpreter.eval(Interpreter.java:739)
[java] at bsh.Interpreter.eval(Interpreter.java:728)
[java] at de.hybris.platform.util.ClientExecuter.execute(ClientExecuter.java:49)
[java] ... 6 more
[java] shutting down hybris registry..
您的SQL语法有错误;查看与您的MySQL服务器版本相对应的手册以获取正确的语法,以在'HAVING TABLE_TYPE IN('TABLE',null,null,null,null)ORDER BY TABLE_TYPE,TABLE_SC'附近使用
HSSQL可以正常工作,并且可以通过mysql工作台连接到数据库。
如何解决此问题?
答案 0 :(得分:6)
您是否已检查https://help.hybris.com/6.7.0/hcd/8c71300f866910149b40c88dfc0de431.html上的“第三方兼容性”页
似乎不支持mysql 8。