[
https://issues.apache.org/jira/browse/MNG-6430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16613215#comment-16613215
]
Burcu commented on MNG-6430:
----------------------------
I updated jUnit to 2.22.0.
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit4</artifactId>
<version>2.22.0</version>
</dependency>
But when I run test at commandline, the tests did not go on. I ran tests on
intellij and it gives same exception:
IntelliJ Exception:
java.lang.RuntimeException: java.lang.RuntimeException:
java.lang.UnsatisfiedLinkError: Native Library D:\jdk 1.8.0
181\jre1.8.0_181\bin\glass.dll already loaded in another classloader
CommandLine:
D:\ys03_YERLISINYAL03-29207\sysadmin>mvn clean test
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< gov.ys03:sysadmin >----------------------
[INFO] Building sysadmin 1.2.7
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ sysadmin ---
[INFO] Deleting D:\ys03_YERLISINYAL03-29207\sysadmin\target
[INFO]
[INFO] --- build-helper-maven-plugin:3.0.0:regex-property (regex-property) @ sys
admin ---
[INFO] No match to regex 'none' found in 'sysadmin'. The initial value 'sysadmin
' is left as-is...
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ sysadmin -
--
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 53 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ sysadmin ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 35 source files to D:\ys03_YERLISINYAL03-29207\sysadmin\target\
classes
[INFO] /D:/ys03_YERLISINYAL03-29207/sysadmin/src/main/java/gov/tubitak/ys03/sysa
dmin/areaManagement/AreaController.java: Some input files use unchecked or unsaf
e operations.
[INFO] /D:/ys03_YERLISINYAL03-29207/sysadmin/src/main/java/gov/tubitak/ys03/sysa
dmin/areaManagement/AreaController.java: Recompile with -Xlint:unchecked for det
ails.
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ sy
sadmin ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ sysad
min ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 27 source files to D:\ys03_YERLISINYAL03-29207\sysadmin\target\
test-classes
[INFO] /D:/ys03_YERLISINYAL03-29207/sysadmin/src/test/java/gov/tubitak/ys03/sysa
dmin/utilities/TestFXFunctions.java: Some input files use unchecked or unsafe op
erations.
[INFO] /D:/ys03_YERLISINYAL03-29207/sysadmin/src/test/java/gov/tubitak/ys03/sysa
dmin/utilities/TestFXFunctions.java: Recompile with -Xlint:unchecked for details
.
[INFO]
[INFO] --- maven-surefire-plugin:2.22.0:test (default-test) @ sysadmin ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.533 s
[INFO] Finished at: 2018-09-12T15:33:23+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.
22.0:test (default-test) on project sysadmin: There are test failures.
[ERROR]
[ERROR] Please refer to D:\ys03_YERLISINYAL03-29207\sysadmin\target\surefire-rep
orts for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].
dumpstream and [date]-jvmRun[N].dumpstream.
[ERROR] There was an error in the forked process
[ERROR] org.apache.maven.surefire.report.RunListener.testSetStarting(Lorg/apache
/maven/surefire/report/ReportEntry;)V
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There was
an error in the forked process
[ERROR] org.apache.maven.surefire.report.RunListener.testSetStarting(Lorg/apache
/maven/surefire/report/ReportEntry;)V
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.for
k(ForkStarter.java:658)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.for
k(ForkStarter.java:533)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run
(ForkStarter.java:278)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run
(ForkStarter.java:244)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute
Provider(AbstractSurefireMojo.java:1194)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute
AfterPreconditionsChecked(AbstractSurefireMojo.java:1022)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute
(AbstractSurefireMojo.java:868)
[ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo
(DefaultBuildPluginManager.java:137)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(Mojo
Executor.java:208)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(Mojo
Executor.java:154)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(Mojo
Executor.java:146)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.bu
ildProject(LifecycleModuleBuilder.java:117)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.bu
ildProject(LifecycleModuleBuilder.java:81)
[ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.Si
ngleThreadedBuilder.build(SingleThreadedBuilder.java:56)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(
LifecycleStarter.java:128)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305
)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192
)
[ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
[ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:954)
[ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
[ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:192)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:62)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:498)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhan
ced(Launcher.java:289)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Laun
cher.java:229)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExi
tCode(Launcher.java:415)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launch
er.java:356)
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception
D:\ys03_YERLISINYAL03-29207\sysadmin>mvn clean test
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< gov.tubitak.ys03:sysadmin >----------------------
[INFO] Building sysadmin 1.2.7
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ sysadmin ---
[INFO] Deleting D:\ys03_YERLISINYAL03-29207\sysadmin\target
[INFO]
[INFO] --- build-helper-maven-plugin:3.0.0:regex-property (regex-property) @ sys
admin ---
[INFO] No match to regex 'none' found in 'sysadmin'. The initial value 'sysadmin
' is left as-is...
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ sysadmin -
--
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 53 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ sysadmin ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 35 source files to D:\ys03_YERLISINYAL03-29207\sysadmin\target\
classes
[INFO] /D:/ys03_YERLISINYAL03-29207/sysadmin/src/main/java/gov/tubitak/ys03/sysa
dmin/areaManagement/AreaController.java: Some input files use unchecked or unsaf
e operations.
[INFO] /D:/ys03_YERLISINYAL03-29207/sysadmin/src/main/java/gov/tubitak/ys03/sysa
dmin/areaManagement/AreaController.java: Recompile with -Xlint:unchecked for det
ails.
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ sy
sadmin ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ sysad
min ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 27 source files to D:\ys03_YERLISINYAL03-29207\sysadmin\target\
test-classes
[INFO] /D:/ys03_YERLISINYAL03-29207/sysadmin/src/test/java/gov/tubitak/ys03/sysa
dmin/utilities/TestFXFunctions.java: Some input files use unchecked or unsafe op
erations.
[INFO] /D:/ys03_YERLISINYAL03-29207/sysadmin/src/test/java/gov/tubitak/ys03/sysa
dmin/utilities/TestFXFunctions.java: Recompile with -Xlint:unchecked for details
.
[INFO]
[INFO] --- maven-surefire-plugin:2.22.0:test (default-test) @ sysadmin ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running gov.tubitak.ys03.sysadmin.alertManagement.AlertManagerTest
HEADLESS:.....null
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 16.201 s
- in gov.tubitak.ys03.sysadmin.alertManagement.AlertManagerTest
[INFO] Running gov.tubitak.ys03.sysadmin.alertManagement.AlertMessagesTest
HEADLESS:.....null
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.989 s -
in gov.tubitak.ys03.sysadmin.alertManagement.AlertMessagesTest
[INFO] Running gov.tubitak.ys03.sysadmin.areaManagement.AreaControllerTest
HEADLESS:.....null
> UnsatisfiedLinkError:Native Library jdk1.8.0_121\jre\bin\glass.dll already
> loaded in another classloader
> --------------------------------------------------------------------------------------------------------
>
> Key: MNG-6430
> URL: https://issues.apache.org/jira/browse/MNG-6430
> Project: Maven
> Issue Type: Bug
> Components: Class Loading
> Reporter: Burcu
> Assignee: Tibor Digana
> Priority: Major
> Labels: ClassLoader, Classloader, classloader, glass,
> unsatisfiedLinkError
> Attachments: 2018-09-11T16-32-01_814-jvmRun1.dump,
> 2018-09-11T16-32-01_814-jvmRun2.dump, 2018-09-12T13-28-04_278-jvmRun1.dump,
> glassdll.jpg, mvnTest.jpg, plugin.jpg, runAllTest.jpg
>
>
> Although I made the linkte and tried other solutions, I could not resolve the
> glass.dll not found error. I'm looking for a solution to this issue that is
> long-lasting. I'm using Powermock and TestFx. I have encountered this problem
> since I started working with both. I would like to try if you offer a
> solution in this regard. Below you will find some images of the fault.
> [https://maven.apache.org/surefire/maven-surefire-plugin/examples/class-loading.html]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)