#19146 closed defect (fixed)
Some kind of bug around dates
Reported by: | Stereo | Owned by: | Don-vip |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin http2 | Version: | |
Keywords: | template_report | Cc: |
Description (last modified by )
What steps will reproduce the problem?
- Add a tile server
What is the expected result?
Tiles get displayed
What happens instead?
Exception. No tiles.
Please provide any additional information below. Attach a screenshot if possible.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2020-04-06 02:17:07 +0200 (Mon, 06 Apr 2020) Revision:16239 Build-Date:2020-04-06 00:18:43 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (16239 en_GB) Mac OS X 10.15.4 OS Build number: Mac OS X 10.15.4 (19E287) Memory Usage: 4096 MB / 4096 MB (2365 MB allocated, but free) Java version: 14.0.1+7, AdoptOpenJDK, OpenJDK 64-Bit Server VM Screen: Display 69733632 1680x1050 Maximum Screen Size: 1680x1050 Dataset consistency test: No problems found Plugins: + AddrInterpolation (35405) + CommandLine (35405) + ImportImagePlugin (35248) + Mapillary + MovementAlert (1511141840) + OpeningHoursEditor (35414) + PicLayer (35405) + RelationDissolve (0.2.0) + alignways (35405) + apache-commons (35362) + apache-http (35092) + areaselector (359) + austriaaddresshelper (57) + buildings_tools (35405) + changeset-viewer (22) + conflation (0.6.4) + continuosDownload (91) + contourmerge (v0.1.6) + ejml (35313) + geotools (35169) + gridify (1577091848) + http2 (35356) + imagery-xml-bounds (35313) + jaxb (35092) + jna (35092) + jogl (1.2.3) + jts (35122) + log4j (35092) + opendata (35405) + openqa (0.1.9) + poly (35248) + public_transport (35405) + reltoolbox (35405) + reverter (35409) + splinex (35405) + terracer (35327) + todo (30306) + undelete (35405) + utilsplugin2 (35405) + wikipedia (1.1.3) Last errors/warnings: - E: Handled by bug report queue: java.time.format.DateTimeParseException: Text 'Thu, 01 Jan 1970 01:00:00 CET' could not be parsed at index 26 - W: Too many errors. Dropping ReportedException [thread=Thread[TMS-downloader-93,5,main], exception=java.time.format.DateTimeParseException: Text 'Thu, 01 Jan 1970 01:00:00 CET' could not be parsed at index 26, methodWarningFrom=BugReportExceptionHandler#handleException] - E: Handled by bug report queue: java.time.format.DateTimeParseException: Text 'Thu, 01 Jan 1970 01:00:00 CET' could not be parsed at index 26 - W: Too many errors. Dropping ReportedException [thread=Thread[TMS-downloader-95,5,main], exception=java.time.format.DateTimeParseException: Text 'Thu, 01 Jan 1970 01:00:00 CET' could not be parsed at index 26, methodWarningFrom=BugReportExceptionHandler#handleException] - E: Handled by bug report queue: java.time.format.DateTimeParseException: Text 'Thu, 01 Jan 1970 01:00:00 CET' could not be parsed at index 26 - W: Too many errors. Dropping ReportedException [thread=Thread[TMS-downloader-97,5,main], exception=java.time.format.DateTimeParseException: Text 'Thu, 01 Jan 1970 01:00:00 CET' could not be parsed at index 26, methodWarningFrom=BugReportExceptionHandler#handleException] - E: Handled by bug report queue: java.time.format.DateTimeParseException: Text 'Thu, 01 Jan 1970 01:00:00 CET' could not be parsed at index 26 - W: Too many errors. Dropping ReportedException [thread=Thread[TMS-downloader-96,5,main], exception=java.time.format.DateTimeParseException: Text 'Thu, 01 Jan 1970 01:00:00 CET' could not be parsed at index 26, methodWarningFrom=BugReportExceptionHandler#handleException] - E: Handled by bug report queue: java.time.format.DateTimeParseException: Text 'Thu, 01 Jan 1970 01:00:00 CET' could not be parsed at index 26 - W: Too many errors. Dropping ReportedException [thread=Thread[TMS-downloader-98,5,main], exception=java.time.format.DateTimeParseException: Text 'Thu, 01 Jan 1970 01:00:00 CET' could not be parsed at index 26, methodWarningFrom=BugReportExceptionHandler#handleException] === REPORTED CRASH DATA === BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: TMS-downloader-19 (115) java.time.format.DateTimeParseException: Text 'Thu, 01 Jan 1970 01:00:00 CET' could not be parsed at index 26 at java.base/java.time.format.DateTimeFormatter.parseResolved0(Unknown Source) at java.base/java.time.format.DateTimeFormatter.parse(Unknown Source) at java.base/java.util.Optional.map(Unknown Source) at org.openstreetmap.josm.plugins.http2.Http2Client$Http2Response.getExpiration(Http2Client.java:178) at org.openstreetmap.josm.data.cache.JCSCachedTileLoaderJob.parseHeaders(JCSCachedTileLoaderJob.java:474) at org.openstreetmap.josm.data.imagery.TMSCachedTileLoaderJob.parseHeaders(TMSCachedTileLoaderJob.java:260) at org.openstreetmap.josm.data.cache.JCSCachedTileLoaderJob.loadObject(JCSCachedTileLoaderJob.java:337) at org.openstreetmap.josm.data.cache.JCSCachedTileLoaderJob.run(JCSCachedTileLoaderJob.java:225) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source)
Attachments (0)
Change History (12)
comment:1 by , 5 years ago
Description: | modified (diff) |
---|
comment:2 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Should be fixed via [o35427], [o35428].
comment:3 by , 4 years ago
Jenkins fails.
IIGTR the unit tests must be in a directory unit, see https://josm.openstreetmap.de/jenkins/job/JOSM-Plugins/jdk=JDK8/1848/consoleText
follow-up: 6 comment:5 by , 4 years ago
Didn't help, now there is a different error. The plugin is not needed for java 8, so why does it stop the jenkins job for jdk8? Where has this to be excluded?
comment:6 by , 4 years ago
Replying to GerdP:
Didn't help, now there is a different error. The plugin is not needed for java 8, so why does it stop the jenkins job for jdk8? Where has this to be excluded?
Not needed?
That's "JOSM-Plugins" job.
comment:7 by , 4 years ago
This plugin requires Java 11 since HttpClient hasn't been introduced before – https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpClient.html
This job: https://josm.openstreetmap.de/jenkins/job/JOSM-Plugins/jdk=JDK8/
comment:8 by , 4 years ago
Probably the best would be to adapt the build.xml to issue a warning in case of Java < 8 instead of building. That would not only fix jenkins, but all builds.
comment:9 by , 4 years ago
The build.xml already sets some properties like skip-compile, skip-dist, and skip-javadoc.
It seems we don't have a similar properties for unit tests in build-common.xml.
comment:10 by , 4 years ago
Would this be OK?
-
build-common.xml
542 542 <target name="check-test"> 543 543 <available file="${plugin.test.dir}" type="dir" property="test.present"/> 544 544 </target> 545 <target name="test-init" depends="check-test" if="test.present" >545 <target name="test-init" depends="check-test" if="test.present" unless="skip-compile"> 546 546 <mkdir dir="${plugin.test.dir}/build"/> 547 547 <mkdir dir="${plugin.test.dir}/build/unit"/> 548 548 <mkdir dir="${plugin.test.dir}/report"/> … … 581 581 <delete file="../00_core_test_config/unit-josm.home/preferences.xml" /> 582 582 <delete dir="../00_core_test_config/unit-josm.home/cache" failonerror="false"/> 583 583 </target> 584 <target name="test-compile" depends="test-init,dist" if="test.present" >584 <target name="test-compile" depends="test-init,dist" if="test.present" unless="skip-compile"> 585 585 <sequential> 586 586 <javac debug="on" includeantruntime="false" srcdir="${plugin.test.dir}/unit" destdir="${plugin.test.dir}/build/unit" encoding="UTF-8" 587 587 target="${java.lang.version}" source="${java.lang.version}"> … … 594 594 </javac> 595 595 </sequential> 596 596 </target> 597 <target name="test" depends="dist, test-clean, test-compile" if="test.present" 597 <target name="test" depends="dist, test-clean, test-compile" if="test.present" unless="skip-compile" 598 598 description="Run unit tests. OSM API (TEST) account shall be set with -Dosm.username and -Dosm.password"> 599 599 <ivy:retrieve file="${josm.ivy}" pattern="../00_core_tools/[conf].[ext]" conf="jacocoant"/> 600 600 <taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml" classpath="../00_core_tools/jacocoant.jar" />
comment:11 by , 4 years ago
In https://trac.openstreetmap.org/browser/subversion/applications/editors/josm/plugins/http2/build.xml, we set skip-compile
, skip-dist
, skip-javadoc
. Thus, I suggest to use a separate property skip-test
for clarity.
The given date
"Thu, 01 Jan 1970 01:00:00 CET"
is invalid according to https://tools.ietf.org/html/rfc2616#section-3.3.1However, the plugin probably shouldn't crash.
The old-school
HttpUrlConnection
uses the deprecated functionDate.parse()
for parsing.