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 , 10 years ago
Status: | new → assigned |
---|
comment:2 by , 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:
comment:3 by , 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 methodvoid start()
in class/fileLabEnvService.java
insrc/net/sf/basedb/labenv/service/
throws an exception, the timer might stop as a result. A simple solution is to put the code inside therun()
method in a try-catch block that catches all exceptions and writes them to the log file, before swallowing them.
comment:4 by , 10 years ago
(In [2539]) Refs #615. Lab environment extension service updated to hopefully increase stability:
- Class/file
LabEnvService.java
insrc/net/sf/basedb/labenv/service/
updated in public methodvoid start()
by putting the code inside theTimerTask
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 theTimerTask
stops after an exception is thrown for therun()
method.
comment:5 by , 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
insrc/net/sf/basedb/labenv/util/
should be updated in public methodLabEnvironmentData createLabEnvironmentData(String sensorUrl, String sensorName)
to check lengths of byte arrays before using data.
comment:6 by , 10 years ago
(In [2540]) Refs #615. Lab environment extension updated to handle odd lab sensor output and improve debug logging:
- Class\file
LabSensorUtil.java
insrc/net/sf/basedb/labenv/util/
updated:
a. Public methodLabEnvironmentData createLabEnvironmentData(String sensorUrl, String sensorName)
updated to check lengths of byte arrays before using data.
b. Private methodString 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 inlog.debug()
call).
comment:7 by , 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:
- JSP script file
labenvironmentdatabaseeventpopup.jsp
inresources/reports/
updated in HTML section with newdiv
tag for error messages (class="messagecontainer error" id="errorMessage"
).
comment:8 by , 10 years ago
(In [2542]) Refs #615. Lab environment extension updated in installation documentation:
- Outermost
README
file updated:
a. New header section with component name and version.
b. Installation instructions extended concerning settings in configuration filelabenv-config.xml
.
c. Extra info on alarm functionality added at the end.
comment:9 by , 10 years ago
comment:10 by , 10 years ago
comment:11 by , 10 years ago
comment:12 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
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).
Ticket accepted.