Code Coverage of DDSPublisher.java using EMMA - publish-subscribe

I am working in Linux platform ,implementing Opensplice DDS with Java using Eclipse as IDE. Publishesr and Subscribers of main classes are getting executed .Currently working in code coverage part using the tool EMMA .I have created the build file using ant script and created the targets for EMMA,At present 'm facing issue as mentioned below,
This is the content at console:
[emmajava] # A fatal error has been detected by the Java Runtime Environment:
[emmajava] #
[emmajava] # SIGSEGV (0xb) at pc=0x00f3a97a, pid=3580, tid=2472213360
[emmajava] #
[emmajava] # JRE version: 6.0_20-b20
[emmajava] # Java VM: OpenJDK Client VM (19.0-b06 mixed mode linux-x86 )
[emmajava] # Derivative: IcedTea6 1.9.1
[emmajava] # Distribution: Custom build (Wed Oct 13 22:53:35 UTC 2010)
[emmajava] # Problematic frame:
[emmajava] # V [libjvm.so+0x20b97a]
[emmajava] #
I would like to know how to use the Opensplice DDS with EMMA coverage?
Should i wanna change any of the configurations ?Finally is it possible to make code
coverage in DDS implementation ? If any body else is aware about this issue, please guide me to proceed it.
Thanks in advance

Related

Spark Scala code failing with exitCode -1073741515 while writing file

I am getting below Error while trying to run simple program with spark scala in IntelliJ
Error:
Caused by: ExitCodeException exitCode=-1073741515:
Code:
file.saveAsTextFile("out/output.txt")
Environment:
Using Below SW/Versions
Java - 1.8.0_322
Scala - 2.12.10
Spark - 3.0.3 with hadoop 2.7
HADOOP_HOME, JAVA_HOME and SPARK_HOME are set accordingly.
winutils.exe and hadoop.dll are present at C:\winutils
Gradle Entry: implementation 'org.apache.spark:spark-core_2.12:3.0.3'
Have you tried downloading and installing Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package from the Official Microsoft Download Center?
https://www.microsoft.com/en-au/download/details.aspx?id=26999

How to import netty to eclipse without pom errors?

I want to learn the source code of netty, and I import the source code of netty from github, I use maven to import these code but there are some pom errors here when I import the project:
I searched the Internet but I can't get any useful information.So I have nothing to do but to ask for help.
ps,
I attempt to follow the steps here:
and the solution is :
Set up Eclipse with M2E and Java 7/8
Ensure to use the 64-bit version of Eclipse.
Download os-maven-plugin and put it into /plugins (Eclipse 4.5) or /dropins (Eclipse 4.6) directory to work around the problem where m2e does not evaluate an extension specified in our pom.xml. (Unlike its name, it's both a Maven plugin and an Eclipse plugin.)
Import the project via the 'File → Import... → Existing Maven Projects' menu.
Netty project Maven pom.xml settings dictate use of Java SE 1.6, while implicitly using Java 7/8 (1.7/1.8) features if present. This may result in compilation errors in Eclipse. There are two ways to work around this problem:
Look in the 'Window → Preferences → Installed JRE' menu:
Make sure you have Java 7/8 installation available under 'Installed JRE'
Map this Java 7/8 installation onto Java 6: 'Installed JRE → Execution Environments → Java SE 1.6'
Alternatively, Java 7/8 JRE can be selected on per-project basis for each Netty module.
I follow these steps but I cant't solve this problem.
could you please help me to solve this problem? I look forward to your help.
my OS information:
ProductName: Mac OS X
ProductVersion: 10.13.3
BuildVersion: 17D102
my jdk information:
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
my eclipse information:
my maven information:
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-04T03:39:06+08:00)
Maven home: /Users/mingxing/development/tools/apache-maven-3.5.0
Java version: 1.8.0_131, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.3", arch: "x86_64", family: "mac"

java.io.InvalidClassException: scala.reflect.ClassTag$$anon$1; local class incompatible:: Spark

I'm getting below exception while counting the file rows :
Actually code is working fine if i executes shell in local mode :
But If we try shell with Yarn-client mode -- the below exceptions stack will be returning.
I've been investigated a little bit for the same problem. some are suggesting it's different JVM compatibility issue . It might be true because in other environment am using JDK6 it is working perfect in both local and Yarn-Client modes . In Another Environment am using JDK7 . here am facing the problem while running in yarn-client mode :
java.io.InvalidClassException: scala.reflect.ClassTag$$anon$1; local class incompatible: stream classdesc serialVersionUID = -4937928798201944954, local class serialVersionUID = -8102093212602380348
FYI JAVA - :In Environment am facing the problem
java -version
java version "1.7.0"
Java(TM) SE Runtime Environment (build pxa6470_27sr2fp10-20141218_02(SR2 FP10))
IBM J9 VM (build 2.7, JRE 1.7.0 Linux amd64-64 Compressed References 20141215_227395 (JIT enabled, AOT enabled)
J9VM - R27_Java727_SR2_20141215_1631_B227395
JIT - tr.r13.java_20141003_74587.07
GC - R27_Java727_SR2_20141215_1631_B227395_CMPRSS
J9CL - 20141215_227395)
JCL - 20141217_01 based on Oracle jdk7u75-b12
In another old Environment : it is working fine
java -version
java version "1.6.0_91"
Java(TM) SE Runtime Environment (build 1.6.0_91-b31)
Java HotSpot(TM) 64-Bit Server VM (build 20.91-b07, mixed mode
From here I had moved the code to new Environment : If we suspects that it is incompatible version Issue then it shouldn't work in local mode too. Please clarify my questions:
I fixed it By after setting JAVA_HOME to 1.8
export JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk-1.8.0.31-1.b13.el6_6.x86_64/
export PATH=$JAVA_HOME/bin:$PATH
I also experienced the same issue, my cluster using RHEL and jre-1.7.1-ibm.x86_64.
After spending many hours, I found that the cause of the problem came from the JVM
Solution
I was able to solve this issue by changing the jvm from jre-1.7.1-ibm.x86_64
to java-1.8.0-openjdk-1.8.0.25-3.b17.el6_6.x86_64.

Eclipse+PyDev crash

I use Eclipse IDE for Java Developers Kepler Release 2(Build id: 20140224-0627)and PyDev 3.5 under a virtualenv.
But when I try to new a python package or .py file. It crashed....
Information is:
*sys-package-mgr*: processing new jar, '/chimerahomes/jingtao/eclipse/plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar'
*sys-package-mgr*: processing new jar, '/usr/lib/jvm/java-1.7.0-oracle-1.7.0.55.x86_64/jre/lib/resources.jar'
*sys-package-mgr*: processing new jar, '/usr/lib/jvm/java-1.7.0-oracle-1.7.0.55.x86_64/jre/lib/rt.jar'
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x0000000000000000, pid=7059, tid=47524454697280
#
# JRE version: Java(TM) SE Runtime Environment (7.0_55-b13) (build 1.7.0_55-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.55-b03 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C 0x0000000000000000
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
This appears to be a bug in java itself (i.e.: PyDev has no compiled source code, only plain java -- although it's possible it could be in Eclipse too).
My suggestion is trying with a different java 7/8 vm.
Alternatively you can try on LiClipse: http://brainwy.github.io/liclipse/ (which comes with a bundled jvm) -- the only thing is that you may want to install JDT on top of it if you are also working with java.

Setup eclipse + svn

I've got a Java project versioned by svn and trying to configure the build for linux. On my work computer all works fine and I committed the changes. To both my home computers however I get this error which seems like some trivial setup problem:
Exception in thread "main" java.lang.NoClassDefFoundError: adventure/Adventure
Caused by: java.lang.ClassNotFoundException: adventure.Adventure
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)
Could not find the main class: adventure.Adventure. Program will exit.
Did I forget to add the src to some path? The way it looks in ubuntu is here:
It was committed with Java 7 but on the ubuntu I have only Java 6. Could it still work or do I need to completely harmonize Java versions?
Update
I cleaned the build path and set up the JARs again and I'm going to add the Java 6 JRE since I don't use any Java 7 specific features so it should work if I only get the JRE set up. But I don't know how to add my JRE with linux? I can try also with windows and then maybe I can add a suitable JRE. Now there is a build problem:
Thanks but now I have no JDK which looks like the main problem and just a build problem:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
String cannot be resolved to a type
at adventure.Adventure.main(Adventure.java:74)
My Java version seems well though:
$ java -version
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.1) (6b24-1.11.1-4ubuntu3)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
The installed JRE is OpenJDK 6 that should work:
My classpath variables look like this
Usually Java projects should be committed without the bin folder (set it to ignore).
It looks like your project was checked-in including the compiled class files from Java 7 with of course can not be loaded by Java 6.
You should proceed as follows:
Open a terminal and change into your project directory
execute svn delete bin
execute svn propset svn:ignore bin .
Does anybody how to do this from whithin Eclipse?
Switch back to Eclipse and execute "Clean" command on the project so that Eclipse re-builds it using your Java version.
But I don't know how to add my JRE with linux?
You surely know Preferences->Java->Installed JREs. Please browse for your Java installations in usr/lib/jvm sub directories.