View Issue Details

IDProjectCategoryView StatusLast Update
0001467SymmetricDSBugpublic2014-06-16 20:27
ReporteralxanderAssigned Tochenson 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version3.5.10 
Target Version3.6.0Fixed in Version3.6.0 
Summary0001467: trigger creation failed with MSSQL database column of nvarchar and ntext data type using the microsoft jdbc driver
Descriptionif mssql table contains nvarchar columns
{
CREATE TABLE [dbo].[Relations](
    [ID] [uniqueidentifier] NOT NULL,
    [Relation_Name] [nvarchar](50) NOT NULL,
}
trigger creating failed with

[SymmetricDS] - TriggerRouterService - Failed to create triggers for ms_App2.dbo
.*
org.apache.commons.lang.NotImplementedException: Relation_Name is of type NVARCHAR with JDB
C type of nvarchar
        at org.jumpmind.symmetric.db.AbstractTriggerTemplate.buildColumnString(A
bstractTriggerTemplate.java:680)
        at org.jumpmind.symmetric.db.AbstractTriggerTemplate.replaceTemplateVari
ables(AbstractTriggerTemplate.java:341)
        at org.jumpmind.symmetric.db.mssql.MsSqlTriggerTemplate.replaceTemplateV
ariables(MsSqlTriggerTemplate.java:205)
        at org.jumpmind.symmetric.db.AbstractTriggerTemplate.createTriggerDDL(Ab
stractTriggerTemplate.java:258)
        at org.jumpmind.symmetric.db.AbstractSymmetricDialect.createTrigger(Abst
ractSymmetricDialect.java:303)
        at org.jumpmind.symmetric.service.impl.TriggerRouterService.rebuildTrigg
erIfNecessary(TriggerRouterService.java:1509)
        at org.jumpmind.symmetric.service.impl.TriggerRouterService.updateOrCrea
teDatabaseTriggers(TriggerRouterService.java:1380)
        at org.jumpmind.symmetric.service.impl.TriggerRouterService.updateOrCrea
teDatabaseTrigger(TriggerRouterService.java:1263)
        at org.jumpmind.symmetric.service.impl.TriggerRouterService.updateOrCrea
teDatabaseTriggers(TriggerRouterService.java:1253)
        at org.jumpmind.symmetric.service.impl.TriggerRouterService.syncTriggers
(TriggerRouterService.java:1032)
        at org.jumpmind.symmetric.service.impl.TriggerRouterService.syncTriggers
(TriggerRouterService.java:983)
        at org.jumpmind.symmetric.service.impl.TriggerRouterService.syncTriggers
(TriggerRouterService.java:979)
        at org.jumpmind.symmetric.AbstractSymmetricEngine.start(AbstractSymmetri
cEngine.java:503)
        at org.jumpmind.symmetric.AbstractSymmetricEngine.start(AbstractSymmetri
cEngine.java:486)
        at org.jumpmind.symmetric.web.SymmetricEngineHolder$EngineStarter.run(Sy
mmetricEngineHolder.java:427)
[SymmetricDS] - MsSqlSymmetricDialect
Steps To Reproducecreate triggers for mssql table with nvarchar column
TagsNo tags attached.

Activities

chenson

2013-11-15 20:30

administrator   ~0000392

Have you tried the JTDS JDBC driver? This is a known issue with the Microsoft driver that we have not yet addressed.

alxander

2013-11-16 09:37

reporter   ~0000393

JTDS JDBC driver for this problem is good, thanx.

I've got another problem:
If tabel contains image or ntext field
..............................
 CREATE TABLE [dbo].[Employees](
    ..........
    [Photo] [image] NULL,
    [Notes] [ntext] NULL,
.....................
than created trigger contains
.....................
from inserted inner join "ms_App2"."dbo"."Employees" orig on orig."Photo"=inserted."Photo" and orig."Notes"=inserted."Notes"
.....................
and it results

Cannot use text, ntext, or image columns in the 'inserted' and 'deleted' tables.

no comparations allowed with inserted
[Photo] [image] NULL,
    [Notes] [ntext] NULL,
columns.

chenson

2013-12-07 19:31

administrator   ~0000403

The table doesn't have a PK. If you don't specify a PK, then all columns are used as the PK. Neither text or image fields can be used as PK columns with SymmetricDS.

Related Changesets

SymmetricDS: master f3338ba5

2013-12-08 11:34:37

chenson

Details Diff
0001467: trigger creation failed with MSSQL database column of nvarchar and ntext data type using the microsoft jdbc driver
0001467
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/db/AbstractTriggerTemplate.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/model/ColumnTypes.java Diff File

SymmetricDS: master 9c38fbe8

2014-04-07 21:14:04

chenson

Details Diff
0001467: trigger creation failed with MSSQL database column of nvarchar and ntext data type using the microsoft jdbc driver
0001467
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/db/AbstractTriggerTemplate.java Diff File

Issue History

Date Modified Username Field Change
2013-11-15 12:38 alxander New Issue
2013-11-15 20:30 chenson Note Added: 0000392
2013-11-16 09:37 alxander Note Added: 0000393
2013-11-16 10:22 chenson Summary trigger creation failed with MMSQL database column of nvarchar data type => trigger creation failed with MMSQL database column of nvarchar and ntext data type
2013-11-16 10:23 chenson Target Version => 3.6.0
2013-12-07 09:38 chenson Summary trigger creation failed with MMSQL database column of nvarchar and ntext data type => trigger creation failed with MSSQL database column of nvarchar and ntext data type
2013-12-07 19:31 chenson Note Added: 0000403
2013-12-07 19:32 chenson Summary trigger creation failed with MSSQL database column of nvarchar and ntext data type => trigger creation failed with MSSQL database column of nvarchar and ntext data type using the microsoft jdbc driver
2013-12-08 11:34 chenson Target Version 3.6.0 => 3.5.12
2013-12-08 11:34 chenson Status new => resolved
2013-12-08 11:34 chenson Fixed in Version => 3.5.12
2013-12-08 11:34 chenson Resolution open => fixed
2013-12-08 11:34 chenson Assigned To => chenson
2013-12-18 10:55 chenson Status resolved => closed
2014-02-02 20:53 Changeset attached => SymmetricDS trunk r7795
2014-04-07 21:10 chenson Status closed => feedback
2014-04-07 21:10 chenson Resolution fixed => reopened
2014-04-07 21:10 chenson Fixed in Version 3.5.12 =>
2014-04-07 21:10 chenson Target Version 3.5.12 => 3.6.0
2014-04-07 21:14 chenson Status feedback => resolved
2014-04-07 21:14 chenson Fixed in Version => 3.6.0
2014-04-07 21:14 chenson Resolution reopened => fixed
2014-04-07 22:00 Changeset attached => SymmetricDS trunk r8137
2014-06-16 20:27 chenson Status resolved => closed
2015-07-30 21:49 chenson Changeset attached => SymmetricDS master 9c38fbe8
2015-07-30 21:49 chenson Changeset attached => SymmetricDS master f3338ba5