09-22-2014 07:50 AM
Alfresco Web Scripts Maintenance
Maintenance Completed
Reset Web Scripts Registry; registered 284 Web Scripts. Previously, there were 285.
Warning: found 1 broken Web Scripts. Previously, there were 0.
Broken Web Scripts
Failed to parse web script description document doAct/doAct.get.desc.xml ; runas user declared for script in insecure store (workspace://SpacesStore/app:company_home/app:dictionary/cm:extensionwebscripts/doAct/doAct.get.desc.xml)
List Web Scripts
Web Script Status 404 - Not Found
The Web Script /alfresco/service/doAct has responded with a status of 404 - Not Found.
404 Description: Requested resource is not available.
Message: Script url /doAct does not map to a Web Script.
Exception: org.alfresco.web.scripts.WebScriptException - Script url /doAct does not map to a Web Script.
org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:106)
org.alfresco.web.scripts.servlet.WebScriptServlet.service(WebScriptServlet.java:116)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
java.lang.Thread.run(Thread.java:662)
Server: Alfresco Labs v3.0.0 (Stable 1526) schema 1,002
Time: Sep 22, 2014 1:34:43 PM
09-22-2014 11:18 AM
<authentication runas="admin">user</authentication>
element in your web script descriptor,you should place the webscript in classpath instead of repository.
09-23-2014 06:38 AM
//<import resource="/Company Home/Data Dictionary/Scripts/modify_metadata.js">
//<import resource="workspace://SpacesStore/7c409e0f-0861-4d10-b9a1-e694b48bc445">
//<import resource="/Company Home/Data Dictionary/Scripts/modify_metadata.js">;
<import resource="workspace://SpacesStore/7c409e0f-0861-4d10-b9a1-e694b48bc445">;
Alfresco Web Script Status 500 - Internal Error
The Web Script /planinicial/service/doAct has responded with a status of 500 - Internal Error.
500 Description: An error inside the HTTP server which prevented it from fulfilling the request.
Message: Wrapped Exception (with status template): Failed to execute script '/doAct/doAct.get.js (in repository store workspace://SpacesStore/Company Home/dictionary/Web Scripts Extensions)': syntax error (AlfrescoScript#20)
Exception: org.mozilla.javascript.EvaluatorException - syntax error (AlfrescoScript#20)
org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:109)
org.mozilla.javascript.DefaultErrorReporter.error(DefaultErrorReporter.java:96)
org.mozilla.javascript.Parser.addError(Parser.java:140)
org.mozilla.javascript.Parser.reportError(Parser.java:154)
org.mozilla.javascript.Parser.mustMatchToken(Parser.java:240)
org.mozilla.javascript.Parser.xmlInitializer(Parser.java:1634)
org.mozilla.javascript.Parser.unaryExpr(Parser.java:1584)
org.mozilla.javascript.Parser.mulExpr(Parser.java:1519)
org.mozilla.javascript.Parser.addExpr(Parser.java:1500)
org.mozilla.javascript.Parser.shiftExpr(Parser.java:1480)
org.mozilla.javascript.Parser.relExpr(Parser.java:1454)
org.mozilla.javascript.Parser.eqExpr(Parser.java:1410)
org.mozilla.javascript.Parser.bitAndExpr(Parser.java:1399)
org.mozilla.javascript.Parser.bitXorExpr(Parser.java:1388)
org.mozilla.javascript.Parser.bitOrExpr(Parser.java:1377)
org.mozilla.javascript.Parser.andExpr(Parser.java:1365)
org.mozilla.javascript.Parser.orExpr(Parser.java:1353)
org.mozilla.javascript.Parser.condExpr(Parser.java:1336)
org.mozilla.javascript.Parser.assignExpr(Parser.java:1321)
org.mozilla.javascript.Parser.expr(Parser.java:1308)
org.mozilla.javascript.Parser.statementHelper(Parser.java:1205)
org.mozilla.javascript.Parser.statement(Parser.java:655)
org.mozilla.javascript.Parser.parse(Parser.java:377)
org.mozilla.javascript.Parser.parse(Parser.java:315)
org.mozilla.javascript.Context.compileImpl(Context.java:2320)
org.mozilla.javascript.Context.compileString(Context.java:1348)
org.mozilla.javascript.Context.compileString(Context.java:1337)
org.mozilla.javascript.Context.evaluateString(Context.java:1193)
org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:390)
org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:122)
org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:263)
org.alfresco.repo.web.scripts.RepositoryScriptProcessor.executeScript(RepositoryScriptProcessor.java:108)
org.alfresco.web.scripts.AbstractWebScript.executeScript(AbstractWebScript.java:800)
org.alfresco.web.scripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:90)
org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:319)
org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:320)
org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:227)
org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:368)
org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:390)
org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:273)
org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:261)
org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:139)
org.alfresco.web.scripts.servlet.WebScriptServlet.service(WebScriptServlet.java:116)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
java.lang.Thread.run(Thread.java:662)
Exception: org.alfresco.error.AlfrescoRuntimeException - syntax error (AlfrescoScript#20)
org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:406)
Exception: org.alfresco.scripts.ScriptException - Failed to execute script '/doAct/doAct.get.js (in repository store workspace://SpacesStore/Company Home/dictionary/Web Scripts Extensions)': syntax error (AlfrescoScript#20)
org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:126)
Exception: org.alfresco.web.scripts.WebScriptException - Wrapped Exception (with status template): Failed to execute script '/doAct/doAct.get.js (in repository store workspace://SpacesStore/Company Home/dictionary/Web Scripts Extensions)': syntax error (AlfrescoScript#20)
org.alfresco.web.scripts.AbstractWebScript.createStatusException(AbstractWebScript.java:595)
Server: Alfresco Labs v3.0.0 (Stable 1526) schema 1.002
Time: 23-sep-2014 12:16:35
Diagnostics: Inspect Web Script (doAct/doAct.get)
//<import resource="/Company Home/Data Dictionary/Scripts/actions.js">
//<import resource="/Company Home/Data Dictionary/Scripts/modify_metadata.js">
<import resource="workspace://SpacesStore/7c409e0f-0861-4d10-b9a1-e694b48bc445">
//______________________
//______________________
//
var fichero = null;
var fichero = getDoc(args.nId);
var periodoAbierto;
var mensaje="";
//
if (fichero == null)
{
status.code = 404;
status.message = "File not found.";
status.redirect = true;
} else {
model.fichero = fichero;
// Obtener si el mes al que pertenece el fichero está abierto
periodoAbierto = getPeriodoAbierto(fichero);
if (!periodoAbierto){
status.code = 404;
status.message = "El periodo al que pertenece la factura ya está cerrado y no se pueden realizar operaciones.";
status.redirect = true;
} else {
if(args.act=="supr"){
try{
var nombre = fichero.properties.name;
if(remove_node(fichero)){
mensaje = "Factura '" + nombre + "' eliminada Correctamente.";
} else {
mensaje = "No se ha podido eliminar la factura '" + nombre + "'.";
}
} catch(err) {
status.code = 403;
status.message = "El usuario no tiene permisos para borrar el fichero.";
status.redirect = true;
}
} else if(args.act=="edit"){
// Comprobar que la factura está Aprobada
var estadoFichero = getEstado(fichero);
// Mostrar error si el período está cerrado
if (!estadoFichero){
status.code = 404;
status.message = "La factura no está aprobada.";
status.redirect = true;
} else {
mensaje = cambiarMetadatos(url.args, args, fichero);
}
} else {
status.code = 404;
status.message = "La operación especificada '" + args.act + "' no es correcta.";
status.redirect = true;
}
}
}
model.mensaje=mensaje;
model.nId = args.nId;
09-23-2014 08:07 AM
<import resource="workspace://SpacesStore/7c409e0f-0861-4d10-b9a1-e694b48bc445">
//______________________
//______________________
//
var fichero = null;
var fichero = getDoc(args.nId);
var periodoAbierto;
var mensaje="";
….
<import resource="/Company Home/Data Dictionary/Scripts/modify_metadata.js">
//______________________
//______________________
//
var fichero = null;
var fichero = getDoc(args.nId);
var periodoAbierto;
var mensaje="";
….
09-23-2014 12:26 PM
09-23-2014 08:40 PM
<import resource="classpath:/***/***/modify_metadata.js">
09-24-2014 03:50 AM
/opt/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/doAct
<import resource="classpath:/alfresco/templates/webscripts/doAct/modify_metadata.js">
<import resource="classpath:/opt/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/doAct/modify_metadata.js">
<import resource="/Company Home/Data Dictionary/Scripts/modify_metadata.js">
09-24-2014 04:21 AM
<import resource="classpath:/alfresco/templates/webscripts/doAct/modify_metadata.js">
<import resource="/Company Home/Data Dictionary/Scripts/modify_metadata.js">
09-24-2014 08:27 AM
09-24-2014 10:16 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.