New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not initialize jdk.net.SocketFlow: org/evosuite/runtime/instrumentation/InstrumentedClass #39
Comments
When I use evosuite-1.0.2.jar instead of evosuite-standalone-runtime-1.0.2.jar in the command line, it had no such error, however, the program hang at a certain point after displaying the following stack traces: Exception in thread "main" java.util.NoSuchElementException |
hmmm... jdk.net classes shouldn't had been instrumented by EvoSuite. I made a fix in a new alpha2 release: 1.0.4-alpha2 can you confirm if you still get same problem with that release? cheers |
Thanks ! @arcuri82 I will try this one!! |
Since jdk.* is now excluded from instrumentation, this problem should be fixed. If it re-appears, please re-open this issue. |
I have used Evosuite to generate test cases for a library, and then try to run with it using JUnit command.
However, for some test cases, it will pops out the could not initialize jdk.net.SocketFlow error, which hinders the suceesfully run of the JUnit test cases.
I have no idea of this problem, is this a compatibility issue?
I use the Evosuite 1.0.2 sevosuite-standalone-runtime-1.0.2.jar, and tried with jdk 8 and openjdk and JUnit 4.12.
Hope you can help me!
The following is part of the output of the running
`[stdin] JUnit version 4.12
[stderr] 7 [main] INFO org.evosuite.runtime.agent.AgentLoader - dynamically loading javaagent
[stderr] 24 [main] INFO org.evosuite.runtime.agent.AgentLoader - Using JavaAgent in ./lib/evosuite-standalone-runtime-1.0.2.jar
[stderr] 31 [main] INFO org.evosuite.runtime.agent.AgentLoader - Classpath: ./lib/junit-4.12.jar:./lib/hamcrest-all-1.3.jar:../TargetLibraries/google-collections-1.0/lib/google-collections-1.0.jar:./lib/evosuite-standalone-runtime-1.0.2.jar:./lib/slf4j-simple-1.6.1.jar:../TargetLibraries/google-collections-1.0/evosuite-tests/evosuite-tests-30-0
[stderr] 31 [main] INFO org.evosuite.runtime.agent.AgentLoader - Going to attach agent to process 13392
[stderr] 295 [Attach Listener] INFO org.evosuite.runtime.agent.InstrumentingAgent - Executing agentmain of JavaAgent
[stderr] 956 [main] INFO org.evosuite.runtime.instrumentation.CreateClassResetClassAdapter - Found static initializer in class com/google/common/collect/ReverseNaturalOrdering
[stderr] 956 [main] INFO org.evosuite.runtime.instrumentation.MethodCallReplacementClassAdapter - No hashCode defined for: com/google/common/collect/ReverseNaturalOrdering, superclass = com.google.common.collect.Ordering
[stderr] 957 [main] INFO org.evosuite.runtime.instrumentation.MethodCallReplacementClassAdapter - Adding mock interface to class jdk/net/SocketFlow
[stderr] 961 [main] INFO org.evosuite.runtime.instrumentation.MethodCallReplacementClassAdapter - No hashCode defined for: jdk/net/SocketFlow, superclass = java.lang.Object
[stderr] 961 [main] INFO org.evosuite.runtime.instrumentation.CreateClassResetClassAdapter - Creating brand-new static initializer in class jdk/net/SocketFlow
[stderr] 961 [main] INFO org.evosuite.runtime.instrumentation.CreateClassResetClassAdapter - Adding bytecode for initializing field UNSET
[stderr] 961 [main] INFO org.evosuite.runtime.instrumentation.CreateClassResetClassAdapter - Adding bytecode for initializing field NORMAL_PRIORITY
[stderr] 961 [main] INFO org.evosuite.runtime.instrumentation.CreateClassResetClassAdapter - Adding bytecode for initializing field HIGH_PRIORITY
## [stderr] 962 [main] ERROR org.evosuite.runtime.classhandling.ClassStateSupport - Could not initialize jdk.net.SocketFlow: org/evosuite/runtime/instrumentation/InstrumentedClass
[stderr] 962 [main] INFO org.evosuite.runtime.instrumentation.MethodCallReplacementClassAdapter - Adding mock interface to class com/google/common/collect/Collections2
[stderr] 964 [main] INFO org.evosuite.runtime.instrumentation.CreateClassResetClassAdapter - Found static initializer in class com/google/common/collect/Collections2
[stderr] 964 [main] INFO org.evosuite.runtime.instrumentation.MethodCallReplacementClassAdapter - No hashCode defined for: com/google/common/collect/Collections2, superclass = java.lang.Object
[stderr] 965 [main] INFO org.evosuite.runtime.instrumentation.MethodCallReplacementClassAdapter - Adding mock interface to class com/google/common/base/Preconditions
[stderr] 972 [main] INFO org.evosuite.runtime.instrumentation.MethodCallReplacementClassAdapter - No hashCode defined for: com/google/common/base/Preconditions, superclass = java.lang.Object
[stderr] 972 [main] INFO org.evosuite.runtime.instrumentation.CreateClassResetClassAdapter - Creating brand-new static initializer in class com/google/common/base/Preconditions
[stderr] 973 [main] INFO org.evosuite.runtime.instrumentation.MethodCallReplacementClassAdapter - Adding mock interface to class com/google/common/collect/ImmutableCollection$1
[stderr] 973 [main] INFO org.evosuite.runtime.instrumentation.MethodCallReplacementClassAdapter - No hashCode defined for: com/google/common/collect/ImmutableCollection$1, superclass = java.lang.Object
The text was updated successfully, but these errors were encountered: