1 Reply Latest reply on Sep 28, 2007 10:12 AM by Kurt Stam

    Wrong DB initialisation Script for Sybase

    Mikhail Kolesnikov Newbie

      For initializing JUDDI data source on MsSQL I have used script for Sybase and there is an error occured in server log:

      com.microsoft.sqlserver.jdbc.SQLServerException: String or binary data would be truncated


      Perform some debugging I had find a root cause - wrong DB structure

      This script exists in ESB distribution
      CREATE TABLE BINDING_TEMPLATE
      (
       SERVICE_KEY VARCHAR(41) NOT NULL,
       BINDING_KEY VARCHAR(41) NOT NULL,
       ACCESS_POINT_TYPE VARCHAR(20) NULL,
       ACCESS_POINT_URL VARCHAR(255) NULL,
       HOSTING_REDIRECTOR VARCHAR(255) NULL,
       LAST_UPDATE DATETIME NOT NULL,
       PRIMARY KEY (BINDING_KEY),
       FOREIGN KEY (SERVICE_KEY)
       REFERENCES BUSINESS_SERVICE (SERVICE_KEY)
      )
      


      But we need in that one

      CREATE TABLE BINDING_TEMPLATE
      (
       SERVICE_KEY VARCHAR(41) NOT NULL,
       BINDING_KEY VARCHAR(41) NOT NULL,
       ACCESS_POINT_TYPE VARCHAR(20) NULL,
       ACCESS_POINT_URL TEXT NULL, -- HERE MUST BE 'TEXT'
       HOSTING_REDIRECTOR VARCHAR(255) NULL,
       LAST_UPDATE DATETIME NOT NULL,
       PRIMARY KEY (BINDING_KEY),
       FOREIGN KEY (SERVICE_KEY)
       REFERENCES BUSINESS_SERVICE (SERVICE_KEY)
      )
      


      Best regards...