VMware Cloud Community
FSvcoe
Enthusiast
Enthusiast

SQL Server 22001 error

Good evening,

We are seeing the following message in the server.log, using VCO 5.1.1 :

2013-07-02 18:10:21.508-0400 DEBUG [ServerObject] --Generating Event in Database !

2013-07-02 18:10:21.512-0400 WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: 22001

2013-07-02 18:10:21.512-0400 ERROR [JDBCExceptionReporter] Data truncation

2013-07-02 18:10:21.512-0400 WARN  [JDBCExceptionReporter] SQL Error: 8152, SQLState: 22001

2013-07-02 18:10:21.512-0400 ERROR [JDBCExceptionReporter] String or binary data would be truncated.

2013-07-02 18:10:21.513-0400 ERROR [STDERR] org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC batch update; SQL [insert into vmo_logevent (logtimestamp, longdescription, originatorid, originatortype, originatoruri, originatorusername, severity, shortdescription, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?)]; nested exception is org.hibernate.exception.DataException: Could not execute JDBC batch update

I see the table defined as follows:

CREATE TABLE [dbo].[VMO_LogEvent](

  [id] [varchar](100) NOT NULL,

  [severity] [int] NOT NULL,

  [logTimeStamp] [datetime] NOT NULL,

  [shortDescription] [nvarchar](255) NOT NULL,

  [longDescription] [nvarchar](1024) NULL,

  [originatorUri] [varchar](1024) NULL,

  [originatorUserName] [nvarchar](32) NULL,

  [originatorId] [varchar](100) NOT NULL,

  [originatorType] [varchar](100) NULL,

Is there some change we can make to the data structure to correct this error? Thanks.

Tags (3)
0 Kudos
2 Replies
igaydajiev
VMware Employee
VMware Employee

I recall that there was similar issue caused by originatorUserName was longer thatn 32 chars.

You can try extending originatorUserName column in the DB.

You can also check following thread

Re: logs are not display on 'logs' tab in Orchestrator client

0 Kudos
FSvcoe
Enthusiast
Enthusiast

Thanks, I'll try that.

0 Kudos