From a133dceb8f343881e3450ba2bbe15f3d77bdf73d Mon Sep 17 00:00:00 2001 From: Jan-Christoph Klie Date: Sun, 22 Nov 2020 20:55:36 +0100 Subject: [PATCH 1/8] #1811 - Webanno does not boot in Intellij due to javax errors - Remove validator bean - Remove some tomcat deps --- webanno-webapp/pom.xml | 11 +---------- .../ukp/clarin/webanno/webapp/WebAnno.java | 7 ------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/webanno-webapp/pom.xml b/webanno-webapp/pom.xml index 7b56414cdcc..8cf2282a5e1 100644 --- a/webanno-webapp/pom.xml +++ b/webanno-webapp/pom.xml @@ -256,16 +256,7 @@ jakarta.validation-api compile - - org.apache.tomcat.embed - tomcat-embed-core - provided - - - org.springframework.boot - spring-boot-starter-tomcat - provided - + org.springframework.boot spring-boot-autoconfigure diff --git a/webanno-webapp/src/main/java/de/tudarmstadt/ukp/clarin/webanno/webapp/WebAnno.java b/webanno-webapp/src/main/java/de/tudarmstadt/ukp/clarin/webanno/webapp/WebAnno.java index dc8d4c2695d..a3d965b0c00 100644 --- a/webanno-webapp/src/main/java/de/tudarmstadt/ukp/clarin/webanno/webapp/WebAnno.java +++ b/webanno-webapp/src/main/java/de/tudarmstadt/ukp/clarin/webanno/webapp/WebAnno.java @@ -75,13 +75,6 @@ public class WebAnno @Value("${server.ajp.address:127.0.0.1}") private String ajpAddress; - @Bean - @Primary - public Validator validator() - { - return new LocalValidatorFactoryBean(); - } - @Bean public PluginManager pluginManager() { From 29855876a7bacd3ab1f524600fff9aada6dd20d7 Mon Sep 17 00:00:00 2001 From: Richard Eckart de Castilho Date: Tue, 24 Nov 2020 15:20:02 +0100 Subject: [PATCH 2/8] No issue: Ignore .gradle folder --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7a23306f0c7..9ab073d5689 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ webanno-doc/src/main/resources/public .checkstyle log4j2-dev.xml .factorypath +.gradle From 1955143489c4da60ea0626ae3a3240068f2d2f0f Mon Sep 17 00:00:00 2001 From: Richard Eckart de Castilho Date: Tue, 24 Nov 2020 15:20:55 +0100 Subject: [PATCH 3/8] #1806 - Display incoming and outgoing relations in the details panel - Only collect links that actually come from/go to annotations (not e.g. to AnnotationBase, FS, or TOP) --- .../webanno/api/dao/AnnotationSchemaServiceImpl.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/webanno-api-dao/src/main/java/de/tudarmstadt/ukp/clarin/webanno/api/dao/AnnotationSchemaServiceImpl.java b/webanno-api-dao/src/main/java/de/tudarmstadt/ukp/clarin/webanno/api/dao/AnnotationSchemaServiceImpl.java index 28cbf893ead..9d16c048cc7 100644 --- a/webanno-api-dao/src/main/java/de/tudarmstadt/ukp/clarin/webanno/api/dao/AnnotationSchemaServiceImpl.java +++ b/webanno-api-dao/src/main/java/de/tudarmstadt/ukp/clarin/webanno/api/dao/AnnotationSchemaServiceImpl.java @@ -1211,6 +1211,10 @@ public List getAttachedRels(AnnotationLayer aLayer, Annotati } for (AnnotationFS relationFS : CasUtil.select(cas, relationType)) { + if (!(relationFS instanceof AnnotationFS)) { + continue; + } + // Here we get the annotations that the relation is pointing to in the UI AnnotationFS sourceFS; if (relationSourceAttachFeature != null) { @@ -1265,6 +1269,10 @@ public List getAttachedLinks(AnnotationLayer aLayer, Annotat // them actually links to the current FS Type linkHost = CasUtil.getType(cas, linkFeature.getLayer().getName()); for (FeatureStructure linkFS : CasUtil.selectFS(cas, linkHost)) { + if (!(linkFS instanceof AnnotationFS)) { + continue; + } + List links = adapter.getFeatureValue(linkFeature, linkFS); for (int li = 0; li < links.size(); li++) { From 43a26eb10a74aefad0c6a5e239f71f9679734b04 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Klie Date: Tue, 24 Nov 2020 18:45:04 +0100 Subject: [PATCH 4/8] #1811 - Webanno does not boot in Intellij due to javax errors - Fix wicket bootstrap version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b0ceee5adb3..075340961cb 100644 --- a/pom.xml +++ b/pom.xml @@ -67,7 +67,7 @@ 9.1.0 9.1.0 9.0.0 - 5.0.2 + 5.0.3 3.0.1 3.0.1 3.0.4 From b98efb00d207b4ebe471b578482e8bd187c2c4fe Mon Sep 17 00:00:00 2001 From: Jan-Christoph Klie Date: Tue, 24 Nov 2020 22:27:12 +0100 Subject: [PATCH 5/8] #1811 - Webanno does not boot in Intellij due to javax errors - Fix dependency analysis --- webanno-webapp/pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/webanno-webapp/pom.xml b/webanno-webapp/pom.xml index 8cf2282a5e1..038cf2a93a1 100644 --- a/webanno-webapp/pom.xml +++ b/webanno-webapp/pom.xml @@ -463,7 +463,6 @@ com.googlecode.wicket-jquery-ui:wicket-jquery-ui-theme-uilightness org.springframework:spring-webmvc - org.springframework.boot:spring-boot-starter-tomcat org.springframework.boot:spring-boot-starter-web com.giffing.wicket.spring.boot.starter:wicket-spring-boot-starter org.springframework.boot:spring-boot-starter-validation From 19e9332752e39bd53a33e2c122fba8737b3e56ea Mon Sep 17 00:00:00 2001 From: Jan-Christoph Klie Date: Tue, 24 Nov 2020 22:47:42 +0100 Subject: [PATCH 6/8] #1811 - Webanno does not boot in Intellij due to javax errors - Fix dependency analysis --- webanno-webapp/pom.xml | 9 +++++---- .../tudarmstadt/ukp/clarin/webanno/webapp/WebAnno.java | 5 +---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/webanno-webapp/pom.xml b/webanno-webapp/pom.xml index 038cf2a93a1..70f44f2c9d3 100644 --- a/webanno-webapp/pom.xml +++ b/webanno-webapp/pom.xml @@ -252,11 +252,9 @@ - jakarta.validation - jakarta.validation-api - compile + org.springframework.boot + spring-boot-starter-tomcat - org.springframework.boot spring-boot-autoconfigure @@ -426,6 +424,9 @@ org.apache.maven.plugins maven-dependency-plugin + + org.apache.tomcat.embed:tomcat-embed-core + de.tudarmstadt.ukp.clarin.webanno:webanno-ui-annotation diff --git a/webanno-webapp/src/main/java/de/tudarmstadt/ukp/clarin/webanno/webapp/WebAnno.java b/webanno-webapp/src/main/java/de/tudarmstadt/ukp/clarin/webanno/webapp/WebAnno.java index a3d965b0c00..839d779681e 100644 --- a/webanno-webapp/src/main/java/de/tudarmstadt/ukp/clarin/webanno/webapp/WebAnno.java +++ b/webanno-webapp/src/main/java/de/tudarmstadt/ukp/clarin/webanno/webapp/WebAnno.java @@ -23,8 +23,7 @@ import java.util.Map; import java.util.Optional; -import javax.swing.JWindow; -import javax.validation.Validator; +import javax.swing.*; import org.apache.catalina.connector.Connector; import org.apache.uima.cas.impl.CASImpl; @@ -36,13 +35,11 @@ import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Primary; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.crypto.password.DelegatingPasswordEncoder; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.security.crypto.password.StandardPasswordEncoder; -import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean; import de.tudarmstadt.ukp.clarin.webanno.plugin.api.PluginManager; import de.tudarmstadt.ukp.clarin.webanno.plugin.impl.PluginManagerImpl; From 1a701ab8cd57add0f5479353a68ad8ed19f5215c Mon Sep 17 00:00:00 2001 From: Jan-Christoph Klie Date: Tue, 24 Nov 2020 23:09:42 +0100 Subject: [PATCH 7/8] #1811 - Webanno does not boot in Intellij due to javax errors - Fix dependency analysis --- webanno-webapp/pom.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/webanno-webapp/pom.xml b/webanno-webapp/pom.xml index 70f44f2c9d3..b6c103e2253 100644 --- a/webanno-webapp/pom.xml +++ b/webanno-webapp/pom.xml @@ -251,10 +251,6 @@ - - org.springframework.boot - spring-boot-starter-tomcat - org.springframework.boot spring-boot-autoconfigure From a2969b5c45dc7d9ae48b57d254ee1c75c76839c9 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Klie Date: Tue, 24 Nov 2020 23:32:50 +0100 Subject: [PATCH 8/8] #1811 - Webanno does not boot in Intellij due to javax errors - Fix dependency analysis --- .../java/de/tudarmstadt/ukp/clarin/webanno/webapp/WebAnno.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webanno-webapp/src/main/java/de/tudarmstadt/ukp/clarin/webanno/webapp/WebAnno.java b/webanno-webapp/src/main/java/de/tudarmstadt/ukp/clarin/webanno/webapp/WebAnno.java index 839d779681e..f4c49f7118e 100644 --- a/webanno-webapp/src/main/java/de/tudarmstadt/ukp/clarin/webanno/webapp/WebAnno.java +++ b/webanno-webapp/src/main/java/de/tudarmstadt/ukp/clarin/webanno/webapp/WebAnno.java @@ -23,7 +23,7 @@ import java.util.Map; import java.util.Optional; -import javax.swing.*; +import javax.swing.JWindow; import org.apache.catalina.connector.Connector; import org.apache.uima.cas.impl.CASImpl;