java.text.ParseException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • How to convert this date in required format
    via Stack Overflow by Kiran
    ,
  • When running JIRA on IBM J9 VM using a german locale, the short dates for the months are different. In particular the short date for march on Sun JVM is Mrz and this is the same as the Javascript date picker. However on IBM J9 VM the short format is Mär. This leads to a situation where the Javascript date picker will put in the wrong value (Mrz) when running on an IBM JVM (which expects Mär). The following java program illustrates the differences. {code}import java.util.*; import java.text.*; public class Test { public static void main(String[] args) { SimpleDateFormat df = new SimpleDateFormat("dd-MMM-yyyy", Locale.GERMAN); //works on sun try { df.parse("09-Mrz-2008"); System.out.println("Parsed 09-Mrz-2008 successfully"); }catch(Exception e) { e.printStackTrace(); } //works on IBM try { df.parse("09-Mär-2008"); System.out.println("Parsed 09-Mär-2008 successfully"); }catch(Exception e) { e.printStackTrace(); } } } {code} Output on Sun/ Apple JVM {noformat}[amyers@erdinger:~]$ java -version java version "1.5.0_16" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284) Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing) [amyers@erdinger:atlassian-jira-enterprise-3.13.1-standalone]$ java Test Parsed 09-Mrz-2008 successfully java.text.ParseException: Unparseable date: "09-Mär-2008" at java.text.DateFormat.parse(DateFormat.java:335) at Test.main(Test.java:20) {noformat} Output on IBM JVM {noformat}[was@centos5was bin]$ ./java -version java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build pxi32dev-20060511 (SR2)) IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223-20060504 (JIT enabled) J9VM - 20060501_06428_lHdSMR JIT - 20060428_1800_r8 GC - 20060501_AA) JCL - 20060511a [was@centos5was bin]$ ./java Test java.text.ParseException: Unparseable date: "09-Mrz-2008" at java.text.DateFormat.parse(DateFormat.java:352) at Test.main(Test.java:11) Parsed 09-Mär-2008 successfully {noformat}
    via by Andrew Myers [Atlassian],
  • Startup of Beta 1 yields (same behavior as alpha3) INFO: Could not parse : Dec 19, 2003 : java.text.ParseException: Unparseable dat e: "Dec 19, 2003" java.text.ParseException: Unparseable date: "Dec 19, 2003" at java.text.DateFormat.parse(DateFormat.java:334) at com.atlassian.confluence.util.GeneralUtil.convertToDate(GeneralUtil.j ava:301) at com.atlassian.confluence.util.GeneralUtil.loadDefaultProperties(Gener alUtil.java:97) at com.atlassian.confluence.setup.ConfluenceSetup.load(ConfluenceSetup.j ava:219) at com.atlassian.confluence.setup.ConfluenceConfigurationListener.contex tInitialized(ConfluenceConfigurationListener.java:27) at org.apache.catalina.core.StandardContext.listenerStart(StandardContex t.java:3270) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3 599) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347 ) at org.apache.catalina.core.StandardService.start(StandardService.java:4 97) at org.apache.catalina.core.StandardServer.start(StandardServer.java:219 0) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) 19.12.2003 19:36:22 org.quartz.impl.StdSchedulerFactory instantiate INFO: Quartz scheduler 'DefaultQuartzScheduler' initialized from default resourc e file in Quartz package: 'quartz.properties' 19.12.2003 19:36:22 org.quartz.impl.StdSchedulerFactory instantiate INFO: Quartz scheduler version: 1.0.7 19.12.2003 19:36:22 org.quartz.core.QuartzScheduler start INFO: Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started. [Filter: profiling] Using parameter [profile] [Filter: profiling] defaulting to off [autostart=false] [Filter: profiling] Turning filter off [profile=off]
    via by Ingomar Otter,
  • String conversion
    via by 437574,
  • Startup of Beta 1 yields (same behavior as alpha3) INFO: Could not parse : Dec 19, 2003 : java.text.ParseException: Unparseable dat e: "Dec 19, 2003" java.text.ParseException: Unparseable date: "Dec 19, 2003" at java.text.DateFormat.parse(DateFormat.java:334) at com.atlassian.confluence.util.GeneralUtil.convertToDate(GeneralUtil.j ava:301) at com.atlassian.confluence.util.GeneralUtil.loadDefaultProperties(Gener alUtil.java:97) at com.atlassian.confluence.setup.ConfluenceSetup.load(ConfluenceSetup.j ava:219) at com.atlassian.confluence.setup.ConfluenceConfigurationListener.contex tInitialized(ConfluenceConfigurationListener.java:27) at org.apache.catalina.core.StandardContext.listenerStart(StandardContex t.java:3270) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3 599) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347 ) at org.apache.catalina.core.StandardService.start(StandardService.java:4 97) at org.apache.catalina.core.StandardServer.start(StandardServer.java:219 0) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) 19.12.2003 19:36:22 org.quartz.impl.StdSchedulerFactory instantiate INFO: Quartz scheduler 'DefaultQuartzScheduler' initialized from default resourc e file in Quartz package: 'quartz.properties' 19.12.2003 19:36:22 org.quartz.impl.StdSchedulerFactory instantiate INFO: Quartz scheduler version: 1.0.7 19.12.2003 19:36:22 org.quartz.core.QuartzScheduler start INFO: Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started. [Filter: profiling] Using parameter [profile] [Filter: profiling] defaulting to off [autostart=false] [Filter: profiling] Turning filter off [profile=off]
    via by Ingomar Otter,
  • getting a date from the user
    via by 807577,
    • java.text.ParseException: Unparseable date: "2003-08-14 16:04:23" at java.text.DateFormat.parse(DateFormat.java:334) at Test.main(Test.java:6)

    Users with the same issue

    derproggerderprogger
    271 times, last one,
    pulse00pulse00
    1 times, last one,
    oddodd
    1 times, last one,
    CasperCasper
    27 times, last one,
    EricEric
    2 times, last one,
    41 more bugmates