From Glenn.Everitt@compuware.com Thu Apr 3 19:47:11 2008 From: Glenn Everitt To: xwiki-devs@xwiki.org Subject: [xwiki-devs] IllegalStateException when editing Groups with Admin Date: Thu, 03 Apr 2008 10:46:52 -0700 Message-ID: <16467949.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7823172090343837699==" --===============7823172090343837699== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable I'm using XWiki 1.3 in tomcat 5.5 and I'm getting this exception when I attempt to edit a group with Administration=20 - No storage migration required since current version is [7351]=20 2008-04-02 18:20:04,725 [http://coe.portal8.stg.covisint.com/xwiki/bin/admin/XWiki/$xwiki.getSkinFile= ('icons/ajax-loader.gif')] [TP-Processor3] ERROR log.SimpleLog4JLogSystem - Method sendRedirect threw exception for reference $response in template /skins/covisint_coe/adminprefs.vm at [69,1]=20 org.apache.velocity.exception.MethodInvocationException: Invocation of method 'sendRedirect' in class com.xpn.xwiki.web.XWikiServletResponse threw exception java.lang.IllegalStateException @ /skins/covisint_coe/adminprefs.vm[69,11] at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:286) Here is a snippet of the adminprefs.vm the problem is the redirect. I think something must have already been written to the client buffer and so we get the IllegationStateException ########## ## ## Content ## #set($formname =3D "update") #set($saveaction =3D "save")
#set($redirect =3D "$xwiki.getRequestURL()") #set($classname =3D "XWiki.XWikiPreferences") #set($class =3D $xwiki.getDocument($classname).xWikiClass) #set($obj =3D $doc.getObject($classname, 0)) #if(!$obj) #set($redirect =3D $xwiki.getRequestURL()) $response.sendRedirect($doc.getURL("objectadd", "classname=3DXWiki.XWikiPreferences&XWiki.XWikiPreferences_upload_maxsize=3D3= 3554432&xredirect=3D$xwiki.getFormEncoded($redirect)")) #end
#foreach($section in $sections) #showsection($section $sectionitemsmap) #end
## xwikiprefs
## noname
## xwikieditcontent
#template("adminactions.vm")
So, I commented out the line with $response.sendRedirect and the exception went away but I don't know if it really needs the redirect. From the log it looks like it is just loading 'icons/ajax-loader.gif' If my "fix" is wrong please let me know. Glenn Everitt --=20 View this message in context: http://www.nabble.com/IllegalStateException-whe= n-editing-Groups-with-Admin-tp16467949p16467949.html Sent from the XWiki- Dev mailing list archive at Nabble.com. --===============7823172090343837699==--