A JNI error has occurred, Exception in thread "main" java.lang.NoClassDefFoundError: com/beust/jcommander/ParameterException

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

A JNI error has occurred, Exception in thread "main" java.lang.NoClassDefFoundError: com/beust/jcommander/ParameterException

Niyati Acharya
I face following error when I try to run testng integration tests from my local host:

] Error: A JNI error has occurred, please check your installation and try again
   [testng] Exception in thread "main" java.lang.NoClassDefFoundError: com/beust/jcommander/ParameterException
   [testng] at java.lang.Class.getDeclaredMethods0(Native Method)
   [testng] at java.lang.Class.privateGetDeclaredMethods(Class.java:2729)
   [testng] at java.lang.Class.privateGetMethodRecursive(Class.java:3076)
   [testng] at java.lang.Class.getMethod0(Class.java:3046)
   [testng] at java.lang.Class.getMethod(Class.java:1812)
   [testng] at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
   [testng] at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
   [testng] Caused by: java.lang.ClassNotFoundException: com.beust.jcommander.ParameterException
   [testng] at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
   [testng] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
   [testng] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
   [testng] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
   [testng] ... 7 more


Any pointers on how to solve this?

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: A JNI error has occurred, Exception in thread "main" java.lang.NoClassDefFoundError: com/beust/jcommander/ParameterException

Saravanan Jothimani
Try changing your package name and check.

Thanks

Saravanan

On Fri, Mar 2, 2018 at 5:38 AM Niyati Acharya <[hidden email]> wrote:
I face following error when I try to run testng integration tests from my local host:

] Error: A JNI error has occurred, please check your installation and try again
   [testng] Exception in thread "main" java.lang.NoClassDefFoundError: com/beust/jcommander/ParameterException
   [testng] at java.lang.Class.getDeclaredMethods0(Native Method)
   [testng] at java.lang.Class.privateGetDeclaredMethods(Class.java:2729)
   [testng] at java.lang.Class.privateGetMethodRecursive(Class.java:3076)
   [testng] at java.lang.Class.getMethod0(Class.java:3046)
   [testng] at java.lang.Class.getMethod(Class.java:1812)
   [testng] at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
   [testng] at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
   [testng] Caused by: java.lang.ClassNotFoundException: com.beust.jcommander.ParameterException
   [testng] at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
   [testng] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
   [testng] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
   [testng] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
   [testng] ... 7 more


Any pointers on how to solve this?

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: A JNI error has occurred, Exception in thread "main"java.lang.NoClassDefFoundError: com/beust/jcommander/ParameterException

Krishnan Mahadevan
In reply to this post by Niyati Acharya

You should fix this:

   [testng] Exception in thread "main" java.lang.NoClassDefFoundError: com/beust/jcommander/ParameterException

 

By making sure that you aren’t excluding the dependencies that TestNG needs (JCommander is one of them) from your CLASSPATH.

 

 

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

Reply-To: <[hidden email]>
Date: Friday, March 2, 2018 at 5:38 AM
To: testng-users <[hidden email]>
Subject: [testng-users] A JNI error has occurred, Exception in thread "main"java.lang.NoClassDefFoundError: com/beust/jcommander/ParameterException

 

I face following error when I try to run testng integration tests from my local host:

 

] Error: A JNI error has occurred, please check your installation and try again

   [testng] Exception in thread "main" java.lang.NoClassDefFoundError: com/beust/jcommander/ParameterException

   [testng]               at java.lang.Class.getDeclaredMethods0(Native Method)

   [testng]               at java.lang.Class.privateGetDeclaredMethods(Class.java:2729)

   [testng]               at java.lang.Class.privateGetMethodRecursive(Class.java:3076)

   [testng]               at java.lang.Class.getMethod0(Class.java:3046)

   [testng]               at java.lang.Class.getMethod(Class.java:1812)

   [testng]               at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)

   [testng]               at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)

   [testng] Caused by: java.lang.ClassNotFoundException: com.beust.jcommander.ParameterException

   [testng]               at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

   [testng]               at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

   [testng]               at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)

   [testng]               at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

   [testng]               ... 7 more

 

 

Any pointers on how to solve this?

 

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
[hidden email].
To post to this group, send email to
[hidden email].
Visit this group at
https://groups.google.com/group/testng-users.
For more options, visit
https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.