Opened 10 years ago

Closed 10 years ago

#1823 closed defect (fixed)

Extensions overview display incorrect error message

Reported by: Nicklas Nordborg Owned by: everyone
Priority: minor Milestone: BASE 3.3
Component: core Version:
Keywords: Cc:

Description

In the picture the yubikey.jar icon is clearly marked with an error icon. The details also has a red error section, but the message is not the error message, but parts of what would have been displayed after a successful installation.

Attachments (1)

successful-error.png (59.1 KB ) - added by Nicklas Nordborg 10 years ago.

Download all attachments as: .zip

Change History (5)

by Nicklas Nordborg, 10 years ago

Attachment: successful-error.png added

comment:1 by Nicklas Nordborg, 10 years ago

From Tomcat's log file:

14:00:14,053 ERROR RegisterExtensionsProcessor:140 - Failed to load extensions from file: ExtensionsFile@1313835020[file:/D:/Data/Base/Plugins/3.3/yubikey.jar]
net.sf.basedb.core.ConfigurationException: Can't find the configuration file. Make sure '/yubikey.properties' is in the CLASSPATH.
	at net.sf.basedb.yubikey.YubiKey.getConfig(YubiKey.java:78)
	at net.sf.basedb.yubikey.YubiKeyAuthenticationManagerFactory.<init>(YubiKeyAuthenticationManagerFactory.java:24)
	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 java.lang.Class.newInstance(Unknown Source)
	at net.sf.basedb.util.extensions.xml.XmlLoader.createFactory(XmlLoader.java:911)
	at net.sf.basedb.util.extensions.xml.XmlLoader.loadExtensions(XmlLoader.java:750)
	at net.sf.basedb.util.extensions.xml.XmlLoader.loadLastValidatedFile(XmlLoader.java:329)
	at net.sf.basedb.util.extensions.xml.XmlLoader.loadXmlFile(XmlLoader.java:264)
	at net.sf.basedb.util.extensions.manager.processor.RegisterExtensionsProcessor.processFile(RegisterExtensionsProcessor.java:125)
	at net.sf.basedb.util.extensions.manager.ExtensionsManager.processFiles(ExtensionsManager.java:572)
	at net.sf.basedb.core.Application.start(Application.java:555)
	at net.sf.basedb.core.Application.start(Application.java:385)
	at net.sf.basedb.clients.web.servlet.StartStopServlet.init(StartStopServlet.java:58)
	at javax.servlet.GenericServlet.init(GenericServlet.java:160)
	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: net.sf.basedb.core.ConfigurationException: Can't find the configuration file. Make sure '/yubikey.properties' is in the CLASSPATH.
	at net.sf.basedb.yubikey.YubiKey.getConfig(YubiKey.java:70)
	... 28 more

comment:2 by Nicklas Nordborg, 10 years ago

Using the "Install/uninstall" wizard and forcing a re-install of YubiKey reveals the actual error in the GUI:

Failed to load extension(s): Can't find the configuration file. 
Make sure '/yubikey.properties' is in the CLASSPATH. 

I think the problem is related to #1777, but in this case, the first scan is done when BASE is starting up (from the Application.start() method) and later in the startup sequence, a second scan is made from ExtensionsControl.init(). There error is encountered in the first scan and forgotten in the second. The reason for this is a bit unclear...

comment:3 by Nicklas Nordborg, 10 years ago

(In [6501]) References #1823: Extensions overview display incorrect error message

This was caused by multiple "cooperating" issues.

  • The yubikey package contain extensions both to the web interface and to the core, thus it is loaded in two different parts of the application.
  • The error messsage in the initial scan from Application.start() was never saved.
  • When ExtensionsControl continue to load the gui extensions it will continue with gui-related installation and this is successful and stored, but the error flag is never reset.

The fix is to save core statup results in ExtensionsManager, and use those results also in the second scan (gui startup from ExtensionsControl). The second scan should not continue if there is an error from the first scan (fixed in InstalledFilter). Then, when forcing a manual re-installation the old error must be cleared (fixed in ResetErrorFlagProcessor).

comment:4 by Nicklas Nordborg, 10 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.