diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index ec65c3b..976fda9 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -25,12 +25,12 @@
       fail-fast: false
       matrix:
         os: [ubuntu-latest, windows-latest]
-        java: [ 17, 21 ]
+        java: [ 21 ]
         experimental: [false]
-#        include:
-#          - java: 18-ea
-#            os: ubuntu-latest
-#            experimental: true
+        include:
+          - java: 22-ea
+            os: ubuntu-latest
+            experimental: true
 
     steps:
     - uses: actions/checkout@v3
diff --git a/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/ModelUtil.java b/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/ModelUtil.java
index 59aedbb..8b3a5be 100644
--- a/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/ModelUtil.java
+++ b/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/ModelUtil.java
@@ -19,6 +19,8 @@
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
 import java.net.URL;
 
 import org.eclipse.core.resources.IFile;
@@ -33,12 +35,11 @@
   //       used to detect an updated model, if model is updated,
   //       load it and replace the old one!
   
-  public static InputStream openModelIn(String modelPath) throws IOException {
+  public static InputStream openModelIn(String modelPath) throws IOException, URISyntaxException {
     InputStream modelIn = null;
     
     if (modelPath.startsWith("http://") || modelPath.startsWith("file://")) {
-      URL modelURL = new URL(modelPath);
-      
+      URL modelURL = new URI(modelPath).toURL();
       modelIn = modelURL.openStream();
     }
     else {
diff --git a/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/namefinder/MultiModelNameFinder.java b/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/namefinder/MultiModelNameFinder.java
index ff44d9f..bf46789 100644
--- a/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/namefinder/MultiModelNameFinder.java
+++ b/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/namefinder/MultiModelNameFinder.java
@@ -19,6 +19,7 @@
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.net.URISyntaxException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -109,7 +110,7 @@
         sequenceValidators[i] = new RestrictedSequencesValidator(modelTypes[i]);
         nameFinders[i] = new NameFinderME(model);
       } 
-      catch (IOException e) {
+      catch (IOException | URISyntaxException e) {
         // Error message should include model type
         throw new IOException("Failed to load a model, path:\n" + modelPathes[i] +
             "\nError Message:\n" + e.getMessage());
diff --git a/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/sentdetect/SentenceDetectorJob.java b/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/sentdetect/SentenceDetectorJob.java
index 04197b9..b52de98 100644
--- a/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/sentdetect/SentenceDetectorJob.java
+++ b/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/sentdetect/SentenceDetectorJob.java
@@ -19,6 +19,7 @@
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.net.URISyntaxException;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -86,7 +87,7 @@
       try (InputStream modelIn = ModelUtil.openModelIn(modelPath)) {
         SentenceModel model = new SentenceModel(modelIn);
         sentenceDetector = new SentenceDetectorME(model);
-      } catch (IOException e1) {
+      } catch (IOException | URISyntaxException e1) {
         return new Status(IStatus.CANCEL, OpenNLPPlugin.ID, "Failed to load sentence detector model!");
       }
     }
diff --git a/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/tokenize/TokenizerJob.java b/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/tokenize/TokenizerJob.java
index e8d1119..a61a45e 100644
--- a/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/tokenize/TokenizerJob.java
+++ b/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/tokenize/TokenizerJob.java
@@ -19,6 +19,7 @@
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.net.URISyntaxException;
 
 import org.apache.opennlp.caseditor.ModelUtil;
 import org.apache.opennlp.caseditor.OpenNLPPlugin;
@@ -76,7 +77,7 @@
         try (InputStream modelIn = ModelUtil.openModelIn(modelPath)) {
           TokenizerModel model = new TokenizerModel(modelIn);
           tokenizer = new TokenizerME(model);
-        } catch (IOException e1) {
+        } catch (IOException | URISyntaxException e1) {
           return new Status(IStatus.CANCEL, OpenNLPPlugin.ID, "Failed to load tokenizer model!");
         }
       }
diff --git a/corpus-server/corpus-server-impl/feature.xml b/corpus-server/corpus-server-impl/feature.xml
index 6406d39..c2139a5 100644
--- a/corpus-server/corpus-server-impl/feature.xml
+++ b/corpus-server/corpus-server-impl/feature.xml
@@ -22,7 +22,8 @@
 <features>
 	<!-- This feature.xml should be automatically be generated, all dependencies are duplicated here! -->
     <feature name="opennlp-corpus-server-impl" version="0.0.1.SNAPSHOT">
-        <bundle>mvn:org.apache.derby/derby/10.14.2.0</bundle>
+        <bundle>mvn:org.apache.derby/derby/10.17.1.0</bundle>
+        <bundle>mvn:org.apache.derby/derbytools/10.17.1.0</bundle>
         <bundle>mvn:org.apache.opennlp/corpus-server-impl/2.3.2-SNAPSHOT</bundle>
     </feature>
 </features>
\ No newline at end of file
diff --git a/corpus-server/corpus-server-impl/pom.xml b/corpus-server/corpus-server-impl/pom.xml
index d1b1052..bf38e6e 100644
--- a/corpus-server/corpus-server-impl/pom.xml
+++ b/corpus-server/corpus-server-impl/pom.xml
@@ -52,9 +52,16 @@
 		</dependency>
 
 		<dependency>
+			<groupId>org.apache.derby</groupId>
+			<artifactId>derby</artifactId>
+			<version>${derby.version}</version>
+			<scope>provided</scope>
+		</dependency>
+
+		<dependency>
 		    <groupId>org.apache.derby</groupId>
-		    <artifactId>derby</artifactId>
-		    <version>10.14.2.0</version>
+		    <artifactId>derbytools</artifactId>
+		    <version>${derby.version}</version>
 		    <scope>provided</scope>
 		</dependency>
 
diff --git a/corpus-server/pom.xml b/corpus-server/pom.xml
index 9282f69..cd21464 100644
--- a/corpus-server/pom.xml
+++ b/corpus-server/pom.xml
@@ -41,7 +41,10 @@
 	</modules>
 
   <properties>
-    <derby.version>10.14.2.0</derby.version>
+    <derby.version>10.17.1.0</derby.version>
+    <!-- A minimum JDK version of 21 is required for modern Derby versions -->
+    <maven.compiler.source>21</maven.compiler.source>
+    <maven.compiler.target>21</maven.compiler.target>
   </properties>
 
   <dependencyManagement>
diff --git a/opennlp-coref/src/main/java/opennlp/tools/cmdline/coref/CoreferencerTool.java b/opennlp-coref/src/main/java/opennlp/tools/cmdline/coref/CoreferencerTool.java
index dbd8dcc..fffaeb9 100644
--- a/opennlp-coref/src/main/java/opennlp/tools/cmdline/coref/CoreferencerTool.java
+++ b/opennlp-coref/src/main/java/opennlp/tools/cmdline/coref/CoreferencerTool.java
@@ -34,10 +34,10 @@
 import opennlp.tools.cmdline.TerminateToolException;
 import opennlp.tools.coref.DiscourseEntity;
 import opennlp.tools.coref.LinkerMode;
+import opennlp.tools.coref.TreebankLinker;
 import opennlp.tools.coref.mention.DefaultParse;
 import opennlp.tools.coref.mention.Mention;
 import opennlp.tools.coref.mention.MentionContext;
-import opennlp.tools.lang.english.TreebankLinker;
 import opennlp.tools.parser.Parse;
 import opennlp.tools.parser.chunking.Parser;
 import opennlp.tools.util.ObjectStream;
diff --git a/opennlp-similarity/src/main/java/opennlp/tools/apps/review_builder/MachineTranslationWrapper.java b/opennlp-similarity/src/main/java/opennlp/tools/apps/review_builder/MachineTranslationWrapper.java
index a27361a..2db4f12 100644
--- a/opennlp-similarity/src/main/java/opennlp/tools/apps/review_builder/MachineTranslationWrapper.java
+++ b/opennlp-similarity/src/main/java/opennlp/tools/apps/review_builder/MachineTranslationWrapper.java
@@ -20,6 +20,8 @@
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
+import java.net.URI;
+import java.net.URISyntaxException;
 import java.net.URL;
 import java.net.URLConnection;
 import java.net.URLDecoder;
@@ -31,12 +33,12 @@
 public class MachineTranslationWrapper  {
 	private static final String TRANSLATOR_URL = "http://mymemory.translated.net/api/get?q=";
 	
-	public String translate(String sentence, String lang2lang){
+	public String translate(String sentence, String lang2lang) {
 		if (sentence==null)
 			return null;
 		String request = TRANSLATOR_URL + sentence.replace(' ','+') + "&langpair="+lang2lang;//"en|es";
 		try {
-			URL urlC = new URL(request);
+			URL urlC = new URI(request).toURL();
 			URLConnection connection = urlC.openConnection();
 
 			String line;
@@ -53,7 +55,7 @@
 			String transl = findObject.getString("translatedText");
 			return URLDecoder.decode(transl, StandardCharsets.UTF_8);
 			
-		} catch (IOException | JSONException e) {
+		} catch (IOException | URISyntaxException | JSONException e) {
 			e.printStackTrace();
 			return null;
 		}
diff --git a/opennlp-similarity/src/main/java/opennlp/tools/doc_classifier/DocClassifierTrainingSetMultilingualExtender.java b/opennlp-similarity/src/main/java/opennlp/tools/doc_classifier/DocClassifierTrainingSetMultilingualExtender.java
index 99d070f..90501ad 100644
--- a/opennlp-similarity/src/main/java/opennlp/tools/doc_classifier/DocClassifierTrainingSetMultilingualExtender.java
+++ b/opennlp-similarity/src/main/java/opennlp/tools/doc_classifier/DocClassifierTrainingSetMultilingualExtender.java
@@ -21,6 +21,8 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
 import java.net.URL;
 import java.nio.channels.Channels;
 import java.nio.channels.ReadableByteChannel;
@@ -184,7 +186,7 @@
 			}
 		}
 
-		try (InputStream is = new URL(docUrl).openStream();
+		try (InputStream is = new URI(docUrl).toURL().openStream();
 				 OutputStream os = new FileOutputStream(destinationFile)) {
 
 			byte[] b = new byte[2048];
@@ -193,7 +195,7 @@
 			while ((length = is.read(b)) != -1) {
 				os.write(b, 0, length);
 			}
-		} catch (IOException e) {
+		} catch (IOException | URISyntaxException e) {
 			e.printStackTrace();
 		}
 	}
diff --git a/opennlp-similarity/src/main/java/opennlp/tools/parse_thicket/VerbNetProcessor.java b/opennlp-similarity/src/main/java/opennlp/tools/parse_thicket/VerbNetProcessor.java
index c0fdc46..2bf9089 100644
--- a/opennlp-similarity/src/main/java/opennlp/tools/parse_thicket/VerbNetProcessor.java
+++ b/opennlp-similarity/src/main/java/opennlp/tools/parse_thicket/VerbNetProcessor.java
@@ -21,10 +21,11 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -41,7 +42,8 @@
 public class VerbNetProcessor implements IGeneralizer<Map<String, List<String>>> {
 
 	static VerbNetProcessor instance;
-	static private String pathToVerbnet = null; //new File( "." ).getCanonicalPath()+"/src/test/resources";
+	private static String pathToVerbnet = null;
+	
 	public static VerbNetProcessor getInstance(String resourceDir) {
 		if (resourceDir==null)
 			try {
@@ -61,40 +63,14 @@
 	private VerbNetProcessor() {
 
 		try {
-			URL url = new URL ("file", null , pathToVerbnet ) ;
+			URL url = new URI("file", null , pathToVerbnet).toURL() ;
 			index = new VerbIndex ( url ) ;
 			index.open() ;
-
-		} catch (IOException e) {
+		} catch (IOException | URISyntaxException e) {
 			e.printStackTrace();
 		}
 	}
 
-
-	public IVerbClass getVerbNetForAVerb_____New(String verb){
-		Iterator<IVerbClass> iter = index.iterator();
-		while(iter.hasNext()){
-			IVerbClass v = iter.next();
-
-			if (v.getID().startsWith(verb))
-				return v;
-		}
-		iter = index.iterator();
-		while(iter.hasNext()){
-			IVerbClass v = iter.next();
-			if (!v.getMembers().isEmpty()){
-				for(IMember m: v.getMembers()) {
-					if (m.getName().equals(verb)){
-						return v;
-					}
-				}
-			}
-		}
-		return null;
-	}
-
-
-
 	public IVerbClass getVerbNetForAVerb(String verb){
 		for (IVerbClass v : index) {
 			if (v.getID().startsWith(verb))
@@ -113,9 +89,10 @@
 			v1 = getVerbNetForAVerb((String) o1);
 			v2 = getVerbNetForAVerb((String) o2);		
 			return generalize(v1, v2);
-		} else
+		} else {
+			v1 = (IVerbClass) o1;
+		}
 
-			v1 = (IVerbClass)o1;
 		v2 = (IVerbClass)o2;
 		List<Map<String, List<String>>> resList = new ArrayList<>();
 
@@ -257,7 +234,4 @@
 		System.out.println (res);
 	}
 
-
-
-
 }
diff --git a/opennlp-similarity/src/main/java/opennlp/tools/similarity/apps/WebSearchEngineResultsScraper.java b/opennlp-similarity/src/main/java/opennlp/tools/similarity/apps/WebSearchEngineResultsScraper.java
index f870259..9ff771d 100644
--- a/opennlp-similarity/src/main/java/opennlp/tools/similarity/apps/WebSearchEngineResultsScraper.java
+++ b/opennlp-similarity/src/main/java/opennlp/tools/similarity/apps/WebSearchEngineResultsScraper.java
@@ -18,8 +18,10 @@
 package opennlp.tools.similarity.apps;
 
 import java.io.BufferedReader;
+import java.io.IOException;
 import java.io.InputStreamReader;
-import java.net.URL;
+import java.net.URI;
+import java.net.URISyntaxException;
 import java.net.URLConnection;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -37,35 +39,23 @@
 
   protected static String fetchPageSearchEngine(String url) {
     System.out.println("fetch url " + url);
-    String pageContent = null;
     StringBuilder buf = new StringBuilder();
     try {
-      URLConnection connection = new URL(url).openConnection();
+      URLConnection connection = new URI(url).toURL().openConnection();
       connection.setReadTimeout(50000);
-      connection
-          .setRequestProperty(
-              "User-Agent",
+      connection.setRequestProperty("User-Agent",
               "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3");
       String line;
-      BufferedReader reader = null;
-      try {
-        reader = new BufferedReader(new InputStreamReader(
-            connection.getInputStream()));
-      } catch (Exception e) {
-        System.err.println("Unable to complete search engine request "+url);
-        //e.printStackTrace();
+      try (BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()))) {
+        while ((line = reader.readLine()) != null) {
+          buf.append(line);
+        }
+        return buf.toString();
       }
-
-      while ((line = reader.readLine()) != null) {
-        buf.append(line);
-      }
-
-    } catch (Exception e) {
-      // e.printStackTrace();
+    } catch (IOException | URISyntaxException e) {
       System.err.println("error fetching url " + url);
+      return null;
     }
-
-    return buf.toString();
   }
 
   private static List<String> extractURLsFromPage(String content, String domain) {
@@ -127,13 +117,11 @@
   }
   
   private static String formRequestURL(String query) {
-    String requestUrl = "http://www.hakia.com/search/web?q=" + query.replace(' ','+');
-    return requestUrl;
+    return "http://www.hakia.com/search/web?q=" + query.replace(' ','+');
   }
   
   private static String formRequestURLAlt(String query) {
-    String requestUrl = "https://www.google.com/search?q=" + query.replace(' ','+');
-    return requestUrl;
+    return "https://www.google.com/search?q=" + query.replace(' ','+');
   }
 
   public List<String> getURLsForWebDomain(String domain) {
@@ -185,7 +173,6 @@
   
   final Map<String, String[][]> cachedSearchEngineData = new HashMap<>();
   
-  
   private void buildCache(){
     cachedSearchEngineData.put("remember+to+buy+milk+tomorrow+for+details", new String[][]{
         {"Remember The Milk - Services / Remember The Milk for Email", "to Remember The Milk just by sending an email to a special address. Read this page to learn all the details, and if you have any questions or run into any .... email address] Buy birthday present for Mike today Pay the phone bill tomorrow Make"},
diff --git a/opennlp-similarity/src/main/java/opennlp/tools/similarity/apps/solr/Comment.java b/opennlp-similarity/src/main/java/opennlp/tools/similarity/apps/solr/Comment.java
index 45f6657..d7903e3 100644
--- a/opennlp-similarity/src/main/java/opennlp/tools/similarity/apps/solr/Comment.java
+++ b/opennlp-similarity/src/main/java/opennlp/tools/similarity/apps/solr/Comment.java
@@ -28,45 +28,41 @@
 import org.docx4j.relationships.Relationship;
 import org.docx4j.relationships.Relationships;
 import org.docx4j.wml.Comments;
-import org.docx4j.wml.ObjectFactory;
-
-//import util.RelationshipName;
 
 public class Comment {
 
-    private final WordprocessingMLPackage wordMlPackage;
-    private final boolean relSet = false;
+  private final WordprocessingMLPackage wordMlPackage;
+  private final boolean relSet = false;
 
-    public Comment(WordprocessingMLPackage wordMLPack) {
-        this.wordMlPackage = wordMLPack;
-        setCommentRel();
+  public Comment(WordprocessingMLPackage wordMLPack) {
+    this.wordMlPackage = wordMLPack;
+    setCommentRel();
+  }
+
+  private void setCommentRel() {
+    if (!commentRelSet()) {
+      CommentsPart cp;
+      try {
+        cp = new CommentsPart();
+        // Part must have minimal contents
+        wordMlPackage.getMainDocumentPart().addTargetPart(cp);
+      } catch (InvalidFormatException e) {
+        e.printStackTrace();
+      }
     }
+  }
 
-    private void setCommentRel() {
-        if (!commentRelSet()) {
-            CommentsPart cp;
-            try {
-                cp = new CommentsPart();
-                // Part must have minimal contents
-                org.docx4j.wml.ObjectFactory wmlObjectFactory = new ObjectFactory();
-                wordMlPackage.getMainDocumentPart().addTargetPart(cp);
-            } catch (InvalidFormatException e) {
-                e.printStackTrace();
-            }
-        }
-    }
+  private boolean commentRelSet() {
+    Relationship relShip;
+    boolean relSet = false;
+    if (!relSet) {
+      JaxbXmlPart<Relationships> jxpRelShips = wordMlPackage
+              .getMainDocumentPart().getOwningRelationshipPart();
+      Relationships pk = jxpRelShips.getJaxbElement();
 
-    private boolean commentRelSet() {
-        Relationship relShip;
-        boolean relSet = false;
-        if (!relSet) {
-            JaxbXmlPart<Relationships> jxpRelShips = wordMlPackage
-                    .getMainDocumentPart().getOwningRelationshipPart();
-            Relationships pk = jxpRelShips.getJaxbElement();
+      List<Relationship> mc = pk.getRelationship();
 
-            List<Relationship> mc = pk.getRelationship();
-
-            Iterator<Relationship> it = mc.iterator();
+      Iterator<Relationship> it = mc.iterator();
        /*     while (it.hasNext() && !relSet) {
                 relShip = it.next();
                 if (relShip.getValue().equalsIgnoreCase(
@@ -74,38 +70,37 @@
                     relSet = true;
                 }
             }*/
-        }
-        return relSet;
     }
-    
-    public static void main(String[] args) throws Exception {
+    return relSet;
+  }
 
-        // Create a package
-        WordprocessingMLPackage wmlPack = new WordprocessingMLPackage();
+  public static void main(String[] args) throws Exception {
 
-        // Create main document part
-        MainDocumentPart wordDocumentPart = new MainDocumentPart();      
-        
-        // Create main document part content
-        org.docx4j.wml.ObjectFactory factory = Context.getWmlObjectFactory();
-        org.docx4j.wml.Body  body = factory.createBody();      
-        org.docx4j.wml.Document wmlDocumentEl = factory.createDocument();
-        
-        wmlDocumentEl.setBody(body);
-        wordDocumentPart.setJaxbElement(wmlDocumentEl);
-        wmlPack.addTargetPart(wordDocumentPart);
-        
-        CommentsPart cp = new CommentsPart();
-        // Part must have minimal contents
-        Comments comments = factory.createComments();
-        cp.setJaxbElement(comments);
-        
-        wordDocumentPart.addTargetPart(cp);
-        
-        // Now you can add comments to your comments part,
-        // and comment refs in your main document part   
+    // Create a package
+    WordprocessingMLPackage wmlPack = new WordprocessingMLPackage();
 
-        wmlPack.save(new java.io.File(System.getProperty("user.dir")+ "/out-m.docx"));       
-      }
-    
+    // Create main document part
+    MainDocumentPart wordDocumentPart = new MainDocumentPart();
+
+    // Create main document part content
+    org.docx4j.wml.ObjectFactory factory = Context.getWmlObjectFactory();
+    org.docx4j.wml.Body  body = factory.createBody();
+    org.docx4j.wml.Document wmlDocumentEl = factory.createDocument();
+
+    wmlDocumentEl.setBody(body);
+    wordDocumentPart.setJaxbElement(wmlDocumentEl);
+    wmlPack.addTargetPart(wordDocumentPart);
+
+    CommentsPart cp = new CommentsPart();
+    // Part must have minimal contents
+    Comments comments = factory.createComments();
+    cp.setJaxbElement(comments);
+
+    wordDocumentPart.addTargetPart(cp);
+
+    // Now you can add comments to your comments part,
+    // and comment refs in your main document part
+
+    wmlPack.save(new java.io.File(System.getProperty("user.dir")+ "/out-m.docx"));
+  }
 }
diff --git a/opennlp-similarity/src/main/java/opennlp/tools/similarity/apps/solr/NLProgram2CodeRequestHandler.java b/opennlp-similarity/src/main/java/opennlp/tools/similarity/apps/solr/NLProgram2CodeRequestHandler.java
index 7a1d40e..42e2ecf 100644
--- a/opennlp-similarity/src/main/java/opennlp/tools/similarity/apps/solr/NLProgram2CodeRequestHandler.java
+++ b/opennlp-similarity/src/main/java/opennlp/tools/similarity/apps/solr/NLProgram2CodeRequestHandler.java
@@ -36,8 +36,7 @@
 	private final ParseTreeChunkListScorer parseTreeChunkListScorer = new ParseTreeChunkListScorer();
 	private final int MAX_QUERY_LENGTH_NOT_TO_RERANK = 3;
 	private static final String RESOURCES = "C:/workspace/TestSolr/src/test/resources";
-	//"/data1/solr/example/src/test/resources";
-	
+
 	final NL2Obj compiler = new NL2ObjCreateAssign(RESOURCES);
 
 	public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp){
diff --git a/opennlp-similarity/src/main/java/opennlp/tools/similarity/apps/solr/WordDocBuilder.java b/opennlp-similarity/src/main/java/opennlp/tools/similarity/apps/solr/WordDocBuilder.java
index 461dcd0..8e767c1 100644
--- a/opennlp-similarity/src/main/java/opennlp/tools/similarity/apps/solr/WordDocBuilder.java
+++ b/opennlp-similarity/src/main/java/opennlp/tools/similarity/apps/solr/WordDocBuilder.java
@@ -24,7 +24,8 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.net.URL;
+import java.net.URI;
+import java.net.URISyntaxException;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -205,7 +206,7 @@
     }
 
     public static void saveImageFromTheWeb(String imageUrl, String destinationFile) {
-			File f = new File(destinationFile);
+			final File f = new File(destinationFile);
 			if (!f.exists()) {
 				try {
 					f.createNewFile();
@@ -213,17 +214,16 @@
 					throw new RuntimeException(e);
 				}
 			}
-			try (InputStream is = new URL(imageUrl).openStream();
+			try (InputStream is = new URI(imageUrl).toURL().openStream();
 					 OutputStream os = new FileOutputStream(destinationFile)) {
 
 				byte[] b = new byte[2048];
 				int length;
-
 				while ((length = is.read(b)) != -1) {
 					os.write(b, 0, length);
 				}
 
-			} catch (IOException e) {
+			} catch (IOException | URISyntaxException e) {
 				e.printStackTrace();
 			}
 		}
diff --git a/opennlp-similarity/src/main/java/opennlp/tools/similarity/apps/utils/PageFetcher.java b/opennlp-similarity/src/main/java/opennlp/tools/similarity/apps/utils/PageFetcher.java
index 0d63e70..53e5a2e 100644
--- a/opennlp-similarity/src/main/java/opennlp/tools/similarity/apps/utils/PageFetcher.java
+++ b/opennlp-similarity/src/main/java/opennlp/tools/similarity/apps/utils/PageFetcher.java
@@ -20,7 +20,8 @@
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
-import java.net.URL;
+import java.net.URI;
+import java.net.URISyntaxException;
 import java.net.URLConnection;
 import java.util.logging.Logger;
 
@@ -31,6 +32,7 @@
 import org.apache.tika.parser.ParseContext;
 import org.apache.tika.parser.Parser;
 import org.apache.tika.sax.BodyContentHandler;
+import org.xml.sax.SAXException;
 
 public class PageFetcher {
   private static final Logger LOG = Logger.getLogger("opennlp.tools.similarity.apps.utils.PageFetcher");
@@ -50,7 +52,7 @@
 	  String pageContent = null;
     URLConnection connection;
     try {
-      connection = new URL(fetchURL).openConnection();
+      connection = new URI(fetchURL).toURL().openConnection();
       connection.setReadTimeout(DEFAULT_TIMEOUT);
       // parse method parameters
       Parser parser = new AutoDetectParser();
@@ -62,23 +64,22 @@
       parser.parse(connection.getInputStream(), handler, metadata, context);
 
       pageContent = handler.toString();
-    } catch (Exception e) {
+    } catch (IOException | URISyntaxException | SAXException | TikaException e) {
       LOG.severe(e.getMessage() + "\n" + e);
     }
-    return  pageContent;
+    return pageContent;
   }
-  
 
   public String fetchPage(final String url, final int timeout) {
     String fetchURL = addHttp(url);
     String pageContent = null;
     URLConnection connection;
     try {
-      connection = new URL(fetchURL).openConnection();
-      connection.setReadTimeout(DEFAULT_TIMEOUT);
+      connection = new URI(fetchURL).toURL().openConnection();
+      connection.setReadTimeout(timeout);
       pageContent = tika.parseToString(connection.getInputStream())
           .replace('\n', ' ').replace('\t', ' ');
-    } catch (IOException | TikaException e) {
+    } catch (IOException | URISyntaxException | TikaException e) {
       LOG.severe(e.getMessage() + "\n" + e);
     }
     return pageContent;
@@ -100,38 +101,20 @@
     LOG.info("fetch url " + url);
     StringBuilder buf = new StringBuilder();
     try {
-      URLConnection connection = new URL(url).openConnection();
+      URLConnection connection = new URI(url).toURL().openConnection();
       connection.setReadTimeout(DEFAULT_TIMEOUT);
-      connection
-          .setRequestProperty(
-              "User-Agent",
+      connection.setRequestProperty("User-Agent",
               "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3");
       String line;
-      BufferedReader reader = null;
-      try {
-        reader = new BufferedReader(new InputStreamReader(
-            connection.getInputStream()));
-      } catch (Exception e) {
-        // we don't always need to log trial web pages if access fails
-        LOG.severe(e.toString());
+      try (BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()))) {
+        while ((line = reader.readLine()) != null) {
+          buf.append(line);
+        }
       }
-
-      while ((line = reader.readLine()) != null) {
-        buf.append(line);
-      }
-
+    } catch (Exception e) {
+      // we don't always need to log trial web pages if access fails
+      LOG.severe(e.toString());
     }
-    // normal case when a hypothetical page does not exist
-    catch (Exception e) {
-
-      // LOG.error(e.getMessage(), e);
-      // System.err.println("error fetching url " + url);
-    }
-/*    try {
-      Thread.sleep(50); // do nothing 4 sec
-    } catch (InterruptedException e) {
-      e.printStackTrace();
-    } */
     return buf.toString();
   }
   
@@ -139,8 +122,7 @@
 	  PageFetcher fetcher = new PageFetcher();
 	  String content = fetcher.fetchPageAutoDetectParser("http://www.elastica.net/");
 	  System.out.println(content);
-	  content = fetcher.
-			  fetchPageAutoDetectParser("http://www.cnn.com");
+	  content = fetcher.fetchPageAutoDetectParser("http://www.cnn.com");
 	  System.out.println(content);
 	  content = new PageFetcher().fetchPage("https://github.com");
 	  System.out.println(content);
diff --git a/pom.xml b/pom.xml
index 64a2b32..3242d17 100644
--- a/pom.xml
+++ b/pom.xml
@@ -60,7 +60,7 @@
             <subscribe>users-subscribe@opennlp.apache.org</subscribe>
             <unsubscribe>users-unsubscribe@opennlp.apache.org</unsubscribe>
             <post>users@opennlp.apache.org</post>
-            <archive>http://mail-archives.apache.org/mod_mbox/opennlp-users/</archive>
+            <archive>https://mail-archives.apache.org/mod_mbox/opennlp-users/</archive>
         </mailingList>
 
         <mailingList>
@@ -68,21 +68,21 @@
             <subscribe>dev-subscribe@opennlp.apache.org</subscribe>
             <unsubscribe>dev-unsubscribe@opennlp.apache.org</unsubscribe>
             <post>dev@opennlp.apache.org</post>
-            <archive>http://mail-archives.apache.org/mod_mbox/opennlp-dev/</archive>
+            <archive>https://mail-archives.apache.org/mod_mbox/opennlp-dev/</archive>
         </mailingList>
 
         <mailingList>
             <name>Apache OpenNLP Commits</name>
             <subscribe>commits-subscribe@opennlp.apache.org</subscribe>
             <unsubscribe>commits-unsubscribe@opennlp.apache.org</unsubscribe>
-            <archive>http://mail-archives.apache.org/mod_mbox/opennlp-commits/</archive>
+            <archive>https://mail-archives.apache.org/mod_mbox/opennlp-commits/</archive>
         </mailingList>
 
         <mailingList>
             <name>Apache OpenNLP Issues</name>
             <subscribe>issues-subscribe@opennlp.apache.org</subscribe>
             <unsubscribe>issues-unsubscribe@opennlp.apache.org</unsubscribe>
-            <archive>http://mail-archives.apache.org/mod_mbox/opennlp-issues/</archive>
+            <archive>https://mail-archives.apache.org/mod_mbox/opennlp-issues/</archive>
         </mailingList>
     </mailingLists>
 
@@ -124,11 +124,11 @@
         <log4j2.version>2.20.0</log4j2.version>
 
         <uimaj.version>3.4.1</uimaj.version>
-        <jersey-client.version>2.39.1</jersey-client.version>
-        <jersey-server.version>2.39.1</jersey-server.version>
+        <jersey-client.version>2.41</jersey-client.version>
+        <jersey-server.version>2.41</jersey-server.version>
         <jettison.version>1.5.4</jettison.version>
         
-        <junit.version>5.9.2</junit.version>
+        <junit.version>5.10.1</junit.version>
 
         <enforcer.plugin.version>3.0.0-M3</enforcer.plugin.version>
         <checkstyle.plugin.version>3.2.0</checkstyle.plugin.version>
@@ -136,6 +136,7 @@
         <jacoco.maven.plugin>0.7.9</jacoco.maven.plugin>
         <maven.surefire.plugin>3.0.0-M5</maven.surefire.plugin>
         <maven.failsafe.plugin>3.0.0-M5</maven.failsafe.plugin>
+        <forbiddenapis.plugin>3.6</forbiddenapis.plugin>
         <mockito.version>3.9.0</mockito.version>
     </properties>
 
@@ -377,7 +378,7 @@
                 <plugin>
                     <groupId>de.thetaphi</groupId>
                     <artifactId>forbiddenapis</artifactId>
-                    <version>3.5.1</version>
+                    <version>${forbiddenapis.plugin}</version>
                     <configuration>
                         <failOnUnsupportedJava>false</failOnUnsupportedJava>
                         <bundledSignatures>
@@ -405,7 +406,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.10.1</version>
+                <version>3.11.0</version>
                 <configuration>
                     <release>${java.version}</release>
                     <compilerArgument>-Xlint</compilerArgument>
