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.

Bug 158704 - ClassNotFoundException occurs in the server.log file for a NewServlet
Summary: ClassNotFoundException occurs in the server.log file for a NewServlet
Status: NEW
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-18 02:14 UTC by davisn
Modified: 2011-06-28 07:40 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
server.log (28.98 KB, text/plain)
2009-02-18 02:15 UTC, davisn
Details
messages.log (37.96 KB, text/plain)
2009-02-18 02:18 UTC, davisn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description davisn 2009-02-18 02:14:19 UTC
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
Comment 1 davisn 2009-02-18 02:15:25 UTC
Created attachment 77089 [details]
server.log
Comment 2 davisn 2009-02-18 02:18:57 UTC
Created attachment 77090 [details]
messages.log
Comment 3 Vince Kraemer 2009-02-21 18:46:18 UTC
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.
Comment 4 Petr Hejl 2009-10-06 15:25:00 UTC
Deployment is already delayed.