,445 INFO [localhost-startStop-1] annotation.ClassPathScanningCandidateComponentProvider (ClassPathScanningCandidateComponentProvider.java:231) - JSR-250 javax.annotation.ManagedBean found and supp...
,445 INFO [localhost-startStop-1] annotation.ClassPathScanningCandidateComponentProvider (ClassPathScanningCandidateComponentProvider.java:231) - JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning
20 [MLog-Init-Reporter] INFO com.mchange.v2.log.MLog - MLog clients using slf4j logging.
90 [localhost-startStop-1] INFO com.mchange.v2.uid.UidUtils - Failed to get local InetAddress for VMID. This is unlikely to matter. At all. We'll add some extra randomness
java.net.UnknownHostException: localhost.localdomain: localhost.localdomain: unknown error
at java.net.InetAddress.getLocalHost(InetAddress.java:1484)
at com.mchange.v2.uid.UidUtils.generateVmId(UidUtils.java:70)
at com.mchange.v2.uid.UidUtils.<clinit>(UidUtils.java:54)
at com.mchange.v2.c3p0.impl.C3P0ImplUtils.<clinit>(C3P0ImplUtils.java:126)
at com.mchange.v2.c3p0.impl.PoolBackedDataSourceBase.<init>(PoolBackedDataSourceBase.java:288)
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.<init>(AbstractPoolBackedDataSource.java:74)
at com.mchange.v2.c3p0.AbstractComboPooledDataSource.<init>(AbstractComboPooledDataSource.java:142)
at com.mchange.v2.c3p0.AbstractComboPooledDataSource.<init>(AbstractComboPooledDataSource.java:138)
at com.mchange.v2.c3p0.ComboPooledDataSource.<init>(ComboPooledDataSource.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1000)
http://blog.sina.com.cn/s/blog_6f3ef5c201012ddz.html
解决这个异常的方法是
主机映射的原因。
修改etc/hosts文件
用root用户登陆后
[root@bogon ~]# vi /etc/hosts
将看到如下代码:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
将以上代码修改成 也就是加个bogon
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 bogon localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
然后按ESC 冒号 wq 保存后退出 reboot 重启后生效。
问道解决。以上异常就不会出现了。一切OK了。
本文标题为:Linux部署tomcat错误:java.net.UnknownHostException: localhost.localdomain: localhost.localdomain: unknow
基础教程推荐
- java基础知识之FileInputStream流的使用 2023-08-11
- ConditionalOnProperty配置swagger不生效问题及解决 2023-01-02
- Java数据结构之对象比较详解 2023-03-07
- Java并发编程进阶之线程控制篇 2023-03-07
- Java实现查找文件和替换文件内容 2023-04-06
- springboot自定义starter方法及注解实例 2023-03-31
- JDK数组阻塞队列源码深入分析总结 2023-04-18
- Java文件管理操作的知识点整理 2023-05-19
- java实现多人聊天系统 2023-05-19
- Java实现线程插队的示例代码 2022-09-03