部署Microstrategy.war的问题解决

困扰好几天的问题终于解决了,虽然可能只是个菜鸟问题,但是十分兴奋。

 

我需要将Microstrategy.war部署到Tomcat中,以便将报表从web页面中呈现出来。

这个war包是从别人那里拷过来的,在她的机器上运行正常;后来甚至把她的tomcat6.0直接拷到我这里,但是依然出现下述错误:

java.util.MissingResourceException: Can't find bundle for base name sun.text.resources.LocaleElements, locale zh_CN
java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1508)
java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1262)
java.util.ResourceBundle.getBundle(ResourceBundle.java:789)
com.microstrategy.utils.FormatUtils$LocaleFormat.<init>(Unknown Source)
com.microstrategy.utils.FormatUtils.getLocaleFormat(Unknown Source)
com.microstrategy.utils.FormatUtils.getTypeFormat(Unknown Source)
com.microstrategy.utils.FormatUtils.parseObject(Unknown Source)
com.microstrategy.utils.FormatUtils.parseInteger(Unknown Source)
com.microstrategy.utils.ValidationHelper.getValidInt(Unknown Source)
com.microstrategy.utils.ValidationHelper.isValidInt(Unknown Source)
com.microstrategy.utils.ValidationHelper.fixInt(Unknown Source)
com.microstrategy.web.admin.beans.AdminServersHelper.scheduleIServerConnect(Unknown Source)
com.microstrategy.web.app.MSTRWebController.initializeApp(Unknown Source)
com.microstrategy.web.servlets.MainServlet.init(Unknown Source)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
java.lang.Thread.run(Thread.java:619)
这时候我用的是JDK1.6。

后来在网上看到一些类似的问题,都说在不同的jdk版本下有时不会报错,便想到了十否要将JDK换一下,于是换成jdk1.4,但是jdk1.4和tomcat6.0不兼容(在。。。tomcat6.0/bin路径下运行catalina run可以看到提示版本不支持的异常信息)

最后问题产生原因及解决方法在这篇帖子中:

We have found that dbSwing components (JdbTable, JdbTextField, JdbLabel etc) do not display dates when the application is run using JRE 1.6. The dates display correctly under JRE 1.5 and earlier.

The problem is caused by the method

protected String getDefaultPattern(int variantType)

in com.borland.dx.text.VariantFormatStr. In JRE 1.5 and earlier if no Formatter or Displaymask is set by the program, the function above loads a resource by

SystemResourceBundle.getLocaleElementsBundle(locale);

which gets the following Resourcebundle

sun.text.resources.LocaleElements

This bundle does not exist in 1.6 and an exception is thrown which is handled by setting the default Pattern to “”. These is the reason why nothing is displayed for date, time or timstamp columns.

To work round this we therefore need to set the displayMask for such columns e.g.

yourDateColumn.setDisplayMask("dd/MM/yyyy");

and dates are displayed correctly.

所以我的问题解决就是将jdk1.6换成jdk1.5。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值