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 ... eExceptionAfter correcting the problems, you can resume the build with the command
mvn <goals> -rf :integration