Closed GoogleCodeExporter closed 8 years ago
I found same issue in this board and tried to make by Run script
But
Alfresco make this message.
please correct the errors below then click Finish.
Failed to run Actions due to error: 03040042 Failed to execute script 'workspace://SpacesStore/dab8d48e-adbb-4c9c-a997-24f736d5d695': 03040041 Unable to locate included script classpath resource: classpath:alfresco/module/org.alfresco.reporting/scripts/getAllTableNames.js
-----
Original comment by hunter.s...@gmail.com
on 4 Apr 2013 at 10:57
And I also found the script getAllTableNames.js is miss the name in source this
google code. The name is getAllTableNames.js.not in this source bank.
So I tried to fix the script creatTables.js in /Data Dictionary/script/
Like below
-------------
<import
resource="classpath:alfresco/module/org.alfresco.reporting/scripts/getAllTableNa
mes.js.not">
// This script is part of the Alfresco Business Reporting project.
reporting.createEmptyTables(getAllTableNames());
---------------
But This make also error like below
-----------------
Please correct the errors below then click Finish.
Failed to run Actions due to error: 03040027 Failed to execute script
'workspace://SpacesStore/dab8d48e-adbb-4c9c-a997-24f736d5d695': 03040026
TypeError: Cannot read property "length" from null
(workspace://SpacesStore/dab8d48e-adbb-4c9c-a997-24f736d5d695#128)
Please check again the package in download link (version 0.8.0)
Thank you.
Original comment by hunter.s...@gmail.com
on 5 Apr 2013 at 2:30
Hi Hunter,
Thanks for taking the effort of logging an issue, and actually follow-up on
your own posting. I appreciate your attitude!
The getAllTableNames.js is a script 'from the past'. Back then you had to
create the tables up-front. I am working hard to get rid of as much JavaScript
as possible. My constraints are work, family life and time-in-general.
In the 0.8.0 release you do not have to create tables 'by hand' (by script it
was). The tool will create the tables on the fly now, if it runs into a table
needed but not in the reporting database yet. I thought I removed the
JavaScript files responsible for the old-style creation of tables.
So far for the history. You don't have all tables you expect to have. The
tables you do have are generated by the harvestDefinitionLessFrequent (If you
kept all the defaults.) Let's assume that is running fine. (The minimal fact we
can see is that JNDI is configured well, you do get tables created!)
My best guess at this point in time is that your harvestDefinitionMoreFrequent
is disabled.
-> Can you verify that it actually -is- enabled?
Did you perhaps get the tables because the cron job was triggered by the
passing of time?
If the harvesting definition was active, and you still do not have tables, can
you switch to the Explorer interface (something like
http://localhost:8080/alfresco), navigate to the folder Data
Dictionary/Reporting, and select the action to harvest the lessFrequent
definition? It would be great if you can send me the log file when you execute
this action.
Could you increase the log level? The file you need is
%tomcat%/webapps/alfresco/WEB-INF/classes/log4j.properties. If you can append
these 3 lines to the bottom of the file:
log4j.logger.org.alfresco.reporting.script.AlfrescoReporting=debug
log4j.logger.org.alfresco.repo.jscript=error
log4j.logger.org.alfresco.repo.jscript.ScriptLogger=warn
Remove them afterwards to reduce the size of your alfresco.log. You do need to
restart Alfresco to have these adjusted settings made active.
Plesae update this issue with your findings,
Thanks
Original comment by tjarda.p...@incentro.com
on 5 Apr 2013 at 7:15
Thank you for your answer..
And also thank your time, life and family too.
I changed the harvestDefinitionMoreFrequent properties to active (attached the
screenshot) and find the harvestDefinitionLessFrequent. But
harvestDefinitionLessFrequent is 0kb (no text in this file - I attached the
screenshot of harvestDefinitionLessFrequent setting).
So I tried to find the source in this code.google.com/source menu... Also no
file about harvestDefinitionLessFrequent script.
Also I changed the log level through the guide of you.
Doing harvestDefinitionLessFrequent script -> no action
Doing siteInfo.prpt -> Error Message (same: no document tables)
----
18:19:13,416 ERROR
[org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor
] 2727254: Report processing failed.
-----
Could please check the repository of harvestDefinitionLessFrequent?
Regards
Hunter
Original comment by hunter.s...@gmail.com
on 6 Apr 2013 at 1:19
Attachments:
Your current setup does not make sense. There are 4 groups of queries (Query
Propreties | Audit framework | Users/Grous | Categories). Assign each of the
groups to 1 Harvesting defintion. Either harvest more often or harvest less
often. Don't do both, from a functional perspective it does not make sense (for
a default setup).
The content element of the lessFrequent is empty. Because there are no Queries
inside for the Query Properties group of queries. These are the lucene-like
queries that will generate the tables. These were (by dfault) in the
moreFrequent only. That's why the latter one has a size > 0kb.
Provided
* you reset your configuration to the one shipped (query properties and audit framework active in the moreFrequent only, users/groups and categories active in the lessFrequent only), and
* there are meaningful queries in the content of the moreFrequent
* you have your log settings extended as described above
Could you please:
1) shut down Alfresco
2) secure your current log if you need it later on (alfresco.log, catalina.out)
3) start Alfresco
4) force execution of moreFrequent
5) stop Alfresco
6) send me the logfile?
7) start Alfresco, you probably need it :-)
Original comment by tjarda.p...@incentro.com
on 7 Apr 2013 at 9:37
Hi
I've the same problem because I don't have all tables populated than expect to
have.
I have default installation of alfresco business reporting (on Alfresco 4.0e)
with enabled harvestMoreFrequent (I attach the screenshoot), then I've enabled
reporting log:
log4j.logger.org.alfresco.reporting.script.AlfrescoReporting=debug
log4j.logger.org.alfresco.repo.jscript=debug
log4j.logger.org.alfresco.repo.jscript.ScriptLogger=debug
log4j.logger.org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient=debug
and executed above steps - from 1) to 7).
The first time I force execution of moreFrequent I have only the following
tables:
+-----------------------------+
| Tables_in_alfrescoreporting |
+-----------------------------+
| lastsuccessfulrun |
| reportingloginaudit |
+-----------------------------+
After execution of lesFrequent I have:
+-----------------------------+
| Tables_in_alfrescoreporting |
+-----------------------------+
| groups |
| lastsuccessfulrun |
| person |
| reportingloginaudit |
| siteperson |
+-----------------------------+
The logs are in attachment
Thanks
Vincenzo
Original comment by vincenzo...@gmail.com
on 10 Apr 2013 at 8:27
Attachments:
If can be useful I've add the following log statement in harvestDatabase.lib.js
on function:
function startQueries(queries) {
..................
catch (exception){
// do nothing. prevent org.springframework.transaction.UnexpectedRollbackException...
--> logger.log("exception " + exception);
}
and I see that some tables as well as calendar, document ecc. through an
exception:
2013-04-10 11:48:29,243 DEBUG [repo.jscript.ScriptLogger] [http-8080-1]
Welcome in main!
2013-04-10 11:48:29,243 DEBUG [reporting.script.AlfrescoReporting] [http-8080-1] isHarvestEnabled: true
2013-04-10 11:48:29,243 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] Checking moreFrequent
2013-04-10 11:48:29,243 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] Checking lessFrequent
2013-04-10 11:48:29,243 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] Checking harvestAll
2013-04-10 11:48:29,243 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] Checking harvestRef!=null
2013-04-10 11:48:29,243 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] There is valid a nodeRef!! workspace://SpacesStore/de53f19a-94e2-4bc0-aa7d-8768c9e694cc
2013-04-10 11:48:29,243 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] Number of results: 1
2013-04-10 11:48:29,243 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] main: (0) Processing: harvestDefinitionMoreFrequent
2013-04-10 11:48:29,243 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] %%5
2013-04-10 11:48:29,243 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] ## storing key=folder value=TYPE:"cm:folder" AND NOT TYPE:"st:site" AND NOT TYPE:"dl:dataList" AND NOT TYPE:"bpm:package" AND NOT TYPE:"cm:systemfolder" AND NOT TYPE:"fm:forum"
2013-04-10 11:48:29,243 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] ## storing key=document value=TYPE:"cm:content" AND NOT TYPE:"bpm:task" AND NOT TYPE:"dl:dataListItem" AND NOT TYPE:"ia:calendarEvent" AND NOT TYPE:"lnk:link" AND NOT TYPE:"cm:dictionaryModel" AND NOT ASPECT:"reporting:executionResult"
2013-04-10 11:48:29,243 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] ## storing key=calendar value=TYPE:"ia:calendarEvent"
2013-04-10 11:48:29,243 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] ## storing key=forum value=TYPE:"fm:forum"
2013-04-10 11:48:29,243 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] ## storing key=link value=TYPE:"lnk:link"
2013-04-10 11:48:29,243 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] ## storing key=site value=TYPE:"st:site"
2013-04-10 11:48:29,243 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] ## storing key=datalistitem value=TYPE:"dl:dataListItem"
2013-04-10 11:48:29,243 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] ## storing key=workflowtask value=TYPE:"bpm:task"
2013-04-10 11:48:29,243 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] Querytables, Creating tables: calendar,folder,link,workflowtask,site,datalistitem,forum,document
2013-04-10 11:48:29,259 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] in startQueries
2013-04-10 11:48:29,259 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] table: calendar
2013-04-10 11:48:29,259 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] exception ReferenceError: "tableNames" is not defined.
2013-04-10 11:48:29,259 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] Done all tables in Store workspace://SpacesStore
2013-04-10 11:48:29,259 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] in startQueries
2013-04-10 11:48:29,259 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] table: calendar
2013-04-10 11:48:29,259 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] exception ReferenceError: "tableNames" is not defined.
2013-04-10 11:48:29,259 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] Done all tables in Store archive://SpacesStore
2013-04-10 11:48:29,259 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] Done all stores
2013-04-10 11:48:29,259 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] processAuditingExport with id: 0, ReportingLoginAudit
2013-04-10 11:48:29,259 DEBUG [reporting.script.AlfrescoReporting] [http-8080-1] Starting tableIsRunning: reportingloginaudit
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] enter tableIsRunning table=reportingloginaudit
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] tableIsRunning: Query=SELECT count(*) FROM `lastsuccessfulrun` WHERE status='Running'
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] exit tableIsRunning returning false
2013-04-10 11:48:29,259 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] processAuditingExport with feed: ReportingLoginAudit
2013-04-10 11:48:29,259 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] processAuditingExport with table: reportingloginaudit
2013-04-10 11:48:29,259 DEBUG [reporting.script.AlfrescoReporting] [http-8080-1] Starting createEmptyTables: reportingloginaudit
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] Starting createEmptyTables: reportingloginaudit
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] Creating table. Query: CREATE TABLE IF NOT EXISTS `reportingloginaudit` (id INT AUTO_INCREMENT PRIMARY KEY, sys_node_uuid VARCHAR(100), isLatest BOOLEAN DEFAULT TRUE, validFrom DATETIME, validUntil DATETIME);
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] enter setLastTimestamp: for table=reportingloginaudit
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] enter getNumberOfRowsLastTimestamp
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] getNumberOfRowsLastTimestamp: Query=SELECT count(*) FROM `lastsuccessfulrun` WHERE tablename='reportingloginaudit'
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] exit getNumberOfRowsLastTimestamp returning=1
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] enter setLastTimestampStatus table=reportingloginaudit
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] enter getNumberOfRowsLastTimestamp
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] getNumberOfRowsLastTimestamp: Query=SELECT count(*) FROM `lastsuccessfulrun` WHERE tablename='reportingloginaudit'
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] exit getNumberOfRowsLastTimestamp returning=1
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] getLastTimestampStatus: Query=UPDATE `lastsuccessfulrun` SET status = 'Running' WHERE (tablename='reportingloginaudit')
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] exit setLastTimestamp
2013-04-10 11:48:29,259 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] START RUNNING processAuditingExport with ReportingLoginAudit
2013-04-10 11:48:29,259 DEBUG [reporting.script.AlfrescoReporting] [http-8080-1] enter processAuditingExport
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] Starting createEmptyTables: reportingloginaudit
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] Creating table. Query: CREATE TABLE IF NOT EXISTS `reportingloginaudit` (id INT AUTO_INCREMENT PRIMARY KEY, sys_node_uuid VARCHAR(100), isLatest BOOLEAN DEFAULT TRUE, validFrom DATETIME, validUntil DATETIME);
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] enter getLastTimestamp table=reportingloginaudit
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] getLastTimestampStatus: Query=SELECT lastrun FROM `lastsuccessfulrun` WHERE tablename='reportingloginaudit'
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] exit getLastTimestamp returning 2013-04-10T11:47:06
2013-04-10 11:48:29,259 DEBUG [reporting.script.AlfrescoReporting] [http-8080-1] Enter setTableDefinition tableName=reportingloginaudit
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] Found column: id - Type: int(11)
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] Found column: sys_node_uuid - Type: varchar(100)
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] Found column: isLatest - Type: tinyint(1)
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] Found column: validFrom - Type: datetime
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] Found column: validUntil - Type: datetime
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] Found column: timestamp - Type: datetime
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] Found column: username - Type: varchar(150)
2013-04-10 11:48:29,259 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] Found column: reportinglogin_login_no_error_user - Type: varchar(100)
2013-04-10 11:48:29,274 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] Found column: reportinglogin_login_error_user - Type: varchar(100)
2013-04-10 11:48:29,274 DEBUG [reporting.script.AlfrescoReporting] [http-8080-1] DEFINITION Column timestamp already exists.
2013-04-10 11:48:29,274 DEBUG [reporting.script.AlfrescoReporting] [http-8080-1] DEFINITION Column username already exists.
2013-04-10 11:48:29,274 DEBUG [reporting.script.AlfrescoReporting] [http-8080-1] Exit setTableDefinition
2013-04-10 11:48:29,274 DEBUG [reporting.script.AlfrescoReporting] [http-8080-1] exit processAuditingExport
2013-04-10 11:48:29,274 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] Enter setQueryDate for timestamp=Wed Apr 10 2013 11:48:29 GMT+0200 (CEST) and table=reportingloginaudit
2013-04-10 11:48:29,274 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] enter setLastTimestamp
2013-04-10 11:48:29,274 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] enter getNumberOfRowsLastTimestamp
2013-04-10 11:48:29,274 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] getNumberOfRowsLastTimestamp: Query=SELECT count(*) FROM `lastsuccessfulrun` WHERE tablename='reportingloginaudit'
2013-04-10 11:48:29,274 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] exit getNumberOfRowsLastTimestamp returning=1
2013-04-10 11:48:29,274 DEBUG [reporting.db.DatabaseHelperBean] [http-8080-1] getLastTimestampStatus: Query=UPDATE `lastsuccessfulrun` SET lastrun = '2013-04-10T11:48:29', status = 'Done' WHERE tablename='reportingloginaudit'
2013-04-10 11:48:29,321 DEBUG [repo.jscript.ScriptLogger] [http-8080-1] Enter setQueryDate for timeString=2013-04-10T11:48:29
2013-04-10 11:48:29,337 DEBUG [repo.jscript.RhinoScriptProcessor] [http-8080-1] Time to execute script: 93.27804ms
Original comment by vincenzo...@gmail.com
on 10 Apr 2013 at 9:55
I've solved the problem, I've add tableNames params to startQueries function
(line 311)
and I've change the call in the function processQueryTables
// ------------------------------------------------------------------------
function processQueryTables(harvestDefinition) {
// get the Properties object with tablename=query values
var queries = getReportingQueries(harvestDefinition);
//if (queries.length>0){
// auto create tables that are needed
var tableNames = "";
var tableName;
for (tableName in queries) {
if ((tableName!=null) && (tableName!=undefined) && (tableName.length>3)){
if (tableNames.length > 0)
tableNames += ",";
tableNames += tableName;
}
}
logger.log("Querytables, Creating tables: " + tableNames);
// only needed for JasperSoft
// reporting.setDataType("JNDI");
--> startQueries(queries, tableNames);
//} // end queries.length>0
} // end function
// --------------------------------------------------------------------------
// startQueries
// --------------------------------------------------------------------------
function startQueries(queries, tableNames) {
............
Let me know if is in line with your develop and applied as patch in the HEAD
Thanks
Vincenzo
Original comment by vincenzo...@gmail.com
on 10 Apr 2013 at 10:05
Attachments:
Moreover a suggestion is to use the name of the table person, siteperson and
groups as variable in this way is easy to change in the case a people would
prefix the name of the tables
Thanks
Vincenzo
Original comment by vincenzo...@gmail.com
on 10 Apr 2013 at 1:03
Attachments:
Vincenzo, Hunter,
Apologies, you were right. It was a bug. Vincenzo was almost right. A statement
was missing to create the empty tables if they did not exist yet. That is fixed
in a new release (see
http://tpeelen.wordpress.com/2013/04/13/admin-panel-for-alfresco-business-report
ing/) and the download section of Google Code. You get the admin page
displaying the current state of harvesting to prevent the trip to SQL next time
:-)
Thanks for reporting this bug. I hope the new version works for you.
Original comment by tjarda.p...@incentro.com
on 13 Apr 2013 at 8:44
Thank you very much!! I also very happy to support this better system. ^_^;
Original comment by hunter.s...@gmail.com
on 14 Apr 2013 at 9:05
Thanks for release new version.
I've installed it (0.8.1) and in the log I see:
2013-04-15 11:58:15,942 INFO [reporting.script.AlfrescoReporting] [http-8080-2] processPropertyValues: Error in object, property cm_source not found! ()
2013-04-15 11:58:21,833 INFO [reporting.script.AlfrescoReporting] [http-8080-2] processPropertyValues: Error in object, property cm_likesRatingSchemeTotal not found! (float)
2013-04-15 11:58:22,661 INFO [reporting.script.AlfrescoReporting] [http-8080-2] processPropertyValues: Error in object, property cm_likesRatingSchemeTotal not found! (float)
2013-04-15 11:58:22,739 INFO [reporting.script.AlfrescoReporting] [http-8080-2] processPropertyValues: Error in object, property cm_likesRatingSchemeTotal not found! (float)
2013-04-15 11:58:22,895 INFO [reporting.script.AlfrescoReporting] [http-8080-2] processPropertyValues: Error in object, property cm_likesRatingSchemeTotal not found! (float)
Is a normal behavior? Or there are some metadata that are not recognized?
Best Regards
Vincenzo
Original comment by vincenzo...@gmail.com
on 15 Apr 2013 at 10:09
Original issue reported on code.google.com by
hunter.s...@gmail.com
on 4 Apr 2013 at 10:51