Unable to load class "ConfigureJob.java" due to exception: java.lang.ClassNotFoundException

90 views
Skip to first unread message

Emanuele Benza

unread,
Sep 25, 2020, 4:17:09 PM9/25/20
to Randoop Developers

Hi Michael,

I'm having a problem getting randoop to generate test classes. I am using version 4.2.4 and after inserting my .class file inside a folder I launched randoop with this command: java -classpath C: \ Users \ Administrator \ Desktop \ randoop-4.2.4 \ bin; C: \ Users \ Administrator \ Desktop \ randoop-4.2.4 \ randoop-all-4.2.4.jar randoop.main.Main gentests --testclass = ConfigureJob.java The ConfigureJob.class file is present in the path C: \ Users \ Administrator \ Desktop \ randoop-4.2.4 \ bin The mistake that gets me out is

Randoop for Java version 4.2.4.
Unable to load class "ConfigureJob.java" due to exception: java.lang.ClassNotFoundException: ConfigureJob.java
Will try to generate tests for 0 out of 1 classes.
You provided no methods to test, so no tests for them can be generated.
Model with hashcode 1273765644:
  classTypes = [java.lang.Object]
  inputTypes = []
  coveredClassesGoal = []
  classLiteralMap = {}
  annotatedTestValues = []
  contracts = ContractSet[size=12]
    arity 1: [randoop.contract.EqualsReflexive@29ca901e, randoop.contract.EqualsToNullRetFalse@5649fd9b, randoop.contract.EqualsReturnsNormally@6adede5, randoop.contract.CompareToReflexive@2d928643, randoop.contract.SizeToArrayLength@5025a98f]
    arity 2: [randoop.contract.EqualsSymmetric@49993335, randoop.contract.EqualsHashcode@20322d26, randoop.contract.CompareToAntiSymmetric@192b07fd, randoop.contract.CompareToEquals@64bfbc86]
    arity 3: [randoop.contract.EqualsTransitive@64bf3bbf, randoop.contract.CompareToSubs@55d56113, randoop.contract.CompareToTransitive@148080bb]

  omitMethods = [^org.apache.commons.math3.analysis.differentiation., ^org.apache.commons.math3.analysis.integration., \bensuresCapacity\b, ^\Qcom.google.common.collect.Iterators.cycle(, ^\Qorg.apache.commons.math4.genetics.GeneticAlgorithm.getRandomGenerator()\E$, ^\Qorg.apache.commons.math4.util.FastMath.random()\E$, ^\Qjava.util.Date.<init>()\E$, ^\Qorg.joda.time.DateTime.now()\E$, ^\Qorg.joda.time.LocalDate.<init>\E$, ^\Qnew org.joda.time.Partial.<init>()\E$, ^\Qjava.io.File.list()\E$, ^\Qjava.io.File.list(java.io.FilenameFilter)\E$, ^\Qjava.io.File.listFiles()\E$, ^\Qjava.io.File.listFiles(java.io.FileFilter)\E$, ^\Qjava.io.File.listFiles(java.io.FilenameFilter)\E$, ^\Qjava.io.File.listRoots()\E$, ^\Qjava.lang.Class.getSigners()\E$, ^\Qjava.lang.Object.hashCode()\E$, ^\Qjava.lang.String.hashCode()\E$, ^\Qjava.lang.System.clearProperty(java.lang.String)\E$, ^\Qjava.lang.System.console()\E$, ^\Qjava.lang.System.currentTimeMillis()\E$, ^\Qjava.lang.System.getProperties()\E$, ^\Qjava.lang.System.getProperty(java.lang.String)\E$, ^\Qjava.lang.System.getProperty(java.lang.String, java.lang.String)\E$, ^\Qjava.lang.System.getSecurityManager()\E$, ^\Qjava.lang.System.getenv()\E$, ^\Qjava.lang.System.getenv(java.lang.String)\E$, ^\Qjava.lang.System.identityHashCode(java.lang.Object)\E$, ^\Qjava.lang.System.inheritedChannel()\E$, ^\Qjava.lang.System.mapLibraryName(java.lang.String)\E$, ^\Qjava.lang.System.nanoTime()\E$, ^\Qjava.lang.System.setProperty(java.lang.String, java.lang.String)\E$, ^\Qjava.lang.reflect.Method.hashCode()\E$, ^\Qjava.text.BreakIterator.getAvailableLocales()\E$, ^\Qjava.util.AbstractList.hashCode()\E$, ^\Qjava.util.AbstractSet.hashCode()\E$, ^\Qjava.util.Arrays.deepHashCode(java.lang.Object[])\E$, ^\Qjava.util.Arrays.hashCode(boolean[])\E$, ^\Qjava.util.Arrays.hashCode(byte[])\E$, ^\Qjava.util.Arrays.hashCode(char[])\E$, ^\Qjava.util.Arrays.hashCode(double[])\E$, ^\Qjava.util.Arrays.hashCode(float[])\E$, ^\Qjava.util.Arrays.hashCode(int[])\E$, ^\Qjava.util.Arrays.hashCode(java.lang.Object[])\E$, ^\Qjava.util.Arrays.hashCode(long[])\E$, ^\Qjava.util.Arrays.hashCode(short[])\E$, ^\Qjava.util.Collection.hashCode()\E$, ^\Qjava.util.Collections.shuffle(java.util.List)\E$, ^\Qjava.util.Comparator.compare(java.lang.Object, java.lang.Object)\E$, ^\Qjava.util.List.hashCode()\E$, ^\Qjava.util.Random.<init>()\E$, ^\Qjava.util.Set.hashCode()\E$]
Operations:
  java.lang.Object.<init> : () -> java.lang.Object

There are no methods for Randoop to test.  See diagnostics above.  Exiting.

What can I do to solve the problem?

Thank you very much

Best Regards

Michael Ernst

unread,
Sep 25, 2020, 4:19:19 PM9/25/20
to randoop-developers
I'm sorry you are having trouble.  We would like to help you, but we cannot do so from this incomplete bug report.  Can you please provide all the details that were requested in the issue template (https://github.com/randoop/randoop/issues/new) and the bug reporting section of the manual (https://randoop.github.io/randoop/manual/#bug-reporting)?  This will enable us to reproduce the problem, fix it, and verify the fix.  Thanks!

Mike

--
You received this message because you are subscribed to the Google Groups "Randoop Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to randoop-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/randoop-developers/109439d7-0fba-4dcb-b3ef-52201d679854n%40googlegroups.com.

Emanuele

unread,
Sep 25, 2020, 4:31:23 PM9/25/20
to Randoop Developers
Thanks Michael,


Obviously, before opening the issue I followed the steps indicated in the Troubleshooting section on https://randoop.github.io/randoop/manual/#bug-reporting but with poor results

Thanks

Best Regards
Reply all
Reply to author
Forward
0 new messages