Linux:Tomcat报错:java.lang.IllegalStateException: Cannot run without an instance id.解决方法

本文已迁移到我的新博客地址:blog.favorstack.io 欢迎访问~

Redhat服务器上,每次启动tomcat都会夹杂着这一段错误信息,虽然还没觉得有什么影响,但总觉得不舒服:

java.lang.IllegalStateException: Cannot run without an instance id.
 at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:1206)
 at org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1509)
 at org.quartz.ee.servlet.QuartzInitializerListener.contextInitialized(QuartzInitializerListener.java:152)
 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
 at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:963)
 at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1600)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
 at java.util.concurrent.FutureTask.run(FutureTask.java:166)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at java.lang.Thread.run(Thread.java:722)

。。。

修改如下:

vi 编辑  /etc/hosts文件,将当前服务器主机名加入127.0.0.1这一行即可(位置前、中、后随意),注意空格与其他名字分开:

Linux:Tomcat报错:java.lang.IllegalStateException: Cannot run without an instance id.解决方法_第1张图片


保存后重启tomcat服务即可。

 

 

参考:

http://www.liferay.com/zh/community/forums/-/message_boards/message/12196921

 

本文已迁移到我的新博客地址:blog.favorstack.io 欢迎访问~

你可能感兴趣的:(Linux/Unix,Tomcat)