GateNLP / gate-core

The GATE Embedded core API and GATE Developer application
GNU Lesser General Public License v3.0
75 stars 29 forks source link

Odd problem loading the prepared ANNIE application #136

Closed johann-petrak closed 3 years ago

johann-petrak commented 3 years ago

Freshly installed GATE 9.0 snapshot, e4210b2 on Windows 10 after installing AdoptOpenJDK 11.

After starting Gate, tried to load the prepared ANNIE pipeline and got the following message to stderr: "The URL of the application has not bee correctly set and cannot be loaded"

Tried this two times and got the message each time.

I then tried to load the prepared OpenNLP pipeline, which worked and which seems to load annie as part of it.

Then tried to load the prepared ANNIE again, and this time it worked.

gate-screenshot1

greenwoodma commented 3 years ago

This happens if you try and load an application before we've had chance to pull down the list of default plugins from github. Now you've run GATE once and got the list (which is why the OpenNLP app loads) it should never re-occur. I admit the message isn't great though, will see if I can re-word it to make it clear what's happening.

ianroberts commented 3 years ago

This may be a timing issue - how soon after launch did you do this test? If you try the menu action to load ANNIE and you don't already have an ANNIE plugin loaded, the action has to find a suitable ANNIE plugin to load first, before it can load the app within the plugin. It does this by calling PluginUpdateManager.getDefaultPlugins() and appending this list of plugins to the list of plugins already loaded, then scans that list to find one with the right group and artifact name (the idea being that if you already have an ANNIE plugin loaded it'll use that, if you don't it'll use the default version of ANNIE for this version of GATE).

However the default plugins list is populated asynchronously in the background when GATE Developer first launches, and if you call PluginUpdateManager.getDefaultPlugins() before the default plugins list has been downloaded from GitHub and the -creole.jar files have been cached then it gives you an empty list.

greenwoodma commented 3 years ago

It's easy to spot this case in the code as the list of plugins will be empty. So I'm going to add the following alternative message for this specific case: No plugins are currently known to GATE, so we cannot load the requested application. If this is the first time you have opened GATE please wait a minute, while we build the cache of known plugins, and then try again. Does that seem like sensible wording?

greenwoodma commented 3 years ago

I've also tweaked the original message (for the case someone builds a menu item and gets the details wrong) to state that: The URL of the application does not point to a known plugin and so cannot be loaded.

ianroberts commented 3 years ago

If this is the first time you have opened GATE please wait a minute, while we build the cache of known plugins, and then try again.

Maybe something like "There may be a short delay while GATE builds the cache of known plugins, you can open the plugin manager to see the progress of this task"

johann-petrak commented 3 years ago

Just got the new message, works fine!