Opened 10 years ago

Closed 10 years ago

#615 closed enhancement (fixed)

Lab environment extension stability improvement and bug fixes for v1.1

Reported by: olle Owned by: olle
Priority: major Milestone: LabEnv v1.2
Component: net.sf.basedb.labenv Keywords:
Cc:

Description

Lab environment extension stability improvement and bug fixes for v1.1 following the first field tests.

Change History (12)

comment:1 by olle, 10 years ago

Status: newassigned

Ticket accepted.

comment:2 by olle, 10 years ago

Traceability note:

  • The lab environment extension was introduced in Ticket #529 (Retrieve and store temperature and humidity measurements).
  • The lab environment extension was updated in Ticket #592 (Lab environment extension improved report routines), specifically regarding graphs of lab environment data for a chosen time interval, new time filters, and improved alarm functionality.

Other tickets for LabEnv v1.2 are:

  • Ticket #607 (Date /time format is different in configuration file and GUI).
  • Ticket #610 (Mail server prints debug output as default).
  • Ticket #612 (LabEnv overview display shows wrong time offsets when the latest data points are filtered away).

comment:3 by olle, 10 years ago

LabEnv stability discussion:

  • The lab environment extension sometimes stop storing data, even though the BASE extension itself is still running. Already stored data could still be accessed, so the database file did not appear to have been corrupted. Restarting the lab environment extension normally made the data collection and storage to resume, provided that communication with the lab sensors was working. The log file did not contain any clues in the form or error messages or exceptions directly prior to the stopped data collection and storage.

Probable cause:

  • Nicklas Nordborg pointed out (Thanks!) that if the TimerTask run() method in public method void start() in class/file LabEnvService.java in src/net/sf/basedb/labenv/service/ throws an exception, the timer might stop as a result. A simple solution is to put the code inside the run() method in a try-catch block that catches all exceptions and writes them to the log file, before swallowing them.
Last edited 10 years ago by olle (previous) (diff)

comment:4 by olle, 10 years ago

(In [2539]) Refs #615. Lab environment extension service updated to hopefully increase stability:

  1. Class/file LabEnvService.java in src/net/sf/basedb/labenv/service/ updated in public method void start() by putting the code inside the TimerTask run() method in a try-catch block that catches all exceptions and writes them to the log file, before swallowing them. This in intended to avoid that the TimerTask stops after an exception is thrown for the run() method.

comment:5 by olle, 10 years ago

Debug output has revealed that lab sensors might produce output where expected Base64-encoded data of fixed length are replaced by empty strings, resulting in a crash for public method LabEnvironmentData createLabEnvironmentData(String sensorUrl, String sensorName) in class/file LabSensorUtil.java in src/net/sf/basedb/labenv/util/.

Proposed solution:

  • Class\file LabSensorUtil.java in src/net/sf/basedb/labenv/util/ should be updated in public method LabEnvironmentData createLabEnvironmentData(String sensorUrl, String sensorName) to check lengths of byte arrays before using data.

comment:6 by olle, 10 years ago

(In [2540]) Refs #615. Lab environment extension updated to handle odd lab sensor output and improve debug logging:

  1. Class\file LabSensorUtil.java in src/net/sf/basedb/labenv/util/ updated:
    a. Public method LabEnvironmentData createLabEnvironmentData(String sensorUrl, String sensorName) updated to check lengths of byte arrays before using data.
    b. Private method String fetchDataFromUrl(String url) updated in debug output with more info concerning current method and more complete stack trace after an exception is thrown (by using ',' instead of '+' before exception output in log.debug() call).

comment:7 by olle, 10 years ago

(In [2541]) Refs #615. Lab environment extension updated with better error support when trying to display lab environment data for an event in a pop-up window:

  1. JSP script file labenvironmentdatabaseeventpopup.jsp in resources/reports/ updated in HTML section with new div tag for error messages (class="messagecontainer error" id="errorMessage").

comment:8 by olle, 10 years ago

(In [2542]) Refs #615. Lab environment extension updated in installation documentation:

  1. Outermost README file updated:
    a. New header section with component name and version.
    b. Installation instructions extended concerning settings in configuration file labenv-config.xml.
    c. Extra info on alarm functionality added at the end.

comment:9 by olle, 10 years ago

(In [2543]) Refs #615. Configuration file META-INF/extensions.xml updated by setting version to "1.2".

comment:10 by olle, 10 years ago

(In [2544]) Refs #615. Lab environment extension updated by setting version number to "1.2":

  1. Ant build file build.xml updated by setting version number to "1.2".
  2. Class/file LabEnv.java in src/net/sf/basedb/labenv/ updated by setting public static constant String VERSION to "1.2".

comment:11 by olle, 10 years ago

(In [2545]) Refs #615. Lab environment extension updated by setting version number to "1.2" in ant build file:

  1. Ant build file build.xml updated by setting version number to "1.2" (previous update erroneously set it to "1.2-dev" instead of "1.2").

comment:12 by olle, 10 years ago

Resolution: fixed
Status: assignedclosed

Ticket closed as stability and bug issues in LabEnv v1.1 at the time of writing have been addressed (except for those related to BASE v3.3).

Note: See TracTickets for help on using tickets.