我尝试做ant构建,ant清理所有,SVN签出一个干净的文件并在我工作的文件服务器上重新下载副本。它在其他机器(我的同事(上工作正常,但对我来说,它似乎无法在 hybrisserver 之后启动.bat而且我找不到问题所在。
我认为这可能与Solr服务器有关。
以下是出现的一些控制台消息:
> at de.hybris.platform.core.Registry.startup(Registry.java:422)
> at de.hybris.platform.spring.HybrisContextLoaderListener.startRegistry(H
> ybrisContextLoaderListener.java:237)
> at de.hybris.platform.spring.HybrisContextLoaderListener.doInitWebApplic
> ationContext(HybrisContextLoaderListener.java:135)
> at de.hybris.platform.spring.HybrisContextLoaderListener.initWebApplicat
> ionContext(HybrisContextLoaderListener.java:125)
> at org.springframework.web.context.ContextLoaderListener.contextInitiali
> zed(ContextLoaderListener.java:106)
> at de.hybris.platform.spring.HybrisContextLoaderListener.contextInitiali
> zed(HybrisContextLoaderListener.java:80)
> at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
> t.java:5016)
> at org.apache.catalina.core.StandardContext.startInternal(StandardContex
> t.java:5524)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.
> java:1575)
> at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.
> java:1565)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
> java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
> .java:617)
> at java.lang.Thread.run(Thread.java:748) INFO [localhost-startStop-1] [HybrisContextFactory] Initializing <<global>>
> Spr ing ApplicationContext took: (22.52 I¼s)
> de.hybris.platform.core.UninstantiableCoreApplicationContextException:
> Error cre ating Spring application context.
> at de.hybris.platform.core.AbstractTenant.doStartupSafe(AbstractTenant.j
> ava:728)
> at de.hybris.platform.core.AbstractTenant.doStartUp(AbstractTenant.java:
> 658)
> at de.hybris.platform.core.Registry.assureTenantStarted(Registry.java:63
> 9)
> at de.hybris.platform.core.Registry.activateTenant(Registry.java:700)
> at de.hybris.platform.core.Registry.setCurrentTenant(Registry.java:544)
> at de.hybris.platform.core.Registry.activateMasterTenant(Registry.java:6
> 07)
> at de.hybris.platform.core.Registry.startup(Registry.java:422)
> at de.hybris.platform.spring.HybrisContextLoaderListener.startRegistry(H
> ybrisContextLoaderListener.java:237)
> at de.hybris.platform.spring.HybrisContextLoaderListener.doInitWebApplic
> ationContext(HybrisContextLoaderListener.java:135)
> at de.hybris.platform.spring.HybrisContextLoaderListener.initWebApplicat
> ionContext(HybrisContextLoaderListener.java:125)
> at org.springframework.web.context.ContextLoaderListener.contextInitiali
> zed(ContextLoaderListener.java:106)
> at de.hybris.platform.spring.HybrisContextLoaderListener.contextInitiali
> zed(HybrisContextLoaderListener.java:80)
> at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
> t.java:5016)
> at org.apache.catalina.core.StandardContext.startInternal(StandardContex
> t.java:5524)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.
> java:1575)
> at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.
> java:1565)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
> java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
> .java:617)
> at java.lang.Thread.run(Thread.java:748) Caused by: org.springframework.beans.FatalBeanException: Context hybris Global C
> ontext Factory couldn't be created correctly due to, Error creating
> bean with name 'defaultSolrServerService' defined in class path
> resource [global-solrserve r-spring.xml]: Invocation of init method
> failed; nested exception is de.hybris.p
> latform.solrserver.SolrServerException: Error while executing Solr
> start command for instance: [name: default, port: 8983]
> at de.hybris.platform.core.HybrisContextFactory.build(HybrisContextFacto
> ry.java:317)
> at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.bui
> ldSelf(HybrisContextFactory.java:189)
> at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.bui
> ld(HybrisContextFactory.java:175)
> at de.hybris.platform.core.HybrisContextHolder.getGlobalInstanceCached(H
> ybrisContextHolder.java:134)
> at de.hybris.platform.core.HybrisContextHolder.getGlobalInstance(HybrisC
> ontextHolder.java:113)
> at de.hybris.platform.core.HybrisContextHolder.getAppCtxFactory(HybrisCo
> ntextHolder.java:164)
> at de.hybris.platform.core.HybrisContextHolder.getApplicationInstance(Hy
> brisContextHolder.java:90)
> at de.hybris.platform.core.AbstractTenant.createCoreApplicationContext(A
> bstractTenant.java:686)
> at de.hybris.platform.core.AbstractTenant.doStartupSafe(AbstractTenant.j
> ava:724)
> ... 20 more Error creating Spring application context. Shutting down hybris platform since t he system cannot be used without
> working Spring context... shutting down hybris registry.. INFO
> [Thread-1] [HybrisContextFactory] Initializing <<global>> Spring
> Applicati onContext took: (16.99 I¼s) ERROR [Thread-1] [JMXBeanLoader]
> Can't unregister jmxbeans on shutdown of the te nant <<master>>
> org.springframework.beans.FatalBeanException: Context hybris Global
> Context Fact ory couldn't be created correctly due to, Error
> creating bean with name 'defau ltSolrServerService' defined in class
> path resource [global-solrserver-spring.xm l]: Invocation of init
> method failed; nested exception is de.hybris.platform.sol
> rserver.SolrServerException: Error while executing Solr start command
> for instan ce: [name: default, port: 8983]
> at de.hybris.platform.core.HybrisContextFactory.build(HybrisContextFacto
> ry.java:317)
> at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.bui
> ldSelf(HybrisContextFactory.java:189)
> at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.bui
> ld(HybrisContextFactory.java:175)
> at de.hybris.platform.core.HybrisContextHolder.getGlobalInstanceCached(H
> ybrisContextHolder.java:134)
> at de.hybris.platform.core.HybrisContextHolder.getGlobalInstance(HybrisC
> ontextHolder.java:113)
> at de.hybris.platform.core.Registry.getSingletonGlobalApplicationContext
> (Registry.java:1059)
> at de.hybris.platform.core.JMXBeanLoader.getMBeanRegistry(JMXBeanLoader.
> java:155)
> at de.hybris.platform.core.JMXBeanLoader.beforeTenantShutDown(JMXBeanLoa
> der.java:116)
> at de.hybris.platform.core.AbstractTenant.notifyTenantListenersBeforeShu
> tdown(AbstractTenant.java:1236)
> at de.hybris.platform.core.AbstractTenant.doShutdown(AbstractTenant.java
> :987)
> at de.hybris.platform.core.AbstractTenant.doShutDown(AbstractTenant.java
> :948)
> at de.hybris.platform.core.Registry.destroy(Registry.java:309)
> at de.hybris.platform.util.RedeployUtilities.shutdown(RedeployUtilities.
> java:74)
> at de.hybris.platform.util.RedeployUtilities$1.run(RedeployUtilities.jav
> a:38) error notifying tenant listener : null
> java.lang.NullPointerException
> at de.hybris.platform.jalo.JaloConnection$AbstractSynchronizedPropertyGe
> tter.get(JaloConnection.java:1142)
> at de.hybris.platform.jalo.JaloConnection.getExtensionManager(JaloConnec
> tion.java:1084)
> at de.hybris.platform.mobileservices.jalo.MobileManager.getInstance(Mobi
> leManager.java:130)
> at de.hybris.platform.mobileservices.jalo.MobileManager$1.beforeTenantSh
> utDown(MobileManager.java:92)
> at de.hybris.platform.core.AbstractTenant.notifyTenantListenersBeforeShu
> tdown(AbstractTenant.java:1236)
> at de.hybris.platform.core.AbstractTenant.doShutdown(AbstractTenant.java
> :987)
> at de.hybris.platform.core.AbstractTenant.doShutDown(AbstractTenant.java
> :948)
> at de.hybris.platform.core.Registry.destroy(Registry.java:309)
> at de.hybris.platform.util.RedeployUtilities.shutdown(RedeployUtilities.
> java:74)
> at de.hybris.platform.util.RedeployUtilities$1.run(RedeployUtilities.jav
> a:38) INFO [Thread-1] [HybrisContextFactory] Initializing <<global>>
> Spring Applicati onContext took: (22.52 I¼s) ERROR [Thread-1]
> [RegionCacheAdapter] Unable to clear cache. Failed on region nu ll.
> Last key null null org.springframework.beans.FatalBeanException:
> Context hybris Global Context Fact ory couldn't be created correctly
> due to, Error creating bean with name 'defau ltSolrServerService'
> defined in class path resource [global-solrserver-spring.xm l]:
> Invocation of init method failed; nested exception is
> de.hybris.platform.sol rserver.SolrServerException: Error while
> executing Solr start command for instan ce: [name: default, port:
> 8983]
> at de.hybris.platform.core.HybrisContextFactory.build(HybrisContextFacto
> ry.java:317)
> at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.bui
> ldSelf(HybrisContextFactory.java:189)
> at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.bui
> ld(HybrisContextFactory.java:175)
> at de.hybris.platform.core.HybrisContextHolder.getGlobalInstanceCached(H
> ybrisContextHolder.java:134)
> at de.hybris.platform.core.HybrisContextHolder.getGlobalInstance(HybrisC
> ontextHolder.java:113)
> at de.hybris.platform.core.Registry.getSingletonGlobalApplicationContext
> (Registry.java:1059)
> at de.hybris.platform.cache.impl.RegionCacheAdapter.getController(Region
> CacheAdapter.java:76)
> at de.hybris.platform.cache.impl.RegionCacheAdapter.clear(RegionCacheAda
> pter.java:288)
> at de.hybris.platform.core.AbstractTenant.shutdownCache(AbstractTenant.j
> ava:1061)
> at de.hybris.platform.core.AbstractTenant.doShutdown(AbstractTenant.java
> :1003)
> at de.hybris.platform.core.AbstractTenant.doShutDown(AbstractTenant.java
> :948)
> at de.hybris.platform.core.Registry.destroy(Registry.java:309)
> at de.hybris.platform.util.RedeployUtilities.shutdown(RedeployUtilities.
> java:74)
> at de.hybris.platform.util.RedeployUtilities$1.run(RedeployUtilities.jav
> a:38) org.springframework.beans.FatalBeanException: Context hybris
> Global Context Fact ory couldn't be created correctly due to, Error
> creating bean with name 'defau ltSolrServerService' defined in class
> path resource [global-solrserver-spring.xm l]: Invocation of init
> method failed; nested exception is de.hybris.platform.sol
> rserver.SolrServerException: Error while executing Solr start command
> for instan ce: [name: default, port: 8983]
> at de.hybris.platform.core.HybrisContextFactory.build(HybrisContextFacto
> ry.java:317)
> at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.bui
> ldSelf(HybrisContextFactory.java:189)
> at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.bui
> ld(HybrisContextFactory.java:175)
> at de.hybris.platform.core.HybrisContextHolder.getGlobalInstanceCached(H
> ybrisContextHolder.java:134)
> at de.hybris.platform.core.HybrisContextHolder.getGlobalInstance(HybrisC
> ontextHolder.java:113)
> at de.hybris.platform.core.Registry.getSingletonGlobalApplicationContext
> (Registry.java:1059)
> at de.hybris.platform.cache.impl.RegionCacheAdapter.getController(Region
> CacheAdapter.java:76)
> at de.hybris.platform.cache.impl.RegionCacheAdapter.clear(RegionCacheAda
> pter.java:288)
> at de.hybris.platform.core.AbstractTenant.shutdownCache(AbstractTenant.j
> ava:1061)
> at de.hybris.platform.core.AbstractTenant.doShutdown(AbstractTenant.java
> :1003)
> at de.hybris.platform.core.AbstractTenant.doShutDown(AbstractTenant.java
> :948)
> at de.hybris.platform.core.Registry.destroy(Registry.java:309)
> at de.hybris.platform.util.RedeployUtilities.shutdown(RedeployUtilities.
> java:74)
> at de.hybris.platform.util.RedeployUtilities$1.run(RedeployUtilities.jav
> a:38) INFO [Thread-1] [HybrisContextFactory] Initializing <<global>>
> Spring Applicati onContext took: (10.27 I¼s) ERROR [Thread-1]
> [RegionCacheAdapter] Unable to clear cache. Failed on region nu ll.
> Last key null null org.springframework.beans.FatalBeanException:
> Context hybris Global Context Fact ory couldn't be created correctly
> due to, Error creating bean with name 'defau ltSolrServerService'
> defined in class path resource [global-solrserver-spring.xm l]:
> Invocation of init method failed; nested exception is
> de.hybris.platform.sol rserver.SolrServerException: Error while
> executing Solr start command for instan ce: [name: default, port:
> 8983]
> at de.hybris.platform.core.HybrisContextFactory.build(HybrisContextFacto
> ry.java:317)
> at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.bui
> ldSelf(HybrisContextFactory.java:189)
> at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.bui
> ld(HybrisContextFactory.java:175)
> at de.hybris.platform.core.HybrisContextHolder.getGlobalInstanceCached(H
> ybrisContextHolder.java:134)
> at de.hybris.platform.core.HybrisContextHolder.getGlobalInstance(HybrisC
> ontextHolder.java:113)
> at de.hybris.platform.core.Registry.getSingletonGlobalApplicationContext
> (Registry.java:1059)
> at de.hybris.platform.cache.impl.RegionCacheAdapter.getController(Region
> CacheAdapter.java:76)
> at de.hybris.platform.cache.impl.RegionCacheAdapter.clear(RegionCacheAda
> pter.java:288)
> at de.hybris.platform.cache.impl.RegionCacheAdapter.destroy(RegionCacheA
> dapter.java:521)
> at de.hybris.platform.core.AbstractTenant.shutdownCache(AbstractTenant.j
> ava:1071)
> at de.hybris.platform.core.AbstractTenant.doShutdown(AbstractTenant.java
> :1003)
> at de.hybris.platform.core.AbstractTenant.doShutDown(AbstractTenant.java
> :948)
> at de.hybris.platform.core.Registry.destroy(Registry.java:309)
> at de.hybris.platform.util.RedeployUtilities.shutdown(RedeployUtilities.
> java:74)
> at de.hybris.platform.util.RedeployUtilities$1.run(RedeployUtilities.jav
> a:38) org.springframework.beans.FatalBeanException: Context hybris
> Global Context Fact ory couldn't be created correctly due to, Error
> creating bean with name 'defau ltSolrServerService' defined in class
> path resource [global-solrserver-spring.xm l]: Invocation of init
> method failed; nested exception is de.hybris.platform.sol
> rserver.SolrServerException: Error while executing Solr start command
> for instan ce: [name: default, port: 8983]
> at de.hybris.platform.core.HybrisContextFactory.build(HybrisContextFacto
> ry.java:317)
> at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.bui
> ldSelf(HybrisContextFactory.java:189)
> at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.bui
> ld(HybrisContextFactory.java:175)
> at de.hybris.platform.core.HybrisContextHolder.getGlobalInstanceCached(H
> ybrisContextHolder.java:134)
> at de.hybris.platform.core.HybrisContextHolder.getGlobalInstance(HybrisC
> ontextHolder.java:113)
> at de.hybris.platform.core.Registry.getSingletonGlobalApplicationContext
> (Registry.java:1059)
> at de.hybris.platform.cache.impl.RegionCacheAdapter.getController(Region
> CacheAdapter.java:76)
> at de.hybris.platform.cache.impl.RegionCacheAdapter.clear(RegionCacheAda
> pter.java:288)
> at de.hybris.platform.cache.impl.RegionCacheAdapter.destroy(RegionCacheA
> dapter.java:521)
> at de.hybris.platform.core.AbstractTenant.shutdownCache(AbstractTenant.j
> ava:1071)
> at de.hybris.platform.core.AbstractTenant.doShutdown(AbstractTenant.java
> :1003)
> at de.hybris.platform.core.AbstractTenant.doShutDown(AbstractTenant.java
> :948)
> at de.hybris.platform.core.Registry.destroy(Registry.java:309)
> at de.hybris.platform.util.RedeployUtilities.shutdown(RedeployUtilities.
> java:74)
> at de.hybris.platform.util.RedeployUtilities$1.run(RedeployUtilities.jav
> a:38) INFO [Thread-1] [DefaultClusterNodeManagementService]
> Unregistering assigned cl uster node id 0... <-- Wrapper Stopped
更新/解决方案:问题是SOLR服务器不允许目录中有空格。
首先,检查所有环境变量是否正确。特别是JAVA_HOME
如果它有正确的路径。如果仍有问题,请尝试停止 SOLR 服务器:ant stopSolrServer
。您也可以通过在 .properties 文件中添加此内容来阻止 solr 自动启动。
solrserver.instances.default.autostart=false
您也可以尝试更改默认端口
solrserver.instances.default.port=8984
在我的情况下也会出现同样的问题,并且我检查了,由于一些错误的拉动或在签出到不同的分支时,我丢失了我的 solr.xml 文件。
尝试重新添加它,它会起作用
我在 6.2 设置中遇到了这个问题,终于能够解决这个问题了。发生这种情况是由于两个 JAR 是"杰克逊核心和杰克逊注释",这些 jar 需要更新到它们的最新版本(我替换为版本 2.9.2(这为我解决了问题!
由于以前的solr服务器仍然占用端口8983,我发生了同样的错误。我尝试停止 solrserver,但它没有帮助,然后我使用以下命令列出所有打开的端口:
lsof -PiTCP -sTCP:LISTEN
然后杀死了监听8983的Java PID。
kill <pid>
是的。我做了。在文件local.properties中的我的配置文件夹下添加了solrserver.instances.default.autostart=false。它对我有用。