[xwiki-devs] Xwiki Forms Error - com.xpn.xwiki.api.XWiki threw exception java.lang.ClassFormatError: Invalid method Code length
Hi, I have created a custom application using Xwiki forms and the size of the page to add a new item is too large. Now, when i tried to add few more lines of code in it, it throws following error. org.apache.velocity.exception.MethodInvocationException: Invocation of method 'includeForm' in class com.xpn.xwiki.api.XWiki threw exception java.lang.ClassFormatError: Invalid method Code length 66381 in class file Script1 @ ACSFacilities.test221,8? at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:300) Failed to find a solution in Xwiki FAQ's and forums. Your kindly help is much appreciated... Thanks. Regards, Rajesh -- View this message in context: http://n2.nabble.com/Xwiki-Forms-Error---com.xpn.xwiki.api.XWiki-threw-excep... Sent from the XWiki- Dev mailing list archive at Nabble.com.
This need more details on the error report. Are you sure you are not going through groovy (having <% in your page) ? Ludovic Rajeshere a écrit :
Hi,
I have created a custom application using Xwiki forms and the size of the page to add a new item is too large. Now, when i tried to add few more lines of code in it, it throws following error.
org.apache.velocity.exception.MethodInvocationException: Invocation of method 'includeForm' in class com.xpn.xwiki.api.XWiki threw exception java.lang.ClassFormatError: Invalid method Code length 66381 in class file Script1 @ ACSFacilities.test221,8? at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:300)
Failed to find a solution in Xwiki FAQ's and forums. Your kindly help is much appreciated...
Thanks.
Regards, Rajesh
-- Ludovic Dubost Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost
Hi, Thanks for showing your interest to help me out in fixing this issue... Below is more info relatred to my issue... I have created seven classes and added them to one template. I have written lot of groovy code(<%) as well as Velocity code(#) in it based on my requirement. I have a dynamic table and some other custom requirements for which i have written groovy code and lot of javascript for validations. Now have i created a new class(number eight) and added it to this template. I have started designing the class sheet and then included this classsheet in main class sheet(for the template) using #includeInContext("...") and tried to create a new page or tried to open up an existing page it throws that error... Please let me know if you need further info on it... Thanks Regards, Rajesh Ludovic Dubost-2 wrote:
This need more details on the error report. Are you sure you are not going through groovy (having <% in your page) ?
Ludovic
Rajeshere a écrit :
Hi,
I have created a custom application using Xwiki forms and the size of the page to add a new item is too large. Now, when i tried to add few more lines of code in it, it throws following error.
org.apache.velocity.exception.MethodInvocationException: Invocation of method 'includeForm' in class com.xpn.xwiki.api.XWiki threw exception java.lang.ClassFormatError: Invalid method Code length 66381 in class file Script1 @ ACSFacilities.test221,8? at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:300)
Failed to find a solution in Xwiki FAQ's and forums. Your kindly help is much appreciated...
Thanks.
Regards, Rajesh
-- Ludovic Dubost Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- View this message in context: http://n2.nabble.com/Xwiki-Forms-Error---com.xpn.xwiki.api.XWiki-threw-excep... Sent from the XWiki- Dev mailing list archive at Nabble.com.
Which way are you calling groovy in your pages ? Can you show a sample of the scripts Ludovic Rajeshere a écrit :
Hi,
Thanks for showing your interest to help me out in fixing this issue...
Below is more info relatred to my issue...
I have created seven classes and added them to one template. I have written lot of groovy code(<%) as well as Velocity code(#) in it based on my requirement. I have a dynamic table and some other custom requirements for which i have written groovy code and lot of javascript for validations. Now have i created a new class(number eight) and added it to this template. I have started designing the class sheet and then included this classsheet in main class sheet(for the template) using #includeInContext("...") and tried to create a new page or tried to open up an existing page it throws that error...
Please let me know if you need further info on it...
Thanks
Regards, Rajesh
Ludovic Dubost-2 wrote:
This need more details on the error report. Are you sure you are not going through groovy (having <% in your page) ?
Ludovic
Rajeshere a écrit :
Hi,
I have created a custom application using Xwiki forms and the size of the page to add a new item is too large. Now, when i tried to add few more lines of code in it, it throws following error.
org.apache.velocity.exception.MethodInvocationException: Invocation of method 'includeForm' in class com.xpn.xwiki.api.XWiki threw exception java.lang.ClassFormatError: Invalid method Code length 66381 in class file Script1 @ ACSFacilities.test221,8? at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:300)
Failed to find a solution in Xwiki FAQ's and forums. Your kindly help is much appreciated...
Thanks.
Regards, Rajesh
-- Ludovic Dubost Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Ludovic Dubost Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost
Hi, Below are two sample groovy and velocity code used in my custom application... Sample 1 <% String viewStatus=""; %> #if($context.action=="view" || $context.action=="preview") <%viewStatus="disabled='true'";%> #end #if($servicesDesc!="") <% String servicesDesc123="$servicesDesc"; String servicesDesc1= ""; String servicesDesc2= ""; String servicesDesc3= ""; String servicesDesc4= ""; .......... java.util.StringTokenizer servicesDescTokens= new java.util.StringTokenizer(servicesDesc123,"~"); int servicesDescCount=servicesDescTokens.countTokens(); if(servicesDescCount>0) { if(servicesDescTokens.hasMoreTokens()) { servicesDesc1=servicesDescTokens.nextToken(); if(!"".equals(servicesDesc1.trim())) { servicesDesc1="checked"; } } if(servicesDescTokens.hasMoreTokens()) { servicesDesc2=servicesDescTokens.nextToken(); if(!"".equals(servicesDesc2.trim())) servicesDesc2="checked"; } ..... %> Sample 2 #set($class3 = $doc.getObject("ACSFacilities.Staffing3Class").xWikiClass) #set($prop3= $class3.get("sg_jobTitle")) #set($jobtitles=$doc.display($prop3.getName(),"view")) #set($prop3= $class3.get("sg_jobCode")) #set($jobcodes=$doc.display($prop3.getName(),"view")) #set($prop3= $class3.get("sg_classify")) #set($classify=$doc.display($prop3.getName(),"view")) #set($prop3= $class3.get("sg_startHourlyRate")) #set($startHourlyRate=$doc.display($prop3.getName(),"view")) ......... #if($jobtitles!="") <% String jobtitles1="$jobtitles"; String jobcodes1="$jobcodes"; String classify1="$classify"; String startHourlyRate1="$startHourlyRate"; String percentABC1="$percentABC"; String s2ndShiftDiff1="$s2ndShiftDiff"; String s3rdShiftDiff1="$s3rdShiftDiff"; String bilingualDiff1="$bilingualDiff"; String inHomeDiff1="$inHomeDiff"; String employeeCount1="$employeeCount"; java.util.StringTokenizer jobtitlesTokens= new java.util.StringTokenizer(jobtitles1,"~"); java.util.StringTokenizer jobcodesTokens= new java.util.StringTokenizer(jobcodes1,"~"); java.util.StringTokenizer classifyTokens= new java.util.StringTokenizer(classify1,"~"); java.util.StringTokenizer startHourlyRateTokens= new java.util.StringTokenizer(startHourlyRate1,"~"); java.util.StringTokenizer percentABCTokens= new java.util.StringTokenizer(percentABC1,"~"); java.util.StringTokenizer s2ndShiftDiffTokens= new java.util.StringTokenizer(s2ndShiftDiff1,"~"); java.util.StringTokenizer s3rdShiftDiffTokens= new java.util.StringTokenizer(s3rdShiftDiff1,"~"); java.util.StringTokenizer bilingualDiffTokens= new java.util.StringTokenizer(bilingualDiff1,"~"); java.util.StringTokenizer inHomeDiffTokens= new java.util.StringTokenizer(inHomeDiff1,"~"); java.util.StringTokenizer employeeCountTokens= new java.util.StringTokenizer(employeeCount1,"~"); int staffingCount=jobtitlesTokens.countTokens(); %> #if($xwikiaction=="inline") <% if(staffingCount>0) { while(startHourlyRateTokens.hasMoreTokens()) { %> <TR> <TD align=left><INPUT type="checkbox" id="checkStaffing" size=6 value="checkbox" name="checkStaffing"> </TD> <Td align=left> ..... Please let me know if you need more info... Thanks. Regards, Rajesh -- View this message in context: http://n2.nabble.com/Xwiki-Forms-Error---com.xpn.xwiki.api.XWiki-threw-excep... Sent from the XWiki- Dev mailing list archive at Nabble.com.
participants (2)
-
Ludovic Dubost -
Rajeshere