Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#4460 closed defect (fixed)

cannot install plugins

Reported by: anonymous Owned by: anonymous
Priority: major Component: Core
Version: latest Keywords: plugins
Cc:

Description

When I try to add a plugin in the preference dialog, it does not actually download the plugin file. On restart java complains about the missing plugin class.

Also: The update on startup only pretends, it does not really update anything.

Attachments (0)

Change History (11)

comment:1 Changed 3 years ago by Gubaer

  • Owner changed from team to anonymous
  • Status changed from new to needinfo

Can't reproduce, neither on Windows 7 nor on Ubuntu.

Anything special in your environment? Disk full? Restricted user rights? I assume you're working with some kind of *nix. Which one?

comment:2 Changed 3 years ago by Gubaer

  • Priority changed from blocker to normal

Reclassifying as normal. Can't reproduce and nobody else seems to be affected.

comment:3 Changed 3 years ago by bastiK

  • Resolution set to invalid
  • Status changed from needinfo to closed

I don't know why I had this problem but it is gone now.

comment:4 Changed 3 years ago by Gubaer

Beware if you simultaneously work with two JOSM instances loading the same jar files (i.e. having the same JOSM home). The plugin update mechanisms can't deal with the locks on the jars. I recently fixed the code in so far that it doesn't fail *sillently* any more, you should at least see some kind of warning or error message in the console.

comment:5 Changed 3 years ago by bastiK

No I started with -Djosm.home=/home/user/.josm-new (where the folder .josm-new was not exitisting before).
Then I installed a plugin from the preferences and did a restart. -> Question: Update Plugin? -> Yes -> plugin directory still empty. As I said, there was an error because he couldn't find the Plugin classes.

Disk wasn't full either.

comment:6 Changed 3 years ago by bastiK

I don't remember the revision, but it was something around r2910.

comment:7 Changed 3 years ago by bastiK

  • Priority changed from normal to major
  • Resolution invalid deleted
  • Status changed from closed to reopened

I can reliably reproduce again, with head version. I (partially) identified what happens:

  • after leaving the preference dialog, the plugin is listed in the preference file (plugins=validator) but the folder ~/.josm/plugins does not contain validator.jar.
  • on restart, it tries to get PluginInformation for the validator plugin. Therefore, it runs processLocalPluginInformationFile and scans the local cache. There the validator plugin is found.
  • loadLocallyAvailablePluginInformation returns validator.
  • buildListOfPluginsToLoad assumes that validator can be loaded, since plugin information is available (wrong?)
  • loadPlugin fails

comment:8 Changed 3 years ago by Gubaer

I see.

Does the directory contain validator.jar.new? If not, this would be strange. It shouldn't contain validator.jar, it's fine if you didn't find it, because validator.jar will be created at the next startup only, should happen in installDownloadedPlugins().

comment:9 Changed 3 years ago by bastiK

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [2934]) fixes #4460 - cannot install plugins

comment:10 Changed 3 years ago by bastiK

What puzzles me is that i was the only one, affected by this.

comment:11 Changed 3 years ago by Gubaer

I wasn't affected because my local code tree already included this fix, I forgot to commit ...

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.