我目前开始使用broadleaf商业框架。我从他们的网站下载了演示网站,其中包含4个文件夹(site,admin,api,core)。然后我成功运行了 mvn install 命令。当我想运行 mvn spring-boot:run 时发生以下错误:
popper.js
我仔细阅读了这个错误并花了很多时间,最后我发现这与太阳能搜索引擎有关。我决定在当地运行太阳能。我下载了太阳能搜索引擎并根据this link中给出的说明对其进行了配置,但遗憾的是我没有在我下载的版本中找到solrconfig.xml和schema.xml,所以我在网上搜索并找到了其他文件。我重新运行了管理区域但是我得到了以下错误:
2018-05-27 13:59:26.784 INFO 13536 --- [ main] utoConfigurationReportLoggingInitializer :
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2018-05-27 13:59:26.797 ERROR 13536 --- [ main] o.s.boot.SpringApplication : Application startup failed
java.lang.reflect.UndeclaredThrowableException: Failed to invoke event listener method
HandlerMethod details:
Bean [com.community.core.service.search.SolrIndexCleanupServiceImpl$$EnhancerBySpringCGLIB$$c6631d93]
Method [public void com.community.core.service.search.SolrIndexCleanupServiceImpl.rebuildIndexAtStartupIfNecessary() throws org.broadleafcommerce.common.exception.ServiceException,java.io.IOException]
Resolved arguments:
at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:273) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:177) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:140) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:393) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:347) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:883) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:144) ~[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
at com.community.admin.AdminApplication.main(AdminApplication.java:18) [classes/:na]
Caused by: org.broadleafcommerce.common.exception.ServiceException: Could not delete documents
at org.broadleafcommerce.core.search.service.solr.index.SolrIndexServiceImpl.deleteAllNamespaceDocuments(SolrIndexServiceImpl.java:339) ~[broadleaf-framework-5.2.3-GA.jar:na]
at org.broadleafcommerce.core.search.service.solr.index.SolrIndexServiceImpl.preBuildIndex(SolrIndexServiceImpl.java:183) ~[broadleaf-framework-5.2.3-GA.jar:na]
at org.broadleafcommerce.core.search.service.solr.index.SolrIndexServiceImpl.rebuildIndex(SolrIndexServiceImpl.java:174) ~[broadleaf-framework-5.2.3-GA.jar:na]
at com.community.core.service.search.SolrIndexCleanupServiceImpl.rebuildIndexAtStartupIfNecessary(SolrIndexCleanupServiceImpl.java:54) ~[classes/:na]
at com.community.core.service.search.SolrIndexCleanupServiceImpl$$FastClassBySpringCGLIB$$b84b8451.invoke(<generated>) ~[classes/:na]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-4.3.14.RELEASE.jar:4.3.14.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738) ~[spring-aop-4.3.14.RELEASE.jar:4.3.14.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.3.14.RELEASE.jar:4.3.14.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) ~[spring-tx-4.3.14.RELEASE.jar:4.3.14.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282) ~[spring-tx-4.3.14.RELEASE.jar:4.3.14.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) ~[spring-tx-4.3.14.RELEASE.jar:4.3.14.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.14.RELEASE.jar:4.3.14.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673) ~[spring-aop-4.3.14.RELEASE.jar:4.3.14.RELEASE]
at com.community.core.service.search.SolrIndexCleanupServiceImpl$$EnhancerBySpringCGLIB$$c6631d93.rebuildIndexAtStartupIfNecessary(<generated>) ~[classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121]
at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:256) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
... 17 common frames omitted
Caused by: org.apache.solr.client.solrj.SolrServerException: Server refused connection at: http://localhost:8983/solr/catalog_reindex
at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:567) ~[solr-solrj-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:48:17]
at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:234) ~[solr-solrj-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:48:17]
at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:226) ~[solr-solrj-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:48:17]
at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:135) ~[solr-solrj-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:48:17]
at org.apache.solr.client.solrj.SolrClient.deleteByQuery(SolrClient.java:896) ~[solr-solrj-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:48:17]
at org.apache.solr.client.solrj.SolrClient.deleteByQuery(SolrClient.java:859) ~[solr-solrj-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:48:17]
at org.apache.solr.client.solrj.SolrClient.deleteByQuery(SolrClient.java:874) ~[solr-solrj-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:48:17]
at org.broadleafcommerce.core.search.service.solr.index.SolrIndexServiceImpl.deleteAllNamespaceDocuments(SolrIndexServiceImpl.java:331) ~[broadleaf-framework-5.2.3-GA.jar:na]
... 35 common frames omitted
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method) ~[na:1.8.0_121]
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) ~[na:1.8.0_121]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_121]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_121]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_121]
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) ~[na:1.8.0_121]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_121]
at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_121]
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121) ~[httpclient-4.5.5.jar:4.5.5]
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) ~[httpclient-4.5.5.jar:4.5.5]
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:326) ~[httpclient-4.5.5.jar:4.5.5]
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:610) ~[httpclient-4.5.5.jar:4.5.5]
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:445) ~[httpclient-4.5.5.jar:4.5.5]
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835) ~[httpclient-4.5.5.jar:4.5.5]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) ~[httpclient-4.5.5.jar:4.5.5]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108) ~[httpclient-4.5.5.jar:4.5.5]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) ~[httpclient-4.5.5.jar:4.5.5]
at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:465) ~[solr-solrj-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:48:17]
... 42 common frames omitted
2018-05-27 13:59:26.799 INFO 13536 --- [ main] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@3ba9ad43: startup date [Sun May 27 13:58:55 IRDT 2018]; root of context hierarchy
2018-05-27 13:59:26.805 INFO 13536 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Stopping beans in phase 0
2018-05-27 13:59:26.806 INFO 13536 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Stopping beans in phase -2147483648
2018-05-27 13:59:26.909 INFO 13536 --- [ main] c.b.autoconfigure.HSQLDBServer : Stopping HSQL server...
[Server@7f1f7edd]: Initiating shutdown sequence...
[Server@7f1f7edd]: Shutdown sequence completed in 132 ms.
[Server@7f1f7edd]: 2018-05-27 13:59:27.042 SHUTDOWN : System.exit() was not called
2018-05-27 13:59:27.050 INFO 13536 --- [ main] o.s.jmx.export.MBeanExporter : Unregistering JMX-exposed beans on shutdown
2018-05-27 13:59:27.051 INFO 13536 --- [ main] o.s.jmx.export.MBeanExporter : Unregistering JMX-exposed beans
2018-05-27 13:59:27.092 INFO 13536 --- [ main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'blPU'
2018-05-27 13:59:27.092 INFO 13536 --- [ main] o.b.c.c.e.AbstractHydratedCacheManager : Disposing of all hydrated cache members
2018-05-27 13:59:27.098 INFO 13536 --- [ main] o.b.c.c.e.AbstractHydratedCacheManager : Disposing of all hydrated cache members
2018-05-27 13:59:27.150 INFO 13536 --- [ main] o.b.c.c.e.AbstractHydratedCacheManager : Disposing of all hydrated cache members
2018-05-27 13:59:27.153 INFO 13536 --- [ main] o.b.c.c.e.AbstractHydratedCacheManager : Disposing of all hydrated cache members
2018-05-27 13:59:27.163 INFO 13536 --- [ main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'blCMSStorage'
2018-05-27 13:59:27.163 INFO 13536 --- [ main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'blSecurePU'
2018-05-27 13:59:27.164 INFO 13536 --- [ main] o.s.jmx.export.MBeanExporter : Unregistering JMX-exposed beans on shutdown
2018-05-27 13:59:27.164 INFO 13536 --- [ main] o.s.jmx.export.MBeanExporter : Unregistering JMX-exposed beans
2018-05-27 13:59:27.174 INFO 13536 --- [ main] b.c.e.c.e.MergeEhCacheManagerFactoryBean : Shutting down EhCache CacheManager
我不知道下一步该做什么。如果你帮我解决这个问题,我会很高兴的。