[SOLVED] Daily Report didn't run today and has this error
-
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.
-
Thanks for your time on this Joel, it's great to get a resolution and have the reports running again.
Cheers
Dan