java.text.ParseException: Unparseable date: "01-06-2016"

GitHub | bruce-szalwinski | 5 months ago
  1. 0

    support multiple dateFormats within same file

    GitHub | 5 months ago | bruce-szalwinski
    java.text.ParseException: Unparseable date: "01-06-2016"
  2. 0

    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}

    Atlassian JIRA | 8 years ago | Andrew Myers [Atlassian]
    java.text.ParseException: Unparseable date: "09-Mrz-2008"
  3. 0

    Java bug en Preview

    GitHub | 3 years ago | rodowi
    java.text.ParseException: Unparseable date: "04/06/2014"
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    CookiesTest#testCookiesFields fails on systems with non-English Locale

    GitHub | 2 years ago | fbricon
    java.text.ParseException: Unparseable date: "Sat, 03 Jan 2015 02:17:02 GMT"
  6. 0

    Error while parsing dividend date

    GitHub | 2 years ago | jbdundas
    java.text.ParseException: Unparseable date: "9-Nov-06"

  1. DoktorDoener666 1 times, last 2 weeks ago
  2. Alexandru Popa 1 times, last 2 weeks ago
  3. maxxi 8 times, last 3 days ago
  4. iridic 5 times, last 1 month ago
  5. ivotje50 33 times, last 1 month ago
23 more registered users
10 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.text.ParseException

    Unparseable date: "01-06-2016"

    at java.text.DateFormat.parse()
  2. Java RT
    DateFormat.parse
    1. java.text.DateFormat.parse(DateFormat.java:366)
    1 frame
  3. com.databricks.spark
    CsvRelation$$anonfun$buildScan$2.apply
    1. com.databricks.spark.csv.util.TypeCast$.castTo(TypeCast.scala:73)
    2. com.databricks.spark.csv.CsvRelation$$anonfun$buildScan$2.apply(CsvRelation.scala:120)
    3. com.databricks.spark.csv.CsvRelation$$anonfun$buildScan$2.apply(CsvRelation.scala:106)
    3 frames
  4. Scala
    AbstractIterator.toArray
    1. scala.collection.Iterator$$anon$13.hasNext(Iterator.scala:371)
    2. scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:327)
    3. scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:327)
    4. scala.collection.Iterator$$anon$10.hasNext(Iterator.scala:308)
    5. scala.collection.Iterator$class.foreach(Iterator.scala:727)
    6. scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
    7. scala.collection.generic.Growable$class.$plus$plus$eq(Growable.scala:48)
    8. scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:103)
    9. scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:47)
    10. scala.collection.TraversableOnce$class.to(TraversableOnce.scala:273)
    11. scala.collection.AbstractIterator.to(Iterator.scala:1157)
    12. scala.collection.TraversableOnce$class.toBuffer(TraversableOnce.scala:265)
    13. scala.collection.AbstractIterator.toBuffer(Iterator.scala:1157)
    14. scala.collection.TraversableOnce$class.toArray(TraversableOnce.scala:252)
    15. scala.collection.AbstractIterator.toArray(Iterator.scala:1157)
    15 frames
  5. Spark Project SQL
    SparkPlan$$anonfun$5.apply
    1. org.apache.spark.sql.execution.SparkPlan$$anonfun$5.apply(SparkPlan.scala:212)
    2. org.apache.spark.sql.execution.SparkPlan$$anonfun$5.apply(SparkPlan.scala:212)
    2 frames
  6. Spark
    Executor$TaskRunner.run
    1. org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:1858)
    2. org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:1858)
    3. org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:66)
    4. org.apache.spark.scheduler.Task.run(Task.scala:89)
    5. org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:214)
    5 frames
  7. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    3. java.lang.Thread.run(Thread.java:745)
    3 frames