Page 1 of 1

How to change to Production runtime environment?

Posted: Wed Jul 29, 2015 2:37 am
by wenmangbo
After reading the broadleaf document.
I have change the site/build.xml runtime.environment=production
Before the change all is ok.
the setting and log is as follows.

<target name="tomcat">
<delete dir="war/WEB-INF/lib"/>
<artifact:mvn mavenHome="${maven.home}" fork="true">
<jvmarg value="-XX:MaxPermSize=256M" />
<jvmarg value="-Xmx512M" />
<jvmarg value="-Xdebug" />
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n" />
<jvmarg value="-javaagent:${spring.instrument.path}" />
<jvmarg value="-Druntime.environment=production" />
<jvmarg value="-Ddatabase.user=${database.user}" />
<jvmarg value="-Ddatabase.password=${database.password}" />
<jvmarg value="-Ddatabase.driver=${database.driver}" />
<jvmarg value="-Ddatabase.url=${database.url}" />
<arg value="compile"/>
<arg value="war:exploded"/>
<arg value="tomcat7:run"/>
</artifact:mvn>
</target>




Buildfile: /Users/max/Documents/eclipse-workspace_wll/DemoSite/site/build.xml
tomcat:
[artifact:mvn] Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
[artifact:mvn] Listening for transport dt_socket at address: 8000
[artifact:mvn] objc[12207]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/jre/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
[artifact:mvn] [INFO] Scanning for projects...
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] ------------------------------------------------------------------------
[artifact:mvn] [INFO] Building site 1.0
[artifact:mvn] [INFO] ------------------------------------------------------------------------
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- maven-resources-plugin:2.7:copy-resources (copy-resources) @ site ---
[artifact:mvn] [INFO] Using 'UTF-8' encoding to copy filtered resources.
[artifact:mvn] [INFO] Copying 1 resource
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- keytool-maven-plugin:1.5:clean (clean) @ site ---
[artifact:mvn] [INFO] Keystore file '/Users/max/Documents/eclipse-workspace_wll/DemoSite/site/target/mycompany/WEB-INF/blc-example.keystore' deleted successfully.
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- keytool-maven-plugin:1.5:generateKeyPair (generateKeyPair) @ site ---
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ site ---
[artifact:mvn] [INFO] Using 'UTF-8' encoding to copy filtered resources.
[artifact:mvn] [INFO] Copying 15 resources
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- jrebel-maven-plugin:1.1.5:generate (generate-rebel-xml) @ site ---
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ site ---
[artifact:mvn] [INFO] Nothing to compile - all classes are up to date
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- maven-war-plugin:2.6:exploded (default-cli) @ site ---
[artifact:mvn] [INFO] Exploding webapp
[artifact:mvn] [INFO] Assembling webapp [site] in [/Users/max/Documents/eclipse-workspace_wll/DemoSite/site/target/mycompany]
[artifact:mvn] [INFO] Processing war project
[artifact:mvn] [INFO] Copying webapp resources [/Users/max/Documents/eclipse-workspace_wll/DemoSite/site/src/main/webapp]
[artifact:mvn] [INFO] Webapp assembled in [998 msecs]
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] >>> tomcat7-maven-plugin:2.2:run (default-cli) @ site >>>
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- maven-resources-plugin:2.7:copy-resources (copy-resources) @ site ---
[artifact:mvn] [INFO] Using 'UTF-8' encoding to copy filtered resources.
[artifact:mvn] [INFO] Copying 1 resource
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- keytool-maven-plugin:1.5:clean (clean) @ site ---
[artifact:mvn] [INFO] Keystore file '/Users/max/Documents/eclipse-workspace_wll/DemoSite/site/target/mycompany/WEB-INF/blc-example.keystore' deleted successfully.
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- keytool-maven-plugin:1.5:generateKeyPair (generateKeyPair) @ site ---
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ site ---
[artifact:mvn] [INFO] Using 'UTF-8' encoding to copy filtered resources.
[artifact:mvn] [INFO] Copying 15 resources
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- jrebel-maven-plugin:1.1.5:generate (generate-rebel-xml) @ site ---
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ site ---
[artifact:mvn] [INFO] Nothing to compile - all classes are up to date
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] <<< tomcat7-maven-plugin:2.2:run (default-cli) @ site <<<
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- tomcat7-maven-plugin:2.2:run (default-cli) @ site ---
[artifact:mvn] [INFO] Running war on http://localhost:8080/
[artifact:mvn] [INFO] Using existing Tomcat server configuration at /Users/max/Documents/eclipse-workspace_wll/DemoSite/site/target/tomcat
[artifact:mvn] [INFO] create webapp with contextPath:
[artifact:mvn] Jul 29, 2015 3:30:52 PM org.apache.coyote.AbstractProtocol init
[artifact:mvn] INFO: Initializing ProtocolHandler ["http-bio-8080"]
[artifact:mvn] Jul 29, 2015 3:30:52 PM org.apache.coyote.AbstractProtocol init
[artifact:mvn] INFO: Initializing ProtocolHandler ["http-bio-8443"]
[artifact:mvn] Jul 29, 2015 3:30:52 PM org.apache.catalina.core.StandardService startInternal
[artifact:mvn] INFO: Starting service Tomcat
[artifact:mvn] Jul 29, 2015 3:30:52 PM org.apache.catalina.core.StandardEngine startInternal
[artifact:mvn] INFO: Starting Servlet Engine: Apache Tomcat/7.0.47
[artifact:mvn] Jul 29, 2015 3:30:53 PM org.apache.catalina.core.ApplicationContext log
[artifact:mvn] INFO: Set web app root system property: 'site.root' = [/Users/max/Documents/eclipse-workspace_wll/DemoSite/site/src/main/webapp/]
[artifact:mvn] Jul 29, 2015 3:30:53 PM org.apache.catalina.core.ApplicationContext log
[artifact:mvn] INFO: Initializing log4j from [/Users/max/Documents/eclipse-workspace_wll/DemoSite/site/src/main/webapp/WEB-INF/log4j.xml]
[artifact:mvn] Jul 29, 2015 3:30:54 PM org.apache.catalina.core.ApplicationContext log
[artifact:mvn] INFO: Initializing Spring root WebApplicationContext
[artifact:mvn] [ WARN] 15:31:04 AbstractEhcacheRegionFactory - HHH020003: Could not find a specific ehcache configuration for cache named [blSandBoxElements]; using defaults.
[artifact:mvn] [ WARN] 15:31:05 MergeXmlWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt
[artifact:mvn] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in resource loaded from byte array: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: blPU] Unable to build EntityManagerFactory
[artifact:mvn] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
[artifact:mvn] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
[artifact:mvn] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:956)
[artifact:mvn] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:747)
[artifact:mvn] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
[artifact:mvn] at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
[artifact:mvn] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
[artifact:mvn] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
[artifact:mvn] at org.broadleafcommerce.common.web.extensibility.MergeContextLoader.contextInitialized(MergeContextLoader.java:148)
[artifact:mvn] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
[artifact:mvn] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
[artifact:mvn] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
[artifact:mvn] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
[artifact:mvn] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
[artifact:mvn] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[artifact:mvn] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[artifact:mvn] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[artifact:mvn] at java.lang.Thread.run(Thread.java:745)
[artifact:mvn] Caused by: javax.persistence.PersistenceException: [PersistenceUnit: blPU] Unable to build EntityManagerFactory
[artifact:mvn] at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:915)
[artifact:mvn] at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:890)
[artifact:mvn] at org.springframework.orm.jpa.vendor.SpringHibernateEjbPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateEjbPersistenceProvider.java:51)
[artifact:mvn] at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:343)
[artifact:mvn] at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:318)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1633)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570)
[artifact:mvn] ... 22 more
[artifact:mvn] Caused by: org.hibernate.HibernateException: Missing table: BLC_ADDITIONAL_OFFER_INFO
[artifact:mvn] at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1261)
[artifact:mvn] at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:155)
[artifact:mvn] at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:506)
[artifact:mvn] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1742)
[artifact:mvn] at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:94)
[artifact:mvn] at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:905)
[artifact:mvn] ... 28 more
[artifact:mvn] Jul 29, 2015 3:31:05 PM org.apache.catalina.core.StandardContext listenerStart
[artifact:mvn] [ERROR] 15:31:05 ContextLoader - Context initialization failed
[artifact:mvn] SEVERE: Exception sending context initialized event to listener instance of class org.broadleafcommerce.common.web.extensibility.MergeContextLoader
[artifact:mvn] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in resource loaded from byte array: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: blPU] Unable to build EntityManagerFactory
[artifact:mvn] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
[artifact:mvn] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in resource loaded from byte array: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: blPU] Unable to build EntityManagerFactory at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
[artifact:mvn] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
[artifact:mvn] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:956)
[artifact:mvn] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:747)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
[artifact:mvn] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:956)
[artifact:mvn] at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
[artifact:mvn] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:747) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
[artifact:mvn] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
[artifact:mvn] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
[artifact:mvn] at org.broadleafcommerce.common.web.extensibility.MergeContextLoader.contextInitialized(MergeContextLoader.java:148)
[artifact:mvn] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
[artifact:mvn] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
[artifact:mvn] at org.broadleafcommerce.common.web.extensibility.MergeContextLoader.contextInitialized(MergeContextLoader.java:148) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
[artifact:mvn] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
[artifact:mvn] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
[artifact:mvn] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
[artifact:mvn] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
[artifact:mvn] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
[artifact:mvn] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[artifact:mvn] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[artifact:mvn] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[artifact:mvn] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[artifact:mvn] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[artifact:mvn] at java.lang.Thread.run(Thread.java:745) at java.lang.Thread.run(Thread.java:745)
[artifact:mvn] Caused by: javax.persistence.PersistenceException: [PersistenceUnit: blPU] Unable to build EntityManagerFactory
[artifact:mvn] at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:915)Caused by: javax.persistence.PersistenceException: [PersistenceUnit: blPU] Unable to build EntityManagerFactory
[artifact:mvn] at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:890)
[artifact:mvn] at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:915)
[artifact:mvn] at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:890)
[artifact:mvn] at org.springframework.orm.jpa.vendor.SpringHibernateEjbPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateEjbPersistenceProvider.java:51)
[artifact:mvn] at org.springframework.orm.jpa.vendor.SpringHibernateEjbPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateEjbPersistenceProvider.java:51)
[artifact:mvn] at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:343)
[artifact:mvn] at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:343) at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:318)
[artifact:mvn] at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:318)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1633)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1633) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570) ... 22 more
[artifact:mvn] ... 22 more
[artifact:mvn] Caused by: org.hibernate.HibernateException: Missing table: BLC_ADDITIONAL_OFFER_INFO
[artifact:mvn] at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1261)
[artifact:mvn] Caused by: org.hibernate.HibernateException: Missing table: BLC_ADDITIONAL_OFFER_INFO at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:155)
[artifact:mvn] at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1261)
[artifact:mvn] at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:506)
[artifact:mvn] at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:155) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1742)
[artifact:mvn] at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:506)
[artifact:mvn] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1742)
[artifact:mvn] at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:94)
[artifact:mvn] at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:94) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:905)
[artifact:mvn] at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:905)
[artifact:mvn] ... 28 more
[artifact:mvn] Jul 29, 2015 3:31:05 PM org.apache.catalina.core.StandardContext startInternal
[artifact:mvn] ... 28 moreSEVERE: Error listenerStart
[artifact:mvn] Jul 29, 2015 3:31:05 PM org.apache.catalina.core.StandardContext startInternal
[artifact:mvn] SEVERE: Context [] startup failed due to previous errors
[artifact:mvn] Jul 29, 2015 3:31:05 PM org.apache.catalina.core.ApplicationContext log
[artifact:mvn] INFO: Closing Spring root WebApplicationContext
[artifact:mvn] Jul 29, 2015 3:31:05 PM org.apache.catalina.core.ApplicationContext log
[artifact:mvn] INFO: Shutting down log4j
[artifact:mvn] Jul 29, 2015 3:31:05 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
[artifact:mvn] SEVERE: The web application [] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
[artifact:mvn] Jul 29, 2015 3:31:05 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
[artifact:mvn] SEVERE: The web application [] created a ThreadLocal with key of type [org.broadleafcommerce.common.classloader.release.ThreadLocalManager$1] (value [org.broadleafcommerce.common.classloader.release.ThreadLocalManager$1@7f536b13]) and a value of type [org.broadleafcommerce.common.classloader.release.ThreadLocalManager] (value [org.broadleafcommerce.common.classloader.release.ThreadLocalManager@322ad694]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
[artifact:mvn] Jul 29, 2015 3:31:05 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
[artifact:mvn] SEVERE: The web application [] created a ThreadLocal with key of type [org.broadleafcommerce.common.classloader.release.ThreadLocalManager$2] (value [org.broadleafcommerce.common.classloader.release.ThreadLocalManager$2@e7ffeda]) and a value of type [org.broadleafcommerce.common.web.BroadleafRequestContext] (value [org.broadleafcommerce.common.web.BroadleafRequestContext@577e537]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
[artifact:mvn] Jul 29, 2015 3:31:05 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
[artifact:mvn] SEVERE: The web application [] created a ThreadLocal with key of type [org.broadleafcommerce.common.classloader.release.ThreadLocalManager$2] (value [org.broadleafcommerce.common.classloader.release.ThreadLocalManager$2@61981d79]) and a value of type [org.broadleafcommerce.common.extensibility.jpa.ConfigurationOnlyState] (value [org.broadleafcommerce.common.extensibility.jpa.ConfigurationOnlyState@562e9a8]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
[artifact:mvn] Jul 29, 2015 3:31:05 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
[artifact:mvn] SEVERE: The web application [] created a ThreadLocal with key of type [org.broadleafcommerce.common.classloader.release.ThreadLocalManager$2] (value [org.broadleafcommerce.common.classloader.release.ThreadLocalManager$2@741a5ef0]) and a value of type [java.util.HashMap] (value [{}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
[artifact:mvn] Jul 29, 2015 3:31:05 PM org.apache.coyote.AbstractProtocol start
[artifact:mvn] INFO: Starting ProtocolHandler ["http-bio-8080"]
[artifact:mvn] Jul 29, 2015 3:31:05 PM org.apache.coyote.AbstractProtocol start
[artifact:mvn] INFO: Starting ProtocolHandler ["http-bio-8443"]
[artifact:mvn] Jul 29, 2015 3:31:06 PM org.apache.catalina.loader.WebappClassLoader findResourceInternal
[artifact:mvn] INFO: Illegal access: this web application instance has been stopped already. Could not load org/terracotta/bigmemory/version.properties. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
[artifact:mvn] Jul 29, 2015 3:31:06 PM org.apache.catalina.loader.WebappClassLoader findResourceInternal
[artifact:mvn] INFO: Illegal access: this web application instance has been stopped already. Could not load net/sf/ehcache/version.properties. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.

Re: How to change to Production runtime environment?

Posted: Wed Jul 29, 2015 10:02 am
by wenmangbo
It is solved. For the bad of hibernate 4.1.1 version. When dll is set to validate, it will compare the boolean type with mysql.
Set the dll to none.
All it will work.

If you like, You can recompile broadleaf commerce and change pom of hibernate version bigger than 4.3.

Re: How to change to Production runtime environment?

Posted: Tue Sep 01, 2015 3:40 pm
by rudy
Hi,

I had an absolutely same problem.
Everything works fine in development mode.
As soon as i switch to production, i get the same errors.

1.blPU.hibernate.hbm2ddl.auto=none -> Broadleaf was unable to find my tables.
2. Updating to hibernate 4.3+ version -> no effect. Same results.

P.S: I am using broadleaf 4.0.
Any help would be appreciated.

Re: How to change to Production runtime environment?

Posted: Tue Sep 15, 2015 8:15 am
by phillipuniverse
@rudy, change the blPU.hibernate.hbm2ddl.auto=update and all of the tables will be created on startup.