Page 1 of 3

Moving DataBase HSQLDB to MySQL

Posted: Wed Jun 20, 2012 10:17 am
by Himkar
Hi,

I have configured Demo application and working fine with default(HSQLDB). now I want the same demo application up and running using MySQL data base. so I did these changes.

1. I changed the data sources to
<bean id="webDS" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">

<!-- The JDBC Driver class name. -->
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost:3306/broadleaf" />
<property name="username" value="root" />
<property name="password" value="Hike#3@2tech" />
</bean>

and tried to start server. at startup it show error for each and every tables.

in the directory of sql in code base I found some tables but are to insert the data but I didn't find any sql file which has the create table data.

Please guide me If I am doing some thing wrong.

I have gone thru the tutorial but there is no help as such.

I want the demo site as it is running with MySQL.

Thanks

Re: Moving DataBase HSQLDB to MySQL

Posted: Thu Jun 21, 2012 8:18 am
by phillipuniverse
There are multiple datasources that are defined, and you need to ensure that you're changing all of them. Just changing the datasources is not enough; you also need to change the persistence-units to tell Hibernate to not use the HSQL dialect to but to use the MySQL dialect instead. Then, you need to make sure to include the MySQL dependency in your pom (and remove the HSQL dependency since you don't need it).

These steps are detailed at http://wiki.broadleafcommerce.org/confl ... r+database and http://wiki.broadleafcommerce.org/confl ... structions (MySQL is the exact same as PostgreSQL except mysql where you see postgres).

Re: Moving DataBase HSQLDB to MySQL

Posted: Wed Jun 27, 2012 12:31 pm
by Himkar
Hi,
I did same as u instructed but still I am not able to achieve this.
here is a complete log which I am getting, Please help me


[ WARN] 22:17:20 JDBCExceptionReporter - SQL Error: 1146, SQLState: 42S02
[ERROR] 22:17:20 JDBCExceptionReporter - Table 'broadleaf.blc_product' doesn't exist
[ERROR] 22:17:20 JobRunShell - Job DEFAULT.indexCreationJob threw an unhandled Exception:
org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'rebuildProductIndex' on target class [class $Proxy98] failed; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:273)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1387)
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1315)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:255)
at org.broadleafcommerce.core.catalog.dao.CategoryDaoImpl.readAllProducts(CategoryDaoImpl.java:90)
at org.broadleafcommerce.core.catalog.service.CatalogServiceImpl.findAllProducts(CatalogServiceImpl.java:98)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy97.findAllProducts(Unknown Source)
at org.broadleafcommerce.core.search.service.SearchServiceCompassImpl.rebuildProductIndex(SearchServiceCompassImpl.java:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy98.rebuildProductIndex(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273)
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:264)
... 3 more
Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.doList(Loader.java:2545)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
at org.hibernate.loader.Loader.list(Loader.java:2271)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:459)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:365)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:246)
... 38 more
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'broadleaf.blc_product' doesn't exist
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2822)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1536)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1626)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3031)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:943)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1049)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1953)
at org.hibernate.loader.Loader.doQuery(Loader.java:802)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
at org.hibernate.loader.Loader.doList(Loader.java:2542)
... 46 more
[ERROR] 22:17:20 ErrorLogger - Job (DEFAULT.indexCreationJob threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'rebuildProductIndex' on target class [class $Proxy98] failed; nested exception is javax.persistence.PersistenceExcep
tion: org.hibernate.exception.SQLGrammarException: could not execute query]
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
Caused by: org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'rebuildProductIndex' on target class [class $Proxy98] failed; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:273)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
... 1 more
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1387)
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1315)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:255)
at org.broadleafcommerce.core.catalog.dao.CategoryDaoImpl.readAllProducts(CategoryDaoImpl.java:90)
at org.broadleafcommerce.core.catalog.service.CatalogServiceImpl.findAllProducts(CatalogServiceImpl.java:98)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy97.findAllProducts(Unknown Source)
at org.broadleafcommerce.core.search.service.SearchServiceCompassImpl.rebuildProductIndex(SearchServiceCompassImpl.java:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy98.rebuildProductIndex(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273)
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:264)
... 3 more
Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.doList(Loader.java:2545)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
at org.hibernate.loader.Loader.list(Loader.java:2271)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:459)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:365)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:246)
... 38 more
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'broadleaf.blc_product' doesn't exist
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2822)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1536)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1626)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3031)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:943)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1049)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1953)
at org.hibernate.loader.Loader.doQuery(Loader.java:802)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
at org.hibernate.loader.Loader.doList(Loader.java:2542)
... 46 more
[ INFO] 22:17:20 XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [applicationContext-servlet-cms-contentCreator.xml]
[ INFO] 22:17:20 DefaultListableBeanFactory - Overriding bean definition for bean 'blStaticAssetURLHandlerMapping': replacing [Generic bean: class [org.broadleafcommerce.cms.web.BroadleafCmsSimpleUrlHandlerMapping]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireC
andidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [applicationContext-servlet-cms-contentClient.xml]] with [Generic bean: class [org.broadleafcommerce.cms.web.BroadleafCmsSimpleUrlHandlerMapping]; s
cope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [applicationContext-servlet-cms-contentCreator.xml]]
[ INFO] 22:17:20 XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext-servlet.xml]
[ INFO] 22:17:20 DefaultListableBeanFactory - Overriding bean definition for bean 'catalogController': replacing [Generic bean: class [org.broadleafcommerce.core.web.controller.catalog.CatalogController]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCan
didate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/C:/Java/tomcat6/webapps/broadleafdemo/WEB-INF/lib/broadleaf-framework-web-1.6.0-GA.jar!/org/broadleafcommerce/core/web/controller/catalog/CatalogController
.class]] with [Generic bean: class [org.broadleafcommerce.core.web.controller.catalog.CatalogController]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethod
Name=null; defined in ServletContext resource [/WEB-INF/applicationContext-servlet.xml]]
[ INFO] 22:17:20 DefaultListableBeanFactory - Overriding bean definition for bean 'blCartController': replacing [Generic bean: class [org.broadleafcommerce.core.web.controller.order.CartController]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate
=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/C:/Java/tomcat6/webapps/broadleafdemo/WEB-INF/lib/broadleaf-framework-web-1.6.0-GA.jar!/org/broadleafcommerce/core/web/controller/order/CartController.class]] wi
th [Generic bean: class [org.broadleafcommerce.core.web.controller.order.CartController]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defin
ed in ServletContext resource [/WEB-INF/applicationContext-servlet.xml]]
[ INFO] 22:17:20 DefaultListableBeanFactory - Overriding bean definition for bean 'previewTemplateController': replacing [Generic bean: class [org.broadleafcommerce.cms.web.PreviewTemplateController]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandida
te=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/C:/Java/tomcat6/webapps/broadleafdemo/WEB-INF/lib/broadleaf-contentmanagement-module-1.6.0-GA.jar!/org/broadleafcommerce/cms/web/PreviewTemplateController.clas
s]] with [Generic bean: class [org.broadleafcommerce.cms.web.PreviewTemplateController]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; define
d in ServletContext resource [/WEB-INF/applicationContext-servlet.xml]]
[ WARN] 22:17:21 RuntimeEnvironmentPropertiesConfigurer - Unable to determine runtime environment, using default environment 'development'
[ INFO] 22:17:21 RuntimeEnvironmentPropertiesConfigurer - Loading properties file from class path resource [config/bc/common.properties]
[ INFO] 22:17:21 RuntimeEnvironmentPropertiesConfigurer - Loading properties file from class path resource [config/bc/development.properties]
[ INFO] 22:17:21 DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1fa38be: defining beans [org.springframework.aop.config.internalAutoProxyCreator,multipartResolver,blUploadController,blUploadCompletedView,org.springfra
mework.web.servlet.view.BeanNameViewResolver#0,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter#0,org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#0,adminUrlMapping,blConfiguration,blPageURLProcessor,blProcessURLFilter,previewTemplateController,blStructuredC
ontentService,blContentDefaultRuleProcessor,blStructuredContentDao,blPageService,blPageDao,blStaticAssetService,blStaticAssetStorageService,blStaticAssetStorageDao,blStaticAssetDao,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.
internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.web.servlet.view.
BeanNameViewResolver#1,blStaticAssetView,blStaticAssetViewController,blStaticAssetURLHandlerMapping,blCustomerStateFilter,blLoginService,blCustomerState,blPhoneFormatter,blRegisterCustomerValidator,blCustomerPhoneValidator,blPhoneValidator,blCustomerPhoneController,blRegisterCustomerController,blMer
geCartProcessor,blAuthenticationSuccessHandler,blCheckoutFormValidator,searchController,blRatingController,catalogController,myAccountController,blCartControllerREST,storeController,blWishlistController,viewOrderController,blCartController,blCheckoutController,blAdminLoginController,resourceBundleEx
tensionPoint,messageSource,tilesConfigurer,viewResolver,store,cmsMainTemplate,checkoutController,customerPhoneController,blCatalogMultiplyController,urlMapping,org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter#0,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter#1,org.spr
ingframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#1,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0]; parent: org.springfra
mework.beans.factory.support.DefaultListableBeanFactory@1fcd402
[ INFO] 22:17:21 CompatibleGWTSecuredHandler - Mapped URL path [/**/security.service] onto handler of type [class org.broadleafcommerce.openadmin.security.CompatibleGWTSecuredRPCServiceExporter]
[ INFO] 22:17:21 CompatibleGWTSecuredHandler - Mapped URL path [/**/dynamic.entity.service] onto handler of type [class org.broadleafcommerce.openadmin.security.CompatibleGWTSecuredRPCServiceExporter]
[ INFO] 22:17:21 CompatibleGWTSecuredHandler - Mapped URL path [/**/upload.progress.service] onto handler of type [class org.broadleafcommerce.openadmin.security.CompatibleGWTSecuredRPCServiceExporter]
[ INFO] 22:17:21 CompatibleGWTSecuredHandler - Mapped URL path [/**/utility.service] onto handler of type [class org.broadleafcommerce.openadmin.security.CompatibleGWTSecuredRPCServiceExporter]
[ INFO] 22:17:21 BroadleafCmsSimpleUrlHandlerMapping - Mapped URL path [/**/cms.upload.service] onto handler of type [class org.broadleafcommerce.openadmin.server.service.artifact.upload.UploadAddOrUpdateController]
[ INFO] 22:17:21 BroadleafCmsSimpleUrlHandlerMapping - Mapped URL path [/**/cmsstatic/**] onto handler of type [class org.broadleafcommerce.cms.web.file.StaticAssetViewController]
[ INFO] 22:17:22 TilesConfigurer - TilesConfigurer: adding definitions [/WEB-INF/tiles-broadleafdemo.xml]
[ INFO] 22:17:22 TilesConfigurer - Found JSP 2.1 ExpressionFactory
[ INFO] 22:17:23 SimpleUrlHandlerMapping - Mapped URL path [/storeLocator/*] onto handler 'storeController'
[ INFO] 22:17:23 SimpleUrlHandlerMapping - Mapped URL path [/checkout/*] onto handler 'checkoutController'
[ INFO] 22:17:23 SimpleUrlHandlerMapping - Mapped URL path [/rating/*] onto handler 'blRatingController'
[ INFO] 22:17:23 SimpleUrlHandlerMapping - Mapped URL path [/basket/**] onto handler 'blCartController'
[ INFO] 22:17:23 SimpleUrlHandlerMapping - Mapped URL path [/welcome.htm] onto handler 'store'
[ INFO] 22:17:23 SimpleUrlHandlerMapping - Mapped URL path [/wishlist/*] onto handler 'blWishlistController'
[ INFO] 22:17:23 SimpleUrlHandlerMapping - Mapped URL path [/account/*] onto handler 'myAccountController'
[ INFO] 22:17:23 SimpleUrlHandlerMapping - Mapped URL path [/search] onto handler 'compassSearchController'
[ INFO] 22:17:23 SimpleUrlHandlerMapping - Mapped URL path [/catalogMultiplier/**] onto handler 'blCatalogMultiplyController'
[ INFO] 22:17:23 SimpleUrlHandlerMapping - Mapped URL path [/orders/*] onto handler 'viewOrderController'
[ INFO] 22:17:23 SimpleUrlHandlerMapping - Mapped URL path [/preview/**] onto handler 'previewTemplateController'
[ INFO] 22:17:23 SimpleUrlHandlerMapping - Mapped URL path [/store/**] onto handler 'catalogController'
[ INFO] 22:17:23 SimpleUrlHandlerMapping - Mapped URL path [/blcadmin/*] onto handler 'blAdminLoginController'
[ INFO] 22:17:23 SimpleUrlHandlerMapping - Mapped URL path [/store] onto handler 'store'
[ INFO] 22:17:23 SimpleUrlHandlerMapping - Mapped URL path [/registerCustomer/*] onto handler 'blRegisterCustomerController'
[ INFO] 22:17:23 SimpleUrlHandlerMapping - Mapped URL path [/myaccount/phone/*] onto handler 'customerPhoneController'
[ INFO] 22:17:23 SimpleUrlHandlerMapping - Mapped URL path [/orders] onto handler 'viewOrderController'
[ INFO] 22:17:23 SimpleUrlHandlerMapping - Mapped URL path [/search/*] onto handler 'compassSearchController'
[ INFO] 22:17:23 SimpleUrlHandlerMapping - Mapped URL path [/**] onto handler 'org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0'
[ INFO] 22:17:23 DispatcherServlet - FrameworkServlet 'demo': initialization completed in 2781 ms
27 Jun, 2012 10:17:23 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
27 Jun, 2012 10:17:23 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
27 Jun, 2012 10:17:23 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
27 Jun, 2012 10:17:23 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
27 Jun, 2012 10:17:23 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
27 Jun, 2012 10:17:23 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
27 Jun, 2012 10:17:23 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
27 Jun, 2012 10:17:23 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/14 config=null
27 Jun, 2012 10:17:23 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 47711 ms

Re: Moving DataBase HSQLDB to MySQL

Posted: Thu Jun 28, 2012 9:34 am
by aazzolini
Do you have a stack trace above this?

The table that it's complaining about should have been created during startup.

If you have no other error messages, I would check that the user you are connecting to the database with has the appropriate table creation privileges. Also, use a CLI or graphical interface to MySQL and try to create a random table yourself to ensure there is no other error.

Re: Moving DataBase HSQLDB to MySQL

Posted: Tue Jul 31, 2012 7:43 am
by broadleafer
Hi aazzolini,

Hi, is it necessary to make the switch to MySQL in BroadleafEcommerce's modules or should the switch to MySQL should only be made in the HeatClinic application ?

In my first attempt I made the change to MySQLin my copy of BroadLeaf commerce. For this I change from HSQLDIalect to org.hibernate.dialect.MySQL5InnoDBDialect and change the database connection to my local mysql database and updated the pom.xml files to include MySQL driver jar. When I build the BroadLeafCommerce project the tables are created in the database but the tests are failing.

So do i need the make the change to Broadleaf ecommerce project or just the HeatClinic project ?



-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestSuite
[ WARN] 22:24:05 RuntimeEnvironmentPropertiesConfigurer - Unable to determine runtime environment, using default environment 'development'
[ WARN] 22:24:07 ConfigurationFactory - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/Users/Simer/.m2/repository/net/sf/ehcache/ehcache-core/2.4.2/ehcache-core-2.4.2.jar!/ehcache-failsafe.xml
[ WARN] 22:24:07 CacheManager - Creating a new instance of CacheManager using the diskStorePath "/var/folders/ad/adz0xb2fFrCCczNhtCRhFk+++TI/-Tmp-/" which is already used by an existing CacheManager.
The source of the configuration was net.sf.ehcache.config.generator.ConfigurationSource$DefaultConfigurationSource@2eed7d11.
The diskStore path for this CacheManager will be set to /var/folders/ad/adz0xb2fFrCCczNhtCRhFk+++TI/-Tmp-//ehcache_auto_created_1343737447265.
To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configuration (ehcache.xml) for each CacheManager instance.
22:24:09 Ejb3Configuration - Container is providing a null PersistenceUnitRootUrl: discovery impossible
[ WARN] 22:24:12 Ejb3Configuration - hibernate.connection.autocommit = false break the EJB3 specification
[ WARN] 22:24:13 AbstractEhcacheRegionFactory - Couldn't find a specific ehcache configuration for cache named [blSandBoxElements]; using defaults.
[ WARN] 22:24:13 AbstractEhcacheRegionFactory - Couldn't find a specific ehcache configuration for cache named [blCMSElements]; using defaults.
22:24:16 SchemaUpdate - Unsuccessful: create table BLC_SKU_FULFILLMENT_FLAT_RATES (SKU_ID bigint not null, RATE decimal(19,5), FULFILLMENT_OPTION_ID tinyblob not null, primary key (SKU_ID, FULFILLMENT_OPTION_ID)) ENGINE=InnoDB
22:24:16 SchemaUpdate - BLOB/TEXT column 'FULFILLMENT_OPTION_ID' used in key specification without a key length
22:24:16 SchemaUpdate - Unsuccessful: alter table BLC_SKU_FULFILLMENT_FLAT_RATES add index FKC1988C96B78C9977 (SKU_ID), add constraint FKC1988C96B78C9977 foreign key (SKU_ID) references BLC_SKU (SKU_ID)
22:24:16 SchemaUpdate - Table 'broadleaf.blc_sku_fulfillment_flat_rates' doesn't exist
[ WARN] 22:24:16 AbstractEhcacheRegionFactory - Couldn't find a specific ehcache configuration for cache named [org.hibernate.cache.UpdateTimestampsCache]; using defaults.
22:24:18 Ejb3Configuration - Container is providing a null PersistenceUnitRootUrl: discovery impossible
[ WARN] 22:24:18 Ejb3Configuration - hibernate.connection.autocommit = false break the EJB3 specification
[ WARN] 22:25:39 JDBCExceptionReporter - SQL Error: 1062, SQLState: 23000
22:25:39 JDBCExceptionReporter - Duplicate entry '1-address1' for key 'CUSTOMER_ID'
[ WARN] 22:25:39 TestContextManager - Caught exception while allowing TestExecutionListener [org.broadleafcommerce.test.MergeTransactionalTestExecutionListener@21d377a4] to process 'after' execution for test: method [public void org.broadleafcommerce.core.order.dao.legacy.LegacyFulfillmentGroupDaoTest.createDefaultFulfillmentGroup(org.broadleafcommerce.core.order.domain.FulfillmentGroup)], instance [org.broadleafcommerce.core.order.dao.legacy.LegacyFulfillmentGroupDaoTest@2786bf64], exception [javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update]
org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Transaction marked as rollbackOnly
at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:521)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
at org.broadleafcommerce.test.MergeTransactionalTestExecutionListener$TransactionContext.endTransaction(MergeTransactionalTestExecutionListener.java:514)
at org.broadleafcommerce.test.MergeTransactionalTestExecutionListener.endTransaction(MergeTransactionalTestExecutionListener.java:287)
at org.broadleafcommerce.test.MergeTransactionalTestExecutionListener.afterTestMethod(MergeTransactionalTestExecutionListener.java:180)
at org.springframework.test.context.TestContextManager.afterTestMethod(TestContextManager.java:406)
at org.springframework.test.context.testng.AbstractTestNGSpringContextTests.springTestContextAfterTestMethod(AbstractTestNGSpringContextTests.java:179)
at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:607)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:417)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:154)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:583)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:669)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:956)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:110)
at org.testng.TestRunner.runWorkers(TestRunner.java:759)
at org.testng.TestRunner.privateRun(TestRunner.java:592)
at org.testng.TestRunner.run(TestRunner.java:486)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:332)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:327)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:299)
at org.testng.SuiteRunner.run(SuiteRunner.java:204)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:877)
at org.testng.TestNG.runSuitesLocally(TestNG.java:842)
at org.testng.TestNG.run(TestNG.java:751)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:70)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:158)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:98)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:111)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
Caused by: javax.persistence.RollbackException: Transaction marked as rollbackOnly
at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:73)
at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:512)
... 41 more
Tests run: 267, Failures: 4, Errors: 0, Skipped: 246, Time elapsed: 109.706 sec <<< FAILURE!

Results :

Failed tests: readAvailableSkusForLocation(org.broadleafcommerce.core.inventory.service.SkuAvailabilityTest)
readSKUAvailabilityEntries(org.broadleafcommerce.core.inventory.service.SkuAvailabilityTest)
springTestContextAfterTestMethod(org.broadleafcommerce.core.order.dao.legacy.LegacyFulfillmentGroupDaoTest): Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Transaction marked as rollbackOnly
createDefaultFulfillmentGroup(org.broadleafcommerce.core.order.dao.legacy.LegacyFulfillmentGroupDaoTest): org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update

Tests run: 267, Failures: 4, Errors: 0, Skipped: 246

------------------------------------------------------------------------
Reactor Summary:

BroadleafCommerce ................................. SUCCESS [2.532s]
BroadleafCommerce Core ............................ SUCCESS [0.016s]
BroadleafCommerce Instrument ...................... SUCCESS [2.532s]
BroadleafCommerce Common Libraries ................ SUCCESS [13.436s]
BroadleafCommerce Profile ......................... SUCCESS [3.030s]
BroadleafCommerce Profile Web ..................... SUCCESS [1.973s]
BroadleafCommerce Admin ........................... SUCCESS [0.015s]
BroadleafCommerce Open Admin Platform ............. SUCCESS [11.940s]
BroadleafCommerce CMS Module ...................... SUCCESS [6.233s]
BroadleafCommerce Framework ....................... SUCCESS [9.830s]
BroadleafCommerce Framework Web ................... SUCCESS [4.669s]
BroadleafCommerce Admin Module .................... SUCCESS [3.814s]
BroadleafCommerce Integration ..................... FAILURE [1:51.315s]
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 2:52.533s
Finished at: Tue Jul 31 22:25:46 EST 2012
Final Memory: 36M/100M
------------------------------------------------------------------------
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (legacy-test) on project integration: There are test failures.

Please refer to /Users/Simer/NetBeansProjects/BroadleafCommerce_heatclinic/integration/target/surefire-reports for the individual test results.
-> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/disp ... eException

After correcting the problems, you can resume the build with the command
mvn <goals> -rf :integration

Re: Moving DataBase HSQLDB to MySQL

Posted: Tue Jul 31, 2012 8:57 am
by aazzolini
You do not need to make the change in the Broadleaf codebase -- in fact, it is very rare for an integration to make changes in BLC since we take care to make sure every component is extensible and customizable.

You can sort of follow this guide: http://docs.broadleafcommerce.org/current/MySQL.html

However, certain pieces of it are likely to be out of date -- it was written before we standardized on a JNDI approach -- so just be aware of that.

Re: Moving DataBase HSQLDB to MySQL

Posted: Wed Aug 01, 2012 7:04 am
by broadleafer
Thanks for your reply :)

Which branch is the most current ? Master branch seem to have a totally different code to the other. 2.0.0 seems like it got added yesterday. I think the old demo site was written in JSP but 2.0.0 seems to be all in HTML ? Is this suppose to be in HTML ?

Re: Moving DataBase HSQLDB to MySQL

Posted: Wed Aug 01, 2012 2:33 pm
by aazzolini
We work off the develop branch in GitHub, but this does not necessarily reflect stable code and should not be used unless you're after absolutely bleeding-edge features.

We are diligent about periodically (every day or two for now, but this will hopefully taper off as we move closer to GA) merging develop into BroadleafCommerce-2.0.0-M1-x and creating an incremental milestone release.

Right now, Broadleaf version 2.0.0-M1-4 is the latest stable build, and if you are attempting to build a new Broadleaf site, this is the recommended build to use.

We've provided documentation on getting started with the framework here: http://docs.broadleafcommerce.org/curre ... arted.html

We encourage you to follow this guide and begin working with Broadleaf!

Re: Moving DataBase HSQLDB to MySQL

Posted: Fri Aug 03, 2012 10:49 pm
by broadleafer
Hi,

I'm having a hard time moving to MySQL.

- I've added resources to my context.xml file in tomcat.
<Context>

<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>

<Resource name="jdbc/web" auth="Container" type="javax.sql.DataSource"
username="root" password="root"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/broadleaf"
maxActive="15"
maxIdle="3"/>

.... and the others
</Context>

- Updated the Dialects to org.hibernate.dialect.MySQLDialect in common-shared.properties file.
- removed all the dependencies to HSQL database in the pom.xml files and replaced them with mysql maven dependencies
- Added mysql-connector-java-5.1.21 to tomcat lib directory.

And I can see the database table are created but after the tables are created it's still complaining about the connection. Can you please help me.


[ INFO] 13:32:03 HibernateSearchEventListenerRegister - Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
[ INFO] 13:32:03 ConnectionProviderFactory - Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
[ INFO] 13:32:03 InjectedDataSourceConnectionProvider - Using provided datasource
[ WARN] 13:32:03 SettingsFactory - Could not obtain connection to query metadata
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1452)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:71)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:113)
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2863)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2859)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1870)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:906)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:268)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:567)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)
at org.broadleafcommerce.common.web.extensibility.MergeContextLoaderListener.contextInitialized(MergeContextLoaderListener.java:42)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:264)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1437)
... 49 more

Re: Moving DataBase HSQLDB to MySQL

Posted: Fri Aug 03, 2012 11:19 pm
by broadleafer
It took me 5 days to realize that I was naming my JDBC JNDI resources jdbc/webSecureDS instead of jdbc/webSecure.

Note to self: stay calm and recheck work done.