#22263 closed defect (fixed)
[PATCH] Could not load plug-in 'ImportImagePlugin'
Reported by: | syncronic | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin importimage | Version: | tested |
Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
- JOSM version 18513 works fine
- update Plugins to the latest
- start JOSM
What is the expected result?
load all plugins
What happens instead?
Does not load plug-in 'ImportImagePlugin'
Please provide any additional information below. Attach a screenshot if possible.
URL:https://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2022-07-07 23:02:39 +0200 (Thu, 07 Jul 2022) Build-Date:2022-07-08 01:30:57 Revision:18513 Relative:URL: ^/trunk Identification: JOSM/1.5 (18513 en_GB) Windows 7 64-Bit OS Build number: Windows 7 Professional (7601) Memory Usage: 463 MB / 2667 MB (224 MB allocated, but free) Java version: 1.8.0_341-b10, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel Screen: \Display0 1920×1080 (scaling 1.00×1.00) \Display1 2560×1440 (scaling 1.00×1.00) Maximum Screen Size: 2560×1440 Best cursor sizes: 16×16→48×48, 32×32→48×48 System property file.encoding: Cp1252 System property sun.jnu.encoding: Cp1252 Locale info: en_GB Numbers with default locale: 1234567890 -> 1234567890 Plugins: + ImportImagePlugin + Mapillary (2.0.0-beta.15) + apache-commons (36003) + apache-http (35924) + ejml (35924) + geotools (36008) + jackson (36006) + jaxb (35952) + jna (36005) + jts (36004) + log4j (36007) + opendata (35984) + undelete (35893) + utilsplugin2 (36001) Tagging presets: + https://josm.openstreetmap.de/josmfile?page=Presets/caravan_site&zip=1 + https://josm.openstreetmap.de/josmfile?page=Presets/Camp_site_extends&zip=1 + https://josm.openstreetmap.de/josmfile?page=Presets/hiking_routes_with_trail_marking&zip=1 + https://josm.openstreetmap.de/josmfile?page=Presets/LaneAttributes&zip=1 Map paint styles: - https://josm.openstreetmap.de/josmfile?page=Styles/Enhanced_Lane_and_Road_Attributes&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/PriorityRoad&zip=1 - https://pasharm.github.io/New_basic_style_for_JOSM/New_basic_style.mapcss - C:\prog\JOSM\Kaart-Styles.mapcss Last errors/warnings: - 00008.064 E: java.lang.IllegalStateException: Error adding certificate AC RAIZ FNMT-RCM - certificate fingerprint mismatch. Expected ebc5570c29018c4d67b1aa127baf12f703b4611ebc17b7dab5573894179b93fa, was 4d9ebb28825c9643ab15d54e5f9614f13cb3e95de3cf4eac971301f320f9226e - 00051.981 E: org.openstreetmap.josm.plugins.PluginException: An error occurred in plug-in ImportImagePlugin. Cause: java.lang.reflect.InvocationTargetException. Cause: java.lang.IllegalStateException: Pattern does not contain a date - 00052.069 W: Disable plug-in - Could not load plug-in 'ImportImagePlugin'. Delete from preferences?
Attachments (3)
Change History (21)
comment:1 by , 2 years ago
Owner: | changed from | to
---|---|
Priority: | major → normal |
Status: | new → needinfo |
follow-up: 3 comment:2 by , 2 years ago
The problem is permanent. I cannot use ImportImagePlugin. There is no error message at startup. There is only the option to diable the plugin and I dont see a possibility to report the bug from that window. The only error message I have seen is in the status report:
- 00051.981 E: org.openstreetmap.josm.plugins.PluginException: An error occurred in plug-in ImportImagePlugin. Cause: java.lang.reflect.InvocationTargetException. Cause: java.lang.IllegalStateException: Pattern does not contain a date
Could it be an issue of Java 8 ?
I try to check it on Windows10 with Java 11
comment:3 by , 2 years ago
Replying to nicco2@…:
The problem is permanent. I cannot use ImportImagePlugin. There is no error message at startup. There is only the option to diable the plugin and I dont see a possibility to report the bug from that window. The only error message I have seen is in the status report:
There should be the option. I'll see if I can reproduce with an arbitrary crash on plugin load.
- 00051.981 E: org.openstreetmap.josm.plugins.PluginException: An error occurred in plug-in ImportImagePlugin. Cause: java.lang.reflect.InvocationTargetException. Cause: java.lang.IllegalStateException: Pattern does not contain a date
Could it be an issue of Java 8 ?
Probably not Java 8 specific. I tried reproducing under Java 8 with Mac.
I try to check it on Windows10 with Java 11
We do have windows installers, if you want to use those. They come with a bundled Java 17 JRE.
comment:4 by , 2 years ago
OK. I was able to reproduce the failure to give a bug report option when a plugin did not properly load. I'll see if I can fix that (it really should be doing a bug report, absent a good reason).
Anyway, another option would be to run (from the command line, that would be the cmd
or powershell
programs)
java.exe -jar PATH_TO_JOSM_JAR
You should be able to drag and drop the jar into the terminal window to avoid typing in the path.
comment:5 by , 2 years ago
I've opened #22266 for the bug report issue. If you use attachment:josm-custom.jar:ticket:22266 , it should open a proper bug report for this issue.
comment:6 by , 2 years ago
Here is the report from the terminal window:
2022-08-04 11:36:42.359 INFORMATION: Protokollierungsgrad ist bei INFORMATION (INFO, 800) 2022-08-04 11:36:43.467 INFO: Detected usable IPv6 network, preferring IPv6 over IPv4. 2022-08-04 11:36:46.181 WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5. 2022-08-04 11:36:46.649 SEVERE: java.lang.IllegalStateException: Error adding certificate AC RAIZ FNMT-RCM - certificate fingerprint mismatch. Expected ebc5570c29018c4d67b1aa127baf12f703b4611ebc17b7dab5573894179b93fa, was 4d9ebb28825c9643ab 15d54e5f9614f13cb3e95de3cf4eac971301f320f9226e java.lang.IllegalStateException: Error adding certificate AC RAIZ FNMT-RCM - certificate fingerprint mismatch. Expected ebc5570c29018c4d67b1aa127baf12f703b4611ebc17b7dab5573894179b93fa, was 4d9ebb28825c9643ab15d54e5f9614f13cb3e95de3cf4eac97 1301f320f9226e at org.openstreetmap.josm.io.CertificateAmendment.checkAndAddCertificate(CertificateAmendment.java:264) at org.openstreetmap.josm.io.CertificateAmendment.addMissingCertificates(CertificateAmendment.java:241) at org.openstreetmap.josm.gui.MainApplication.mainJOSM(MainApplication.java:878) at org.openstreetmap.josm.gui.MainApplication$3.processArguments(MainApplication.java:277) at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:741) 2022-08-04 11:36:49.208 WARNING: Update plug-ins - You updated your JOSM software. To prevent problems the plug-ins should be updated as well. Update plug-ins now? 2022-08-04 11:36:52.328 INFO: loading plugin 'jaxb' (version 35952) 2022-08-04 11:36:52.343 INFO: loading plugin 'log4j' (version 36007) 2022-08-04 11:36:54.434 INFO: GET https://api.openstreetmap.org/api/0.6/user/details -> HTTP/1.1 200 (427 ms; 397 B) 2022-08-04 11:36:55.588 INFO: GET https://josm.openstreetmap.de/wiki/En_GB:StartupPage -> HTTP/1.1 200 (507 ms) 2022-08-04 11:36:56.493 INFO: Obtained 82 Tag2Link rules from resource://META-INF/resources/webjars/tag2link/2021.3.21/index.json 2022-08-04 11:36:57.819 INFO: Defaults for clr.mappaint.Neuer Grundstil.node_selected differ: [#4A4A4A, mappaint, Neuer Grundstil, node_selected] != [#FFFFFF, mappaint, Neuer Grundstil, node_selected] 2022-08-04 11:36:57.834 INFO: Defaults for clr.mappaint.Neuer Grundstil.node_selected differ: [#FFFFFF, mappaint, Neuer Grundstil, node_selected] != [#4A4A4A, mappaint, Neuer Grundstil, node_selected] 2022-08-04 11:36:57.850 INFO: Defaults for clr.mappaint.Neuer Grundstil.node_selected differ: [#4A4A4A, mappaint, Neuer Grundstil, node_selected] != [#FFFFFF, mappaint, Neuer Grundstil, node_selected] 2022-08-04 11:36:57.866 INFO: Defaults for clr.mappaint.Neuer Grundstil.node_selected differ: [#FFFFFF, mappaint, Neuer Grundstil, node_selected] != [#4A4A4A, mappaint, Neuer Grundstil, node_selected] 2022-08-04 11:36:57.959 INFO: Defaults for clr.mappaint.Neuer Grundstil.node_selected differ: [#4A4A4A, mappaint, Neuer Grundstil, node_selected] != [#FFFFFF, mappaint, Neuer Grundstil, node_selected] 2022-08-04 11:36:57.975 INFO: Defaults for clr.mappaint.Neuer Grundstil.node_selected differ: [#FF2F14, mappaint, Neuer Grundstil, node_selected] != [#4A4A4A, mappaint, Neuer Grundstil, node_selected] 2022-08-04 11:36:57.990 INFO: Defaults for clr.mappaint.Neuer Grundstil.node_selected differ: [#FFFFFF, mappaint, Neuer Grundstil, node_selected] != [#FF2F14, mappaint, Neuer Grundstil, node_selected] 2022-08-04 11:36:57.990 INFO: Defaults for clr.mappaint.Neuer Grundstil.node_selected differ: [#4A4A4A, mappaint, Neuer Grundstil, node_selected] != [#FFFFFF, mappaint, Neuer Grundstil, node_selected] 2022-08-04 11:36:58.006 INFO: Defaults for clr.mappaint.Neuer Grundstil.node_selected differ: [#FFFFFF, mappaint, Neuer Grundstil, node_selected] != [#4A4A4A, mappaint, Neuer Grundstil, node_selected] 2022-08-04 11:36:58.022 INFO: Defaults for clr.mappaint.Neuer Grundstil.node_selected differ: [#4A4A4A, mappaint, Neuer Grundstil, node_selected] != [#FFFFFF, mappaint, Neuer Grundstil, node_selected] 2022-08-04 11:36:58.084 INFO: Update imagery 'Bing Luftbild' 2022-08-04 11:36:58.084 INFO: Update imagery 'Esri Luftbilder' 2022-08-04 11:36:58.100 INFO: Update imagery 'Esri World Luftbilder (Clarity) Beta' 2022-08-04 11:36:58.131 INFO: Update imagery 'Locator-Einblendung' 2022-08-04 11:36:58.146 INFO: Update imagery 'Mapbox Satellitenbild' 2022-08-04 11:36:58.146 INFO: Update imagery 'Maxar Premium-Luftbild' 2022-08-04 11:37:02.436 INFO: loading plugin 'apache-commons' (version 36003) 2022-08-04 11:37:02.452 INFO: loading plugin 'jts' (version 36004) 2022-08-04 11:37:02.483 INFO: loading plugin 'jna' (version 36005) 2022-08-04 11:37:02.826 INFO: loading plugin 'ejml' (version 35924) 2022-08-04 11:37:02.826 INFO: loading plugin 'apache-http' (version 35924) 2022-08-04 11:37:02.889 INFO: loading plugin 'geotools' (version 36008) 2022-08-04 11:37:05.541 INFO: Warp/affine reduction enabled: true Error in registry file at line number #4 org.jaitools.media.jai.contour.ContourDescriptor Error in registry file at line number #5 org.jaitools.media.jai.rangelookup.RangeLookupDescriptor Error in registry file at line number #6 org.jaitools.media.jai.vectorbinarize.VectorBinarizeDescriptor Error in registry file at line number #7 org.jaitools.media.jai.vectorize.VectorizeDescriptor Error in registry file at line number #16 org.jaitools.media.jai.contour.ContourRIF Error in registry file at line number #17 org.jaitools.media.jai.rangelookup.RangeLookupRIF Error in registry file at line number #18 org.jaitools.media.jai.vectorbinarize.VectorBinarizeRIF Error in registry file at line number #19 org.jaitools.media.jai.vectorize.VectorizeRIF 2022-08-04 11:37:08.536 INFO: loading plugin 'utilsplugin2' (version 36001) 2022-08-04 11:37:08.770 INFO: loading plugin 'opendata' (version 35984) 2022-08-04 11:37:08.926 INFO: loading plugin 'Mapillary' (version 2.0.0-beta.15) 2022-08-04 11:37:09.004 INFO: RemoteControl: adding command "photo" (handled by MapillaryRemoteControl) 2022-08-04 11:37:09.004 INFO: RemoteControl: adding command "mapillaryfilter" (handled by MapillaryFilterRemoteControl) 2022-08-04 11:37:09.035 INFO: loading plugin 'jackson' (version 36006) 2022-08-04 11:37:09.066 INFO: loading plugin 'ImportImagePlugin' (version 35893) ERROR StatusLogger Unrecognized format specifier [d] ERROR StatusLogger Unrecognized conversion specifier [d] starting at position 16 in conversion pattern. ERROR StatusLogger Unrecognized format specifier [thread] ERROR StatusLogger Unrecognized conversion specifier [thread] starting at position 25 in conversion pattern. ERROR StatusLogger Unrecognized format specifier [level] ERROR StatusLogger Unrecognized conversion specifier [level] starting at position 35 in conversion pattern. ERROR StatusLogger Unrecognized format specifier [logger] ERROR StatusLogger Unrecognized conversion specifier [logger] starting at position 47 in conversion pattern. ERROR StatusLogger Unrecognized format specifier [msg] ERROR StatusLogger Unrecognized conversion specifier [msg] starting at position 54 in conversion pattern. ERROR StatusLogger Unrecognized format specifier [n] ERROR StatusLogger Unrecognized conversion specifier [n] starting at position 56 in conversion pattern. ERROR StatusLogger Unrecognized format specifier [d] ERROR StatusLogger Unrecognized conversion specifier [d] starting at position 16 in conversion pattern. ERROR StatusLogger Unrecognized format specifier [thread] ERROR StatusLogger Unrecognized conversion specifier [thread] starting at position 25 in conversion pattern. ERROR StatusLogger Unrecognized format specifier [level] ERROR StatusLogger Unrecognized conversion specifier [level] starting at position 35 in conversion pattern. ERROR StatusLogger Unrecognized format specifier [logger] ERROR StatusLogger Unrecognized conversion specifier [logger] starting at position 47 in conversion pattern. ERROR StatusLogger Unrecognized format specifier [msg] ERROR StatusLogger Unrecognized conversion specifier [msg] starting at position 54 in conversion pattern. ERROR StatusLogger Unrecognized format specifier [n] ERROR StatusLogger Unrecognized conversion specifier [n] starting at position 56 in conversion pattern. 2022-08-04 11:37:10,533 main ERROR Unrecognized format specifier [d] 2022-08-04 11:37:10,533 main ERROR Unrecognized conversion specifier [d] starting at position 11 in conversion pattern. 2022-08-04 11:37:10,548 main ERROR Unrecognized format specifier [t] 2022-08-04 11:37:10,548 main ERROR Unrecognized conversion specifier [t] starting at position 26 in conversion pattern. 2022-08-04 11:37:10,580 main ERROR Unrecognized format specifier [c] 2022-08-04 11:37:10,580 main ERROR Unrecognized conversion specifier [c] starting at position 30 in conversion pattern. 2022-08-04 11:37:10,580 main ERROR Unrecognized format specifier [m] 2022-08-04 11:37:10,595 main ERROR Unrecognized conversion specifier [m] starting at position 34 in conversion pattern. 2022-08-04 11:37:10,611 main ERROR Unrecognized format specifier [n] 2022-08-04 11:37:10,626 main ERROR Unrecognized conversion specifier [n] starting at position 36 in conversion pattern. 2022-08-04 11:37:10,798 main ERROR Unrecognized format specifier [d] 2022-08-04 11:37:10,798 main ERROR Unrecognized conversion specifier [d] starting at position 87 in conversion pattern. 2022-08-04 11:37:10.814 SEVERE: org.openstreetmap.josm.plugins.PluginException: An error occurred in plug-in ImportImagePlugin. Cause: java.lang.reflect.InvocationTargetException. Cause: java.lang.IllegalStateException: Pattern does not con tain a date org.openstreetmap.josm.plugins.PluginException: An error occurred in plug-in ImportImagePlugin at org.openstreetmap.josm.plugins.PluginInformation.load(PluginInformation.java:387) at org.openstreetmap.josm.plugins.PluginHandler.loadPlugin(PluginHandler.java:813) at org.openstreetmap.josm.plugins.PluginHandler.loadPlugins(PluginHandler.java:898) at org.openstreetmap.josm.plugins.PluginHandler.loadLatePlugins(PluginHandler.java:950) at org.openstreetmap.josm.gui.MainApplication.loadLatePlugins(MainApplication.java:1226) at org.openstreetmap.josm.gui.MainApplication.mainJOSM(MainApplication.java:956) at org.openstreetmap.josm.gui.MainApplication$3.processArguments(MainApplication.java:277) at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:741) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.openstreetmap.josm.plugins.PluginInformation.load(PluginInformation.java:382) ... 7 more Caused by: java.lang.IllegalStateException: Pattern does not contain a date at org.apache.logging.log4j.core.appender.rolling.PatternProcessor.getNextTime(PatternProcessor.java:161) at org.apache.logging.log4j.core.appender.rolling.TimeBasedTriggeringPolicy.initialize(TimeBasedTriggeringPolicy.java:117) at org.apache.logging.log4j.core.appender.rolling.CompositeTriggeringPolicy.initialize(CompositeTriggeringPolicy.java:54) at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.initialize(RollingFileManager.java:170) at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:142) at org.apache.log4j.builders.appender.DailyRollingFileAppenderBuilder.createAppender(DailyRollingFileAppenderBuilder.java:171) at org.apache.log4j.builders.appender.DailyRollingFileAppenderBuilder.parseAppender(DailyRollingFileAppenderBuilder.java:133) at org.apache.log4j.builders.BuilderManager.parseAppender(BuilderManager.java:144) at org.apache.log4j.config.PropertiesConfiguration.parseAppender(PropertiesConfiguration.java:456) at org.apache.log4j.config.PropertiesConfiguration.parseLogger(PropertiesConfiguration.java:431) at org.apache.log4j.config.PropertiesConfiguration.configureRoot(PropertiesConfiguration.java:351) at org.apache.log4j.config.PropertiesConfiguration.doConfigure(PropertiesConfiguration.java:328) at org.apache.log4j.config.PropertiesConfiguration.doConfigure(PropertiesConfiguration.java:129) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:303) at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:167) at org.openstreetmap.josm.plugins.ImportImagePlugin.ImportImagePlugin.initializeLogger(ImportImagePlugin.java:167) at org.openstreetmap.josm.plugins.ImportImagePlugin.ImportImagePlugin.<init>(ImportImagePlugin.java:67) ... 12 more 2022-08-04 11:37:11.032 WARNING: Disable plug-in - Could not load plug-in 'ImportImagePlugin'. Delete from preferences? 2022-08-04 11:37:14.760 INFO: loading plugin 'undelete' (version 35893) 2022-08-04 11:37:15.416 INFO: Message notifier active (checks every 5 minutes) 2022-08-04 11:37:15.462 INFO: Changeset updater active (checks every 60 minutes if open changesets have been closed) 2022-08-04 11:37:15.665 INFO: GET https://api.openstreetmap.org/api/0.6/user/details (get number of unread messages) -> HTTP/1.1 200 (210 ms; 397 B) 2022-08-04 11:37:21.765 INFO: Changeset updater inactive 2022-08-04 11:37:21.765 INFO: Message notifier inactive
comment:7 by , 2 years ago
OK.
- Please upload the
log4j.properties
file from wiki:Help/Preferences#JOSMpreferencedatacachedirectories (it should be in the user data directory underplugins/ImportImagePlugin
) - Delete that file and try again.
It looks like the ImportImagePlugin is old enough to have needed to use a third party logging library. I'll see about moving it to the JOSM logging class.
by , 2 years ago
Attachment: | 22263.patch added |
---|
Remove use of Log4J classes, use JOSM internal logger. Also, various sonar lint fixes.
by , 2 years ago
Attachment: | ImportImagePlugin.jar added |
---|
comment:8 by , 2 years ago
You can alternatively try using attachment:ImportImagePlugin.jar (it contains the changes from attachment:22263.patch).
I need to do some testing, since there were quite a few code changes I made for lint purposes, along with the logging stuff.
comment:9 by , 2 years ago
Owner: | changed from | to
---|---|
Status: | needinfo → new |
comment:10 by , 2 years ago
Summary: | Could not load plug-in 'ImportImagePlugin' → [PATCH] Could not load plug-in 'ImportImagePlugin' |
---|
comment:13 by , 2 years ago
this is log4j.properties
#Wed Dec 02 22:03:28 CET 2015 log4j.rootLogger=ALL, MyRoFiAppender log4j.appender.MyRoFiAppender.layout=org.apache.log4j.PatternLayout log4j.appender.MyRoFiAppender=org.apache.log4j.DailyRollingFileAppender log4j.appender.MyRoFiAppender.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c\: %m%n
comment:14 by , 2 years ago
That looks like the same as source:osm/applications/editors/josm/plugins/ImportImagePlugin/resources/log4j.properties@23145 . Which makes things fun since I wasn't able to reproduce (I have no clue why).
Best guess, this was probably due to the log4j 1.x to 2.x transition. In any case, the ImportImagePlugin now uses JOSM internal logging as of r36013/osm. And I'll be applying the patch in #22266 next week so that next time something like this happens, we don't have to do this dance of "can you start JOSM from the command line".
comment:15 by , 2 years ago
I deleted the log4j.properties and started JOSM again. That solved the problem. The plugin loads and works.
Then I tried your new ImportImagePlugin.jar
That does not load with message:
Could not load plugin 'ImportImagePlugin' because the plugin main class 'org.openstreetmap.josm.plugins.ImportImagePlugin.ImportImagePlugin' was not found. Delete from preferences?
comment:16 by , 2 years ago
That is odd. I just downloaded it from the ticket and from the actual repository, and it had the class. Can you try deleting the plugin and reinstalling it? (See wiki:Help/Preferences/Plugins#Manualinstallation for where the plugin file is, if you don't already know)
comment:17 by , 2 years ago
sorry, probably I downloaded some crap from the links above. The size of the ImportImagePlugin.jar was only 5kB. I tried again and now it works. Size is 54.772 Bytes which is slightly less than the old one.
comment:18 by , 2 years ago
No worries. You probably just downloaded the HTML page with additional details.
@nicco2: How reproducible is this? I wasn't able to reproduce. If it is reproducible, there should be a window that appears when the ImportImage plugin fails to load, which should have more information (when reporting the bug from that window).
As a heads up, Windows 7 is EOL as of January 24, 2020. See https://www.microsoft.com/en-us/windows/end-of-support for more information.
I don't have access to a Windows machine, so I don't know if this bug is specific to Windows (I couldn't reproduce on Mac).