jcommander icon indicating copy to clipboard operation
jcommander copied to clipboard

AnnotationTypeMismatchException in jcommander

Open rpii opened this issue 6 years ago • 1 comments

There was a previous report of something similar to this issue but I am getting it with jcommander 1.72: This is code that was working before a dependency upgrade changed the jcommander version from 1.64. The file mentioned does exist.

5.2019 12:27:53.593,[15] SeLion-2.0.1-SNAPSHOT FINE Invoking SeLionGridLauncherV3 with arguments: [-role, hub, -port, 9502, -host, 127.0.0.1, -hubConfig, C:\Users\rpeter\.selion2\config\hubConfig.json, -selionConfig, C:\Users\rpeter\.selion2\config\SeLionConfig.json]
02.05.2019 12:27:58.378,[15] SeLion-2.0.1-SNAPSHOT SEVERE Incorrectly typed data found for annotation element public abstract java.lang.Class[] com.beust.jcommander.Parameter.validateValueWith() (Found data of type class java.lang.Class[class org.openqa.grid.internal.utils.configuration.validators.FileExistsValueValidator])
java.lang.annotation.AnnotationTypeMismatchException: Incorrectly typed data found for annotation element public abstract java.lang.Class[] com.beust.jcommander.Parameter.validateValueWith() (Found data of type class java.lang.Class[class org.openqa.grid.internal.utils.configuration.validators.FileExistsValueValidator])
	at sun.reflect.annotation.AnnotationTypeMismatchExceptionProxy.generateException(AnnotationTypeMismatchExceptionProxy.java:57)
	at sun.reflect.annotation.AnnotationInvocationHandler.invoke(AnnotationInvocationHandler.java:84)
	at com.sun.proxy.$Proxy1.validateValueWith(Unknown Source)
	at com.beust.jcommander.WrappedParameter.validateValueWith(WrappedParameter.java:60)
	at com.beust.jcommander.ParameterDescription.validateValueParameter(ParameterDescription.java:339)
	at com.beust.jcommander.ParameterDescription.addValue(ParameterDescription.java:240)
	at com.beust.jcommander.JCommander.processFixedArity(JCommander.java:895)
	at com.beust.jcommander.JCommander.processFixedArity(JCommander.java:870)
	at com.beust.jcommander.JCommander.parseValues(JCommander.java:721)
	at com.beust.jcommander.JCommander.parse(JCommander.java:340)
	at com.beust.jcommander.JCommander.parse(JCommander.java:319)
	at com.beust.jcommander.JCommander.<init>(JCommander.java:253)
	at com.paypal.selion.grid.SeLionGridLauncherV3$2.setConfiguration(SeLionGridLauncherV3.java:118)
	at com.paypal.selion.grid.SeLionGridLauncherV3.boot(SeLionGridLauncherV3.java:286)
	at com.paypal.selion.grid.ThreadedLauncher.run(ThreadedLauncher.java:134)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Not really sure what is causing this.

rpii avatar Feb 05 '19 21:02 rpii

Its seems to have to do with this parameter in Selenium:

  /**
   * Hub specific json config file to use. Defaults to {@code null}.
   */
  @Parameter(
    names = "-hubConfig",
    description =  "<String> filename: a JSON file (following grid2 format), which defines the hub properties",
    validateValueWith = FileExistsValueValidator.class
  )

rpii avatar Feb 06 '19 16:02 rpii