Page 1 of 1

Production Environment with MSSQL and Tomcat

Posted: Sun Nov 18, 2012 7:27 pm
by felixnutella
Hello

I have been pulling hair all weekend trying to figure out how to get this working....

I started out with this: http://docs.broadleafcommerce.org/curre ... Setup.html on how to setup my IntelliJ. I checked out the master branch on github (https://github.com/BroadleafCommerce/DemoSite) and went from there.

Then I moved on to http://docs.broadleafcommerce.org/curre ... erver.html on how to change to MSSQL.... But I get some errors with unable to create table [ERROR] 00:56:50 SchemaExport - Unsuccessful: create table BLC_QUAL_CRIT_PAGE_XREF (PAGE_ID bigint null, PAGE_ITEM_CRITERIA_ID bigint not null, primary key (PAGE_ID, PAGE_ITEM_CRITERIA_ID), unique (PAGE_ITEM_CRITERIA_ID))
[ERROR] 00:56:50 SchemaExport - Cannot define PRIMARY KEY constraint on nullable column in table 'BLC_QUAL_CRIT_PAGE_XREF'.

This the repeats with the table BLC_TAR_CRIT_OFFER_XREF and same error. The error pops up when running Jetty demo also...

It appears that a bug describing a similar issue that has been fixed as part of 1.5M2. http://jira.broadleafcommerce.org/browse/BLC-76



Furthermore it complains about CURRENT_DATE is not known.

I have replaced all current_date with getdate() in the SQL files as well as replacing all true/false with 1/0

Using the sqljdbc4 driver...

Just to confirm: When I want to go production I just need to configure the context.xml under META-INF for the JNDI and then run the Maven Package, deploy the WAR on the tomcat and then done ???

Hope someone can help since I'm getting more and more bald every day that passes by :roll:



OOh and the build-sql ant task also complains about:
DemoSite/site/build.xml:144: org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is java.lang.UnsupportedOperationException: The user must supply a JDBC connection... Any idea as to why I can't generate SQL-Scripts ?

Re: Production Environment with MSSQL and Tomcat

Posted: Fri Nov 23, 2012 6:33 am
by felixnutella
No one ?? :|

Re: Production Environment with MSSQL and Tomcat

Posted: Fri Nov 23, 2012 3:28 pm
by felixnutella
Well - Guess that I figured out most of it. I checked out the 2.0.1-GA (NOT demo) and changed the joins in PageCriteriaImpl and OfferItemCriteriaImpl so the inversejoincolumns was set to nullable=false. This removed the "Cannot define PRIMARY KEY" errors. The CURRENT_DATE error was due to old version of demo in my Maven Repo... So the remaining thing is the build-sql ant task that still don't work.... :D