Hi All,
I have the same above requirement where I need to sendemail at regular Intervals, for that i have taken the above mentioned "scheduled-action-services-context.xml" and the sendmail.js file.
My sendmail.js file is scheduled to run for every 3 mins, but in my sendmail.js file I was not able to define the "ActivexObject".
can any one please help me how we can define the The ActivexObjects in alfresco.
The Exception what iam getting is mentioned below.
13:51:00,049 INFO [STDOUT] 13:51:00,039 ERROR [quartz.core.JobRunShell] Job jobGroup.jobA threw an unhandled Exception:
org.alfresco.scripts.ScriptException: Failed to execute script 'workspace://SpacesStore/6f3fe30e-8a40-4d73-a765-ec8322cb776c': ReferenceError: "ActiveXObject" is not defined. (workspace://SpacesStore/6f3fe30e-8a40-4d73-a765-ec8322cb776c#17)
at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:228)
at org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:187)
at sun.reflect.GeneratedMethodAccessor808.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:40)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
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 $Proxy231.executeScript(Unknown Source)
at org.alfresco.repo.action.executer.ScriptActionExecuter.executeImpl(ScriptActionExecuter.java:157)
at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:127)
at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:688)
at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:625)
at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:487)
at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:475)
at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:696)
at sun.reflect.GeneratedMethodAccessor805.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:40)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
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 $Proxy78.executeAction(Unknown Source)
at org.alfresco.repo.action.scheduled.AbstractScheduledAction$JobDefinition$1$2.execute(AbstractScheduledAction.java:574)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:322)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:229)
at org.alfresco.repo.action.scheduled.AbstractScheduledAction$JobDefinition$1.runTransactionalAction(AbstractScheduledAction.java:564)
at org.alfresco.repo.action.scheduled.AbstractScheduledAction$JobDefinition$1.doWork(AbstractScheduledAction.java:432)
at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:497)
at org.alfresco.repo.action.scheduled.AbstractScheduledAction$JobDefinition.execute(AbstractScheduledAction.java:398)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
Caused by: org.alfresco.error.AlfrescoRuntimeException: ReferenceError: "ActiveXObject" is not defined. (workspace://SpacesStore/6f3fe30e-8a40-4d73-a765-ec8322cb776c#17)
at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:465)
at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:224)
… 51 more
Caused by: org.mozilla.javascript.EcmaError: ReferenceError: "ActiveXObject" is not defined. (workspace://SpacesStore/6f3fe30e-8a40-4d73-a765-ec8322cb776c#17)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3350)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3340)
at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3413)
at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1612)
at org.mozilla.javascript.gen.c8._c0(workspace://SpacesStore/6f3fe30e-8a40-4d73-a765-ec8322cb776c:17)
at org.mozilla.javascript.gen.c8.call(workspace://SpacesStore/6f3fe30e-8a40-4d73-a765-ec8322cb776c)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
at org.mozilla.javascript.gen.c8.call(workspace://SpacesStore/6f3fe30e-8a40-4d73-a765-ec8322cb776c)
at org.mozilla.javascript.gen.c8.exec(workspace://SpacesStore/6f3fe30e-8a40-4d73-a765-ec8322cb776c)
at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:449)
… 52 more
13:51:00,049 INFO [STDOUT] 13:51:00,049 ERROR [quartz.core.ErrorLogger] Job (jobGroup.jobA threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.alfresco.scripts.ScriptException: Failed to execute script 'workspace://SpacesStore/6f3fe30e-8a40-4d73-a765-ec8322cb776c': ReferenceError: "ActiveXObject" is not defined. (workspace://SpacesStore/6f3fe30e-8a40-4d73-a76
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
Caused by: org.alfresco.scripts.ScriptException: Failed to execute script 'workspace://SpacesStore/6f3fe30e-8a40-4d73-a765-ec8322cb776c': ReferenceError: "ActiveXObject" is not defined. (workspace://SpacesStore/6f3fe30e-8a40-4d73-a765-ec8322cb776c#17)
at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:228)
at org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:187)
at sun.reflect.GeneratedMethodAccessor808.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:40)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
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 $Proxy231.executeScript(Unknown Source)
at org.alfresco.repo.action.executer.ScriptActionExecuter.executeImpl(ScriptActionExecuter.java:157)
at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:127)
at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:688)
at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:625)
at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:487)
at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:475)
at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:696)
at sun.reflect.GeneratedMethodAccessor805.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:40)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)