Article - CS104848

Project Plan actions throw “com.microsoft.sqlserver.jdbc.SQLServerException: Conversion failed when converting date and/or time from character string” in Method Server log in Windchill ProjectLink

Modified: 06-Feb-2020   


Applies To

  • Windchill ProjectLink 10.0 to 11.0

Description

  • Actions in Project Plan cause massive errors and logging 
  • SQL server error logged continuously in Windchill logs causing low disk space
  • Actions like Track Work, Edit Activity > Set Date
  • Error in Method Server log file:
wt.calendar.CalendarException: A persistence error occurred.
Nested exception is: (wt.pom.pomResource/0) wt.pom.PersistenceException: A persistence error occurred. System message follows:
Nested exception is: wt.pom.DatastoreException: A SQL error has occurred. Database system message follows:
Nested exception is: com.microsoft.sqlserver.jdbc.SQLServerException: Conversion failed when converting date and/or time from character string.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216)
at com.microsoft.sqlserver.jdbc.SQLServerResultSet$FetchBuffer.nextRow(SQLServerResultSet.java:4853)
at com.microsoft.sqlserver.jdbc.SQLServerResultSet.fetchBufferNext(SQLServerResultSet.java:1781)
at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:1034)
at wt.pds.BasicResultCursor.getNextResultSet(BasicResultCursor.java:298)
at wt.pds.BasicResultCursor.advance(BasicResultCursor.java:234)
at wt.pds.BasicResultCursor.next(BasicResultCursor.java:82)
at wt.pds.SQLDatabasePds.query(SQLDatabasePds.java:687)
at wt.pds.SQLDatabasePds.expandLink(SQLDatabasePds.java:2786)
at wt.pds.SQLDatabasePds.expand(SQLDatabasePds.java:559)
at wt.pom.PersistentObjectManager.expand(PersistentObjectManager.java:1463)
at wt.fc.StandardPersistenceManager.expand(StandardPersistenceManager.java:2949)
at wt.fc.StandardPersistenceManager.expand(StandardPersistenceManager.java:1038)
at wt.calendar.LocalCAP.getComponents(LocalCAP.java:1333)
at wt.calendar.LocalCAP.readComponents(LocalCAP.java:862)
at wt.calendar.StandardCalendarService.getCalendarMonth(StandardCalendarService.java:393)
at sun.reflect.GeneratedMethodAccessor224.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at wt.services.ServiceFactory$ServerInvocationHandler.invoke(ServiceFactory.java:399)
at com.sun.proxy.$Proxy162.getCalendarMonth(Unknown Source)
...

 
  • Output from SQL profiler: SQL can not convert bold date strings to dates 
...
declare @p1 int
set @p1=NULL
exec sp_prepexec @p1 output,N'@P0 nvarchar(4000),@P1 int,@P2 nvarchar(4000),@P3 int,@P4 bigint',N'SELECT ''wt.calendar.CalendarComponent'',A0.delegateIsNull,A0.classnamekeyA4,A0.idA3A4,CONVERT(varchar,A0.end_date,120),CONVERT(varchar,A0.start_date,120),CONVERT(varchar,A0.createStampA2,120),A0.markForDeleteA2,CONVERT(varchar,A0.modifyStampA2,120),A0.idA2A2,A0.updateCountA2,CONVERT(varchar,A0.updateStampA2,120),A0.workingDay FROM CalendarComponent A0,ComponentLink A1 WHERE ((A0.idA2A2 IN (SELECT MIN(A0.idA2A2) FROM CalendarComponent A0 WHERE ((A0.start_date BETWEEN CONVERT(datetime,@P0,@P1)  AND CONVERT(datetime,@P2,@P3) )) GROUP BY A0.start_date,A0.end_date,A0.workingDay,A0.idA3A4,A0.updateStampA2))) AND ((A1.idA3A5 = A0.idA2A2) AND (A1.idA3B5 = @P4))',N'292269008-06-01 00:00:00',120,N'292269008-06-30 23:59:59',120,223
...
  • Ressources attribute of plan activities equals 0%
  • In some environments when Windows Firewall is turned on these errors are logged
This is a printer-friendly version of Article 104848 and may be out of date. For the latest version click CS104848