Error=193 %1 is not a valid Win32 application

Please help to resolve this, I have to give demo to management to convince them to use this software company wide
Exception occurred executing command line
Cannot run program “C:\Program Files\diffblue-cover-cli-
2023.06.02\dcover” (in directory "path of file): CreateProcess error=193
%1 is not a valid Win32 application

Hi Hemal,

It looks like a general issue with running CLI version of Cover (used to integrate into Eclipse) on your device.

First, I would see if you are seeing the same error when running dcover --version in a command line environment. Looking at the error you are seeing some basic things to check is that; dcover is executable, and that none of the dependencies are corrupt.

Please let me know how this goes

Kind regards,

Jane @ Diffblue

Hello Jane,

I tried running this command in cmd and it gives me this error
" dcover is not recognized as an internal or external command, operable program or batch file."

Hi @Hemal

Have you added the location of dcover to your Path environment variable?
If not; please do so, then restart your CLI session, and try running dcover --version again

Kind regards,
Jane @ Diffblue

Hi Hemal,

Were you able to get that set up?
If not, we have a Windows installer available to you which could help you with your set up.
I would be happy to send this as part of your trial; we can have a 1:1 session to go through the installation together. How does that sound?

Kind regards,

Jane @ Diffblue

Hello Jane,
1:1 season sounds great.
Please let me know when it is good time to conduct this season.

Thanks & Regards,
Hemal

Great - I will contact you directly to organise

1 Like

@Jane_Walls i’m also facing the issue while using this as an external tool in Eclipse
can u help me pls …we are also at same stage i need to show this to my Project Manager in order to get for our team

Hi @Deep_Tomar
Of course, we would be happy to help you through this issue. It would be useful for us to know more information about the behaviour you are experiences as it may not be exactly the same as the original post. Are you please able to try running dcover --version in a command line environment?
This will isolate and show us directly what is happening when Eclipse is attempting to execute Cover, and therefore what the solution is.

Kind regards,
Jane @ Diffblue

PS C:\Users\Admin> dcover --version
2024.06.02-f*1c*04-licensed
PS C:\Users\Admin>

this is what i get

Hi @Deep_Tomar

Thank you - this shows us that Cover is on your path, and it has installed correctly in your system. This also means it is unlikely the same issue as the original post.
You mention you have had trouble running Cover from Eclipse.
Are you able to show me, and give more information about what issue Cover is having when running in Eclipse?

Kind regards,
Jane

Exception occurred executing command line.

Cannot run program “C:\Program Files\Diffblue\dcover” (in directory “C:\Users\Admin\Documents\BOXTRACKER\BoxTracker”): CreateProcess error=193, %1 is not a valid Win32 application

this is the error in Ecllipse while running

@Jane_Walls is it possible if we can get this resolve a bit faster so that i can use this and then give the demo to my team coz we actually are in hurry

Hi @Deep_Tomar

Please double-check the instructions at Using Cover CLI in Eclipse. The example given in the video is for a Linux system, where the executable is dcover, whereas you will want to choose dcover.bat for Windows.

Best regards
Peter Sear @ Diffblue

Hello @petersear

error
INFO
INFO Command: create
INFO Create tests for the specified package/class/method.
INFO
ERROR E012: Error when using build system
An error occurred when using the build system.
Read the output of your build system below to fix the problem.
Build command: cmd.exe /X /C “C:\Users\Admin\Documents\BOXTRACKER\BoxTracker\mvnw.cmd -B -D output=diffblue.effective-pom.output.xml -D mdep.outputFile=diffblue-cp.txt -D mdep.pathSeparator=#SEP# -D includeScope=test -D skipTestOptimizer=true -D mdep.outputProperty=build.classpath -D “maven.ext.class.path=C:\Program Files\Diffblue\cover-buildsystem-maven-spy-jar-with-dependencies.jar” validate org.apache.maven.plugins:maven-help-plugin:3.2.0:effective-pom -am”
Standard error: The system cannot find the file C:\Users\Admin\Documents\BOXTRACKER\BoxTracker.mvn\wrapper\maven-wrapper.properties.
Exception calling “DownloadFile” with “2” argument(s): “An exception occurred during a WebClient request.”
At line:1 char:282
+ … pe]::Tls12; $webclient.DownloadFile('https://repo.maven.apache.org/ma
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:slight_smile: , MethodInvocationException
+ FullyQualifiedErrorId : WebException
The system cannot find the file C:\Users\Admin\Documents\BOXTRACKER\BoxTracker.mvn\wrapper\maven-wrapper.properties.
Error: Could not find or load main class org.apache.maven.wrapper.MavenWrapperMain
Caused by: java.lang.ClassNotFoundException: org.apache.maven.wrapper.MavenWrapperMain
Exit code: 1
WARN E047: Unsupported Java version
Diffblue provides only community support for Java version 10.0.2.
Diffblue supports LTS versions Java 8 351+, Java 11.0.17+,
Java 17.0.5+, or Java 21.0.1+ for production use.
INFO

Hi @Deep_Tomar

Now you have Diffblue Cover running, which is progress!

Diffblue Cover uses various build system (Maven/Gradle) commands to identify features of the Java project and to build/run tests etc. In this case, the build system (Maven) has produced an error. By default, Cover will use the Maven (or Gradle) wrapper script, if available. It is possible that this is not what you want. If you don’t want it to use the wrapper script (mvnw.cmd), you can rename or remove it and try again. If you do want it to use the wrapper script, see below.

This Maven command has been run by Diffblue Cover:

“C:\Users\Admin\Documents\BOXTRACKER\BoxTracker\mvnw.cmd -B -D output=diffblue.effective-pom.output.xml -D mdep.outputFile=diffblue-cp.txt -D mdep.pathSeparator=#SEP# -D includeScope=test -D skipTestOptimizer=true -D mdep.outputProperty=build.classpath -D “maven.ext.class.path=C:\Program Files\Diffblue\cover-buildsystem-maven-spy-jar-with-dependencies.jar” validate org.apache.maven.plugins:maven-help-plugin:3.2.0:effective-pom -am”

You can run it outside Diffblue Cover (i.e. on the command line), which will likely show the same error. The error in question reported by Maven is:

Standard error: The system cannot find the file C:\Users\Admin\Documents\BOXTRACKER\BoxTracker.mvn\wrapper\maven-wrapper.properties.

Note also the warning about support Java versions:

Diffblue provides only community support for Java version 10.0.2.
Diffblue supports LTS versions Java 8 351+, Java 11.0.17+,
Java 17.0.5+, or Java 21.0.1+ for production use.

In general, you are likely to get better results by using one of the LTS versions of Java, although that may not be related to the build system error you’ve seen.

Best regards

Peter Sear @ Diffblue

@petersear
ERROR E054: No class files found
Diffblue Cover could not find any .class files for your project. This
usually means that your project has not yet been compiled.
Please run mvn install from the root of your project to ensure the project
is compiled, and all tests pass.
Depending on your project setup, additional configuration may be required.
See E - Environment Codes | Diffblue Documentation for further information on how to compile your
project and configure Diffblue Cover for validating your tests.
If this is a sub module you wish to exclude, use the --exclude-modules
argument to exclude this module.
WARN E047: Unsupported Java version
Diffblue provides only community support for Java version 10.0.2.
Diffblue supports LTS versions Java 8 351+, Java 11.0.17+,
Java 17.0.5+, or Java 21.0.1+ for production use.
WARN E066: Dependency incompatible with JDK
The following dependencies are incompatible with
the current JDK (JDK version: 10.0.2). Consider fixing this first
before tackling any of the other warnings.
Please change the following dependencies in your project:

org.mockito
mockito-core
4.11.0
test

WARN E066: Dependency incompatible with JDK
The following dependencies are incompatible with
the current JDK (JDK version: 10.0.2). Consider fixing this first
before tackling any of the other warnings.
Please change the following dependencies in your project:

org.springframework
spring-core
5.3.8
compile

WARN E107: Incompatible Spring dependency
Please update the following dependencies in your project:
Spring Security Web 6.2.3 may not be compatible with Spring Core 5.3.8
Spring Core 5.3.8 is better suited with:

org.springframework.security
spring-security-web
5.5.1
compile

Diffblue Cover may not be able to create Spring tests correctly.
WARN E107: Incompatible Spring dependency
Please update the following dependencies in your project:
Spring Boot 3.2.4 may not be compatible with Spring Core 5.3.8
Spring Core 5.3.8 is better suited with:

org.springframework.boot
spring-boot
2.5.2
compile

Diffblue Cover may not be able to create Spring tests correctly.
WARN E107: Incompatible Spring dependency
Please update the following dependencies in your project:
Spring Boot Test 3.2.4 may not be compatible with Spring Core 5.3.8
Spring Core 5.3.8 is better suited with:

org.springframework.boot
spring-boot-test
2.5.2
test

Diffblue Cover may not be able to create Spring tests correctly.
WARN E109: Max heap size too low
Diffblue Cover recommends 4096 MB of memory allocated but
detected only 1990 MB.
Please use the JVM_ARGS environment variable to increase the
maximum memory allocated:
JVM_ARGS=-Xmx4096m
WARN E004: No methods found to test
Please ensure the project has been built, that any specified entry points
exist, and that the patch (if given) is valid.
See https://diff.blue/E004 to resolve this issue.

Hi @Deep_Tomar

These are informative messages (output codes) from Diffblue Cover, with suggested actions, intended to help the user take the next steps.
I’m glad to see that you were able to configure Eclipse to run Cover, and that the Maven issues seen previously have been resolved.
If you have specific questions at a later time, please get in touch by starting a new topic in this forum.

Thanks and enjoy using Diffblue Cover!

Peter Sear @ Diffblue