Importing a Java Enterprise Application (.ear) project in Netbeans 8.2 from Existing Sources, ant will sometimes erroneously end up not finding CopyLibs in the classpath.
To solve it, you simply double-click (open as separate projects) each and every module in the Java Enterprise Application.