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.
This bug was originally marked as duplicate of bug 207767, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related. Build: NetBeans IDE 7.3 Beta 2 (Build 201211062253) VM: Java HotSpot(TM) 64-Bit Server VM, 23.6-b04, Java(TM) SE Runtime Environment, 1.7.0_10-b18 OS: Mac OS X User Comments: brettryan: Trying to run Maven project in bundled tomcat. Stacktrace: java.util.NoSuchElementException at java.util.ArrayList$Itr.next(ArrayList.java:794) at org.netbeans.modules.tomcat5.ide.StartTomcat.getJavaHome(StartTomcat.java:752) at org.netbeans.modules.tomcat5.ide.StartTomcat.access$900(StartTomcat.java:97) at org.netbeans.modules.tomcat5.ide.StartTomcat$StartRunnable.run(StartTomcat.java:490) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1454) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2036)
Created attachment 129523 [details] stacktrace
Occurs when attempting to start tomcat from within the IDE.
Creating a new apache tomcat server entry with duplicated settings as that bundled solves the problem.
JavaPlatform.getInstallFolders() returned empty collection. This is strange. Tomasi do you have any idea? Might it be Mac OS specific? brettryan can you provide details about original tomcat configuration and the configuration which solved the problem?
Original tomcat configuration was what is installed with NetBeans 7.3 beta 2 (apache-tomcat-7.0.32). I inspected each element in the server configuration and duplicated it as a new server with all the same settings. i.e. Tools > Servers > Add Server... And switched back and forth between server configurations to set everything the same. I did install with an upgrade of my user directory from a 7.2 installation. I wonder if this could have caused the problem. I can reinstall 7.3 B2 and not copy my configuration and see what happens.
(In reply to comment #5) > Original tomcat configuration was what is installed with NetBeans 7.3 beta 2 > (apache-tomcat-7.0.32). I inspected each element in the server configuration > and duplicated it as a new server with all the same settings. i.e. > > Tools > Servers > Add Server... > > And switched back and forth between server configurations to set everything the > same. > > I did install with an upgrade of my user directory from a 7.2 installation. I > wonder if this could have caused the problem. I can reinstall 7.3 B2 and not > copy my configuration and see what happens. Yep that would be great. Could you also check that preinstalled instance in your current setup still does not work? Thanks.
JavaPlatform.getInstallFolders().size() == 0 means that the platform is broken (for example the JDK was deleted).
(In reply to comment #7) > JavaPlatform.getInstallFolders().size() == 0 means that the platform is broken > (for example the JDK was deleted). brettryan, might this be your case? Thanks.
Okay, I know the cause. Steps to reproduce: 1. Install JDK and NB as normal with Tomcat 2. Validate configuration by creating web app and running in Tomcat 3. Close IDE, install newer JDK. 4. Start NetBeans 5. Confirm that running existing project causes this failure. You will now find two JDK's with the same name in Java Platforms (JDK 1.7), one being defaulted. Do not delete the bad one as I want to show something else. 1. Close platforms 2. View properties of Tomcat instance 3. Under "Platform" select the default JDK 4. Confirm tomcat works correctly. 5. Close IDE 6. Restart IDE 7. Tomcat exhibits error again. So it seems also that the tomcat settings take the first JDK and not the default one. I believe this could be fixed by tomcat always defaulting to the default JDK if not specified, furthermore if I set it it should be persisted, though this may be because both JDK's had the same name.
Fixed in web-main b4ed10d4d754.
Integrated into 'main-silver', will be available in build *201307172300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/b4ed10d4d754 User: Petr Hejl <phejl@netbeans.org> Log: #224005 - java.util.NoSuchElementException at java.util.ArrayList$Itr.next
*** Bug 239734 has been marked as a duplicate of this bug. ***