View Issue Details

IDProjectCategoryView StatusLast Update
0002233SymmetricDSBugpublic2021-11-04 14:58
Reporterglodererm Assigned Torudiejd  
Priorityhigh 
Status closedResolutionfixed 
Product Version3.7.4 
Target Version3.12.12Fixed in Version3.12.12 
Summary0002233: IgnoreColumnException and IgnoreRowException are not handled correctly in bsh extension scripts
DescriptionWhen throwing an "IgnoreColumnException" or an "IgnoreRowException" in a bsh extension script the extension service does not unwrap the TargetError in which the original exception has been nested by the bsh interpreter.

The "BshColumnTransform" handles this correctly and rethrows the target exception.
Steps To ReproduceSave to file "samples/test.bsh":

transform(platform, context, column, data, sourceValues, newValue, oldValue) {
    throw new org.jumpmind.symmetric.io.data.transform.IgnoreColumnException();
}


Register in symmetric-extensions.xml:

<lang:bsh
    id="test"
    refresh-check-delay="10000"
    script-source="file:samples/test.bsh"
    script-interfaces="org.jumpmind.symmetric.io.data.transform.ISingleValueColumnTransform">
</lang:bsh>

Tagstransformation

Activities

rudiejd

2021-08-11 18:46

developer   ~0001983

I can confirm that this is still an issue and I reproduced with the above steps on 3.12. Working on a fix today.

rudiejd

2021-08-11 22:48

developer   ~0001984

Looks like this issue was due to the fact that Beanshell scripts that were loaded as extensions throw a TargetError inside of a BshExecutionException (Spring Framework NestedRuntimeException), which we did not handle. I had to add a dependency on Spring Core, then I could catch this nested exception and handle the contents like we do other TargetErrors.

Related Changesets

SymmetricDS: 3.12 3f51f36d

2021-08-13 14:51:39

JD


Committer: GitHub Details Diff
0002233: fix handling of ignorecolumnexception for bsh transforms imported as spring beans (0000168)

* fix: 0002233 resolve issue with ignorecolumneception and ignorerowexception

* fix: 0002233, catch the spring error and unwrap it

* fix: 0002233 remove unneessary handling for target error

* fix: 0002233 indentation

* fix: 0002233 replace space with tabs (whoops)
Affected Issues
0002233
mod - symmetric-io/build.gradle Diff File
mod - symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/TransformWriter.java Diff File

Issue History

Date Modified Username Field Change
2015-03-16 11:34 glodererm New Issue
2015-03-16 11:42 glodererm Tag Attached: column transformation
2019-04-12 12:50 admin Tag Renamed column transformation => transformation
2021-08-11 18:46 rudiejd Note Added: 0001983
2021-08-11 18:47 rudiejd Assigned To => rudiejd
2021-08-11 18:47 rudiejd Status new => assigned
2021-08-11 22:48 rudiejd Note Added: 0001984
2021-08-13 14:52 elong Status assigned => resolved
2021-08-13 14:52 elong Resolution open => fixed
2021-08-13 14:52 elong Fixed in Version => 3.12.12
2021-08-13 14:52 elong Target Version => 3.12.12
2021-08-13 15:00 JD Changeset attached => SymmetricDS 3.12 3f51f36d
2021-11-04 14:58 admin Status resolved => closed