在平台初始化期间无法在数据库错误中找到源表“ props”

时间:2018-12-13 09:34:45

标签: mysql hybris

杂种:6.6.0.12

mySQL: 5.6.42

mySQL DB驱动程序: 5.1.44

在本地计算机上初始化时,出现“在数据库中找不到源表'props'”错误。我尝试删除数据库模式,创建一个新模式,然后进行平台初始化,但是会发生相同的错误。

下面的日志:

     [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

2 个答案:

答案 0 :(得分:0)

该问题已临时解决。我说“暂时”,因为我尚未找到根本原因。

其他背景:我们正在迁移到Hybris 6.6(来自Hybris 5.7),并且我使用了与Hybris 5.7相同的local.properties。当我使用同事的local.properties时,平台初始化成功。因此,我的猜测是,我的旧local.properties中可能存在一个导致“道具”问题的属性。

我现在没有时间检查,但是稍后会进行进一步调查。 (并希望也更新此答案)

答案 1 :(得分:0)

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

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”。