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.
Hi, I just installed NetBeansIDE-dev-200401201900. I tried to add my Tomcat 5.0.16. Well it doesn't work, there was a message, that an error occurred, but everything should work. But when I clicked at the instances icon to open the node I got the message below. I restartet the IDE and now I can't even switch to the runtime-tab. java.lang.NumberFormatException: null at java.lang.Integer.parseInt(Integer.java:436) at java.lang.Integer.valueOf(Integer.java:574) at org.netbeans.modules.tomcat5.TomcatManager.readPortFromFile(TomcatManager.java:780) at org.netbeans.modules.tomcat5.TomcatManager.getServerPort(TomcatManager.java:676) at org.netbeans.modules.tomcat5.nodes.TomcatInstanceNode.getServerPort(TomcatInstanceNode.java:98) at org.netbeans.modules.tomcat5.nodes.TomcatInstanceNode.getDisplayName(TomcatInstanceNode.java:78) at org.openide.nodes.FilterNode.getDisplayName(FilterNode.java:403) at org.openide.nodes.FilterNode.getDisplayName(FilterNode.java:403) at org.openide.nodes.FilterNode.getDisplayName(FilterNode.java:403) at org.openide.explorer.view.VisualizerNode.getDisplayName(VisualizerNode.java:145) at org.openide.explorer.view.NodeRenderer$Tree.getTreeCellRendererComponent(NodeRenderer.java:259) at org.openide.explorer.view.NodeRenderer.getTreeCellRendererComponent(NodeRenderer.java:100) at javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(BasicTreeUI.java:2751) at javax.swing.tree.AbstractLayoutCache.getNodeDimensions(AbstractLayoutCache.java:475) at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.updatePreferredSize(VariableHeightLayoutCache.java:1342) at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1478) at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1270) at javax.swing.tree.VariableHeightLayoutCache.ensurePathIsExpanded(VariableHeightLayoutCache.java:966) at javax.swing.tree.VariableHeightLayoutCache.setExpandedState(VariableHeightLayoutCache.java:164) at javax.swing.plaf.basic.BasicTreeUI.updateExpandedDescendants(BasicTreeUI.java:1494) at javax.swing.plaf.basic.BasicTreeUI$TreeExpansionHandler.treeExpanded(BasicTreeUI.java:2314) at javax.swing.JTree.fireTreeExpanded(JTree.java:2228) at javax.swing.JTree.setExpandedState(JTree.java:2999) at javax.swing.JTree.expandPath(JTree.java:1735) at javax.swing.plaf.basic.BasicTreeUI.toggleExpandState(BasicTreeUI.java:2095) at javax.swing.plaf.basic.BasicTreeUI.handleExpandControlClick(BasicTreeUI.java:2082) at javax.swing.plaf.basic.BasicTreeUI.checkForClickInExpandControl(BasicTreeUI.java:2036) at javax.swing.plaf.basic.BasicTreeUI$MouseHandler.handleSelection(BasicTreeUI.java:2831) at javax.swing.plaf.basic.BasicTreeUI$MouseHandler.mousePressed(BasicTreeUI.java:2801) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:222) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221) at java.awt.Component.processMouseEvent(Component.java:5097) at java.awt.Component.processEvent(Component.java:4897) at java.awt.Container.processEvent(Container.java:1569) at java.awt.Component.dispatchEventImpl(Component.java:3615) at java.awt.Container.dispatchEventImpl(Container.java:1627) at java.awt.Component.dispatchEvent(Component.java:3477) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3195) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128) at java.awt.Container.dispatchEventImpl(Container.java:1613) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3477) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
Created attachment 12991 [details] added ide.log
will try to fix for 3.6 pls next time put the ex in attachment
Will look at it.
Did you make any changes to Tomcat's server.xml?
Fixed in trunk. There's more error checking, so you should get error message when something went wrong. There are some new bundles again. chris, could you review them? Thanks a lot. http://tomcatint.netbeans.org/source/browse/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/ide/Bundle.properties.diff?r1=1.16&r2=1.17 http://tomcatint.netbeans.org/source/browse/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/ide/TomcatInstall.java.diff?r1=1.15&r2=1.16 http://tomcatint.netbeans.org/source/browse/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/TomcatManager.java.diff?r1=1.35&r2=1.36
Hi, sorry for the delay. No, I didn't change the server.xml
Hmm, strange then. But, if you try latest build, I believe it should work, or you'd get much more specific error dialog about what went wrong. Could you try it?
My Tomcat 5.0.16 is a standard windows installation, my web-apps are created using the /admin/frameset.jsp. Start/stop is done with /manager/html. The path to the installation is F:\Programme\Tomcat_5.0.16 wihout any blanks. Trying to add this server a windows opens saying: >> Admin port cannot be read: null. Please check the admin port setting in server.xml The server.xml installed looks like the server-minimal.xml of the internal tomcat, but the server.xml of the internal tomcat doesn't contain anything corresponding either. There is nothing about an admin-port on the "Adding a Tomcat Server"-Node of the Netbeans help and the entry in the Node "Tomcat Server Property Sheet" gives no clue about what to do. My final test was to try to add my Tomcat4.1.27 directory. The window doesn't appear. Instead there is a message in the "add new server"-Window stating that Tomcat 4.x isn't supported. Regards, Sascha
Would it be possible to attach your server.xml to this bug (or send it to me), so that I can try it on my system? Thanks.
Created attachment 13663 [details] Here is my server.xml
My suggestions for error messages MSG_ServerPortError=Cannot read server's port\: {0}. Check the port's Connector entry in the <Tomcat-Base-Path>/conf/server.xml file to ensure it is a valid port number. MSG_AdminPortError=Cannot read Admin port\: {0}. Check the port number in the Server entry in the <Tomcat-Base-Path>/conf/server.xml file to ensure it is a valid port number. MSG_ServerXmlError=Cannot read <Tomcat-Base-Path>/conf/server.xml: Check that the file exists in this location, is readable, is well-formed XML, and conforms to the DTD.
Problem is, that your server.xml doesn't specify the admin port: <Server port="8005" shutdown="SHUTDOWN"> Chris: I'm gonna use your suggestions. Thanks a lot for help.
VERIFIED