Users - MS SQL problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Users - MS SQL problem

BJ Freeman
when I switched from derby to MS SQL, I notice that I get table
generation errors for table that already exist.

62089 (main) [       DatabaseUtil.java:356:WARN ] Entity [AcctgTrans]
has no table in the database
62119 (main) [       DatabaseUtil.java:364:ERROR] Could not create table
[ACCTG_TRANS]: SQL Exception while executing the following:
CREATE TABLE ACCTG_TRANS (ACCTG_TRANS_ID VARCHAR(20) NOT NULL,
ACCTG_TRANS_TYPE_ID VARCHAR(20), DESCRIPTION VARCHAR(255),
TRANSACTION_DATE DATETIME, IS_POSTED CHAR(1), POSTED_DATE DATETIME,
GL_JOURNAL_ID VARCHAR(20), GL_FISCAL_TYPE_ID VARCHAR(20), VOUCHER_REF
VARCHAR(60), VOUCHER_DATE DATETIME, GROUP_STATUS_ID VARCHAR(20),
FIXED_ASSET_ID VARCHAR(20), INVENTORY_ITEM_ID VARCHAR(20),
PHYSICAL_INVENTORY_ID VARCHAR(20), PARTY_ID VARCHAR(20), ROLE_TYPE_ID
VARCHAR(20), INVOICE_ID VARCHAR(20), PAYMENT_ID VARCHAR(20), SHIPMENT_ID
VARCHAR(20), RECEIPT_ID VARCHAR(20), WORK_EFFORT_ID VARCHAR(20),
THEIR_ACCTG_TRANS_ID VARCHAR(60), CREATED_BY_USER_LOGIN VARCHAR(250),
LAST_MODIFIED_BY_USER_LOGIN VARCHAR(250), LAST_UPDATED_STAMP DATETIME,
LAST_UPDATED_TX_STAMP DATETIME, CREATED_STAMP DATETIME, CREATED_TX_STAMP
DATETIME, CONSTRAINT PK_ACCTG_TRANS PRIMARY KEY (ACCTG_TRANS_ID))
Error was: java.sql.SQLException: There is already an object named
'ACCTG_TRANS' in the database.

haven't dug into it yet, seem the first checking routine is not checking
as well as the second routine.
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - MS SQL problem

David E. Jones

Sounds like your JDBC driver doesn't support the meta data stuff, so just turn off the check/update database stuff in entityengine.xml for your datasource, or check out a different JDBC driver (there are various available for MS SQL Server).

-David


BJ Freeman wrote:

> when I switched from derby to MS SQL, I notice that I get table
> generation errors for table that already exist.
>
> 62089 (main) [       DatabaseUtil.java:356:WARN ] Entity [AcctgTrans]
> has no table in the database
> 62119 (main) [       DatabaseUtil.java:364:ERROR] Could not create table
> [ACCTG_TRANS]: SQL Exception while executing the following:
> CREATE TABLE ACCTG_TRANS (ACCTG_TRANS_ID VARCHAR(20) NOT NULL,
> ACCTG_TRANS_TYPE_ID VARCHAR(20), DESCRIPTION VARCHAR(255),
> TRANSACTION_DATE DATETIME, IS_POSTED CHAR(1), POSTED_DATE DATETIME,
> GL_JOURNAL_ID VARCHAR(20), GL_FISCAL_TYPE_ID VARCHAR(20), VOUCHER_REF
> VARCHAR(60), VOUCHER_DATE DATETIME, GROUP_STATUS_ID VARCHAR(20),
> FIXED_ASSET_ID VARCHAR(20), INVENTORY_ITEM_ID VARCHAR(20),
> PHYSICAL_INVENTORY_ID VARCHAR(20), PARTY_ID VARCHAR(20), ROLE_TYPE_ID
> VARCHAR(20), INVOICE_ID VARCHAR(20), PAYMENT_ID VARCHAR(20), SHIPMENT_ID
> VARCHAR(20), RECEIPT_ID VARCHAR(20), WORK_EFFORT_ID VARCHAR(20),
> THEIR_ACCTG_TRANS_ID VARCHAR(60), CREATED_BY_USER_LOGIN VARCHAR(250),
> LAST_MODIFIED_BY_USER_LOGIN VARCHAR(250), LAST_UPDATED_STAMP DATETIME,
> LAST_UPDATED_TX_STAMP DATETIME, CREATED_STAMP DATETIME, CREATED_TX_STAMP
> DATETIME, CONSTRAINT PK_ACCTG_TRANS PRIMARY KEY (ACCTG_TRANS_ID))
> Error was: java.sql.SQLException: There is already an object named
> 'ACCTG_TRANS' in the database.
>
> haven't dug into it yet, seem the first checking routine is not checking
> as well as the second routine.
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users