A lot of errors "Java Model Exception: Java Model Status" since migrating to Katalon 7.6.2

Hello,
since some time now (I think since I migrated katalonc.exe to version7.6.2), I have a lot of error messages which are filling my console.
Here is a sample of one of these error messages :

[2020-08-25T21:30:48.264] Java Model Exception: Java Model Status [1 [in ReflexShare [in ReflexShare.groovy [in test.common [in Keywords [in D%%Tools%Jenkins%workspace%Cimsup kanban 9.14%reflexCoreModel.prj]]]]] does not exist]
[2020-08-25T21:30:48.264] at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException(JavaElement.java:557)
[2020-08-25T21:30:48.264] at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:599)
[2020-08-25T21:30:48.264] at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:317)
[2020-08-25T21:30:48.264] at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:303)
[2020-08-25T21:30:48.264] at org.eclipse.jdt.internal.core.JavaElement.getChildren(JavaElement.java:258)
[2020-08-25T21:30:48.264] at org.eclipse.jdt.internal.core.JavaElement.getChildrenOfType(JavaElement.java:272)
[2020-08-25T21:30:48.264] at org.eclipse.jdt.internal.core.SourceType.getMethods(SourceType.java:420)
[2020-08-25T21:30:48.264] at com.kms.katalon.util.jdt.JDTUtil.findMethod(JDTUtil.java:47)
[2020-08-25T21:30:48.264] at com.kms.katalon.custom.parser.CustomKeywordParser.findJavadoc(CustomKeywordParser.java:299)
[2020-08-25T21:30:48.264] at com.kms.katalon.custom.parser.CustomKeywordParser.collectMethodJavadocs(CustomKeywordParser.java:292)
[2020-08-25T21:30:48.264] at com.kms.katalon.custom.parser.CustomKeywordParser.parseCustomKeywordFile(CustomKeywordParser.java:278)
[2020-08-25T21:30:48.264] at com.kms.katalon.custom.parser.CustomKeywordParser.parseProjectCustomKeywords(CustomKeywordParser.java:81)
[2020-08-25T21:30:48.264] at com.kms.katalon.controller.KeywordController.parseAllCustomKeywords(KeywordController.java:152)
[2020-08-25T21:30:48.264] at com.kms.katalon.controller.ProjectController.openProject(ProjectController.java:213)
[2020-08-25T21:30:48.264] at com.kms.katalon.execution.console.ConsoleMain.getProject(ConsoleMain.java:569)
[2020-08-25T21:30:48.264] at com.kms.katalon.execution.console.ConsoleMain.findProject(ConsoleMain.java:463)
[2020-08-25T21:30:48.264] at com.kms.katalon.execution.console.ConsoleMain.launch(ConsoleMain.java:291)
[2020-08-25T21:30:48.264] at com.kms.katalon.console.application.ConsoleApplicationStarter.start(ConsoleApplicationStarter.java:37)
[2020-08-25T21:30:48.264] at com.kms.katalon.application.Application.runConsole(Application.java:120)
[2020-08-25T21:30:48.264] at com.kms.katalon.application.Application.start(Application.java:84)
[2020-08-25T21:30:48.264] at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
[2020-08-25T21:30:48.264] at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
[2020-08-25T21:30:48.264] at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
[2020-08-25T21:30:48.264] at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
[2020-08-25T21:30:48.264] at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
[2020-08-25T21:30:48.264] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2020-08-25T21:30:48.264] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2020-08-25T21:30:48.264] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2020-08-25T21:30:48.264] at java.lang.reflect.Method.invoke(Method.java:498)
[2020-08-25T21:30:48.264] at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
[2020-08-25T21:30:48.264] at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
[2020-08-25T21:30:48.264] at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
[2020-08-25T21:30:48.264]
[2020-08-25T21:30:48.264]
[2020-08-25T21:30:48.264]
[2020-08-25T21:30:48.264] Tue Aug 25 21:30:48 CEST 2020

It seem it generate this message for every classes of my Keywords libraries :

Do you know where it could come from ?

Here is complete log from Jenkins :
katalon_log_error.txt (94.8 KB)

Hi @staniere,
Is this just the warning or it terminates your test execution?

Hi Huynguyen, this is only a warning. My execution goes normally after these warnings.

Hello, I have found the block of code which is throwing “Java Model Exception” in my common keyword

it is linked to code with FilenameFilter (see bellow) :

   FilenameFilter filtreFichiersGz = new FilenameFilter() {
   public boolean accept(File dir, String name) {
   return name.endsWith(".INH.gz");
   }};

do you know why Katalon is generating 10 times this “Java Model Exception: Java Model Status [1 [in ReflexShare2” when launching Katalon with this code ?

package test.common
import java.io.FilenameFilter
import java.nio.charset.Charset
import java.nio.charset.StandardCharsets
import java.nio.file.FileAlreadyExistsException
import java.nio.file.Files
import java.nio.file.Path
import java.nio.file.Paths
import java.util.regex.Matcher
import java.util.regex.Pattern
import java.util.stream.Collectors;
import java.util.stream.Stream

import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream;
import org.apache.commons.compress.utils.IOUtils;
import org.testng.Assert
import org.apache.commons.io.comparator.NameFileComparator
import org.apache.commons.io.filefilter.WildcardFileFilter
import org.apache.commons.lang3.StringUtils
import org.apache.commons.text.StringSubstitutor
import org.apache.pdfbox.pdmodel.PDDocument
import org.apache.pdfbox.text.PDFTextStripper

import com.github.difflib.DiffUtils
import com.github.difflib.patch.AbstractDelta
import com.github.difflib.patch.Patch
import com.kms.katalon.core.annotation.Keyword
import com.kms.katalon.core.configuration.RunConfiguration
import com.kms.katalon.core.util.KeywordUtil
import com.kms.katalon.core.webui.keyword.builtin.getCSSValueKeyword

import internal.GlobalVariable
import sun.security.x509.EDIPartyName

import com.kms.katalon.core.exception.StepErrorException as StepErrorException

public class ReflexShare2 {

@Keyword
public Path getEDILastFile(String folder, String inicli, String MinEdiSpid) {
// exemple de chemin : \sgecrfxdb02\ReflexShare023\Interfaces\InterfacesSortie\SCM_TEST
int timeout_recherche_fichier=GlobalVariable.reflexShare_wait_file_timeout

  File EDIfolder = new File(folder)
  
   assert EDIfolder.exists()
   
   FilenameFilter filtreFichiersGz = new FilenameFilter() {
   public boolean accept(File dir, String name) {
   return name.endsWith(".INH.gz");
   }};
  return null

}
}

Hello,
I finally solved these exception messages with following code :

> @Keyword

public Path EDIgetLastFile(String folder, String inicli, String MinEdiSpid) {
// exemple de chemin : \sgecrfxdb02\ReflexShare023\Interfaces\InterfacesSortie\SCM_TEST
int timeout_recherche_fichier=GlobalVariable.reflexShare_wait_file_timeout

  File EDIfolder = new File(folder)
  assert EDIfolder.exists()

  // Récupérer dernier fichier EDI (ultérieur à début du test)
  File ediGzFile=null
  File lastFile
  int cpt=0
  while (ediGzFile == null && cpt<timeout_recherche_fichier) {
  	lastFile = EDIfolder.listFiles({d, f-> f ==~ /.*\.INH\.gz/ } as FilenameFilter).sort{ it.toString() }.last()
  	println "lastFile : $lastFile"

  	// verification que le spid est ultérieur à celui du début de test (MinEdiSpid)
  	if (lastFile!=null && lastFile.name.substring(10,25).compareTo(MinEdiSpid) > 0) {
  		ediGzFile = lastFile
  		break
  	}
  	sleep(1000);
  	cpt++
  }

  if (ediGzFile==null) {
  	String lastFileName
  	if (lastFile == null) {
  		lastFileName = "AUCUN FICHIER "
  	} else {
  		lastFileName = lastFile.name
  	}
  	//KeywordUtil.markFailed("Fichier EDI $inicli avec spid > $MinEdiSpid non généré au bout de $timeout_recherche_fichier secondes dans $folder\nFichier le plus récent : $lastFile.name")
  	throw new StepErrorException("Fichier EDI $inicli avec spid > $MinEdiSpid non généré au bout de $timeout_recherche_fichier secondes dans $folder\nFichier le plus récent : $lastFileName")
  }

  String filename=ediGzFile.name
  println "fichier EDI trouvé : "+filename

  Path reportPath = Paths.get(RunConfiguration.getReportFolder())
  Path target = reportPath.resolve(filename)
  println "Copie du fichier EDI en local dans : $target"
  Path source = ediGzFile.toPath()

  // Copier fichier dans dossier report
  java.nio.file.Files.copy(source, target)

  // dezippage fichier INH.gz
  //decompressGZIP(target.toFile(), projectPath.resolve("fichier_EDI.INH").toFile())
  Path unzippedFile_path = decompressGZIP(target, reportPath)

  return unzippedFile_path

}