cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying metadata problem

zladuric
Champ on-the-rise
Champ on-the-rise
Hello,

I have a community install, version 3.0 of Alfrecso. I have some custom metadata (amounts), and there are some problems. The metadata for certain types of documents of this type seems fine, both in database and when i view the  properties in the web client. But in the Share, when the users log in, they don't see some of the amounts correctly.
IE. instead of the amount 94532.32 they see 945,323.20 or something similar. This is not always when there are thousand separators, some numbers bigger then 1000.00 show correctly, but some don't.
This has been a minor problem till now, but from recently, I'm even having some issues with Tasks dashlets, that I believe are connected.

For example, in the "Pay tasks" dashlet, when the documents waiting for payment (custom workflow-assigned) load, they don't show correctly (I get the model.load-failed message and my catalina.out shows this: (detailed output at the end of the post):

21:11:11,547  ERROR [web.scripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: Failed to load script '/org/alfresco/components/dashlets/protenus/pay-tasks-list.get.js (in classpath store file:/opt/pbk-svn/webapps/share/WEB-INF/classes/alfresco/site-webscripts)': SyntaxError: missing } after property list (file:/opt/pbk-svn/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/dashlets/protenus/pay-tasks-list.get.js#10(eval)#7579)

This script (pay-tasks-list.get.js) evals output from "pay-tasks-list.json.ftl" script, which reads through the pay tasks and sorts them according to the filter (all/today/tomorrow…). The "SyntaxError" thing leads me to believe that there is some extra comma or extra bracket in the metadata.

I'm struggling 3 days with this (and with alfresco itself only a few weeks now), I don't know where I haven't looked at yet.

Did somebody get this error before? Can you give me a hint please? Can I look for incorrect values in the database (tried searching for ',' in alf_node_properties, but with thousands of documents already in alfresco, it didn't pay off, tried searching for incorrect amounts or something)? Also, how would I call this pay-tasks-list.json.ftl from the web-client (without the eval) - maybe that way I get to see which document has flawed metadata?

Any suggestions where to look at?

Thanks in advance!

The errors from error log:


21:30:19,673 User:avon_fin DEBUG [alfresco.repo.workflow] Detached (commit) JBPM Context from transaction 79727c70-326c-46db-8c79-997bf87053f1
21:30:19,693  ERROR [web.scripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: Failed to load script '/org/alfresco/components/dashlets/protenus/pay-tasks-list.get.js (in classpath store file:/opt/pbk-svn/webapps/share/WEB-INF/classes/alfresco/site-webscripts)': SyntaxError: missing } after property list (file:/opt/pbk-svn/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/dashlets/protenus/pay-tasks-list.get.js#10(eval)#7579)
org.alfresco.web.scripts.WebScriptException: Failed to load script '/org/alfresco/components/dashlets/protenus/pay-tasks-list.get.js (in classpath store file:/opt/pbk-svn/webapps/share/WEB-INF/classes/alfresco/site-webscripts)': SyntaxError: missing } after property list (file:/opt/pbk-svn/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/dashlets/protenus/pay-tasks-list.get.js#10(eval)#7579)
        at org.alfresco.web.scripts.PresentationScriptProcessor.executeScript(PresentationScriptProcessor.java:161)
        at org.alfresco.web.scripts.AbstractWebScript.executeScript(AbstractWebScript.java:827)
        at org.alfresco.web.scripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:90)
        at org.alfresco.web.scripts.PresentationContainer.executeScript(PresentationContainer.java:60)
        at org.alfresco.web.scripts.LocalWebScriptRuntimeContainer.executeScript(LocalWebScriptRuntimeContainer.java:169)
        at org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:262)
        at org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:139)
        at org.alfresco.web.scripts.servlet.WebScriptServlet.service(WebScriptServlet.java:122)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
   at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
        at java.lang.Thread.run(Thread.java:619)
Caused by: org.alfresco.web.scripts.WebScriptException: SyntaxError: missing } after property list (file:/opt/pbk-svn/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/dashlets/protenus/pay-tasks-list.get.js#10(eval)#7579)
        at org.alfresco.web.scripts.PresentationScriptProcessor.executeScriptImpl(PresentationScriptProcessor.java:275)
        at org.alfresco.web.scripts.PresentationScriptProcessor.executeScript(PresentationScriptProcessor.java:157)
        … 23 more
Caused by: org.mozilla.javascript.EcmaError: SyntaxError: missing } after property list (file:/opt/pbk-svn/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/dashlets/protenus/pay-tasks-list.get.js#10(eval)#7579)
        at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3350)
        at org.mozilla.javascript.DefaultErrorReporter.error(DefaultErrorReporter.java:89)
        at org.mozilla.javascript.Parser.addError(Parser.java:140)
        at org.mozilla.javascript.Parser.reportError(Parser.java:154)
        at org.mozilla.javascript.Parser.mustMatchToken(Parser.java:240)
        at org.mozilla.javascript.Parser.primaryExpr(Parser.java:2031)
        at org.mozilla.javascript.Parser.memberExpr(Parser.java:1729)
        at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1590)
        at org.mozilla.javascript.Parser.mulExpr(Parser.java:1519)
        at org.mozilla.javascript.Parser.addExpr(Parser.java:1500)
        at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1480)
        at org.mozilla.javascript.Parser.relExpr(Parser.java:1454)
        at org.mozilla.javascript.Parser.eqExpr(Parser.java:1410)
        at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:1399)
        at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:1388)
        at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:1377)
        at org.mozilla.javascript.Parser.andExpr(Parser.java:1365)
        at org.mozilla.javascript.Parser.orExpr(Parser.java:1353)
        at org.mozilla.javascript.Parser.condExpr(Parser.java:1336)
        at org.mozilla.javascript.Parser.assignExpr(Parser.java:1321)
        at org.mozilla.javascript.Parser.primaryExpr(Parser.java:1952)
        at org.mozilla.javascript.Parser.memberExpr(Parser.java:1729)
        at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1590)
        at org.mozilla.javascript.Parser.mulExpr(Parser.java:1519)
        at org.mozilla.javascript.Parser.addExpr(Parser.java:1500)
        at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1480)
        at org.mozilla.javascript.Parser.relExpr(Parser.java:1454)
        at org.mozilla.javascript.Parser.eqExpr(Parser.java:1410)
        at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:1399)
        at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:1388)
        at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:1377)
        at org.mozilla.javascript.Parser.andExpr(Parser.java:1365)
        at org.mozilla.javascript.Parser.orExpr(Parser.java:1353)
        at org.mozilla.javascript.Parser.condExpr(Parser.java:1336)
        at org.mozilla.javascript.Parser.assignExpr(Parser.java:1321)
        at org.mozilla.javascript.Parser.plainProperty(Parser.java:2135)
        at org.mozilla.javascript.Parser.primaryExpr(Parser.java:2011)
        at org.mozilla.javascript.Parser.memberExpr(Parser.java:1729)
        at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1590)
        at org.mozilla.javascript.Parser.mulExpr(Parser.java:1519)
        at org.mozilla.javascript.Parser.addExpr(Parser.java:1500)
        at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1480)
        at org.mozilla.javascript.Parser.relExpr(Parser.java:1454)
        at org.mozilla.javascript.Parser.eqExpr(Parser.java:1410)
        at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:1399)
        at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:1388)
        at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:1377)
        at org.mozilla.javascript.Parser.andExpr(Parser.java:1365)
        at org.mozilla.javascript.Parser.orExpr(Parser.java:1353)
        at org.mozilla.javascript.Parser.condExpr(Parser.java:1336)
        at org.mozilla.javascript.Parser.assignExpr(Parser.java:1321)
        at org.mozilla.javascript.Parser.primaryExpr(Parser.java:1952)
        at org.mozilla.javascript.Parser.memberExpr(Parser.java:1729)
        at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1590)
        at org.mozilla.javascript.Parser.mulExpr(Parser.java:1519)
        at org.mozilla.javascript.Parser.addExpr(Parser.java:1500)
        at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1480)
        at org.mozilla.javascript.Parser.relExpr(Parser.java:1454)
        at org.mozilla.javascript.Parser.eqExpr(Parser.java:1410)
        at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:1399)
        at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:1388)
        at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:1377)
        at org.mozilla.javascript.Parser.andExpr(Parser.java:1365)
        at org.mozilla.javascript.Parser.orExpr(Parser.java:1353)
        at org.mozilla.javascript.Parser.condExpr(Parser.java:1336)
        at org.mozilla.javascript.Parser.assignExpr(Parser.java:1321)
        at org.mozilla.javascript.Parser.plainProperty(Parser.java:2135)
        at org.mozilla.javascript.Parser.primaryExpr(Parser.java:2011)
        at org.mozilla.javascript.Parser.memberExpr(Parser.java:1729)
        at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1590)
        at org.mozilla.javascript.Parser.mulExpr(Parser.java:1519)
        at org.mozilla.javascript.Parser.addExpr(Parser.java:1500)
        at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1480)
        at org.mozilla.javascript.Parser.relExpr(Parser.java:1454)
        at org.mozilla.javascript.Parser.eqExpr(Parser.java:1410)
        at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:1399)
        at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:1388)
        at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:1377)
        at org.mozilla.javascript.Parser.andExpr(Parser.java:1365)
        at org.mozilla.javascript.Parser.orExpr(Parser.java:1353)
        at org.mozilla.javascript.Parser.condExpr(Parser.java:1336)
        at org.mozilla.javascript.Parser.assignExpr(Parser.java:1321)
        at org.mozilla.javascript.Parser.expr(Parser.java:1308)
        at org.mozilla.javascript.Parser.primaryExpr(Parser.java:2045)
        at org.mozilla.javascript.Parser.memberExpr(Parser.java:1729)
        at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1590)
        at org.mozilla.javascript.Parser.mulExpr(Parser.java:1519)
        at org.mozilla.javascript.Parser.addExpr(Parser.java:1500)
        at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1480)
        at org.mozilla.javascript.Parser.relExpr(Parser.java:1454)
        at org.mozilla.javascript.Parser.eqExpr(Parser.java:1410)
        at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:1399)
        at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:1388)
        at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:1377)
        at org.mozilla.javascript.Parser.andExpr(Parser.java:1365)
        at org.mozilla.javascript.Parser.orExpr(Parser.java:1353)
        at org.mozilla.javascript.Parser.condExpr(Parser.java:1336)
        at org.mozilla.javascript.Parser.assignExpr(Parser.java:1321)
        at org.mozilla.javascript.Parser.expr(Parser.java:1308)
        at org.mozilla.javascript.Parser.statementHelper(Parser.java:1205)
        at org.mozilla.javascript.Parser.statement(Parser.java:655)
        at org.mozilla.javascript.Parser.parse(Parser.java:377)
        at org.mozilla.javascript.Parser.parse(Parser.java:315)
        at org.mozilla.javascript.Context.compileImpl(Context.java:2320)
        at org.mozilla.javascript.Context.compileString(Context.java:1348)
        at org.mozilla.javascript.ScriptRuntime.evalSpecial(ScriptRuntime.java:2276)
        at org.mozilla.javascript.ScriptRuntime.callSpecial(ScriptRuntime.java:2143)
        at org.mozilla.javascript.optimizer.OptRuntime.callSpecial(OptRuntime.java:165)
        at org.mozilla.javascript.gen.c26._c1(file:/opt/pbk-svn/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/dashlets/protenus/pay-tasks-list.get.js:10)
        at org.mozilla.javascript.gen.c26.call(file:/opt/pbk-svn/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/dashlets/protenus/pay-tasks-list.get.js)
        at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:108)
        at org.mozilla.javascript.gen.c26._c0(file:/opt/pbk-svn/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/dashlets/protenus/pay-tasks-list.get.js:1)
        at org.mozilla.javascript.gen.c26.call(file:/opt/pbk-svn/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/dashlets/protenus/pay-tasks-list.get.js)
        at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
        at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
        at org.mozilla.javascript.gen.c26.call(file:/opt/pbk-svn/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/dashlets/protenus/pay-tasks-list.get.js)
        at org.mozilla.javascript.gen.c26.exec(file:/opt/pbk-svn/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/dashlets/protenus/pay-tasks-list.get.js)
        at org.alfresco.web.scripts.PresentationScriptProcessor.executeScriptImpl(PresentationScriptProcessor.java:265)
        … 24 more
9 REPLIES 9

mikeh
Star Contributor
Star Contributor
Load-up Firefox and add the JSONview add-on. Then point it at your pay-tasks-list.json.ftl URL (the one in the /alfresco webapp). This will highlight the error in your JSON syntax.

By the way, the reason you're seeing thousand separators is because you've forgotten to add the Freemarker built-in "?c" when rendering numbers. See the Freemarker documentation for further information.

Thanks,
Mike

zladuric
Champ on-the-rise
Champ on-the-rise
Thanks Mike, this sounds reeealy encouraging! For the ?c part, I have an excuse - I just got to work here, I didn't make these scripts Smiley Happy

Anyway, one more question, if you're still around: what would be a path to my script?


http://server/alfresco/service/what? How could I find out?

zladuric
Champ on-the-rise
Champ on-the-rise
The original script is at: extensions/templates/webscripts/protenus-pay/pay-tasks.get.json.ftl…how would I call it? Can I copy it somewhere?

mikeh
Star Contributor
Star Contributor
Find the .desc.xml file ("next to" the .json.ftl) - then add the URL specified within that descriptor file to http://server/alfresco/service/

Thanks,
Mike

zladuric
Champ on-the-rise
Champ on-the-rise
Thank you bunches and bunches, Mike!

The more I learn about Alfresco, the more I love/hate its complexity Smiley Happy

zladuric
Champ on-the-rise
Champ on-the-rise
Mike, your hints were really helpfull, I found out that when the filter=today the json I get is valid, but with filter=all, the script does some skipping and things.

Can you answer one more question to help me out, please?

How would I find out what content is connected to what tasks so I can clean out a bit? In the database or in the workflow console (which I just discovered by googling)?

Thanks again!

zladuric
Champ on-the-rise
Champ on-the-rise
I mean, I found workflows with no resources attached. How do I kill those workflows?

P.S. Or tasks?

When I try (admin workflow console), I get:
org.alfresco.error.AlfrescoRuntimeException: Failed to execute transaction-level behaviour public abstract void org.alfresco.repo.node.NodeServicePolicies$OnUpdatePropertiesPolicy.onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef,java.util.Map,java.util.Map) in transaction 149b34ea-c9b9-48cf-b039-c9b672fb64d8


And of course, catalina.out:
02:15:54,773 User:admin DEBUG [alfresco.repo.workflow] Detached (rollback) JBPM Context from transaction 149b34ea-c9b9-48cf-b039-c9b672fb64d8
02:15:54,855 User:admin DEBUG [repo.transaction.RetryingTransactionHelper]
Transaction commit failed:
   Thread: TP-Processor6
   Txn:    UserTransaction[object=org.alfresco.util.transaction.SpringAwareUserTransaction@67df5608, status=4]
   Iteration: 0
   Exception follows:
javax.transaction.RollbackException: Transaction didn't commit: Failed to execute transaction-level behaviour public abstract void org.alfresco.repo.node.NodeServicePolicies$OnUpdatePropertiesPolicy.onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef,java.util.Map,java.util.Map) in transaction 149b34ea-c9b9-48cf-b039-c9b672fb64d8
        at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:477)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:336)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:229)
        at org.alfresco.repo.admin.BaseInterpreter$1.doWork(BaseInterpreter.java:164)
        at org.alfresco.repo.admin.BaseInterpreter$1.doWork(BaseInterpreter.java:154)
        at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:489)
        at org.alfresco.repo.admin.BaseInterpreter.interpretCommand(BaseInterpreter.java:153)
        at org.alfresco.web.bean.workflow.WorkflowConsoleBean.interpretCommand(WorkflowConsoleBean.java:196)
        at org.alfresco.web.bean.workflow.WorkflowConsoleBean.submitCommand(WorkflowConsoleBean.java:161)
        at sun.reflect.GeneratedMethodAccessor1011.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
        at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
        at javax.faces.component.UICommand.broadcast(UICommand.java:109)
        at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
        at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
        at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
        at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.alfresco.web.app.servlet.AdminAuthenticationFilter.doFilter(AdminAuthenticationFilter.java:80)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
        at java.lang.Thread.run(Thread.java:619)
Caused by: org.alfresco.error.AlfrescoRuntimeException: Failed to execute transaction-level behaviour public abstract void org.alfresco.repo.node.NodeServicePolicies$OnUpdatePropertiesPolicy.onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef,java.util.Map,java.util.Map) in transaction 149b34ea-c9b9-48cf-b039-c9b672fb64d8
        at org.alfresco.repo.policy.TransactionBehaviourQueue.execute(TransactionBehaviourQueue.java:201)
        at org.alfresco.repo.policy.TransactionBehaviourQueue.beforeCommit(TransactionBehaviourQueue.java:133)
        at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.doBeforeCommit(AlfrescoTransactionSupport.java:710)
        at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.doBeforeCommit(AlfrescoTransactionSupport.java:690)
        at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.beforeCommit(AlfrescoTransactionSupport.java:650)
        at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCommit(TransactionSynchronizationUtils.java:48)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:835)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:645)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:632)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:314)
        at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:467)
        … 41 more
Caused by: org.alfresco.repo.security.permissions.AccessDeniedException: Access Denied.  You do not have the appropriate permissions to perform this operation.
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:53)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:275)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy7.hasAspect(Unknown Source)
        at org.alfresco.repo.thumbnail.ThumbnailedAspect.onUpdateProperties(ThumbnailedAspect.java:144)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.policy.JavaBehaviour$JavaMethodInvocationHandler.invoke(JavaBehaviour.java:179)
        at $Proxy11.onUpdateProperties(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor872.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.policy.TransactionBehaviourQueue.execute(TransactionBehaviourQueue.java:189)
        … 51 more
Caused by: net.sf.acegisecurity.AccessDeniedException: Access is denied.
        at net.sf.acegisecurity.vote.AffirmativeBased.decide(AffirmativeBased.java:86)
        at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:394)
        at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
        … 70 more

mikeh
Star Contributor
Star Contributor
The root cause of the exception is "Access Denied" - are you sure you're trying with the local admin user account?

Thanks,
Mike

zladuric
Champ on-the-rise
Champ on-the-rise
I was logged in with admin - admin workflow console wouldn't load any other way, but ni there I had set the 'user' variable. Anyway, I solved that problem, finally. It was really dirty but it was also urgent, and I'm still trying to find my way around here.
So, what I did is located all those workflows that didn't have any resources attached, went to the mysql, and changed the bpm:assignee (to a test user) for all the JBPM_TASKINSTANCE instances. Then I was left with only the double-quotes in JSON, which I could deal with by editing metadata. I know this was risky, the database thing, but I was on a short notice, I had backups, it was night, and I needed to try something Smiley Happy
And I figured that I changed the assignee, then I wouldn't get the error with the original user. The logic I used is that those extra workflows are some misconfiguration too, as my installation (well, it will be my installation when I get to know it a bit) is not supposed to have ANY tasks that have no resources. I just hope it doesn't backfire (didn't for now, the testing and one whole production day are over).