This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
java.lang.ClassNotFoundException occurs in the server.log file when create a NewServlet Steps To Reproduce: 1. Install NB Development All version from http://bits.netbeans.org/download/trunk/nightly/latest/ 2. Install IDE > activate GlassFish V3 Prelude plugin 3. Create new Web Project 3. Run the Web Project 4. Add a new Servlet to the Web Project BUG: java.lang.ClassNotFoundException: NewServlet at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1509) at com.sun.enterprise.deployment.annotation.impl.ModuleScanner.getElements(ModuleScanner.java:189) at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:127) at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:476) at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:348) at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:320) at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:211) at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:143) at org.glassfish.javaee.core.deployment.JavaEEDeployer.parseModuleMetaData(JavaEEDeployer.java:231) at com.sun.enterprise.web.WebDeployer.parseModuleMetaData(WebDeployer.java:110) at org.glassfish.javaee.core.deployment.JavaEEDeployer.loadMetaData(JavaEEDeployer.java:157) at com.sun.enterprise.v3.server.ApplicationLifecycle.prepare(ApplicationLifecycle.java:429) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:173) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:329) at com.sun.enterprise.v3.admin.CommandRunner$2.execute(CommandRunner.java:302) at com.sun.enterprise.v3.admin.CommandRunner.doCommand(CommandRunner.java:312) at com.sun.enterprise.v3.admin.CommandRunner.doCommand(CommandRunner.java:119) at com.sun.enterprise.v3.admin.CommandRunner.doCommand(CommandRunner.java:99) at org.glassfish.deployment.admin.ReDeployCommand.execute(ReDeployCommand.java:94) at com.sun.enterprise.v3.admin.CommandRunner$2.execute(CommandRunner.java:302) at com.sun.enterprise.v3.admin.CommandRunner.doCommand(CommandRunner.java:312) at com.sun.enterprise.v3.admin.CommandRunner.doCommand(CommandRunner.java:119) at com.sun.enterprise.v3.admin.CommandRunner.doCommand(CommandRunner.java:99) at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:250) at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:176) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:147) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180) at com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:633) at com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:570) at com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:827) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152) at com.sun.enterprise.v3.services.impl.GlassfishProtocolChain.executeProtocolFilter(GlassfishProtocolChain.java:71) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56) at com.sun.grizzly.util.WorkerThreadImpl.processTask(WorkerThreadImpl.java:325) at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:184) INFO: Unknown loader org.glassfish.internal.api.DelegatingClassLoader@2c5e5c15 class org.glassfish.internal.api.DelegatingClassLoader
Created attachment 77089 [details] server.log
Created attachment 77090 [details] messages.log
I guess that the problem is this... The java file is saved first. It starts to compile. the dd file is saved next. it gets copied into the deployment directory, which triggers a deploy... and the class file is not in place yet. the java file finishes compiling and that triggers a second deployment which completes successfully. So, the error is correct... this can probably be prevented most of the time but not 100% of the time by delaying the deployment for some amount of time.
Deployment is already delayed.