joda new DateTime问题(int,int,int,int,int,int,int)

胡迪:

嗨,我用weblogic 11g创建了战争应用,并且乔达时间方法有问题

new DateTime(int, int, int, int, int, int);

这引发了nosuchmethodException,但是当我使用new DateTime(int, int, int, int, int, int, int);(多一个整数)时,它可以正常更新:

DateTime start = new DateTime(1990, 1, 1, 0, 0, 0); this doesnt works
DateTime start = new DateTime(1990, 1, 1, 0, 0, 0, 0); this works

知道哪里出了问题吗?谢谢

雷·托尔:

在Joda-Time 2.0中添加了具有5和6整数参数的构造函数。7整数参数构造函数已经存在很长时间了。

检查您的Joda-Time版本。

您可能正在使用较早的版本。

UPDATE为了回应有关它在JUnit中工作但不在WebLogic中部署时的评论,我只能支持version参数。

在WebLogic中,检查您的jar(使用jar -tf)。在内部查找旧的Joda-Time版本。也许WebLogic默认将它们放在那里。或者,如果不在您的jar中,请查看WebLogic的容器类库。检查您的类路径或JRE扩展目录。随处可见,因为version参数很有意义。NoSuchMethodError还会如何发生?

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

为什么int [] a = new int [0]; 允许吗?

在Java中,如何解释此int [] [] dp = new int [110] [1 << 3];

为什么要使用int [] a = new int [1]而不是仅仅使用int a?

使用new(Integer)与int

make([] int,0),[] int {}和* new([] int)之间有什么区别?

是“ sizeof new int”;未定义的行为?

C ++ new int [0]-会分配内存吗?

x = new int [2]如何;在此Java代码中工作?

new int;中的new是操作符吗?

为什么new int(*)[3]是一个错误?

在C ++中,new int [] []是否有效?

new int [M] [N]是什么类型?

在C ++ 11中“ new int [8]()”是否等效于“ new int [8] {}”?

“ new int [5] {};”中“ {}”的目的是什么?

“ new int * ** [10]”是做什么的?

new int [0]和new int [] {}之间有什么区别

new int [n]()如何工作?

int * a和int * a = new int之间的区别

int和new int()之间的区别

声明变量(int c;和int c = new int();之间的差异;

使用joda将int天转换为月和日

“ new int [];”是什么?做?

“ int * a = new int”和“ int * a = new int [5]”之间有什么区别?

带有Joda构造函数的LocalDate表示构造函数LocalDate(int,int,int)不可见

int * array [60]和int * array之间的区别= new int(60);

Java中的动态数组?使用ArrayList与int [] array = new int [n]

'new()'int和'int * p'有什么区别

TypeError: can only concatenate str (not "int") to str - (New Learner)

new int[3] 会对 int 指针做什么?