嗨,我是Broadleaf商业框架的新手。我已经在我的系统中成功完成了设置但是当我试图通过码头运行管理员以下错误即将启动Jetty服务器之前请帮助我
[ERROR] 23:22:45 SchemaUpdate - HHH000299: Could not complete schema update
[artifact:mvn] org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (java.net.ConnectException: Connection refused: connect)
[artifact:mvn] at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
[artifact:mvn] at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
[artifact:mvn] at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:70)
[artifact:mvn] at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:51)
[artifact:mvn] at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:194)
[artifact:mvn] at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:178)
[artifact:mvn] at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:503)
[artifact:mvn] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1743)
[artifact:mvn] at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:94)
[artifact:mvn] at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:905)
[artifact:mvn] at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:890)
[artifact:mvn] at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74)
[artifact:mvn] at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:288)
[artifact:mvn] at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
[artifact:mvn] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
[artifact:mvn] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1117)
[artifact:mvn] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:922)
[artifact:mvn] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
[artifact:mvn] at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
[artifact:mvn] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
[artifact:mvn] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
[artifact:mvn] at org.broadleafcommerce.common.web.extensibility.MergeContextLoaderListener.contextInitialized(MergeContextLoaderListener.java:47)
[artifact:mvn] at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:766)
[artifact:mvn] at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:406)
[artifact:mvn] at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:758)
[artifact:mvn] at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:242)
[artifact:mvn] at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1233)
[artifact:mvn] at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:701)
[artifact:mvn] at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:475)
[artifact:mvn] at org.mortbay.jetty.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:256)
[artifact:mvn] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
[artifact:mvn] at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224)
[artifact:mvn] at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:167)
[artifact:mvn] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
[artifact:mvn] at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224)
[artifact:mvn] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
[artifact:mvn] at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)
[artifact:mvn] at org.eclipse.jetty.server.Server.doStart(Server.java:272)
[artifact:mvn] at org.mortbay.jetty.plugin.JettyServer.doStart(JettyServer.java:65)
[artifact:mvn] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
[artifact:mvn] at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:511)
[artifact:mvn] at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:364)
[artifact:mvn] at org.mortbay.jetty.plugin.JettyRunMojo.execute(JettyRunMojo.java:516)
[artifact:mvn] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
[artifact:mvn] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
[artifact:mvn] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
[artifact:mvn] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
[artifact:mvn] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
[artifact:mvn] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
[artifact:mvn] at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
[artifact:mvn] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
[artifact:mvn] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
[artifact:mvn] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
[artifact:mvn] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
[artifact:mvn] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
[artifact:mvn] at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
[artifact:mvn] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[artifact:mvn] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[artifact:mvn] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[artifact:mvn] at java.lang.reflect.Method.invoke(Method.java:606)
[artifact:mvn] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
[artifact:mvn] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
[artifact:mvn] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
[artifact:mvn] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[artifact:mvn] at org.codehaus.classworlds.Launcher.main(Launcher.java:46)
[artifact:mvn] Caused by: java.sql.SQLTransientConnectionException: java.net.ConnectException: Connection refused: connect
[artifact:mvn] at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
[artifact:mvn] at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
[artifact:mvn] at org.hsqldb.jdbc.JDBCConnection.<init>(Unknown Source)
[artifact:mvn] at org.hsqldb.jdbc.JDBCDriver.getConnection(Unknown Source)
[artifact:mvn] at org.hsqldb.jdbc.JDBCDriver.connect(Unknown Source)
[artifact:mvn] at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
[artifact:mvn] at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
[artifact:mvn] at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
[artifact:mvn] at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
[artifact:mvn] ... 71 more
[artifact:mvn] Caused by: org.hsqldb.HsqlException: java.net.ConnectException: Connection refused: connect
[artifact:mvn] at org.hsqldb.ClientConnection.openConnection(Unknown Source)
[artifact:mvn] at org.hsqldb.ClientConnection.initConnection(Unknown Source)
[artifact:mvn] at org.hsqldb.ClientConnection.<init>(Unknown Source)
[artifact:mvn] ... 78 more
[artifact:mvn] Caused by: java.net.ConnectException: Connection refused: connect
[artifact:mvn] at java.net.DualStackPlainSocketImpl.connect0(Native Method)
[artifact:mvn] at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
[artifact:mvn] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
[artifact:mvn] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
[artifact:mvn] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
[artifact:mvn] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
[artifact:mvn] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
[artifact:mvn] at java.net.Socket.connect(Socket.java:579)
[artifact:mvn] at java.net.Socket.connect(Socket.java:528)
[artifact:mvn] at java.net.Socket.<init>(Socket.java:425)
[artifact:mvn] at java.net.Socket.<init>(Socket.java:208)
[artifact:mvn] at org.hsqldb.server.HsqlSocketFactory.createSocket(Unknown Source)
[artifact:mvn] ... 81 more
[artifact:mvn] 2013-12-19 23:23:11.536:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8081
[artifact:mvn] [INFO] Started Jetty Server
[artifact:mvn] 2013-12-19 23:23:11.834:INFO:oejus.SslContextFactory:Enabled Protocols [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2] of [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2]
[artifact:mvn] 2013-12-19 23:23:11.836:INFO:oejs.AbstractConnector:Started SslSelectChannelConnector@0.0.0.0:8444
答案 0 :(得分:3)
您需要先启动“网站”应用程序。 'site'应用程序ant任务'jetty-demo'依赖于名为'start-db'的ant任务。此ant任务将启动管理员可以连接到的HSQL(内存中)数据库。此外,由于development.properties中的Hibernate启动设置为“创建”,因此它还将导入大量可以使用的示例数据(请参阅“核心”项目中的脚本)。
或者,如果您不想使用嵌入式HSQL数据库,则可以按照文档切换到MySQL服务器:http://docs.broadleafcommerce.org/core/current/tutorials/getting-started-tutorials/switch-to-mysql-tutorial。
基本上,您可以在此处选择一些选项,但最简单的解决方案是启动站点应用程序并使其与管理应用程序一起运行。然后,您将不会在管理员中看到启动错误。