tomcat启动时的NumberFormatException

时间:2013-11-15 21:48:33

标签: java eclipse debugging runtime-error

当我尝试在调试模式下启动我的tomcat服务器或我的Java应用程序(在eclipse中)时,在尝试连接到服务器时总是会遇到numberFormatException。 stacktrace(在tomcat的情况下)看起来像这样:

org.apache.catalina.startup.Bootstrap at localhost:3413 
Thread [main] (Suspended (exception NumberFormatException)) 
    owns: InetAddress$Cache  (id=24)    
    owns: Object  (id=25)   
    owns: Class<T> (sun.management.jmxremote.ConnectorBootstrap) (id=22)    
    Integer.parseInt(String, int) line: not available   
    Integer.<init>(String) line: not available  
    InetAddressCachePolicy.<clinit>() line: not available   
    InetAddress$Cache.getPolicy() line: not available   
    InetAddress$Cache.put(String, InetAddress[]) line: not available    
    InetAddress.cacheInitIfNeeded() line: not available 
    InetAddress.cacheAddresses(String, InetAddress[], boolean) line: not available  
    InetAddress.getAddressesFromNameService(String, InetAddress) line: not available    
    InetAddress.getLocalHost() line: not available  
    JMXServiceURL.<init>(String, String, int, String) line: not available   
    JMXServiceURL.<init>(String, String, int) line: not available   
    ConnectorBootstrap.exportMBeanServer(MBeanServer, int, int, boolean, boolean, String, String[], String[], boolean, boolean, String, String, String) line: not available 

和尝试启动我的应用程序时的那个:

Thread [AWT-EventQueue-0] (Suspended (exception NumberFormatException)) 
owns: InetAddress$Cache  (id=57)    
owns: HttpClient  (id=58)   
owns: HttpURLConnection  (id=59)    
Integer.parseInt(String, int) line: not available   
Integer.<init>(String) line: not available  
InetAddressCachePolicy.<clinit>() line: not available   
InetAddress$Cache.getPolicy() line: not available   
InetAddress$Cache.put(String, InetAddress[]) line: not available    
InetAddress.cacheInitIfNeeded() line: not available 
InetAddress.getCachedAddresses(String) line: not available  
InetAddress.getAllByName0(String, InetAddress, boolean) line: not available 
InetAddress.getAllByName(String, InetAddress) line: not available   
InetAddress.getAllByName(String) line: not available    
InetAddress.getByName(String) line: not available   
InetSocketAddress.<init>(String, int) line: not available   
HttpClient(NetworkClient).doConnect(String, int) line: not available    
HttpClient.openServer(String, int) line: not available  
HttpClient.openServer() line: not available 
HttpClient.<init>(URL, Proxy, int) line: not available  
HttpClient.New(URL, Proxy, int, boolean, HttpURLConnection) line: not available 
HttpClient.New(URL, Proxy, int, HttpURLConnection) line: not available  
HttpURLConnection.getNewHttpClient(URL, Proxy, int) line: not available 
HttpURLConnection.plainConnect() line: not available [local variables unavailable]  
HttpURLConnection.connect() line: not available 
HttpURLConnection.getOutputStream() line: not available 
ServerRequest.get_response(List<Parameter>, String) line: 249   
ServerRequest.logout() line: 80 
MainWindow$2.actionPerformed(ActionEvent) line: 218 
JMenuItem(AbstractButton).fireActionPerformed(ActionEvent) line: not available  
AbstractButton$Handler.actionPerformed(ActionEvent) line: not available 
DefaultButtonModel.fireActionPerformed(ActionEvent) line: not available 
DefaultButtonModel.setPressed(boolean) line: not available  
JMenuItem(AbstractButton).doClick(int) line: not available  
BasicMenuItemUI.doClick(MenuSelectionManager) line: not available   
BasicMenuItemUI$Handler.mouseReleased(MouseEvent) line: not available   
JMenuItem(Component).processMouseEvent(MouseEvent) line: not available  
JMenuItem(JComponent).processMouseEvent(MouseEvent) line: not available 
JMenuItem(Component).processEvent(AWTEvent) line: not available 
JMenuItem(Container).processEvent(AWTEvent) line: not available 
JMenuItem(Component).dispatchEventImpl(AWTEvent) line: not available    
JMenuItem(Container).dispatchEventImpl(AWTEvent) line: not available    
JMenuItem(Component).dispatchEvent(AWTEvent) line: not available    
LightweightDispatcher.retargetMouseEvent(Component, int, MouseEvent) line: not available    
LightweightDispatcher.processMouseEvent(MouseEvent) line: not available 
LightweightDispatcher.dispatchEvent(AWTEvent) line: not available   
JFrame(Container).dispatchEventImpl(AWTEvent) line: not available   
JFrame(Window).dispatchEventImpl(AWTEvent) line: not available  
JFrame(Component).dispatchEvent(AWTEvent) line: not available   
EventQueue.dispatchEventImpl(AWTEvent, Object) line: not available  
EventQueue.access$200(EventQueue, AWTEvent, Object) line: not available 
EventQueue$3.run() line: not available  
EventQueue$3.run() line: not available  
AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]    
ProtectionDomain$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: not available 
ProtectionDomain$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext) line: not available   
EventQueue$4.run() line: not available  
EventQueue$4.run() line: not available  
AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]    
ProtectionDomain$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: not available 
EventQueue.dispatchEvent(AWTEvent) line: not available  
EventDispatchThread.pumpOneEventForFilters(int) line: not available 
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: not available  
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: not available 
EventDispatchThread.pumpEvents(int, Conditional) line: not available    
EventDispatchThread.pumpEvents(Conditional) line: not available 
EventDispatchThread.run() line: not available   

1 个答案:

答案 0 :(得分:0)

在这两种情况下,它都试图获得InetAddress ...这指向您的配置有拼写错误。或者,也许您的DNS服务器配置错误并且正在返回垃圾,尽管我打赌你的Tomcat配置被破坏了。