Exceptions with Jmeter Perfmon Metrics Collector - java

I am facing the below exception when I try to run the Jmeter Load testing.
I need to monitor the CPU and memory of Web and App servers so I have added the Perfmon Metrics Collectors and configured the Server agents on the Web and App Servers
Jmeter Version-3.1 is being installed
Jars added:
When I execute the Jmeter Application I face the below exception:
ERROR - jmeter.JMeter: Uncaught exception: java.lang.NoClassDefFoundError: kg/apc/perfmon/metrics/MetricParams
at kg.apc.jmeter.perfmon.PerfMonCollector.initiateConnector(PerfMonCollector.java:200)
at kg.apc.jmeter.perfmon.PerfMonCollector.initiateConnectors(PerfMonCollector.java:175)
at kg.apc.jmeter.perfmon.PerfMonCollector.testStarted(PerfMonCollector.java:126)
at org.apache.jmeter.reporters.ResultCollector.testStarted(ResultCollector.java:348)
at kg.apc.jmeter.vizualizers.CorrectedResultCollector.testStarted(CorrectedResultCollector.java:28)
at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:204)
at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:325)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: kg.apc.perfmon.metrics.MetricParams
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

Now the Perfmon is working and i followed the below video tip
https://www.youtube.com/watch?v=F-dHii9qZD0
And installed the Plugin -
https://jmeter-plugins.org/downloads/file/JMeterPlugins-Standard-1.4.0.zip
The above plugins were missing and were not mentioned in the installation documents.

Related

Hadoop MR job - java.lang.ClassNotFoundException: au.com.bytecode.opencsv.CSVParser

Oozie workflow triggers a Hadoop Map Reduce job's Java class. I have added opencsv-2.3.jar and commons-lang-3-3.1 jar dependencies in my Eclipse project. The project builds successfully, however when moved it on Hadoop cluster I get an ClassNotFoundError even though my project contains jar.
Since this is a working existing legacy system, I do not wish to change the environment dependencies. Hence, i tried different combinations by adding libraries to classpath without success.
Tried: java.lang.NoClassDefFoundError: au/com/bytecode/opencsv/CSVReader - Upload File Vaadin
Checked with a MR client maven dependency - org.apache.hadoop:hadoop-mapreduce-client-common:2.6.0-cdh5.4.2.
The legacy jar in production env runs fine, but my project's compiled jar throws errors as follows:
oozie syslog:
INFO [uber-SubtaskRunner] org.apache.hadoop.mapreduce.Job: Running job: job_123213123123_35305
INFO [communication thread] org.apache.hadoop.mapred.TaskAttemptListenerImpl: Progress of TaskAttempt attempt_1548794054671_35304_m_000000_0 is : 1.0
INFO [uber-SubtaskRunner] org.apache.hadoop.mapreduce.Job: Job job_123213123123_35305 running in uber mode : false
INFO [uber-SubtaskRunner] org.apache.hadoop.mapreduce.Job: map 0% reduce 0%
INFO [uber-SubtaskRunner] org.apache.hadoop.mapreduce.Job: Task Id : attempt_123213123123_35305_m_000001_0, Status : FAILED
oozie stderr:
Error: java.lang.ClassNotFoundException: au.com.bytecode.opencsv.CSVParser
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:142)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:787)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:163)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1671)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
Please suggest if I am missing anything and what I can try.
opencsv-2.3.jar library was added from Eclipse Build Path as an external jar. I had to use mvn clean and build it. Finally, used "*jar-with-dependencies.jar" from the target folder which fixed the issue.

Hadoop 2.2.0 mapreduce job not running after upgrading from hadoop 1.0.4

I have upgraded my hadoop version from 1.0.4 to 2.2.0. The mapreduce job was running fine earlier. Now i have added almost all jars provided for hadoop 2.2.0. Still it gives me this exception. Let me know where i am doing wrong.
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/protobuf/ServiceException
at org.apache.hadoop.ipc.ProtobufRpcEngine.<clinit>(ProtobufRpcEngine.java:69)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at org.apache.hadoop.conf.Configuration.getClassByNameOrNull(Configuration.java:1659)
at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:1624)
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1718)
at org.apache.hadoop.ipc.RPC.getProtocolEngine(RPC.java:203)
at org.apache.hadoop.ipc.RPC.getProtocolProxy(RPC.java:537)
at org.apache.hadoop.hdfs.NameNodeProxies.createNNProxyWithClientProtocol(NameNodeProxies.java:328)
at org.apache.hadoop.hdfs.NameNodeProxies.createNonHAProxy(NameNodeProxies.java:235)
at org.apache.hadoop.hdfs.NameNodeProxies.createProxy(NameNodeProxies.java:139)
at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:510)
at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:453)
at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:136)
at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2433)
at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:88)
at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2467)
at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2449)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:367)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:166)
Caused by: java.lang.ClassNotFoundException: com.google.protobuf.ServiceException
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
Thanks in advance.
Please check your protobuf dependency. AFAIR Hadoop 2.x needs 2.5.x (please check your hadoop dependencies) and you could just take outdated one because of some external component.
Just for note: if your job uses org.apache.hadoop.mapreduce package it could be binary incompatible with Hadoop 2.x. You should recompile in this case. There should be no such issue with "old" API org.apache.hadoop.mapred. But I'd recommend recompile in any case.
Hope this at least help.

To use Android Studio encountered an error

I have Android Studio (Google I/O Preview).
I created an android project in Android Studio, and when I run it, the Studio tell me :
/usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java -ea -Didea.launcher.port=7534 -Didea.launcher.bin.path=/home/username/android-studio/bin -Dfile.encoding=UTF-8 -classpath /home/username/android-studio/lib/idea_rt.jar:/home/username/android-studio/plugins/junit/lib/junit-rt.jar:/home/username/android-studio/sdk/platforms/android-17/android.jar:/home/username/android-studio/sdk/platforms/android-17/data/res:/home/username/android-studio/sdk/tools/support/annotations.jar:/home/username/AndroidStudioProjects/test/test/libs/android-support-v4.jar com.intellij.rt.execution.application.AppMain com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 #/tmp/idea_junit6666593680737984739.tmp -socket52225
Exception in thread "main" java.lang.NoClassDefFoundError: junit/textui/ResultPrinter
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:188)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:113)
Caused by: java.lang.ClassNotFoundException: junit.textui.ResultPrinter
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 3 more
Process finished with exit code 1
What can I try?I've Googled this but haven't had much luck.
I don't know.When I use the Windows Version, I didn't meet any error;
Sounds like to me from your windows version has the missing class while your Linux Version does not.
Caused by: java.lang.ClassNotFoundException: junit.textui.ResultPrinter
Make sure you have this class in your library or where ever you are calling it for.
Hope this helps or points you to the right direction.

JMS Application giving error

I'm trying to run some applications (both my own and tutorial-applications) to help me understanding the basics of JMS. The code in the applications should be correct (for at least some). My added libraries are: Java EE 6 API Library - javaee-api-6.0.jar, jndi-properties.jar, appserv-rt.jar, javaee.jar and JDK 1.7(Default).
But with every single application I try to start, I get the following error message:
run:
java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/jms/JMSException
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2442)
at java.lang.Class.getMethod0(Class.java:2685)
at java.lang.Class.getMethod(Class.java:1620)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:488)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:480)
Exception in thread "main" Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)
Note that it does say BUILD SUCCESSFUL, but it's a runnable form class (with 2 textfields and a button) and I don't see my form.
I'm trying my applications in NetBeans 7.1.1 using GlassFish Server 3.1.2 1. I've configured the used connection factories and destination resources in the admin console.
As seen by other related questions, I've tried moving the javaee.jar up and down the classpath, and even removed it, with no results. The same goes for Java EE 6 API Library, but that jar is needed for my project.
Changing the javaee-api-6.0.jar to javaee-api-5.0.5.jar fixed it.

HttpClient on GAE

I'm really curious as how JIQL admin demo was able to run on Appengine cloud (appspot.com)
Whereas where I tried to port the available sources like the Guestbook and the Jqladmin app I get this error:
Caused by: java.lang.ClassNotFoundException: org.apache.commons.httpclient.HttpException
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:176)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 44 more
However, there is a running JiqlAdmin that runs on top of GAE and I have tried and was able to execute a SQL query:
http://jiqladmin.appspot.com/Jiqladmin.html
Just wondering what went wrong in my app.
Error seems obvious, you should add Apache commons Http client as dependency. Try putting that in your war/WEB_INF/lib or add it as dependency in Eclipse.

Categories

Resources