Modify

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#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 simon04)

What steps will reproduce the problem?

  1. 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 simon04, 5 years ago

Description: modified (diff)

The given date "Thu, 01 Jan 1970 01:00:00 CET" is invalid according to https://tools.ietf.org/html/rfc2616#section-3.3.1

All HTTP date/time stamps MUST be represented in Greenwich Mean Time (GMT), without exception.

However, the plugin probably shouldn't crash.

The old-school HttpUrlConnection uses the deprecated function Date.parse() for parsing.

comment:2 by simon04, 5 years ago

Resolution: fixed
Status: newclosed

Should be fixed via [o35427], [o35428].

comment:3 by GerdP, 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

comment:4 by GerdP, 4 years ago

see [o35442]

comment:5 by GerdP, 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?

in reply to:  5 comment:6 by stoecker, 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:8 by stoecker, 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 GerdP, 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 GerdP, 4 years ago

Would this be OK?

  • build-common.xml

     
    542542    <target name="check-test">
    543543        <available file="${plugin.test.dir}" type="dir" property="test.present"/>
    544544    </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">
    546546        <mkdir dir="${plugin.test.dir}/build"/>
    547547        <mkdir dir="${plugin.test.dir}/build/unit"/>
    548548        <mkdir dir="${plugin.test.dir}/report"/>
     
    581581        <delete file="../00_core_test_config/unit-josm.home/preferences.xml" />
    582582        <delete dir="../00_core_test_config/unit-josm.home/cache" failonerror="false"/>
    583583    </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">
    585585        <sequential>
    586586            <javac debug="on" includeantruntime="false" srcdir="${plugin.test.dir}/unit" destdir="${plugin.test.dir}/build/unit" encoding="UTF-8"
    587587                target="${java.lang.version}" source="${java.lang.version}">
     
    594594            </javac>
    595595        </sequential>
    596596    </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"
    598598        description="Run unit tests. OSM API (TEST) account shall be set with -Dosm.username and -Dosm.password">
    599599        <ivy:retrieve file="${josm.ivy}" pattern="../00_core_tools/[conf].[ext]" conf="jacocoant"/>
    600600        <taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml" classpath="../00_core_tools/jacocoant.jar" />

comment:11 by simon04, 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.

comment:12 by GerdP, 4 years ago

see [o35443]

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.