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 39050 - Adding server instance fails
Summary: Adding server instance fails
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Martin Grebac
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-21 09:16 UTC by smarkus
Modified: 2006-02-28 11:56 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
added ide.log (129.46 KB, text/plain)
2004-01-21 09:18 UTC, smarkus
Details
Here is my server.xml (1.58 KB, text/plain)
2004-02-26 10:18 UTC, smarkus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description smarkus 2004-01-21 09:16:55 UTC
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)
Comment 1 smarkus 2004-01-21 09:18:16 UTC
Created attachment 12991 [details]
added ide.log
Comment 2 Pavel Buzek 2004-01-29 05:44:23 UTC
will try to fix for 3.6
pls next time put the ex in attachment
Comment 3 Martin Grebac 2004-02-24 14:00:53 UTC
Will look at it.
Comment 4 Martin Grebac 2004-02-24 14:34:00 UTC
Did you make any changes to Tomcat's server.xml?
Comment 6 smarkus 2004-02-25 10:48:06 UTC
Hi,
sorry for the delay.
No, I didn't change the server.xml
Comment 7 Martin Grebac 2004-02-25 10:51:36 UTC
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?
Comment 8 smarkus 2004-02-26 09:39:35 UTC
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
Comment 9 Martin Grebac 2004-02-26 09:45:25 UTC
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.
Comment 10 smarkus 2004-02-26 10:18:22 UTC
Created attachment 13663 [details]
Here is my server.xml
Comment 11 Chris Kutler 2004-02-26 16:58:24 UTC
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.
Comment 12 Martin Grebac 2004-02-27 08:55:06 UTC
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.
Comment 13 Jaroslav Pospisil 2006-02-28 11:56:32 UTC
VERIFIED