[SOLVED] Daily Report didn't run today and has this error
-
What version of the reports module do you have? You might want to check and make sure it's the latest version: http://store.infiniteautomation.com/module/reports
-
ah, reports 2.0.12
I recently updated Mango itself, maybe reports isn't included with the modules pack?oh I read that wrong, it is running the latest according to that.
-
BUMP
-
Dan,
I'm a developer for Infinite Automation and am happy to try and help you out.
It looks like something went wrong in the upgrade of the reports module.
What version were you previously using? And what was your report configuration if you have the old JSON export or are able to get the existing one back out?
I will dig into this first thing tomorrow morning and let you know what I find.
Thanks,
Terry -
Gidday. Thanks for your message. I think it started playing up before I upgraded as I upgraded in an attempt to fix this issue I think.
Cheers
Dan -
Dan,
Can you tell me the previous version of the Reports Module you were using when the report starting playing up?
Thanks,
Terry -
Dan,
Another option that would fix this if you don't have reports that you need to keep would be to mark the module for deletion from the modules page, restart Mango. Then shut mango down and install the latest module.
Thanks,
Terry -
Gidday, I'm not sure what version was running before. I think Mango itself was 2.2.2 maybe.
I will try the delete option.Cheers
Dan -
Hey Guys, I'm just trying this again, I'll see if deleting the module altogether helps.
-
Hrm, it's still not running any reports, I've tried creating all new ones. It almost looks like the DB table might be corrupt?
I'm familiar with MYSQL somewhat but not with the Mango DB ?
Attachment: download link
-
This was the error log:
ERROR 2014-09-16 12:02:43,812 (com.serotonin.m2m2.web.dwr.util.ExceptionDetectionFilter.doFilter:38) - DWR invocation exception org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [insert into reportInstances (userId, reportId, name, template, includeEvents, includeUserComments, reportStartTime, reportEndTime, runStartTime, runEndTime, recordCount, preventPurge, mapping) values (?,?,?,?,?,?,?,?,?,?,?,?,?)]; An attempt was made to get a data value of type 'BLOB' from a data value of type 'java.io.ByteArrayInputStream'.; nested exception is java.sql.SQLDataException: An attempt was made to get a data value of type 'BLOB' from a data value of type 'java.io.ByteArrayInputStream'.
-
It looks like something is wrong in the database. When you deleted the module did you use the Mark for Deletion button on the modules page and then restarted Mango? This should remove the old table. You can then put the latest reports module back in the modules folder and restart again. After the first restart you can use the SQL console to check and make sure the reports table is removed.
-
Gidday.. yeh I used the mark for deletion button and it greyed out the whole reports module in red. Then I hit restart this instance button..
-
Hi Dan,
I'm not sure what to say at this point. Probably best to get on a remote support session. Contact me tomorrow as early as you can if possible.
Joel.
-
Attached the output of the show tables command..
I can't see a reports table in there now that I've deleted the reports module.
If I was to delete the whole instance of Mango, if I backed up the config script, does that take all the scripts and data points with that?
Then how do I back the Graphical Overview up? Or would I have to set that one up manually again?Cheers
DanAttachment: download link
-
I don't see any of the reports tables. Is this with the module installed? If not then I think it needs to be installed again. I'm sure you know but just to clarify, to install a module you place the zip file in the modules folder and DON'T unzip it. When mango starts up it will install it the module and create it's needed database tables.
-
yeh sorry mate, this was after I removed it to check that it dropped the table. I'll reinstall now..
-
Yep I got the report tables back:
REPORTINSTANCEDATA
REPORTINSTANCEDATAANNOTATIONS
REPORTINSTANCEEVENTS
REPORTINSTANCEPOINTS
REPORTINSTANCES
REPORTINSTANCEUSERCOMMENTS
REPORTS -
still same error :(
-
This seems to have been resolved by converting the Derby database to H2. For others interested to know the conversion settings are in the env.properties file and it's really easy to do. H2 is a much better database than derby so we recommend everyone either converts away from Derby to either H2 or MySQL.
Thanks,
Joel.