On Tue, Dec 11, 2012 at 2:28 PM, Haimerl, Josef
<Josef.Haimerl(a)de-gmbh.com> wrote:
Hi,
trying to use the FullCalendar Extension. I can add appointments like it's meant to
be with the JSONService. But when I want to use the UpdateService I get "Failed to
save the document Reason: update failed".
Already tried to manually use the UpdateService, with something like this:
http://localhost/industrialwiki/bin/view/Calendar/UpdateService?xpage=plain…
In Firefox I get as result:
OK 3 Sun Dec 09 00:00:00 CET 2012
So that works. When I refresh the appointment it has the new date.
In IE I get following: (Has anybody any hints?)
Failed to execute the [velocity] macroorg.xwiki.rendering.macro.MacroExecutionException:
Failed to evaluate Velocity Macro for content [#set($page = $request.page)
#if($request.durationfield) #set($durationfield = $request.durationfield) #else
#set($durationfield = "duration") #end #if($request.startfield) #set($startfield
= $request.startfield) #else #set($startfield = "datetime") #end
#if($request.classname) #set($classname = $request.classname) #else #set($classname =
"") #end #set($success = false) #if($page&&$page!="")
#set($pagedoc = $xwiki.getDocument($page)) #if(!$pagedoc.isNew()) #set($ok =
$pagedoc.use($classname)) #if("$!{request.isResize}"=="1")
#set($cduration = $pagedoc.getValue($durationfield)) #if(!$cduration) #set($cduration =
"30") #end #set($nduration = $util.parseInt($cduration)) #set($dayDelta =
$util.parseInt($request.dayDelta)) #set($minuteDelta =
$util.parseInt($request.minuteDelta)) #set($nduration = $nduration + $dayDelta * 24 +
$minuteDelta) #set($o
k = $pagedoc.set($durationfield, "$!{nduration}")) #set($success = true) #else
#set($datetime = $pagedoc.getValue($startfield)) #if(!$datetime) #set($datetime =
$xwiki.jodatime.getDateTime(2012, 7, 22, 8, 0, 0, 0).toDate()) #end #set($jdatetime =
$xwiki.jodatime.getDateTime($datetime.getTime())) #set($jdatetime =
$jdatetime.plusDays($util.parseInt($request.dayDelta))) #set($jdatetime =
$jdatetime.plusMinutes($util.parseInt($request.minuteDelta))) #set($ok =
$pagedoc.set($startfield, $jdatetime.toDate())) #set($success = true) #end #if($success)
#set($ok = $pagedoc.save("Update session time")) OK
$pagedoc.getValue($durationfield) $pagedoc.getValue($startfield) #else FAIL $message
($pagedoc.fullName $pagedoc.getValue($durationfield) $pagedoc.getValue($startfield)) #end
#else FAIL No Document #end #else FAIL No Document #end] at
org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:131)
at org.xwiki.rendering.internal.macro.velocity.Velocit
yMacro.evaluateString(VelocityMacro.java:50) at
org.xwiki.rendering.macro.script.AbstractScriptMacro.evaluateBlock(AbstractScriptMacro.java:302)
at
org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:198)
at
org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:59)
at
org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transformOnce(MacroTransformation.java:188)
at
org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transform(MacroTransformation.java:135)
at
org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:84)
at
org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:250)
at
org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:124)
at
org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:5
4) at
org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:80)
at
org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:38)
at
org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:113)
at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:50)
at
org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:67)
at
org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:41)
at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:901) at
com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:880) at
com.xpn.xwiki.api.Document.getRenderedContent(Document.java:660) at
sun.reflect.GeneratedMethodAccessor479.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at
java.lang.reflect.Meth
od.invoke(Method.java:597) at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:395)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173) at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280) at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:369) at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87) at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342) at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:224)
at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:184)
at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocity
Renderer.java:105) at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:1765) at
com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1705) at
com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:854) at
sun.reflect.GeneratedMethodAccessor125.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at
java.lang.reflect.Method.invoke(Method.java:597) at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:395)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173) at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280) at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:369) at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) at
org.apache.velocity.runtime.directive.VelocimacroProxy.ren
der(VelocimacroProxy.java:216) at
org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:311) at
org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:230) at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:207) at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342) at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106) at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342) at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:224)
at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:184)
at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:105) at
com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:1765) at
com.xpn.xwiki.web.Utils.parseTemplate(
Utils.java:155) at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:241) at
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:116) at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:120) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.Applicatio
nFilterChain.doFilter(ApplicationFilterChain.java:210) at
org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:144) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:66) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.xwiki.container.servlet.filters.internal.SetCharacterEnco
dingFilter.doFilter(SetCharacterEncodingFilter.java:111) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929) at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at
org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:19
7) at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1813) at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at
java.lang.Thread.run(Thread.java:662) Caused by:
org.xwiki.velocity.XWikiVelocityException: Failed to evaluate content with id
[xwiki:Calendar.UpdateService] at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:243)
at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:184)
at
org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:124)
... 97 more Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation
of method 'save' in class com.xpn.xwiki.api.Document threw exception
com.xpn.xwiki.XWikiExce
ption: Error number 9001 in 9: Access denied in edit mode on document
xwiki:Sandbox.DatesClassTest at xwiki:Calendar.UpdateService[line 45, column 21] at
org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:243)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:187) at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280) at
org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:567) at
org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71) at
org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87) at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(
ASTIfStatement.java:87) at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87) at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342) at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:224)
... 99 more
Caused by: com.xpn.xwiki.XWikiException: Error number
9001 in 9: Access denied in edit mode on document xwiki:Sandbox.DatesClassTest at
com.xpn.xwiki.api.Document.save(Document.java:2202)
Looks like you are missing some rights on the
xwiki:Sandbox.DatesClassTest document.
Hope this helps,
Marius
at com.xpn.xwiki.api.Document.save(Document.java:2193)
at sun.reflect.GeneratedMethodAccessor565.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at
java.lang.reflect.Method.invoke(Method.java:597) at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:395)
at org.apache.velocity.util.introspection.UberspectImpl$Vel
MethodImpl.invoke(UberspectImpl.java:384) at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173) ... 111
more
Josef Haimerl
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users