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 189356 - java.util.NoSuchElementException when deploying a web app
Summary: java.util.NoSuchElementException when deploying a web app
Status: RESOLVED INCOMPLETE
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-10 14:00 UTC by zemu
Modified: 2011-02-08 14:19 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zemu 2010-08-10 14:00:39 UTC
After restarting netbeans 6.8 and trying to deploy a web service on tomcat 6.0.18, I got the following error :

-------------------------------
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
java.util.NoSuchElementException
        at java.util.StringTokenizer.nextToken(StringTokenizer.java:332)
        at org.netbeans.modules.tomcat5.TomcatManagerImpl.list(TomcatManagerImpl.java:411)
        at org.netbeans.modules.tomcat5.TomcatManager.modules(TomcatManager.java:622)
        at org.netbeans.modules.tomcat5.TomcatManager.getAvailableModules(TomcatManager.java:433)
        at org.netbeans.modules.j2ee.deployment.impl.TargetServer.getAvailableTMIDsMap(TargetServer.java:400)
        at org.netbeans.modules.j2ee.deployment.impl.TargetServer.processLastTargetModules(TargetServer.java:438)
        at org.netbeans.modules.j2ee.deployment.impl.TargetServer.init(TargetServer.java:166)
        at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:563)
        at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:170)
        at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:103)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:278)
        at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:498)
        at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
------------


The "java.util.NoSuchElementException" and its stacktrace repeats 334 times in a row before to finally give up :

----------------------
In-place deployment at /home/blabla/build/web
deploy?config=file%3A%2Ftmp%2Fcontext173874113681921--.xml&path=/Blabla/ws

/home/blabla/nbproject/build-impl.xml:725: The module has not been deployed.
BUILD FAILED (total time: 13 seconds)
----------

I had no problem deploying my web service app until then, I just restarted tomcat because of a PermGenSpace problem, and closed Netbeans at the same time.

Note: it is possible that the tomcat was not properly killed. I resolved the problem by :
 - closing netbeans
 - killing tomcat
 - restarting netbeans
I then run my project succesfully
Comment 1 zemu 2010-08-10 14:11:16 UTC
I am afraid I spoke too fast. The problem is not solved, it appears again each time I redeploy the app. Initial run/deploy works, but I have to shut apache down if I want to redeploy (no need to close netbeans itself)
Comment 2 Petr Hejl 2011-02-08 13:40:43 UTC
I added debug message. Can you test this issue in the upcoming 7 dev build? Can you share your test project?

web-main 8a8a37b26fd0
Comment 3 zemu 2011-02-08 14:19:52 UTC
(In reply to comment #2)
> I added debug message. Can you test this issue in the upcoming 7 dev build? Can
> you share your test project?
> 
> web-main 8a8a37b26fd0

Sadly I cant, I reported this bug a long time ago, and I have not any problem any more. I am not sure how I resolved it, bug I guess I created a new web project from scratch.
I will tell if I encounter this problem again, but for now I am afraid I cannot be of any help about it.