From 7f81ea783052aa6f21ed8ad0ee4d88bec2d9d6b8 Mon Sep 17 00:00:00 2001 From: Paulo Veiga Date: Sun, 16 Sep 2018 18:37:13 -0700 Subject: [PATCH 1/8] Bump up version --- core-js/pom.xml | 2 +- mindplot/pom.xml | 2 +- pom.xml | 4 ++-- web2d/pom.xml | 2 +- wise-editor/pom.xml | 2 +- wise-webapp/pom.xml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core-js/pom.xml b/core-js/pom.xml index a64965bf..2d8eda6a 100644 --- a/core-js/pom.xml +++ b/core-js/pom.xml @@ -9,7 +9,7 @@ org.wisemapping wisemapping ../pom.xml - 4.0.5-SNAPSHOT + 4.0.6-SNAPSHOT scm:git:git@bitbucket.org:wisemapping/wisemapping-open-source.git diff --git a/mindplot/pom.xml b/mindplot/pom.xml index 137b3e8d..b99f3d5e 100644 --- a/mindplot/pom.xml +++ b/mindplot/pom.xml @@ -9,7 +9,7 @@ org.wisemapping wisemapping ../pom.xml - 4.0.5-SNAPSHOT + 4.0.6-SNAPSHOT diff --git a/pom.xml b/pom.xml index 09c0b704..142fa1d1 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> - 4.0.5-SNAPSHOT + 4.0.6-SNAPSHOT ${project.basedir}/wise-webapps @@ -16,7 +16,7 @@ org.wisemapping wisemapping WiseMapping Project - 4.0.5-SNAPSHOT + 4.0.6-SNAPSHOT pom diff --git a/web2d/pom.xml b/web2d/pom.xml index 732c81a6..5017df69 100644 --- a/web2d/pom.xml +++ b/web2d/pom.xml @@ -9,7 +9,7 @@ org.wisemapping wisemapping ../pom.xml - 4.0.5-SNAPSHOT + 4.0.6-SNAPSHOT diff --git a/wise-editor/pom.xml b/wise-editor/pom.xml index a1a1ec4a..dddf61f4 100644 --- a/wise-editor/pom.xml +++ b/wise-editor/pom.xml @@ -9,7 +9,7 @@ org.wisemapping wisemapping ../pom.xml - 4.0.5-SNAPSHOT + 4.0.6-SNAPSHOT diff --git a/wise-webapp/pom.xml b/wise-webapp/pom.xml index f8af1bf3..04a6a92c 100644 --- a/wise-webapp/pom.xml +++ b/wise-webapp/pom.xml @@ -9,7 +9,7 @@ org.wisemapping wisemapping ../pom.xml - 4.0.5-SNAPSHOT + 4.0.6-SNAPSHOT From 6872cda95293b7fabbd9887e200ea2a181ae47ae Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Wed, 29 Jul 2020 12:30:44 -0700 Subject: [PATCH 2/8] Disable timestamp control. Issue seems to be related to changes in the JDBC driver. --- .../java/com/wisemapping/rest/MindmapController.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java index 67cd903a..bc7abd9f 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java @@ -53,6 +53,7 @@ import com.wisemapping.service.MindmapService; import com.wisemapping.validator.MapInfoValidator; import com.wordnik.swagger.annotations.Api; import com.wordnik.swagger.annotations.ApiParam; +import org.apache.log4j.Logger; import org.jetbrains.annotations.NotNull; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; @@ -84,6 +85,7 @@ import java.util.Set; @Api(value = "mindmap", description = "User Mindmap Objects.") @Controller public class MindmapController extends BaseController { + final Logger logger = Logger.getLogger("com.wisemapping"); public static final String LATEST_HISTORY_REVISION = "latest"; @Qualifier("mindmapService") @@ -301,16 +303,20 @@ public class MindmapController extends BaseController { final LockInfo lockInfo = lockManager.getLockInfo(mindmap); if (lockInfo.getUser().identityEquality(user)) { - final boolean outdated = mindmap.getLastModificationTime().getTimeInMillis() > timestamp; + long savedTimestamp = mindmap.getLastModificationTime().getTimeInMillis(); + final boolean outdated = savedTimestamp > timestamp; + if (lockInfo.getSession() == session) { // Timestamp might not be returned to the client. This try to cover this case, ignoring the client timestamp check. final User lastEditor = mindmap.getLastEditor(); boolean editedBySameUser = lastEditor == null || user.identityEquality(lastEditor); if (outdated && !editedBySameUser) { - throw new SessionExpiredException("Map has been updated by " + (lastEditor.getEmail()) + ",Timestamp:" + timestamp + "," + mindmap.getLastModificationTime().getTimeInMillis() + ", User:" + lastEditor.getId() + ":" + user.getId() + ",Mail:'" + lastEditor.getEmail() + "':'" + user.getEmail(), lastEditor); + throw new SessionExpiredException("Map has been updated by " + (lastEditor.getEmail()) + ",Timestamp:" + timestamp + "," + savedTimestamp + ", User:" + lastEditor.getId() + ":" + user.getId() + ",Mail:'" + lastEditor.getEmail() + "':'" + user.getEmail(), lastEditor); } } else if (outdated) { - throw new MultipleSessionsOpenException("Sessions:" + session + ":" + lockInfo.getSession() + ",Timestamp: " + timestamp + ": " + lockInfo.getTimestamp() + ",User:"); + logger.warn("Sessions:" + session + ":" + lockInfo.getSession() + ",Timestamp: " + timestamp + ": " + savedTimestamp); + // @Todo: Temporally disabled to unblock save action. More research needed. +// throw new MultipleSessionsOpenException("Sessions:" + session + ":" + lockInfo.getSession() + ",Timestamp: " + timestamp + ": " + savedTimestamp); } } else { throw new SessionExpiredException("Different Users.", lockInfo.getUser()); From 9b738eaaf7b8504ea6d13d3484e453710f6b67bc Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Fri, 6 Nov 2020 21:35:54 -0800 Subject: [PATCH 3/8] Support for Java 11 --- pom.xml | 8 +-- wise-webapp/pom.xml | 58 ++++++++++++------- .../com/wisemapping/dao/LabelManagerImpl.java | 6 +- .../wisemapping/dao/MindmapManagerImpl.java | 12 ++-- .../com/wisemapping/dao/UserManagerImpl.java | 4 +- .../wisemapping/exporter/ExporterFactory.java | 7 ++- .../filter/BrowserSupportInterceptor.java | 23 ++++---- .../importer/freemind/FreemindImporter.java | 2 +- .../com/wisemapping/rest/BaseController.java | 32 +++++----- ...bugMappingJacksonHttpMessageConverter.java | 47 +++++++-------- .../wisemapping/rest/MindmapController.java | 5 +- .../rest/model/RestCollaboration.java | 3 +- .../rest/model/RestCollaborationList.java | 2 +- .../rest/model/RestCollaborator.java | 7 +-- .../wisemapping/rest/model/RestErrors.java | 6 +- .../com/wisemapping/rest/model/RestLabel.java | 11 ++-- .../wisemapping/rest/model/RestLabelList.java | 2 +- .../wisemapping/rest/model/RestLockInfo.java | 4 +- .../wisemapping/rest/model/RestLogItem.java | 2 +- .../wisemapping/rest/model/RestMindmap.java | 6 +- .../rest/model/RestMindmapHistory.java | 4 +- .../rest/model/RestMindmapHistoryList.java | 4 +- .../rest/model/RestMindmapInfo.java | 7 +-- .../rest/model/RestMindmapList.java | 34 +++++------ .../com/wisemapping/rest/model/RestUser.java | 48 +++++++-------- .../AuthenticationSuccessHandler.java | 4 +- .../wisemapping/service/RecaptchaService.java | 1 - .../java/com/wisemapping/util/JAXBUtils.java | 5 +- .../src/main/resources/Bundle.properties | 1 + .../main/webapp/WEB-INF/wisemapping-dao.xml | 7 +-- .../main/webapp/WEB-INF/wisemapping-model.xml | 2 +- .../main/webapp/WEB-INF/wisemapping-rest.xml | 20 +++++-- .../WEB-INF/wisemapping-security-db.xml | 4 +- .../WEB-INF/wisemapping-security-ldap.xml | 4 +- .../webapp/WEB-INF/wisemapping-security.xml | 15 +++-- .../webapp/WEB-INF/wisemapping-service.xml | 4 +- .../webapp/WEB-INF/wisemapping-servlet.xml | 6 +- wise-webapp/src/main/webapp/jsp/login.jsp | 6 +- .../main/webapp/jsp/userForgotPassword.jsp | 2 +- .../src/main/webapp/jsp/userRegistration.jsp | 2 +- .../test/export/ExportXsltBasedTest.java | 10 +++- .../com/wisemapping/test/model/JsonTest.java | 2 +- .../test/rest/RestAccountITCase.java | 4 +- .../test/rest/RestAdminITCase.java | 4 +- .../test/rest/RestMindmapITCase.java | 25 ++------ 45 files changed, 240 insertions(+), 232 deletions(-) create mode 100644 wise-webapp/src/main/resources/Bundle.properties diff --git a/pom.xml b/pom.xml index 142fa1d1..e211621c 100644 --- a/pom.xml +++ b/pom.xml @@ -77,7 +77,7 @@ org.jvnet.jaxb2.maven2 maven-jaxb2-plugin - 0.8.1 + 0.14.0 net.alchim31.maven @@ -117,10 +117,10 @@ org.apache.maven.plugins maven-compiler-plugin - 3.1 + 3.8.0 - 1.8 - 1.8 + 11 + 11 UTF-8 diff --git a/wise-webapp/pom.xml b/wise-webapp/pom.xml index 04a6a92c..ec0abb55 100644 --- a/wise-webapp/pom.xml +++ b/wise-webapp/pom.xml @@ -28,8 +28,8 @@ - 3.2.18.RELEASE - 3.2.10.RELEASE + 4.3.29.RELEASE + 4.2.9.RELEASE @@ -56,7 +56,7 @@ org.apache.velocity velocity - 1.5 + 1.7 compile @@ -122,7 +122,7 @@ org.apache.xmlgraphics fop - 2.3 + 2.4 org.springframework @@ -228,7 +228,7 @@ javax javaee-api - 6.0 + 8.0.1 provided @@ -268,15 +268,9 @@ runtime - org.codehaus.jackson - jackson-core-asl - 1.9.4 - - - org.codehaus.jackson - jackson-mapper-asl - 1.9.4 - compile + com.fasterxml.jackson.core + jackson-databind + 2.11.3 org.slf4j @@ -290,6 +284,26 @@ 2.10.0 compile + + javax.xml.bind + jaxb-api + 2.3.1 + + + org.glassfish.jaxb + jaxb-runtime + 2.3.1 + + + com.sun.xml.bind + jaxb-core + 2.3.0 + + + org.jacoco + jacoco-maven-plugin + 0.8.5 + org.jsoup @@ -311,6 +325,11 @@ jstl 1.2 + + javax.servlet + servlet-api + 2.5 + org.apache.httpcomponents fluent-hc @@ -567,11 +586,9 @@ org.eclipse.jetty jetty-maven-plugin - 9.4.12.v20180830 + 9.4.34.v20201102 - false foo - true 9999 ${project.build.directory}/wisemapping.war automatic @@ -595,14 +612,15 @@ - start-jetty + run-forked pre-integration-test - run + run-forked 0 - true + false + -Ddatabase.base.url=${project.build.directory} diff --git a/wise-webapp/src/main/java/com/wisemapping/dao/LabelManagerImpl.java b/wise-webapp/src/main/java/com/wisemapping/dao/LabelManagerImpl.java index 54ded25a..926134ff 100644 --- a/wise-webapp/src/main/java/com/wisemapping/dao/LabelManagerImpl.java +++ b/wise-webapp/src/main/java/com/wisemapping/dao/LabelManagerImpl.java @@ -24,20 +24,20 @@ public class LabelManagerImpl extends HibernateDaoSupport @NotNull @Override public List