十分的不解啊,已经修改为jdk1.6编译,在tomcat中还是错误。

2012-9-8 14:34:45 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class com.sencloud.dh.core.web.listener.StartupListener
java.lang.NoSuchMethodError: java.util.Properties.load(Ljava/io/Reader;)V
 at com.sencloud.dh.core.utils.AppUtil.init(AppUtil.java:259)
 at com.sencloud.dh.core.web.listener.StartupListener.contextInitialized(StartupListener.java:30)
 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
 at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
 at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
 at org.apache.catalina.core.StandardService.start(StandardService.java:525)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
2012-9-8 14:34:45 org.apache.catalina.core.StandardContext start
 解决方法:	
原始代码:为注释部分
  Properties props = new Properties();
        try
        {
            // FileInputStream fis = new FileInputStream(configFilePath);
            // InputStreamReader reader = new InputStreamReader(fis, "UTF-8");
            InputStream inputStream = new BufferedInputStream(new FileInputStream(configFilePath));
            props.load(inputStream);
            Iterator it = props.keySet().iterator();
            while (it.hasNext())
            {
                // String key = (String) it.next();
                String key = (String) it.next();
                String value = props.get(key).toString();
                value = new String(value.getBytes("ISO8859-1"), "UTF-8");
                configMap.put(key, value);
            }
        }
        catch (Exception ex)
        {
            logger.error(ex.getMessage());
        }											

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值