This error is occurring when consulting the maven version - maven

This error is occurring when consulting the maven version after installation.
mvn -v
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/cli/ParseException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at org.codehaus.plexus.classworlds.launcher.Launcher.getEnhancedMainMethod(Launcher.java:172)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:268)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.cli.ParseException
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)

Related

Exception in thread "main" java.lang.NoClassDefFoundError: com/github/tomakehurst/wiremock/core/Options

Getting this error whenever I am trying to run the jar file. How to fix this
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: com/github/tomakehurst/wiremock/core/Options
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: com.github.tomakehurst.wiremock.core.Options
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
The command that I am entering is
mvn clean compile package
java -jar target/filename-1.0-SNAPSHOT.jar

ClassNotFoundException for Ebean only in IntelliJ

I keep getting following exceptions when I run a Spring Application from IntelliJ
Caused by: java.lang.NoClassDefFoundError:
com/avaje/ebean/bean/EntityBean at
java.lang.ClassLoader.defineClass1(Native Method) at
java.lang.ClassLoader.defineClass(ClassLoader.java:763) at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) at
java.net.URLClassLoader.access$100(URLClassLoader.java:73) at
java.net.URLClassLoader$1.run(URLClassLoader.java:368) at
java.net.URLClassLoader$1.run(URLClassLoader.java:362) at
java.security.AccessController.doPrivileged(Native Method) at
java.net.URLClassLoader.findClass(URLClassLoader.java:361) at
java.lang.ClassLoader.loadClass(ClassLoader.java:424) at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) at
java.lang.ClassLoader.loadClass(ClassLoader.java:357) at
java.lang.Class.getDeclaredMethods0(Native Method) at
java.lang.Class.privateGetDeclaredMethods(Class.java:2701) at
java.lang.Class.getDeclaredMethods(Class.java:1975) at
org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:613)
at
org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:524)
at
org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:510)
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:247)
... 32 common frames omitted Caused by:
java.lang.ClassNotFoundException: com.avaje.ebean.bean.EntityBean at
java.net.URLClassLoader.findClass(URLClassLoader.java:381) at
java.lang.ClassLoader.loadClass(ClassLoader.java:424) at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) at
java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 51 common
frames omitted
however, if I try to run the jar from command line, it works fine. I turned on the Enhance Beans plugin. not even sure what could be the problem.
turns out my Ebean enhancement plugin is in mismatched version, upgraded to latest version and it is all working again.

Hudson 3.3.3 compatibility with maven 3.2.5 issue

recently we have upgraded our Oracle Server Bus to 12.2.1 with Maven 3.2.5 and also upgraded Hudson from 3.2.2 to 3.3.3.
When executing mvn clean install build of type Build a Maven 2/3 project (Legacy)
we are seeing errors.The same job runs with no errors in hudson 3.2.2 with maven 3.0.5.
Also tried with Build a free-style software job and that picking default maven home and running osb plug in issues.
Error:-
[CommonResources] $ /oraapp/java/jdk1.8.0_121/bin/java -cp /oraapp/hudson122_1/plugins/maven-plugin/WEB-INF/lib/maven3-agent-3.0.2.jar:/oraapp/1221/product/fmw/oracle_common/modules/org.apache.maven_3.2.5/boot/plexus-classworlds-2.5.2.jar org.jvnet.hudson.maven3.agent.Maven3Main /oraapp/1221/product/fmw/oracle_common/modules/org.apache.maven_3.2.5 /oraapp/config/domains/soadevt/servers/soa_server1/tmp/_WL_user/hudson1221/vwczzi/war/WEB-INF/lib/hudson-remoting-3.0.3.jar /oraapp/hudson122_1/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-3.0.2.jar 41686
<===[HUDSON REMOTING CAPACITY]===>channel started
Executing Maven: -B -f /oraapp/hudson122_1/jobs/CommonResources_S-TFSIHUB_1221/workspace/CommonResources/pom.xml clean install -Dgroupid=CSSIntegrationhub_CUSTSVC -Dversion=RL1.0_110717 -DoracleServerUrl=http://hostname:7001 -DoracleUsername=x2krkanu -DoraclePassword=******** -Dcustomization=CommonResources_DEV_CF.xml -DoracleHome=/oraapp/product/fmw
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:146)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:124)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
at hudson.remoting.UserRequest.perform(UserRequest.java:107)
at hudson.remoting.UserRequest.perform(UserRequest.java:41)
at hudson.remoting.Request$2.run(Request.java:276)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: org/apache/maven/cli/MavenLoggerManager
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:73)
... 17 more
Caused by: java.lang.ClassNotFoundException: org.apache.maven.cli.MavenLoggerManager
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
... 18 more
channel stopped
ERROR: Failed to parse POMs
hudson.util.IOException2: java.lang.reflect.InvocationTargetException
at hudson.maven.Maven3Builder.call(Maven3Builder.java:189)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
at hudson.remoting.UserRequest.perform(UserRequest.java:107)
at hudson.remoting.UserRequest.perform(UserRequest.java:41)
at hudson.remoting.Request$2.run(Request.java:276)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.Exception: java.lang.reflect.InvocationTargetException
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:150)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:124)
... 9 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:146)
... 10 more
Caused by: java.lang.NoClassDefFoundError: org/apache/maven/cli/MavenLoggerManager
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:73)
... 17 more
Caused by: java.lang.ClassNotFoundException: org.apache.maven.cli.MavenLoggerManager
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
... 18 more
An attempt to send an e-mail to empty list of recipients, ignored.
[DEBUG] Skipping watched dependency update for build: CommonResources_S-TFSIHUB_1221 #19 due to result: FAILURE
Notifying upstream projects of job completion`enter code here`
Finished: FAILURE

jenkins maven setPerCoreThreadCount

Jenkins ver. 1.538
With Maven 3.1.0 works just fine
With Maven 3.2.1 it get the following error
Jenkins installed Maven 3.2.1 itself (downloaded from Apache and extracted)
What is wrong?
Parsing POMs
maven31-agent.jar already up to date
maven31-interceptor.jar already up to date
maven3-interceptor-commons.jar already up to date
[project] $ /opt/jenkins/tools/hudson.model.JDK/java-1.7.0/bin/java -Xmx512m -Xms512m -Dfile.encoding=UTF-8 -XX:PermSize=128M -cp /opt/jenkins/maven31-agent.jar:/opt/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.1/boot/plexus-classworlds-2.5.1.jar:\opt\jenkins\tools\hudson.tasks.Maven_MavenInstallation\maven-3.2.1/conf/logging jenkins.maven3.agent.Maven31Main /opt/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven-3.2.1 /opt/jenkins/slave.jar /opt/jenkins/maven31-interceptor.jar /opt/jenkins/maven3-interceptor-commons.jar 41476
&lt===[JENKINS REMOTING CAPACITY]===&gtchannel started
...
ERROR: Failed to parse POMs
hudson.util.IOException2
at hudson.maven.Maven3Builder.call(Maven3Builder.java:178)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
... 9 more
Caused by: java.lang.Exception: java.lang.reflect.InvocationTargetException
at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:184)
... 14 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:181)
... 14 more
Caused by: java.lang.NoSuchMethodError: org.apache.maven.execution.MavenExecutionRequest.setPerCoreThreadCount(Z)V
at org.apache.maven.cli.DefaultMavenExecutionRequestBuilder.populateRequest(DefaultMavenExecutionRequestBuilder.java:978)
at org.apache.maven.cli.DefaultMavenExecutionRequestBuilder.getMavenExecutionRequest(DefaultMavenExecutionRequestBuilder.java:172)
at org.jvnet.hudson.maven3.launcher.Maven31Launcher.getMavenExecutionRequest(Maven31Launcher.java:153)
at org.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:130)
... 21 more
JENKINS-22486 was fixed with Maven plugin 2.8.
Works when I remove -T 1C Maven argument (one thread per core).

Error:java.lang.RuntimeException: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.ipc.SecureRpcEngine

I am trying to create HBASE table in java. The code works perfectly fine in localhost. But when I try to run it on cloudera, it throws following error
Exception in thread "main" java.lang.RuntimeException: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.ipc.SecureRpcEngine
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:867)
at org.apache.hadoop.hbase.ipc.HBaseRPC.getProtocolEngine(HBaseRPC.java:114)
at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:335)
at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:312)
at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:364)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getMaster(HConnectionManager.java:665)
at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:109)
at com.ab.academy.THBaseAdmin.createTable(THBaseAdmin.java:97)
at com.ab.academy.THBaseAdmin.main(THBaseAdmin.java:71)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.ipc.SecureRpcEngine
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:266)
at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:820)
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:865)
... 8 more
Can anyone please help me with this error?

Resources