Hi Simon, thanks for the reply. I'll try changing it in the xml file and see if that helps.
Matt On 4 June 2018 at 16:59, Simon Levesque <si...@simonlevesque.com> wrote: > Hi Matt, > > I am no James expert, but I think using the column escape character > (double-quotes) should fix it: > CREATE TABLE JAMES_MAILBOX_ANNOTATION > ("KEY" VARCHAR(200) NOT NULL, "MAILBOX_ID" BIGINT NOT NULL, "VALUE" > VARCHAR(255), > PRIMARY KEY ("KEY", "MAILBOX_ID")) > > That is the standard SQL per > https://stackoverflow.com/questions/2901453/sql-standard-to-escape-column- > names#answer-2901499 > but it looks like you might need to enable it first for MS SQL. > > The normal MS SQL way could be using brackets instead per > https://stackoverflow.com/questions/2901453/sql-standard-to-escape-column- > names#answer-2901473 > > You could try that as well. > > HTH > > On Mon, 4 Jun 2018 at 11:03 Matt Pryor <pr...@international-presence.com> > wrote: > > > Hi there > > > > We are using James 3.0.1, SQL Server 2016 with JDBC driver version > 4.2.6420 > > > > When James starts it gets as far as creating three tables and then falls > > over creating JAMES_MAILBOX_ANNOTATION, it looks like it is using a > column > > named "key" which is a reserved keyword in SQL Server: > > > > org.apache.openjpa.lib.jdbc.ReportingSQLException: Incorrect syntax near > > the keyword 'KEY'. {stmnt 1425117721 CREATE TABLE > JAMES_MAILBOX_ANNOTATION > > (KEY VARCHAR(200) NOT NULL, MAILBOX_ID BIGINT NOT NULL, VALUE > VARCHAR(255), > > PRIMARY KEY (KEY, MAILBOX_ID))} [code=156, state=S0001] > > > > Do I have to find this in the source and change it or is there another > way? > > > > Look forward to feedback. > > > > Thanks > > Matt Pryor > > > > > > > > > > > > > > -- > > Matt Pryor > > > > The International Presence Group of Companies > > > > EMAIL: pr...@presencebpm.com > > > > URL: www.International-presence.com > > > -- Matt Pryor The International Presence Group of Companies EMAIL: pr...@presencebpm.com URL: www.International-presence.com