在平台初始化期间,在数据库中找不到源表“props”

pu82cl6c  于 2021-06-17  发布在  Mysql
关注(0)|答案(2)|浏览(594)

海布里斯:6.6.0.12
mysql:5.6.42版本
mysql数据库驱动程序:5.1.44
在本地计算机上初始化时,出现“在数据库中找不到源表'props'”错误。我尝试过删除db模式,创建一个新的模式,并进行平台初始化,但同样的错误也发生了。
日志如下:

[java] shutting down hybris registry..
     [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: java.lang.IllegalArgumentException: Can't find source table 'props' in database.
     [java]     at de.hybris.bootstrap.ddl.tools.TablesStructureCopier.requireValidTablesMapping(TablesStructureCopier.java:52)
     [java]     at de.hybris.bootstrap.ddl.tools.TablesStructureCopier.getCopyStatements(TablesStructureCopier.java:36)
     [java]     at de.hybris.bootstrap.ddl.tools.MigrateTypeSystemProps.createTypeSystemPropsTable(MigrateTypeSystemProps.java:67)
     [java]     at de.hybris.bootstrap.ddl.tools.MigrateTypeSystemProps.getStatementsToExecute(MigrateTypeSystemProps.java:57)
     [java]     at de.hybris.bootstrap.ddl.tools.TypeSystemHelper.assureTypeSystemStructureIsUpToDate(TypeSystemHelper.java:123)
     [java]     at de.hybris.platform.core.AbstractTenant.assureTypeSystemStructureIsUpToDate(AbstractTenant.java:827)
     [java]     at de.hybris.platform.core.AbstractTenant.doStartupSafe(AbstractTenant.java:735)
     [java]     at de.hybris.platform.core.AbstractTenant.doStartUp(AbstractTenant.java:683)
     [java]     at de.hybris.platform.core.Registry.assureTenantStarted(Registry.java:657)
     [java]     at de.hybris.platform.core.Registry.activateTenant(Registry.java:718)
     [java]     at de.hybris.platform.core.Registry.setCurrentTenant(Registry.java:565)
     [java]     at de.hybris.platform.core.Registry.activateMasterTenantForInit(Registry.java:634)
     [java]     at de.hybris.platform.util.ClientExecuter.execute(ClientExecuter.java:39)
     [java]     ... 6 more
     [java] INFO  [Thread-0] [HybrisContextFactory] Loading <<global>> spring config from extension (core) located in (global-core-spring.xml,core-cache.xml,global-servicelayer-spring.xml,global-core-jmx-spring.xml,global-statistics-spring.xml) took: (398.7 ms)
     [java] INFO  [Thread-0] [HybrisContextFactory] Loading <<global>> spring config from extension (solrfacetsearch) located in (global-solrfacetsearch-spring.xml) took: (53.91 ms)
     [java] INFO  [Thread-0] [HybrisContextFactory] Loading <<global>> spring config from extension (cockpit) located in (global-cockpit-spring.xml) took: (38.67 ms)
     [java] INFO  [Thread-0] [HybrisContextFactory] - Refreshing SpringContext (Global context) took: (556.6 ms)
     [java] INFO  [Thread-0] [HybrisContextFactory] Initializing <<global>> Spring ApplicationContext took: (2.072 s)
     [java] error notifying tenant listener : ListableBeanFactory must not be null
     [java] java.lang.IllegalArgumentException: ListableBeanFactory must not be null
     [java]     at org.springframework.util.Assert.notNull(Assert.java:134)
     [java]     at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:287)
     [java]     at de.hybris.platform.jmx.MBeanRegisterUtilities.refreshMBeans(MBeanRegisterUtilities.java:157)
     [java]     at de.hybris.platform.jmx.MBeanRegisterUtilities.getRegisteredBeans(MBeanRegisterUtilities.java:134)
     [java]     at de.hybris.platform.core.JMXBeanLoader.beforeTenantShutDown(JMXBeanLoader.java:116)
     [java]     at de.hybris.platform.core.AbstractTenant.notifyTenantListenersBeforeShutdown(AbstractTenant.java:1266)
     [java]     at de.hybris.platform.core.AbstractTenant.doShutdown(AbstractTenant.java:947)
     [java]     at de.hybris.platform.core.AbstractTenant.doShutDown(AbstractTenant.java:908)
     [java]     at de.hybris.platform.core.Registry.destroy(Registry.java:330)
     [java]     at de.hybris.platform.util.RedeployUtilities.shutdown(RedeployUtilities.java:75)
     [java]     at de.hybris.platform.util.RedeployUtilities$1.internalRun(RedeployUtilities.java:39)
     [java]     at de.hybris.platform.core.threadregistry.RegistrableThread.run(RegistrableThread.java:135)
     [java] INFO  [Thread-0] [EHCacheRegion] EHCacheRegion entityCacheRegion, eviction policy FIFO, size 200000
     [java] INFO  [Thread-0] [EHCacheRegion] EHCacheRegion queryCacheRegion, eviction policy FIFO, size 40000
     [java] INFO  [Thread-0] [EHCacheRegion] EHCacheRegion sessionCacheRegion, eviction policy LRU, size 50000
     [java] INFO  [Thread-0] [DefaultCacheController] Regioncache initialized with region count 7
     [java] INFO  [Thread-0] [DefaultCacheController] Cache region: Name: typesystemCacheRegion, size: 0, types: [81, 82, 83, 84, 87], statistics: true, class: class de.hybris.platform.regioncache.region.impl.UnlimitedCacheRegion
     [java] INFO  [Thread-0] [DefaultCacheController] Cache region: Name: entityCacheRegion, size: 200000, types: [__ALL_TYPES__, __NO_QUERY__], exclusive computation: false, statistics: true, class: class de.hybris.platform.regioncache.region.impl.EHCacheRegion
     [java] INFO  [Thread-0] [DefaultCacheController] Cache region: Name: queryCacheRegion, size: 40000, types: [__QUERY_CACHE__], exclusive computation: false, statistics: true, class: class de.hybris.platform.regioncache.region.impl.EHCacheRegion
     [java] INFO  [Thread-0] [DefaultCacheController] Cache region: Name: mediaCacheRegion, size: 0, types: [__MEDIA__cache], statistics: true, class: class de.hybris.platform.media.storage.impl.MediaCacheRegion
     [java] INFO  [Thread-0] [DefaultCacheController] Cache region: Name: scriptsCacheRegion, size: 0, types: [__SCRIPT__], statistics: true, class: class de.hybris.platform.scripting.engine.internal.cache.impl.ScriptsCacheRegion
     [java] INFO  [Thread-0] [DefaultCacheController] Cache region: Name: sessionCacheRegion, size: 50000, types: [__SESSION__], exclusive computation: false, statistics: true, class: class de.hybris.platform.regioncache.region.impl.EHCacheRegion
     [java] INFO  [Thread-0] [DefaultCacheController] Cache region: Name: facetSearchConfigCacheRegion, size: 0, types: [__FACET_SEARCH_CONFIG__], statistics: true, class: class de.hybris.platform.solrfacetsearch.config.cache.impl.FacetSearchConfigCacheRegion
     [java] INFO  [Thread-0] [DefaultCacheController] Registered Listener RegionCacheAdapter(1206648899) - <<master>> on cache controller. Currently registered 1
     [java] WARN  [Thread-0] [RegionCacheAdapter] Check licence skipped since system is already shutting down
     [java] INFO  [Thread-0] [DefaultCacheController] Removed listener from cache controller. Currently registered 0
     [java] INFO  [Thread-0] [DefaultClusterNodeManagementService] Unregistering assigned cluster node id 0...

BUILD FAILED
C:\HY66_12\hybris\bin\platform\build.xml:123: The following error occurred while executing this line:
C:\HY66_12\hybris\bin\platform\resources\ant\antmacros.xml:1026: The following error occurred while executing this line:
C:\HY66_12\hybris\bin\platform\resources\ant\platformadministration.xml:51: The following error occurred while executing this line:
C:\HY66_12\hybris\bin\platform\resources\ant\antmacros.xml:883: Java returned: 1
70gysomp

70gysomp1#

这个问题暂时解决了。我说“暂时”,因为我还没有找到根本原因。
其他背景:我们正在迁移到hybris6.6(从hybris5.7),我使用了hybris5.7中相同的local.properties。当我使用同事的local.properties时,平台初始化成功。所以,我猜可能有一个来自我的旧local.properties的属性导致了“props”问题。
我现在没有时间检查,但我稍后会进一步调查(希望也能更新这个答案)

tv6aics1

tv6aics12#

有一个解决方法。您可以运行:

ant initialize -DdryRun=true

然后从以下公式中获取输出: $HYBRIS_HOME/hybris/temp/hybris/init_master_schema.sql ,使用它手动创建正确的数据库架构,然后尝试运行

ant initialize

再一次。有了合适的表,它就不应该再抱怨“props”表了。
编辑:local.properties中还有一个属性用于禁用系统初始化:


# Prevent init

system.unlocking.disabled=true

请确保此行已被注解掉、删除,或者某个值设置为“false”。

相关问题