Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#20632 closed defect (fixed)

IOException at start related to tag2link - jar downloaded with the'?unsigned=1' lacks mandatory files

Reported by: joris Owned by: Don-vip
Priority: normal Milestone: 21.03
Component: Trac Version: tested
Keywords: template_report jar Cc: Don-vip

Description (last modified by Don-vip)

What steps will reproduce the problem?

  1. start josm from a command prompt and look at the console output

What is the expected result?

No errors

What happens instead?

2021-03-21 17:35:23.820 SEVERE: Failed to initialize tag2link rules
2021-03-21 17:35:23.822 SEVERE: java.io.IOException: Failed to open input stream for resource 'resource://META-INF/resources/webjars/tag2link/2020.10.18/index.json'
java.io.IOException: Failed to open input stream for resource 'resource://META-INF/resources/webjars/tag2link/2020.10.18/index.json'
	at org.openstreetmap.josm.io.CachedFile.lambda$getInputStream$0(CachedFile.java:231)
	at java.base/java.util.Optional.orElseThrow(Optional.java:408)
	at org.openstreetmap.josm.io.CachedFile.getInputStream(CachedFile.java:231)
	at org.openstreetmap.josm.tools.Tag2Link.initializeFromResources(Tag2Link.java:111)
	at org.openstreetmap.josm.tools.Tag2Link.initialize(Tag2Link.java:95)
	at org.openstreetmap.josm.spi.lifecycle.InitializationTask.call(InitializationTask.java:33)
	at org.openstreetmap.josm.spi.lifecycle.InitializationTask.call(InitializationTask.java:11)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

Please provide any additional information below. Attach a screenshot if possible.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2021-03-17 18:58:40 +0100 (Wed, 17 Mar 2021)
Revision:17580
Build-Date:2021-03-17 17:59:56
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (17580 en_AU) Mac OS X 10.14.6
OS Build number: Mac OS X 10.14.6 (18G8022)
Memory Usage: 263 MB / 4096 MB (86 MB allocated, but free)
Java version: 11.0.9+7-LTS, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Look and Feel: com.apple.laf.AquaLookAndFeel
Screen: Display 69733632 1440×900 (scaling 2.00×2.00) Display 724044302 3840×2160 (scaling 1.00×1.00)
Maximum Screen Size: 3840×2160
Best cursor sizes: 16×16→16×16, 32×32→32×32

Last errors/warnings:
- 00010.229 E: Failed to initialize tag2link rules
- 00010.230 E: java.io.IOException: Failed to open input stream for resource 'resource://META-INF/resources/webjars/tag2link/2020.10.18/index.json'

Attachments (0)

Change History (13)

comment:1 by joris, 3 years ago

This happened with a .jar downloaded with the'?unsigned=1' download option. Issue does not show without this option.

comment:2 by simon04, 3 years ago

Component: CoreTrac
Owner: changed from team to stoecker

https://josm.openstreetmap.de/josm-tested.jar?lang=en&unsigned=1 lacks the file resource://META-INF/resources/webjars/tag2link/2020.10.18/index.json

comment:3 by stoecker, 3 years ago

What are these files doing there? They don't belong there.

        0  2021-03-17 18:59   META-INF/
        0  2021-03-17 18:59   META-INF/services/
       62  2021-03-17 18:59   META-INF/services/java.text.spi.DecimalFormatSymbolsProvider
      864  2021-03-17 18:59   META-INF/services/org.apache.commons.jcs3.log.LogFactory
        0  2021-03-17 18:59   META-INF/resources/
        0  2021-03-17 18:59   META-INF/resources/webjars/
        0  2021-03-17 18:59   META-INF/resources/webjars/tag2link/
        0  2021-03-17 18:59   META-INF/resources/webjars/tag2link/2020.10.18/
      770  2021-03-17 18:59   META-INF/resources/webjars/tag2link/2020.10.18/README.md
      744  2021-03-17 18:59   META-INF/resources/webjars/tag2link/2020.10.18/LICENSE
     1033  2021-03-17 18:59   META-INF/resources/webjars/tag2link/2020.10.18/schema.json
      359  2021-03-17 18:59   META-INF/resources/webjars/tag2link/2020.10.18/tag2link.wikidata.sparql
    28086  2021-03-17 18:59   META-INF/resources/webjars/tag2link/2020.10.18/taginfo.json
    37971  2021-03-17 18:59   META-INF/resources/webjars/tag2link/2020.10.18/index.json
      458  2021-03-17 18:59   META-INF/resources/webjars/tag2link/2020.10.18/package.json
      256  2021-03-17 18:59   META-INF/resources/webjars/tag2link/2020.10.18/tag2link.sophox.sparql
     2316  2021-03-17 18:59   META-INF/resources/webjars/tag2link/2020.10.18/build.js

comment:4 by stoecker, 3 years ago

Cc: Don-vip added

comment:5 by simon04, 3 years ago

  • META-INF/services/java.text.spi.DecimalFormatSymbolsProvider – #19391
  • META-INF/services/org.apache.commons.jcs3.log.LogFactory – coming from jcs
  • META-INF/resources/webjars/tag2link/2020.10.18/index.json – #19620

in reply to:  5 ; comment:6 by stoecker, 3 years ago

Replying to simon04:

  • META-INF/resources/webjars/tag2link/2020.10.18/index.json – #19620

So we import 8 useless files for one useful one?

in reply to:  3 comment:7 by Don-vip, 3 years ago

Replying to stoecker:

What are these files doing there? They don't belong there.

        0  2021-03-17 18:59   META-INF/
        0  2021-03-17 18:59   META-INF/services/
       62  2021-03-17 18:59   META-INF/services/java.text.spi.DecimalFormatSymbolsProvider

This part is included in JOSM jar since r12931 (#14602). See ticket comments for details.

in reply to:  6 comment:8 by simon04, 3 years ago

Replying to stoecker:

So we import 8 useless files for one useful one?

Since #20635/r17627 it's 7 useless files, in total 5936 bytes (w/o compression):

-rw-r--r--  0 0      0       41827 21 Mar 14:08 META-INF/resources/webjars/tag2link/2021.3.21/index.json
-rw-r--r--  0 0      0         744 21 Mar 14:08 META-INF/resources/webjars/tag2link/2021.3.21/LICENSE
-rw-r--r--  0 0      0         770 21 Mar 14:08 META-INF/resources/webjars/tag2link/2021.3.21/README.md
-rw-r--r--  0 0      0        2316 21 Mar 14:08 META-INF/resources/webjars/tag2link/2021.3.21/build.js
-rw-r--r--  0 0      0         458 21 Mar 14:08 META-INF/resources/webjars/tag2link/2021.3.21/package.json
-rw-r--r--  0 0      0        1033 21 Mar 14:08 META-INF/resources/webjars/tag2link/2021.3.21/schema.json
-rw-r--r--  0 0      0         256 21 Mar 14:08 META-INF/resources/webjars/tag2link/2021.3.21/tag2link.sophox.sparql
-rw-r--r--  0 0      0         359 21 Mar 14:08 META-INF/resources/webjars/tag2link/2021.3.21/tag2link.wikidata.sparql

comment:9 by Don-vip, 3 years ago

Description: modified (diff)

comment:10 by Don-vip, 3 years ago

Keywords: jar added
Summary: IOException at start related to tag2linkIOException at start related to tag2link - jar downloaded with the'?unsigned=1' lacks mandatory files

comment:11 by Don-vip, 3 years ago

Milestone: 21.03
Owner: changed from stoecker to Don-vip
Status: newassigned

comment:12 by Don-vip, 3 years ago

Resolution: fixed
Status: assignedclosed

fixed on server side. @Simon is it possible to not include useless files?

comment:13 by simon04, 3 years ago

In 17644/josm:

see #20632, #20635 - Tag2Link: exclude unused META-INF/resources

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.