[ https://issues.apache.org/jira/browse/NETBEANS-2313?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Neffenger updated NETBEANS-2313: ------------------------------------- Description: When I try to run a JUnit 4.12 test case in a non-modular project, I get the following error: {noformat} Error occurred during initialization of boot layer java.lang.module.FindException: Module ${related.module.name} not found {noformat} The full output with the Ant Verbosity Level set to _Verbose_ is attached below. I worked around the issue by making the following two changes. First, I changed the project's Run-time Test Libraries under Project Properties > Libraries > Run Tests as follows: *Before (default, fails)* {noformat} Modulepath Modulepath for Compiling Tests Classpath Classpath for Compiling Tests Compiled Tests {noformat} *After (works)* {noformat} Modulepath Classpath Modulepath for Compiling Tests Classpath for Compiling Tests Compiled Tests {noformat} Then I also created a new Run Configuration called "Tests" which did *not* contain the VM Option "--add-modules=javafx.graphics". With the "Tests" run configuration selected in the NetBeans toolbar, and the change to the Run Tests Libraries, the unit tests ran without errors. was: When I try to run a JUnit 4.12 test case in a non-modular project, I get the following error: {noformat} Error occurred during initialization of boot layer java.lang.module.FindException: Module ${related.module.name} not found {noformat} The full output with the Ant Verbosity Level set to _Verbose_ is attached below. I can work around the issue by changing the project's Run-time Test Libraries under Project Properties > Libraries > Run Tests as follows. *Before (default, fails)* {noformat} Modulepath Modulepath for Compiling Tests Classpath Classpath for Compiling Tests Compiled Tests {noformat} *After (works)* {noformat} Modulepath Classpath Modulepath for Compiling Tests Classpath for Compiling Tests Compiled Tests {noformat} > Module ${related.module.name} not found for JUnit test > ------------------------------------------------------ > > Key: NETBEANS-2313 > URL: https://issues.apache.org/jira/browse/NETBEANS-2313 > Project: NetBeans > Issue Type: Bug > Components: java - JUnit > Affects Versions: 11.0 > Environment: Product: Apache NetBeans IDE 11.0 (Build > incubator-netbeans-release-404-on-20190319) > Java: OpenJDK 64-Bit Server VM 12+33 > System: Linux version 4.15.0-46-generic running on amd64 > Reporter: John Neffenger > Priority: Major > Attachments: related-module-name.log > > > When I try to run a JUnit 4.12 test case in a non-modular project, I get the > following error: > {noformat} > Error occurred during initialization of boot layer > java.lang.module.FindException: Module ${related.module.name} not found > {noformat} > The full output with the Ant Verbosity Level set to _Verbose_ is attached > below. > I worked around the issue by making the following two changes. > First, I changed the project's Run-time Test Libraries under Project > Properties > Libraries > Run Tests as follows: > *Before (default, fails)* > {noformat} > Modulepath > Modulepath for Compiling Tests > Classpath > Classpath for Compiling Tests > Compiled Tests > {noformat} > *After (works)* > {noformat} > Modulepath > Classpath > Modulepath for Compiling Tests > Classpath for Compiling Tests > Compiled Tests > {noformat} > Then I also created a new Run Configuration called "Tests" which did *not* > contain the VM Option "--add-modules=javafx.graphics". > With the "Tests" run configuration selected in the NetBeans toolbar, and the > change to the Run Tests Libraries, the unit tests ran without errors. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists