Outline of fix for 11257 The logic which scans for annos is based on File objects. (See ModuleScanner.) This does not work during Java Web Start launches because Java Web Start does not expose the on-disk locations for downloaded files. Instead, they appear as URIs that are not of type file://. In fact, currently the ACC's FacadeLaunchable class turns off anno processing during a Java Web Start launch to avoid exceptions which would be thrown otherwise. I looked at fixing this (again) in late 2011, but this is a low priority bug and rarely encountered -- never reported by users -- and making the changes would take time away from higher-priority work. There are (at least) two general approaches to solving this problem. In one all the changes are in various app client-related classes (described in detail below). In the other we would work on ModuleScanner a bit so that it would be more general and be able to deal with either File objects (as it does today) or ArchiveAdapter objects (an hk2 interface). We could refactor the AppClientScanner logic so that most of the work is done in a helper class. There would be two implementations of the helper, one for Java Web Start launches and one for other uses (directory deployment, archive deployment, and non-Java Web Start app client launches). It might make sense to refactor the second one into multiple implementations; currently there are some branches depending on what type of archive (JAR or directory) are being processed. But that's a separate concern. It would not work to create different implementations of the scanner itself because we use hk2 to select the correct scanner based on the archive type (car, war, ejb, rar) so there can be only one scanner for app client modules. That's why it seems like the single AppClientScanner could instantiate the correct kind of helper (one which uses File-based scanning and one which uses archive-based scanning) and delegate work to the helper. Because hk2 instantiates the scanner there would need to be a way to tell the scanner enough info so it could choose the right kind of helper. This could be done from the ACCAppClientArchivist (which is used only during app client launches, not during deployment). It could override the ModuleScanner#getScanner method to invoke super.getScanner, then check and cast the result to AppClientScanner and invoke a method passing enough info so the scanner knows what kind of helper to use. This info could be as simple as just whether a Java Web Start launch is underway or not. That would most closely leave the currently working cases following the same code path as they do now. Some of the most important behavior to delegate to the helper is the addScanURI method. Currently, that's where a URI is forced to a File for use by the File-friendly scanner in the ModuleScanner implementation. For Java Web Start launches the helper would define an inner class which implements the ArchiveAdapter interface and would pass instances of this implementation to the hk2 Parser.parse method. (The current ModuleScanner code passes a File object to the parse method but there is another variant which accepts ArchiveAdapter.) This means that the AppClientScanner needs to override ModuleScanner.process (which is currently File-based). But the process method is not very long so that's not too bad. And the helper would need to maintain a set of URIs to be scanned (rather than the set of Files the ModuleScanner uses) and work with that during its process method. The stack trace below is what happens when I let anno scanning try to happen during a Java Web Start launch by always setting the archivist's setAnnoProcessingRequested to true all the time. java.lang.RuntimeException: Error launching or running the application at org.glassfish.appclient.client.JWSAppClientContainerMain.main(JWSAppClientContainerMain.java:144) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.javaws.Launcher.executeApplication(Launcher.java:1914) at com.sun.javaws.Launcher.executeMainClass(Launcher.java:1847) at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:1609) at com.sun.javaws.Launcher.run(Launcher.java:138) at java.lang.Thread.run(Thread.java:680) Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: URI scheme is not "file" at org.glassfish.appclient.client.JWSAppClientContainerMain$ClientRunner.run(JWSAppClientContainerMain.java:179) at org.glassfish.appclient.client.JWSAppClientContainerMain.main(JWSAppClientContainerMain.java:138) ... 9 more Caused by: java.lang.IllegalArgumentException: URI scheme is not "file" at java.io.File.(File.java:366) at com.sun.enterprise.deployment.annotation.impl.ModuleScanner.addScanURI(ModuleScanner.java:216) at com.sun.enterprise.deployment.annotation.impl.AppClientScanner.doProcess(AppClientScanner.java:147) at com.sun.enterprise.deployment.annotation.impl.AppClientScanner.process(AppClientScanner.java:83) at com.sun.enterprise.deployment.annotation.impl.AppClientScanner.process(AppClientScanner.java:73) at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:555) at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:442) at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:429) at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:405) at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:380) at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:243) at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:252) at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:213) at com.sun.enterprise.deployment.archivist.AppClientArchivist.open(AppClientArchivist.java:113) at org.glassfish.appclient.client.acc.FacadeLaunchable.getDescriptor(FacadeLaunchable.java:290) at org.glassfish.appclient.client.acc.AppClientContainerBuilder.createContainer(AppClientContainerBuilder.java:187) at org.glassfish.appclient.client.acc.AppClientContainerBuilder.newContainer(AppClientContainerBuilder.java:172) at org.glassfish.appclient.client.acc.AppClientContainerBuilder.newContainer(AppClientContainerBuilder.java:153) at org.glassfish.appclient.client.AppClientFacade.createContainerForJWSLaunch(AppClientFacade.java:503) at org.glassfish.appclient.client.AppClientFacade.createContainer(AppClientFacade.java:462) at org.glassfish.appclient.client.AppClientFacade.prepareACC(AppClientFacade.java:269) at org.glassfish.appclient.client.JWSAppClientContainerMain$ClientRunner.run(JWSAppClientContainerMain.java:168) ... 10 more