简体   繁体   中英

problem with joda new DateTime(int,int,int,int,int,int)

Hi I creating war aplication with weblogic 11g and I have problem with joda time's method

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

this thrown nosuchmethodException but when I use new DateTime(int, int, int, int, int, int, int); (one int more) it works fine update:

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

Any idea where is problem ? thx

The constructors with 5 and 6 integer arguments were added in Joda-Time 2.0. The 7 integer argument constructor has been there a long time.

Check your version of Joda-Time.

You may be using an earlier one.

UPDATE In response to the comment about it working in JUnit but not when deployed in WebLogic, I can only stand by the version argument.

In WebLogic, examine your jar (use jar -tf ). Look inside for old Joda-Time versions. Perhaps WebLogic put them there by default. Or if not in your jar, look in WebLogic's container class library. Check your classpath, or JRE extensions directory. Look everywhere you can, because, well, the version argument makes sense. How else would a NoSuchMethodError occur?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM