郁闷了一上午,运行了myEclipse的clean 后,重新加载我的项目报错了....
2010-1-5 15:05:02 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre1.5.0_15\bin;C:\Program Files\tomcat\apache-tomcat-6.0.16\bin
2010-1-5 15:05:02 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2010-1-5 15:05:02 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 488 ms
2010-1-5 15:05:02 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2010-1-5 15:05:02 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.16
2010-1-5 15:05:03 org.apache.catalina.core.StandardContext addApplicationListener
信息: The listener "listeners.ContextListener" is already configured for this context. The duplicate definition has been ignored.
2010-1-5 15:05:03 org.apache.catalina.core.StandardContext addApplicationListener
信息: The listener "listeners.SessionListener" is already configured for this context. The duplicate definition has been ignored.
2010-1-5 15:05:03 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2010-1-5 15:05:03 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2010-1-5 15:05:04 org.apache.catalina.core.StandardContext addApplicationListener
信息: The listener "org.springframework.web.context.ContextLoaderListener" is already configured for this context. The duplicate definition has been ignored.
2010-1-5 15:05:04 org.apache.catalina.core.StandardContext addApplicationListener
信息: The listener "com.ving.xzfw.led.LEDListener" is already configured for this context. The duplicate definition has been ignored.
2010-1-5 15:05:04 org.apache.catalina.core.StandardContext addApplicationListener
信息: The listener "org.springframework.web.context.request.RequestContextListener" is already configured for this context. The duplicate definition has been ignored.
2010-1-5 15:05:04 org.apache.catalina.core.StandardContext addApplicationListener
信息: The listener "org.springframework.web.util.IntrospectorCleanupListener" is already configured for this context. The duplicate definition has been ignored.
Can't rea from property file: bpelConfig.properties.Make sure that the file is under proper path
Please check the property name 'led.TimingRunTime' and try it again
2010-1-5 15:05:04 org.apache.catalina.core.StandardContext listenerStart
严重: Error configuring application listener of class com.ving.xzfw.led.LEDListener
java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at com.ving.xzfw.led.LEDListener.<init>(LEDListener.java:19)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
......
(Bootstrap.java:413)
2010-1-5 15:05:04 org.apache.catalina.core.StandardContext listenerStart
严重: Skipped installing application listeners due to previous error(s)
2010-1-5 15:05:04 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2010-1-5 15:05:04 org.apache.catalina.core.StandardContext start
严重: Context [/fuNan_web] startup failed due to previous errors
2010-1-5 15:05:04 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2010-1-5 15:05:04 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2010-1-5 15:05:04 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/15 config=null
2010-1-5 15:05:04 org.apache.catalina.startup.Catalina start
信息: Server startup in 2095 ms
从控制台的信息显示
com.ving.xzfw.led.LEDListener
java.lang.NumberFormatException: For input string: ""
得知是读取我的属性文件有错。
com.ving.xzfw.led.LEDListener代码片段
private Timer timer = null;
private Logger log = Logger.getLogger(getClass());
// GetconfigInfor config = new GetconfigInfor();
GetInformation getInfo = new GetInformation("bpelConfig.properties");
Integer runTime = Integer.parseInt(getInfo.getProperty("led.TimingRunTime"));
String fileRealPath = "";
String templePath = "";
public void contextInitialized(ServletContextEvent event) {
// 在这里初始化监听器,在tomcat启动的时候监听器启动,可以在这里实现定时器功能
ServletContext context = event.getServletContext();
fileRealPath = context.getRealPath("")
+ System.getProperty("file.separator") + "LEDFile"
+ System.getProperty("file.separator");
templePath = context.getRealPath("")
+ System.getProperty("file.separator") + "led"
+ System.getProperty("file.separator");
timer = new Timer();
log.info("定时器已启动");// 添加日志,可在tomcat日志中查看到
timer.schedule(new LEDTimerTack(fileRealPath, templePath), 20000, runTime);
log.info("已经添加任务");
}
结合代码可以分析出错代码段
Integer runTime = Integer.parseInt(getInfo.getProperty("led.TimingRunTime"));
很容易才想到,获取配置属性文件 led.TimingRunTime 为空
那看看配置文件
# checkMachine
#192.168.0.130
#192.168.0.92
sql.dbIP=193.168.92
sql.user=sa
sql.password=1
sql.dbName=zktime65
sql.dbPort=1433
# create LED file
led.ledtemplate=ledtemplate.htm
led.LedRunTime=60000
led.TimingRunTime=500000
配置文件时没有问题的,那怎么会出错了。
再看看控制台的信息:
Can't rea from property file: bpelConfig.properties.Make sure that the file is under proper path
Please check the property name 'led.TimingRunTime' and try it again
这里透露很重要的信息:读取属性文件bpelConfig.properties出错了,确保文件路径是否正确....
Ok,let me check and try it again!
呵呵,没有更改任何程序,没有动配置,try ,try ...try several times!
myEclipse 终于肯认错了!哈哈
分享到:
相关推荐
然而,开发者在使用MyEclipse进行项目导出时,有时会遇到一些问题,比如标题中提到的"myeclipse10.7导出项目报错所需的jar包"。这个问题通常指的是在将项目导出为WAR(Web Application Archive)文件时,由于缺少...
解决MyEclipse导出war包时报“SECURITY ALERT: INTEGERITY CHECK ERROR”的错误 使用方法参考:https://blog.csdn.net/qq_37131111/article/details/84582925
但是,有时候我们在安装 MyEclipse 时会遇到一些问题,例如安装报错、卸载不干净等。 安装 MyEclipse 的注意事项 在安装 MyEclipse 之前,我们需要注意一些重要的事项。首先,我们需要确保系统中不存在 MyEclipse ...
解决myeclipse mac下安装报错
NULL 博文链接:https://luihuilang.iteye.com/blog/396488
总之,解决MyEclipse 10系列导出WAR包报错的关键在于细致地排查问题,从项目配置、依赖管理、环境设置等多个角度入手。在实践中,结合日志信息,大多数问题都能迎刃而解。对于复杂的案例,可能需要查阅官方文档或...
myeclipse创建maven工程报错 Could not resolve
Myeclipse js引入报错问题Myeclipse js引入报错问题
MyEclipse10.0注册报错:Error: Unable to access jarfile *.jar,可以试试我的方式可以完成注册
标题中的“myeclipse导包war报错”指的是在MyEclipse中尝试将Java Web项目打包成WAR文件时,遇到了错误。这可能由于多种原因,包括但不限于以下几点: 1. **项目配置问题**:可能是项目构建路径设置不正确,或者是...
本文主要针对"Myeclipse 2015导出war报错时的替换jar包"这一问题进行深入探讨。报错信息指出,可能需要替换特定的JAR包——`com.genuitec.eclipse.export.wizard_9.0.0.me201203160414.jar`。这个JAR文件是MyEclipse...
1、在MyEclipse中连接MySQL数据库:依次点击window–>show view–>other–>MyEclipse Database–>DB Browser 图一:找到数据库连接选项 2、选中DB Browser,右键单击,并选择New一个数据连接的菜单,新建一个MySQL...
这通常是由于MyEclipse的验证器对JavaScript代码进行了严格的语法检查,而有些情况下我们可能并不希望它对JS文件进行这样的校验。下面将详细介绍如何解决这个烦恼。 首先,我们需要了解JavaScript Validator的作用...
通过myeclipse configuration center来进行插件安装,这样往往导致虽然安装上了,但是activiti diagram 根本打不开,以上错误需要,下载一个补丁。 补丁的安装可以参考: ...
针对JSP文件,如果觉得MyEclipse默认的可视化编辑器启动较慢,可以将默认编辑器改为`MyEclipse JSP Editor`: - 进入`Windows -> Preferences -> General -> Editors -> File Associations`,找到JSP文件类型,并...
4. **设置默认编辑器**:调整JSP和XML文件的默认编辑器,例如在`Window > Preferences > General > Editors > File Associations`中将"MyEclipse JSP Editor"设为JSP文件的默认编辑器,以提高编辑体验。 5. **调整...
### MyEclipse启动和运行速度优化 在日常开发过程中,我们经常会遇到MyEclipse启动慢、运行卡顿等问题,这不仅影响工作效率,还可能导致代码编辑和调试效率降低。本文将针对这些问题提供一系列优化建议,帮助提升...
- 通过`Window > preferences > General > Editors > File Associations`,选择*.jsp文件类型,并将“MyEclipse JSP Editor”设为默认编辑器。 - 这样可以在打开JSP文件时更快地进入编辑状态。 8. **加大JVM的非...
myEclipse10.7.1破解和解决导出war出错,首先要破解,然后解决war导出报错问题。