parent project pitest failing but subprojects running fine if executed individually - gradlew

I am using gradle wrapper to run my pitest. I have parent build.gradle which has the pitest defined. My subprojects does not have any pitest. If I run the pitest on individual project for example gradlew clean :myproject:pitest. Then the pitest is successful. But if I try to run pitest from parent using gradlew clean pitest. Then it failes with the below error
> Task :pitest
4:57:34 PM PIT >> INFO : Verbose logging is disabled. If you encounter an
problem please enable it before reporting an issue.
4:57:35 PM PIT >> INFO : Sending 0 test classes to minion
4:57:35 PM PIT >> INFO : Sent tests to minion
4:57:35 PM PIT >> SEVERE : Error generating coverage. Please check that your
classpath contains JUnit 4.6 or above.
Exception in thread "main" org.pitest.util.PitError: Coverage generation
minion exited abnormally. Please check the classpath.
Please copy and paste the information and the complete stacktrace below when
reporting an issue
VM : Java HotSpot(TM) 64-Bit Server VM
Vendor : Oracle Corporation
Version : 25.152-b16
Uptime : 2390
Input ->
1 : -Dfile.encoding=windows-1252
2 : -Duser.country=US
3 : -Duser.language=en
4 : -Duser.variant
BootClassPathSupported : true
Please copy and paste the information and the complete stacktrace below when
reporting an issue
VM : Java HotSpot(TM) 64-Bit Server VM
Vendor : Oracle Corporation
Version : 25.152-b16
Uptime : 2391
Input ->
1 : -Dfile.encoding=windows-1252
2 : -Duser.country=US
3 : -Duser.language=en
4 : -Duser.variant
BootClassPathSupported : true
at
org.pitest.util.Unchecked.translateCheckedException(Unchecked.java:20)
at
org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage(DefaultCoverageGenerator.java:103)
at
org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage(DefaultCoverageGenerator.java:49)
at
org.pitest.mutationtest.tooling.MutationCoverage.runReport(MutationCoverage.java:115)
at
org.pitest.mutationtest.tooling.EntryPoint.execute(EntryPoint.java:116)
at
org.pitest.mutationtest.tooling.EntryPoint.execute(EntryPoint.java:49)
at
org.pitest.mutationtest.commandline.MutationCoverageReport.runReport(MutationCoverageReport.java:87)
at
org.pitest.mutationtest.commandline.MutationCoverageReport.main(MutationCoverageReport.java:45)
Caused by: org.pitest.util.PitError: Coverage generation minion exited
abnormally. Please check the classpath.
Please copy and paste the information and the complete stacktrace below when
reporting an issue
VM : Java HotSpot(TM) 64-Bit Server VM
Vendor : Oracle Corporation
Version : 25.152-b16
Uptime : 2390
Input ->
1 : -Dfile.encoding=windows-1252
2 : -Duser.country=US
3 : -Duser.language=en
4 : -Duser.variant
BootClassPathSupported : true
at
org.pitest.coverage.execute.DefaultCoverageGenerator.gatherCoverageData(DefaultCoverageGenerator.java:137)
at
org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage(DefaultCoverageGenerator.java:87)
Can any one direct what may be going wrong as I am using JUNIT 4.12 which is greater than 4.6 which is mentioned in the error.

In my experience, adding explicit dependency to Junit is needed although there are no tests in the submodule.
For me this fixed the problem:
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>

Related

Appcelerator Errors When Running Android

I'm having issues when trying to run the Android Emulator with Appcelerator. I'm new to this program and not having much luck finding an answer on how to fix this error. My app development knowledge up til now is Xcode and Apache Cordova. I've uninstalled/reinstalled Appcelerator along with different versions of Node with no luck. iPhone runs fine, so I'm guessing it's something with Java, but I can't figure out how or where to find it or fix it.
I'm running Appcelerator v7.1.2 with Node v8.16.0 and npm v6.4.1. Any help is greatly appreciated!
Below is what it is showing when I try to run for Android.
[INFO] : Deploy type: development
[INFO] : Building for target: emulator
[INFO] : Building for emulator: Pixel_2_XL_API_29
[INFO] : Targeting Android SDK API: 29
[INFO] : Building for the following architectures: arm64-v8a, armeabi-v7a, x86
[INFO] : Signing with keystore: /Users/user/Library/Application Support/Titanium/mobilesdk/osx/8.3.0.GA/android/dev_keystore (tidev)
[INFO] : Debugging disabled
[INFO] : Profiler disabled
[INFO] : Transpile javascript: true
[INFO] : Generate source maps: true
[INFO] : Forcing rebuild: /Users/user/Documents/Appcelerator_Studio_Workspace/MyFirstApp/build/android/build-manifest.json does not exist
[INFO] : Starting Hyperloop assembly
[INFO] : [Hyperloop] Generating system metabase
**[ERROR] Application Installer abnormal process termination. Process exit value was 1
[ERROR] : hyperloop:generateMetabase: Failed to generated metabase: warning: [options] bootstrap class path not set in conjunction with -source 6
error: Source option 6 is no longer supported. Use 7 or later.
error: Target option 6 is no longer supported. Use 7 or later.
[ERROR] : An error occurred during build after 735ms
[ERROR] : warning: [options] bootstrap class path not set in conjunction with -source 6
[ERROR] : error: Source option 6 is no longer supported. Use 7 or later.
[ERROR] : error: Target option 6 is no longer supported. Use 7 or later.**
As a different user has the same question and provided additional information it is likely that it is the same issue:
use Java 1.8
use Node 10.13.x
especially the Java version is required. Node might work in a newer version but the official supported version is 10.13.x at the moment

nettyserver not started for Play2 in intellij

I'm new to Intellij IDEA for Play/Scala and apparently need to do something to start NettyServer when I Run a project. My run configuration ran once OK. Then I killed the server, made some changes and tried to run again:
/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/bin/java -Dfile.encoding=UTF8 -Djline.terminal=none -Dsbt.log.noformat=true -Dsbt.global.base=/private/var/folders/97/16yb2phd7sz78q0sf5wl7z200000gn/T/sbt-global-pluginstub -Xms512M -Xmx1024M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M -classpath "/Users/j/Library/Application Support/IntelliJIdea2016.1/Scala/launcher/sbt-launch.jar" xsbt.boot.Boot run
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
[info] Loading project definition from /Users/jch/IdeaProjects/editor/project
[info] Set current project to ...
--- (Running the application, auto-reloading is enabled) ---
[error] p.c.s.NettyServer - Failed to listen for HTTP on /0.0.0.0:9000!
[error] (compile:run) play.runsupport.ServerStartException
[error] Total time: 3 s, completed Apr 4, 2016 11:24:31 AM
Process finished with exit code 1
What am I missing?
My Mistake. - Apparently NettyServer could not start because it was already running. When I browse to localhost:9000 it's up. A better error message would have helped, and IDEA apparently did not autoload into my browser because of the NettyServer exit code.

Sonar for Eclipse: unable to run local analysis

I have successfully installed sonar plug-in for eclipse, however when I try to 'Run Local Analysis' for sonar, eclipse gives an error saying:
An internal error occurred during: "Sonar Analysis".
Unable to create markers
and console for Sonar has following info printed:
Usage: javaw [-options] class [args...]
(to execute a class)
or javaw [-jar] [-options] jarfile [args...]
(to execute a jar file)
where options include:
-cp -classpath
set search path for application classes and resources
-D=
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version
-version:
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -no-jre-restrict-search
include/exclude user private JREs in the version search
-agentlib:[=]
load native agent library , e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:[=]
load native agent library by full pathname
-javaagent:[=]
load Java programming language agent, see java.lang.instrument
-? -help print this help message
-X print help on non-standard options
-splash: show splash screen with specified image
-ea[:...|:]
-enableassertions[:...|:]
enable assertions
-da[:...|:]
-disableassertions[:...|:]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
Plz help with how to proceed for Local analysis in eclipse.
[Update: Version Details]
Eclipse: Indigo (3.7.1)
Sonar Plug-in: 3.0.0
Sonar(Server): 3.4.1
Sonar Web Service Client: 3.4.0
Java: 1.4.1 ('Java EE IDE' property in Eclipse Features)
Local Java Installation: 1.6

How to change JDK version in Cloudbee Buildhive

i am trying to created a build in CloubBees BuildHive. my maven is using 1.7 JDK and when i try to build i am getting following exception
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Failure executing javac, but could not parse the error:
javac: invalid target release: 1.7
Usage: javac <options> <source files>
use -help for a list of possible options
Anyone tell me how to change the JDK version ?
Duplicate of Does buildhive from CloudBees have JDK 7 I think. It is on our to-do list to set JDK 7 as the default.

How to analyze low-level OSGi problems during tycho test execution?

When executing JUnit test with tycho-surefire-plugin, tycho forks an equinox runtime.
In rare cases it may happen that some bundles in the OSGi test runtime cannot be resolved/started (e.g. package uses conflicts).
If you read the debug log (maven CLI option -X), you will find something like
!ENTRY org.eclipse.osgi 2 0 2012-10-08 16:41:31.635
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2012-10-08 16:41:31.635
An error has occurred. See the log file
C:\mytestproject.tests\target\work\configuration\1349705136008.log.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12:03.181s
[INFO] Finished at: Mon Oct 08 16:17:16 CEST 2012
[INFO] Final Memory: 20M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:0.15.0:test (default-test) on project mytestproject.tests: An unexpected error occured (return c
ode 13). See log for details. -> [Help 1]
The eclipse console log does not provide enough information in case of package uses conflicts.
How can I analyze the bundles in the OSGi test runtime forked by tycho?
start tests in remote debug mode (simply specify -DdebugPort=8000 on the CLI) and start the OSGi console on a local port, e.g. 1234:
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<systemProperties>
<osgi.console>1234</osgi.console>
</systemProperties>
</configuration>
</plugin>
Set a breakpoint in one of your test classes or in org/eclipse/tycho/surefire/osgibooter/OsgiSurefireBooter if tests are not even started. Then,
telnet localhost 1234
and you can use the usual OSGi console commands like ss, diag, bundle etc. to analyze the problem "in vivo".
Alternatively you can run with -consolelog or set the eclipse.consoleLog property to true property. If you're running with Tycho, you can use <argLine>-Declipse.consoleLog=true</argLine>.