Project

General

Profile

bug #8774

Reimplement term tree editors to implement the general save strategy

Added by Andreas Müller over 1 year ago. Updated 5 months ago.

Status:
Closed
Priority:
Highest
Assignee:
Category:
taxeditor
Target version:
Start date:
12/17/2019
Due date:
% Done:

100%

Severity:
blocker
Found in Version:
Tags:

Description

Currently term trees save changes in the hierarchy (including new terms/nodes) immediately in the DB. This is against our general save strategy which saves changes only after explicitly pressing the save button.
It also creates huge problems because chnages in the nodes and terms itself are still saved via save button by saving (merging) the full term tree. This seems to lead to inconsistent data under certain circumstances.

Therefore we urgently need to reimplement the save strategy in term tree editors (including the Character Editor which more or less is also a term tree editor).
This is urgent as blocks using the Character-Editor which is a prerequisite for all additivity functionality.

During this reimplementation we also should use TermDtos instead of the whole objects.

picture145-1.png View (7.82 KB) Andreas Müller, 11/09/2020 02:28 PM

picture539-1.png View (2.08 KB) Andreas Müller, 11/27/2020 09:12 AM

picture709-1.png View (1.09 KB) Andreas Müller, 12/01/2020 11:59 AM

picture911-1.png View (2.2 KB) Andreas Müller, 12/02/2020 12:20 PM


Related issues

Related to Edit - bug #8663: LIE when trying to save a tree node Duplicate 11/07/2019
Related to Edit - bug #8776: Open issues for TermCollection.allowDuplicates handling in TaxEditor In Progress 08/19/2019
Related to Edit - feature request #8474: Make TermCollection.orderRelevant usable for TermTrees In Progress 08/16/2019
Related to Edit - feature request #8476: Implement support for TermCollection.isFlat in TaxEditor In Progress 08/16/2019
Related to Edit - bug #9287: Show term details in details view of term tree editor New 11/09/2020
Related to Edit - feature request #9288: Add symbols for flags in use for term trees in term tree editor New 11/09/2020
Related to Edit - feature request #9307: Preferences for display of termtrees and entries Closed 11/17/2020
Related to Edit - bug #9334: Show error message when feature tree can not be shown because of dirty data New 11/26/2020
Duplicated by Edit - bug #7990: Moving a feature via d&d does not make the Feature Tree Editor dirty Closed 01/14/2019
Duplicated by Edit - bug #8751: Replace saveOrUpdate() in AbstractTermTreeEditor Duplicate 12/06/2019
Blocks Edit - feature request #8756: Refresh button for structure tree and property tree in Character Editor Feedback 12/10/2019
Copied from Edit - bug #8744: LazyInitializationException (LIE) saving the Character Editor Closed 12/04/2019
Copied to Edit - feature request #9338: Restructure term menus Closed 12/01/2020
Copied to Edit - feature request #9337: Open issues for reimplementation of termtree editors In Progress 11/30/2020

Associated revisions

Revision 2e1c204d (diff)
Added by Katja Luther 7 months ago

ref #8774: adapt term tree editors to usage of termDtos

Revision 3037370e (diff)
Added by Katja Luther 7 months ago

ref #8774: dto and service adaptions to use dtos for term tree editors

Revision df6ac42d (diff)
Added by Katja Luther 7 months ago

ref #8774: smaller changes in termDtos

Revision 4d68581f (diff)
Added by Katja Luther 6 months ago

ref #8774: further implementations for using term dtos in editor

Revision edc4e5ae (diff)
Added by Katja Luther 6 months ago

ref #8774: adapt term tree editors to dto usage

Revision f3ff329f (diff)
Added by Katja Luther 6 months ago

ref #8774: save plural of representation was missing

Revision 90b5ff20 (diff)
Added by Katja Luther 6 months ago

ref #8774: fix term combo for dto selection

Revision 22294efa (diff)
Added by Katja Luther 6 months ago

ref #8774: small change in dto creation

Revision cafb8a16 (diff)
Added by Katja Luther 6 months ago

ref #8774: implement tests for dto handling - to be continued

Revision a1aece3d (diff)
Added by Katja Luther 6 months ago

ref #8774: implement tests for dto handling - continue

Revision 1edfe89d (diff)
Added by Katja Luther 6 months ago

ref #8774: implement tests for dto handling - continue

Revision af4b4144 (diff)
Added by Katja Luther 6 months ago

ref #8774: implement tests for dto handling - comment the assert statement

Revision db1795af (diff)
Added by Katja Luther 6 months ago

ref #8774: implement tests for dto handling - test changing representation

Revision c10c3ee4 (diff)
Added by Katja Luther 6 months ago

ref #8774: avoid NPE when creating new Enum

Revision 9958faa9 (diff)
Added by Katja Luther 6 months ago

ref #8774: correct termtyoe in characterDto

Revision 42b0120b (diff)
Added by Katja Luther 6 months ago

ref #8774: termnode dto tests - continue

Revision 41963d8b (diff)
Added by Katja Luther 6 months ago

ref #8774: smaller changes in character editor or correct right click menu usage

Revision d9495f8d (diff)
Added by Andreas Müller 6 months ago

ref #8774: fix test in suite

Revision 5790f731 (diff)
Added by Katja Luther 6 months ago

ref #8774: fix drag & drop in character editor

Revision 458132f7 (diff)
Added by Katja Luther 6 months ago

ref #8774: fix refresh after remove featurenode

Revision 2931e154 (diff)
Added by Katja Luther 6 months ago

ref #8774: reuse treeDto for all node dtos

Revision 25b3a146 (diff)
Added by Katja Luther 6 months ago

ref #8774: save method for new characternodes

Revision 8bf5dd93 (diff)
Added by Katja Luther 6 months ago

ref #8774: fix save of newly created character nodes

Revision f00aae44 (diff)
Added by Katja Luther 6 months ago

ref #8774: improve save method for new characternodes

Revision de68e009 (diff)
Added by Katja Luther 6 months ago

ref #8774: avoid NPE in delete method

Revision 2cb9b55f (diff)
Added by Katja Luther 6 months ago

ref #8774: fix getPath of termnode

Revision a5c3b1fd (diff)
Added by Katja Luther 6 months ago

ref #8774: fix character creation

Revision b6099a9c (diff)
Added by Katja Luther 6 months ago

ref #8774: missing files

Revision e4a5c66f (diff)
Added by Katja Luther 6 months ago

ref #8774: do not allow duplicates in term tree editors if voc does not allow

Revision 5affe60a (diff)
Added by Katja Luther 6 months ago

ref #8774: do not allow duplicates in character editor

Revision adf08111 (diff)
Added by Katja Luther 6 months ago

ref #8774: save term tree informations

Revision 8fd0ede6 (diff)
Added by Katja Luther 6 months ago

ref #8774: remember expansion state when removing feature from feature tree

Revision 0307d72a (diff)
Added by Katja Luther 5 months ago

ref #8774: open termTree editors only once

Revision 14417ce8 (diff)
Added by Katja Luther 5 months ago

ref #8774: move all term editor menu items to vocabularies

Revision c9d0cb80 (diff)
Added by Katja Luther 5 months ago

ref #8774: update of termtree editor after creating/removing tree

Revision a3e8d11d (diff)
Added by Katja Luther 5 months ago

ref #8774: show which terms are duplicates in dialog

Revision 7c5f89b4 (diff)
Added by Katja Luther 5 months ago

ref #8774: avoid NPE in termNodeDto

Revision 87caa5aa (diff)
Added by Katja Luther 5 months ago

ref #8774: adapt to termNodeDto changes

Revision 0e21282a (diff)
Added by Katja Luther 5 months ago

ref #8774: save term tree titleCache

Revision 21015b47 (diff)
Added by Katja Luther 5 months ago

ref #8774: fix AOOB Exception in termtree editor

Revision 4756075a (diff)
Added by Katja Luther 5 months ago

ref #8774: avoid d&d to child of the dropped node

Revision b15678f9 (diff)
Added by Katja Luther 5 months ago

ref #8774: change text for duplicates

Revision 81222649 (diff)
Added by Katja Luther 5 months ago

ref #8774: save is not necessary for creating new terms

Revision 427ed9f2 (diff)
Added by Katja Luther 5 months ago

ref #8774: label issues in character editor

Revision e33f888a (diff)
Added by Katja Luther 5 months ago

ref #8774: label issues in character editor

Revision 91febabd (diff)
Added by Katja Luther 5 months ago

ref #8774: code cleaning

Revision 49f27511 (diff)
Added by Katja Luther 5 months ago

ref #8774: only one message when trying to move new node

History

#1 Updated by Andreas Müller over 1 year ago

  • Copied from bug #8744: LazyInitializationException (LIE) saving the Character Editor added

#2 Updated by Andreas Müller over 1 year ago

  • Related to bug #8663: LIE when trying to save a tree node added

#3 Updated by Andreas Müller over 1 year ago

  • Related to bug #8751: Replace saveOrUpdate() in AbstractTermTreeEditor added

#4 Updated by Andreas Müller over 1 year ago

  • Related to bug #8776: Open issues for TermCollection.allowDuplicates handling in TaxEditor added

#5 Updated by Andreas Müller over 1 year ago

#6 Updated by Andreas Müller over 1 year ago

#7 Updated by Katja Luther over 1 year ago

  • Description updated (diff)
  • Status changed from New to In Progress

#8 Updated by Katja Luther over 1 year ago

  • Target version changed from Release 5.12 to Release 5.13

#9 Updated by Katja Luther about 1 year ago

  • Target version changed from Release 5.13 to Release 5.14

#10 Updated by Andreas Müller about 1 year ago

  • Blocks feature request #8756: Refresh button for structure tree and property tree in Character Editor added

#11 Updated by Katja Luther about 1 year ago

  • Target version changed from Release 5.14 to Release 5.15

#12 Updated by Katja Luther 11 months ago

  • Target version changed from Release 5.15 to Release 5.18

#13 Updated by Katja Luther 6 months ago

  • Status changed from In Progress to Resolved
  • Assignee changed from Katja Luther to Andreas Müller

all termtree editors are now switched to dtos. please review.

#14 Updated by Katja Luther 6 months ago

  • % Done changed from 0 to 60

#15 Updated by Andreas Müller 6 months ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther

Drag&drop still seems to work like in the old version with no dirty flag but immediate save of change.

#16 Updated by Andreas Müller 6 months ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Katja Luther to Andreas Müller

Andreas Müller wrote:

Drag&drop still seems to work like in the old version with no dirty flag but immediate save of Change.

Sorry this was not a tree

#17 Updated by Andreas Müller 6 months ago

  • File picture145-1.png View added
  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther

Trying to open the feature tree editor opened it in the buttom panel and no tree appeared and no conext menu existed for rem_conf_am.

Opening the named area tree editor worked as expected.

#18 Updated by Andreas Müller 6 months ago

It is now possible to open 2 term tree Editors of the same type. This is not wanted as a term tree editor always edits all trees and therefore should be singleton, same as term editors.

#19 Updated by Andreas Müller 6 months ago

Can we still Change the menu that way that we have Vocabularies instead of "Feature", "Named Area", "Others" and then list ALL vocabularies in the same sublist. As the Terms menu is now more populated this seems to be the more approriate way.
Feel free to open a new ticket if task is not straight forward.

#20 Updated by Andreas Müller 6 months ago

Can we show the details of a term anyway even if it is not editable in the term tree editor. This is because the pure label is often not enough to decide if one took the right term.
If not all information is easily available at least the most important should be shown.

But ofcourse it should be disabled for editing. (but Maybe in future when vocabularies will also use term trees for hierarchy editing might be a requested feature, just in case this is important to know for implementation).

Feel free to create a new ticket if this takes time to implement.

#21 Updated by Katja Luther 6 months ago

Andreas Müller wrote:

Can we show the details of a term anyway even if it is not editable in the term tree editor. This is because the pure label is often not enough to decide if one took the right term.
If not all information is easily available at least the most important should be shown.

But ofcourse it should be disabled for editing. (but Maybe in future when vocabularies will also use term trees for hierarchy editing might be a requested feature, just in case this is important to know for implementation).

Feel free to create a new ticket if this takes time to implement.

This needs a more detailed dto and therefore I move this to a new ticket.(#9287)

#22 Updated by Katja Luther 6 months ago

  • Related to bug #9287: Show term details in details view of term tree editor added

#23 Updated by Katja Luther 6 months ago

Andreas Müller wrote:

Trying to open the feature tree editor opened it in the buttom panel and no tree appeared and no conext menu existed for rem_conf_am.

Opening the named area tree editor worked as expected.

This seems to be related to the database, in other instances the problem does not appear. Needs further testing.

#24 Updated by Andreas Müller 6 months ago

Changing the name of a vocabulary is not possible. The changes neither show up in the term tree editor nor do they seem to be saved correctly. Dirty flag seems to work.

fixed

#25 Updated by Andreas Müller 6 months ago

Andreas Müller wrote:

Changing the name of a vocabulary is not possible. The changes neither show up in the term tree editor nor do they seem to be saved correctly. Dirty flag seems to work.

Also vocabulary flags do not seem to be saved when changed.

fixed

#26 Updated by Andreas Müller 6 months ago

Andreas Müller wrote:

Changing the name of a vocabulary is not possible. The changes neither show up in the term tree editor nor do they seem to be saved correctly. Dirty flag seems to work.

I mean term tree not vocabulary ofcourse.

#27 Updated by Andreas Müller 6 months ago

  • Related to feature request #9288: Add symbols for flags in use for term trees in term tree editor added

#28 Updated by Andreas Müller 6 months ago

adding a child (which was a duplicate but the tree did not allow duplicates, don't know if this is relevant):

last remote method : http://test.e-taxonomy.eu:80/cdmserver/rem_conf_am/remoting/termnode.service
last remote request client time : 2020-11-09T15:21:14.826
last remote request response header time : Mon, 09 Nov 2020 15:21:14 GMT
client error time : 2020-11-09T15:21:14.857
login : admin
editor version : 5.18.0.202011082350
server : test.e-taxonomy.eu (edit-test) / rem_conf_am
schema version : 5.18.4.0.20201020
os : Windows Server 2012 R2 6.3 amd64
java : 1.8.0_121
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
    at org.eclipse.swt.SWT.error(SWT.java:4533)
    at org.eclipse.swt.SWT.error(SWT.java:4448)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4211)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3827)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
    at eu.etaxonomy.taxeditor.Application.start(Application.java:20)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
Caused by: java.lang.NullPointerException
    at eu.etaxonomy.cdm.api.service.TermNodeServiceImpl.addChildNode(TermNodeServiceImpl.java:159)
    at sun.reflect.GeneratedMethodAccessor1905.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:283)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
    at com.sun.proxy.$Proxy791.addChildNode(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor1905.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at org.springframework.remoting.support.RemoteInvocationTraceInterceptor.invoke(RemoteInvocationTraceInterceptor.java:78)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
    at com.sun.proxy.$Proxy1171.addChildNode(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor1965.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.remoting.support.RemoteInvocation.invoke(RemoteInvocation.java:212)
    at eu.etaxonomy.cdm.api.remoting.DebuggingRemoteInvocationExecutor.invoke(DebuggingRemoteInvocationExecutor.java:52)
    at org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke(RemoteInvocationBasedExporter.java:78)
    at org.springframework.remoting.support.RemoteInvocationBasedExporter.invokeAndCreateResult(RemoteInvocationBasedExporter.java:114)
    at org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter.handleRequest(HttpInvokerServiceExporter.java:80)
    at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:51)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1395)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:755)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:215)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
    at eu.etaxonomy.cdm.servlet.DateHeaderFilter.doFilter(DateHeaderFilter.java:55)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)

#29 Updated by Andreas Müller 6 months ago

The duplicate check should be done when adding the term not only when saving it.

this is fixed.

#30 Updated by Andreas Müller 6 months ago

When adding/removing terms the tree should stay expanded. Currently it collapses and you have to reopen it. Best would be to focus on the added term (or on the next term, if exists, if removing terms).

#31 Updated by Andreas Müller 6 months ago

Unordered trees should preferably be ordered alphabetically by label or idInVoc or whatever the first part of the used label is.
However, this has not a hight priority and can be moved to another ticket if not straight forward.

#32 Updated by Katja Luther 6 months ago

Andreas Müller wrote:

Trying to open the feature tree editor opened it in the buttom panel and no tree appeared and no conext menu existed for rem_conf_am.

Opening the named area tree editor worked as expected.

This is caused by dirty data, I cleaned up the database, now the feature trees and the character trees show up again.

#33 Updated by Katja Luther 6 months ago

Andreas Müller wrote:

adding a child (which was a duplicate but the tree did not allow duplicates, don't know if this is relevant):

last remote method : http://test.e-taxonomy.eu:80/cdmserver/rem_conf_am/remoting/termnode.service
last remote request client time : 2020-11-09T15:21:14.826
last remote request response header time : Mon, 09 Nov 2020 15:21:14 GMT
client error time : 2020-11-09T15:21:14.857
login : admin
editor version : 5.18.0.202011082350
server : test.e-taxonomy.eu (edit-test) / rem_conf_am
schema version : 5.18.4.0.20201020
os : Windows Server 2012 R2 6.3 amd64
java : 1.8.0_121
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
at org.eclipse.swt.SWT.error(SWT.java:4533)
at org.eclipse.swt.SWT.error(SWT.java:4448)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4211)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3827)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at eu.etaxonomy.taxeditor.Application.start(Application.java:20)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
Caused by: java.lang.NullPointerException
at eu.etaxonomy.cdm.api.service.TermNodeServiceImpl.addChildNode(TermNodeServiceImpl.java:159)

after the data cleaning I could not reproduce this exception anymore, maybe it was also related to dirty data. But the user should not be able to create duplicates, this still is an open issue.

#34 Updated by Andreas Müller 6 months ago

Katja Luther wrote:

...
This is caused by dirty data, I cleaned up the database, now the feature trees and the character trees show up again.

Can you explain how far the data was dirty?
Shouldn't the UI give feedback on dirty data somehow? Why did the dirty data result in such strange result?

#35 Updated by Katja Luther 6 months ago

Andreas Müller wrote:

Katja Luther wrote:

...
This is caused by dirty data, I cleaned up the database, now the feature trees and the character trees show up again.

Can you explain how far the data was dirty?
Shouldn't the UI give feedback on dirty data somehow? Why did the dirty data result in such strange result?

You are right the UI should show up a message.

The dirty data was caused by missing terms and feature trees containing character nodes or vice versa, this was allowed in first implementation of term tree editor but this was adapted and now a term tree only contains nodes of one term type.

#36 Updated by Andreas Müller 6 months ago

#37 Updated by Katja Luther 5 months ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Katja Luther to Andreas Müller

For the missing feedback I create a new ticket, can we close this ticket?

#38 Updated by Katja Luther 5 months ago

  • Related to bug #9334: Show error message when feature tree can not be shown because of dirty data added

#39 Updated by Andreas Müller 5 months ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther

When moving a term up in feature tree via d&d

last remote method : http://test.e-taxonomy.eu:80/cdmserver/rem_conf_am/remoting/common.service
last remote request client time : 2020-11-27T08:36:35.887
last remote request response header time : Fri, 27 Nov 2020 08:36:35 GMT
client error time : 2020-11-27T08:36:35.934
login : admin
editor version : 5.18.0.202011262351
server : test.e-taxonomy.eu (edit-test) / rem_conf_am
schema version : 5.18.5.0.20201103
os : Windows Server 2012 R2 6.3 amd64
java : 1.8.0_121
java.lang.NullPointerException
    at eu.etaxonomy.cdm.persistence.dto.TermNodeDto.getIndex(TermNodeDto.java:207)
    at eu.etaxonomy.taxeditor.featuretree.e4.FeatureTreeDtoDropAdapter.performDrop(FeatureTreeDtoDropAdapter.java:80)
    at org.eclipse.jface.viewers.ViewerDropAdapter.drop(ViewerDropAdapter.java:254)
    at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:91)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1088)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:802)
    at org.eclipse.swt.dnd.DropTarget.Drop(DropTarget.java:472)
    at org.eclipse.swt.dnd.DropTarget.Drop_64(DropTarget.java:406)
    at org.eclipse.swt.dnd.DropTarget$3.method6(DropTarget.java:270)
    at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:119)
    at org.eclipse.swt.internal.ole.win32.COM.DoDragDrop(Native Method)
    at org.eclipse.swt.dnd.DragSource.drag(DragSource.java:378)
    at org.eclipse.swt.dnd.DragSource.access$0(DragSource.java:304)
    at org.eclipse.swt.dnd.DragSource$1.handleEvent(DragSource.java:173)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)

#40 Updated by Andreas Müller 5 months ago

Andreas Müller wrote:

It is now possible to open 2 term tree Editors of the same type. This is not wanted as a term tree editor always edits all trees and therefore should be singleton, same as term editors.

This seems not to be fixed yet.

#41 Updated by Andreas Müller 5 months ago

Andreas Müller wrote:

Trying to open the feature tree editor opened it in the buttom panel and no tree appeared and no conext menu existed for rem_conf_am.
Opening the named area tree editor worked as expected.

It generally works now, but for a very short time it still seems to open it on buttom and then moves it up. This looks not nice (though not critical).

#42 Updated by Andreas Müller 5 months ago

Andreas Müller wrote:

Can we still Change the menu that way that we have Vocabularies instead of "Feature", "Named Area", "Others" and then list ALL vocabularies in the same sublist. As the Terms menu is now more populated this seems to be the more approriate way.
Feel free to open a new ticket if task is not straight forward.

This seem also still open

#43 Updated by Andreas Müller 5 months ago

There is still camle case in the label

#44 Updated by Andreas Müller 5 months ago

Andreas Müller wrote:

The duplicate check should be done when adding the term not only when saving it.

this is fixed.

It works now, only when adding multiple terms you get the message and you don't know which term was a duplicate. So the message could say something like "... allow duplicates but the following term(s) are already in the tree. They will not be added.". Also we may want to add a cancel button here if at least 1 term is not a duplicate.
In general we may distinguish the case that all selected terms are duplicates or only a few and adapt the message and the buttoms accordingly.

#45 Updated by Andreas Müller 5 months ago

Similar to the duplicates issue a term tree can be "flat". In this case adding a child to a term node should not be allowed. The menu should be disabled for term nodes. Children can only be added to the tree itself then.
If this is complicated to implement move to new ticket (but with milestone soon)

#46 Updated by Katja Luther 5 months ago

Andreas Müller wrote:

Similar to the duplicates issue a term tree can be "flat". In this case adding a child to a term node should not be allowed. The menu should be disabled for term nodes. Children can only be added to the tree itself then.
If this is complicated to implement move to new ticket (but with milestone soon)

there is a ticket already (#8476). I will have a look.

#47 Updated by Katja Luther 5 months ago

Andreas Müller wrote:

Andreas Müller wrote:

Can we still Change the menu that way that we have Vocabularies instead of "Feature", "Named Area", "Others" and then list ALL vocabularies in the same sublist. As the Terms menu is now more populated this seems to be the more approriate way.
Feel free to open a new ticket if task is not straight forward.

This seem also still open

this is fixed.

#48 Updated by Katja Luther 5 months ago

Andreas Müller wrote:

Andreas Müller wrote:

It is now possible to open 2 term tree Editors of the same type. This is not wanted as a term tree editor always edits all trees and therefore should be singleton, same as term editors.

This seems not to be fixed yet.

this is fixed.

#49 Updated by Andreas Müller 5 months ago

Andreas Müller wrote:

Andreas Müller wrote:

The duplicate check should be done when adding the term not only when saving it.

this is fixed.

It works now, only when adding multiple terms you get the message and you don't know which term was a duplicate. So the message could say something like "... allow duplicates but the following term(s) are already in the tree. They will not be added.". Also we may want to add a cancel button here if at least 1 term is not a duplicate.
In general we may distinguish the case that all selected terms are duplicates or only a few and adapt the message and the buttoms accordingly.

There is a related ticket on this issue: #8776 , can you please check how far these issues are fixed. Those not fixed yet we should try to handle soon. (not necessarily this release)

#50 Updated by Katja Luther 5 months ago

Andreas Müller wrote:

Andreas Müller wrote:

Andreas Müller wrote:

The duplicate check should be done when adding the term not only when saving it.

this is fixed.

It works now, only when adding multiple terms you get the message and you don't know which term was a duplicate. So the message could say something like "... allow duplicates but the following term(s) are already in the tree. They will not be added.". Also we may want to add a cancel button here if at least 1 term is not a duplicate.
In general we may distinguish the case that all selected terms are duplicates or only a few and adapt the message and the buttoms accordingly.

There is a related ticket on this issue: #8776 , can you please check how far these issues are fixed. Those not fixed yet we should try to handle soon. (not necessarily this release)

Now the message contains the terms not added because of duplication.

#51 Updated by Katja Luther 5 months ago

Andreas Müller wrote:

There is still camle case in the label

this is fixed

#52 Updated by Katja Luther 5 months ago

Andreas Müller wrote:

When adding/removing terms the tree should stay expanded. Currently it collapses and you have to reopen it. Best would be to focus on the added term (or on the next term, if exists, if removing terms).

this is fixed

#53 Updated by Katja Luther 5 months ago

#54 Updated by Katja Luther 5 months ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Katja Luther to Andreas Müller

I think all issues are fixed. Only the wrong position for a short time (#9337) and handling of flat trees still open (#8476).

#55 Updated by Andreas Müller 5 months ago

#56 Updated by Andreas Müller 5 months ago

I moved the open menu items to #9338

#57 Updated by Andreas Müller 5 months ago

But this should be done immediately:

Rename menu entry "Term Tree Editor" to "Term Trees" as it is inconsistent with "vocabularies" otherwise.

-> done

#58 Updated by Andreas Müller 5 months ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther

Can we remove "Inapplicable IF" and "Only applicable if" for all term trees except for those having term type "Feature" or "Character" or better "Feature" and all its subtypes. As the message "No feature state added yet" says this is only for data related to "Feature".

#59 Updated by Katja Luther 5 months ago

Andreas Müller wrote:

Can we remove "Inapplicable IF" and "Only applicable if" for all term trees except for those having term type "Feature" or "Character" or better "Feature" and all its subtypes. As the message "No feature state added yet" says this is only for data related to "Feature".

for other termnodes the details view is blank already.

#60 Updated by Andreas Müller 5 months ago

Katja Luther wrote:

Andreas Müller wrote:

Can we remove "Inapplicable IF" and "Only applicable if" for all term trees except for those having term type "Feature" or "Character" or better "Feature" and all its subtypes. As the message "No feature state added yet" says this is only for data related to "Feature".

for other termnodes the details view is blank already.

Ahh, ofcourse you are right. I made a mistake when testing.

#61 Updated by Katja Luther 5 months ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Katja Luther to Andreas Müller

I think all remaining issues are solved or moved to new tickets.

#62 Updated by Andreas Müller 5 months ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther

AOOB with a rank tree with 3 top level children, first I moved 3rd rank to be child of 2nd rank, than I tried to move it to bcome child of 1st rank or inbetween 1st and 2nd rank => exception:

last remote method : http://test.e-taxonomy.eu:80/cdmserver/rem_conf_am/remoting/termnode.service
last remote request client time : 2020-12-02T12:13:58.344
last remote request response header time : Wed, 02 Dec 2020 12:13:58 GMT
client error time : 2020-12-02T12:13:58.39
login : admin
editor version : 5.18.0.202012011427
server : test.e-taxonomy.eu (edit-test) / rem_conf_am
schema version : 5.18.5.0.20201103
os : Windows Server 2012 R2 6.3 amd64
java : 1.8.0_121
java.lang.ArrayIndexOutOfBoundsException: -1
    at java.util.ArrayList.elementData(ArrayList.java:418)
    at java.util.ArrayList.remove(ArrayList.java:495)
    at eu.etaxonomy.taxeditor.featuretree.e4.FeatureTreeDtoDropAdapter.performDrop(FeatureTreeDtoDropAdapter.java:149)
    at org.eclipse.jface.viewers.ViewerDropAdapter.drop(ViewerDropAdapter.java:254)
    at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:91)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103)

#63 Updated by Andreas Müller 5 months ago

... this happens whereever I try to move the 3rd rank from position of being child of 2nd rank (but in the same session, no saving before)

#64 Updated by Andreas Müller 5 months ago

When changing a tree by e.g. changing a flag (order relevant) and then adding a term a message comes that the tree needs to be saved before. After adding the term the term does not appear in the UI, only after saving again it appears.

AND: the changed flag does is reverted again if I click on the tree

#65 Updated by Andreas Müller 5 months ago

The text for duplicate recognition should be improved from

This term tree does not allow duplicates and there exist nodes with following terms => This term tree does not allow duplicates and therefore the following terms were not added

... and the according German translation

#66 Updated by Andreas Müller 5 months ago

after moving some ranks around in the term editor I got the following when trying to save:

last remote method : http://test.e-taxonomy.eu:80/cdmserver/rem_conf_am/remoting/termnode.service
last remote request client time : 2020-12-02T19:34:43.622
last remote request response header time : Wed, 02 Dec 2020 19:34:43 GMT
client error time : 2020-12-02T19:34:59.366
login : admin
editor version : 5.18.0.202012021746
server : test.e-taxonomy.eu (edit-test) / rem_conf_am
schema version : 5.18.6.0.20201124
os : Windows Server 2012 R2 6.3 amd64
java : 1.8.0_121
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.StackOverflowError)
    at org.eclipse.swt.SWT.error(SWT.java:4533)
    at org.eclipse.swt.SWT.error(SWT.java:4448)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
...
Caused by: java.lang.StackOverflowError
    at java.lang.Class.getDeclaringClass(Class.java:1235)
    at java.lang.Class.getEnclosingClass(Class.java:1277)
    at java.lang.Class.getSimpleBinaryName(Class.java:1443)
    at java.lang.Class.getSimpleName(Class.java:1309)
    at eu.etaxonomy.cdm.aspectj.PropertyChangeAspect.isPersistentSet(PropertyChangeAspect.aj:75)
    at eu.etaxonomy.cdm.aspectj.PropertyChangeAspect.ajc$inlineAccessMethod$eu_etaxonomy_cdm_aspectj_PropertyChangeAspect$eu_etaxonomy_cdm_aspectj_PropertyChangeAspect$isPersistentSet(PropertyChangeAspect.aj:1)
    at eu.etaxonomy.cdm.model.term.TermNode.setTreeIndex_aroundBody5$advice(TermNode.java:61)
    at eu.etaxonomy.cdm.model.term.TermNode.setTreeIndex(TermNode.java:1)
...
    at eu.etaxonomy.cdm.persistence.hibernate.SaveOrUpdateEntityListener.reindex(SaveOrUpdateEntityListener.java:67)
    at eu.etaxonomy.cdm.persistence.hibernate.SaveOrUpdateEntityListener.reindex(SaveOrUpdateEntityListener.java:67)
    at eu.etaxonomy.cdm.persistence.hibernate.SaveOrUpdateEntityListener.reindex(SaveOrUpdateEntityListener.java:67)
    at eu.etaxonomy.cdm.persistence.hibernate.SaveOrUpdateEntityListener.reindex(SaveOrUpdateEntityListener.java:67)
    at org.springframework.remoting.support.RemoteInvocationUtils.fillInClientStackTraceIfPossible(RemoteInvocationUtils.java:45)
    at org.springframework.remoting.support.RemoteInvocationResult.recreate(RemoteInvocationResult.java:149)

#67 Updated by Andreas Müller 5 months ago

D&d a term onto its own child makes both disappear in the UI. Saving this is one way to create the above StackOverflowError.

#68 Updated by Andreas Müller 5 months ago

D&D a NamedArea term from a NamedArea Tree Term Editor to an Rank Tree Term Editor leeds to the below NPE:

D&D with 2 different term types should generally not be allowed

last remote method : http://test.e-taxonomy.eu:80/cdmserver/rem_conf_am/remoting/common.service
last remote request client time : 2020-12-02T19:48:34.249
last remote request response header time : Wed, 02 Dec 2020 19:48:34 GMT
client error time : 2020-12-02T19:48:34.296
login : admin
editor version : 5.18.0.202012021746
server : test.e-taxonomy.eu (edit-test) / rem_conf_am
schema version : 5.18.6.0.20201124
os : Windows Server 2012 R2 6.3 amd64
java : 1.8.0_121
java.lang.NullPointerException
    at eu.etaxonomy.taxeditor.featuretree.e4.FeatureTreeDtoDropAdapter.performDrop(FeatureTreeDtoDropAdapter.java:141)
    at org.eclipse.jface.viewers.ViewerDropAdapter.drop(ViewerDropAdapter.java:254)
    at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:91)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:

By the way shouldn't we rename FeatureTreeDtoDropAdapter to TermTreeDtoDropAdapter?

#69 Updated by Andreas Müller 5 months ago

The above also happens when D&D a NamedAreae from NamedArea Term Editor to NamedArea Term Tree Editor, so it is probably not term type dependend.

#70 Updated by Andreas Müller 5 months ago

The tree should stay expanded when saving

#71 Updated by Andreas Müller 5 months ago

D&D on itself makes a node disappear and saving it creates a stackOverflow

#72 Updated by Katja Luther 5 months ago

The saving of the termtree editor before adding a new term is not necessary anymore, only moving a new term is not possible yet.

#73 Updated by Katja Luther 5 months ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Katja Luther to Andreas Müller

I move the expand of the tree after saving to the follow up ticket.

#74 Updated by Andreas Müller 5 months ago

  • Status changed from Resolved to Closed
  • Assignee changed from Andreas Müller to Katja Luther
  • % Done changed from 60 to 100

I think we can close this ticket. All remaining issues will go into the follow up ticket #9337

#75 Updated by Andreas Müller 5 months ago

#76 Updated by Andreas Müller 5 months ago

#77 Updated by Andreas Müller 5 months ago

  • Duplicated by bug #7990: Moving a feature via d&d does not make the Feature Tree Editor dirty added

#78 Updated by Andreas Müller 3 months ago

  • Related to deleted (bug #8751: Replace saveOrUpdate() in AbstractTermTreeEditor)

#79 Updated by Andreas Müller 3 months ago

  • Duplicated by bug #8751: Replace saveOrUpdate() in AbstractTermTreeEditor added

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)