Q:

error on running admin of broadleaf commerce

Hi i am new to Broadleaf commerce framework.I have done the setup is successfully in my system but when i tried to run the admin through jetty following error is coming before starting of jetty server please help me on this
[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

A:

You will need to start up the 'site' application first. The 'site' application ant task 'jetty-demo' has a dependency on the ant task called 'start-db'. This ant task will start up an HSQL (in-memory) database that the admin can then connect to. Also, since the Hibernate startup in development.properties is set to 'create' then it will also import a lot of sample data that you can play around with (see the scripts in the 'core' project).
Alternatively, you could follow the docs to switch to MySQL server if you don't want to use the embedded HSQL database: http://docs.broadleafcommerce.org/core/current/tutorials/getting-started-tutorials/switch-to-mysql-tutorial.
Basically, you have a few options here but the easiest solution is to start up the site application and have it running alongside the admin application. Then you won't see that startup error in the admin.

