Hi, I have a webmaker app that I designed that was working perfectly until a recent re-publish and now whenever I try to change data on a repeating record set of fields and submit to the server, none of the data gets saved.
The odd thing is, with the exact same data set (I did an export from live and imported it to my local dev mysql instance) on the local dev instance of webmaker, it works perfectly with the very same version of the app that is deployed to the live system.
I checked out the differences between the XML document that gets sent to the controller on my dev system versus what gets sent on the live system (I enabled debug logging and loaded up the log in the test dashboard on my local dev box). On the one that is working all the data gets bound correctly to repeating <record>...</record> elements with all the record data inside the <record>...</record> tag as separate tags, as expected. However on the live version the data is not like that, nothing is under the <mvc:unbound> tag, and I get a bunch of records that look like this:
with the working local dev system, the document that is displayed as the incoming document on the test dashboard looks like this:
Why the differences? How do I fix this?
This is rather important that I get this fixed asap because this system is to be used live tomorrow.
BTW the live server architecture is ubuntu linux running nginx reverse proxied to tomcat which is running the webmaker app. With this same architecture the app was working perfectly in the past.
My browser that I am experiencing this in is chrome 21.0.1180.60 m
BTW with the number of rows on the repating record set for editing, the resulting document that gets shown in the test dashboard is about 180kB. I have ensured the tomcat and nginx configuration is set to allow a payload of a much larger size than this.
The odd thing is, with the exact same data set (I did an export from live and imported it to my local dev mysql instance) on the local dev instance of webmaker, it works perfectly with the very same version of the app that is deployed to the live system.
I checked out the differences between the XML document that gets sent to the controller on my dev system versus what gets sent on the live system (I enabled debug logging and loaded up the log in the test dashboard on my local dev box). On the one that is working all the data gets bound correctly to repeating <record>...</record> elements with all the record data inside the <record>...</record> tag as separate tags, as expected. However on the live version the data is not like that, nothing is under the <mvc:unbound> tag, and I get a bunch of records that look like this:
<mvc:eForm xmlns="http://www.hyfinity.com/xplatform" xmlns:mvc="http://www.hyfinity.com/mvc" xmlns:xg="http://www.hyfinity.com/xgate">
<mvc:Control>
<record_repeat56want_shirt xmlns="http://www.hyfinity.com/mvc">0</record_repeat56want_shirt>
<record_repeat29zip xmlns="http://www.hyfinity.com/mvc"/>
<record_repeat95last_name xmlns="http://www.hyfinity.com/mvc">redacted</record_repeat95last_name>
<record_repeat57first_name xmlns="http://www.hyfinity.com/mvc">redacted</record_repeat57first_name>
<record_repeat89trusted xmlns="http://www.hyfinity.com/mvc">0</record_repeat89trusted>
<record_repeat28emergency_contact xmlns="http://www.hyfinity.com/mvc">redacted</record_repeat28emergency_contact>
<record_repeat49attendee_comments xmlns="http://www.hyfinity.com/mvc"/>
<record_repeat88zip xmlns="http://www.hyfinity.com/mvc">redacted</record_repeat88zip>
<record_repeat52middle_name xmlns="http://www.hyfinity.com/mvc">redacted</record_repeat52middle_name>
with the working local dev system, the document that is displayed as the incoming document on the test dashboard looks like this:
<eForm xmlns="http://www.hyfinity.com/mvc">
<mvc:Control xmlns:mvc="http://www.hyfinity.com/mvc" xmlns:xform="http://www.w3.org/2001/08/xforms" xmlns:xg="http://www.hyfinity.com/xgate">
<is_script_enabled>true</is_script_enabled>
<Page>Attendee.xsl</Page>
<Controller>mvc-redacted-SaveAttendees-Controller</Controller>
<action>updateAttendees</action>
<mvc:unbound>
<record_repeat77chkHighlight>false</record_repeat77chkHighlight>
<record_repeat84attendeePaypalURL>redacted</record_repeat84attendeePaypalURL>
.................................
<record_repeat37chkHighlight>false</record_repeat37chkHighlight>
</mvc:unbound>
</mvc:Control>
<Data>
<formData>
<aidDelete/>
<gidNew/>
<fnNew/>
<mnNew/>
<lnNew/>
<preferredNameNew/>
<dobNew/>
<zipNew/>
<phoneNew/>
<emailNew/>
<emergencyContactNew/>
<emergencyPhoneNew/>
<dateRegisteredNew/>
<dateCheckedInNew/>
<paidNew>1</paidNew>
<amountPaidNew>0</amountPaidNew>
<amountRefundedNew>0</amountRefundedNew>
<howFoundNew/>
<attendeeCommentsNew/>
<adminCommentsNew/>
<trustedNew>1</trustedNew>
<interestedWorkingNew>1</interestedWorkingNew>
<hoursWorkedNew>0</hoursWorkedNew>
<wantShirtNew>1</wantShirtNew>
<shirtPaidNew>0</shirtPaidNew>
<shirtSizeNew>3XL</shirtSizeNew>
<howAttendingNew>1</howAttendingNew>
</formData>
<attendees xmlns="">
<record>
<aid>redacted</aid>
<gid>redacted</gid>
<first_name>redacted</first_name>
<middle_name/>
<last_name>redacted</last_name>
<preferred_name/>
<dob>redacted</dob>
<zip/>
<phone_number/>
<email>redacted@redacted.redacted</email>
<emergency_contact>redacted</emergency_contact>
<emergency_phone>redacted</emergency_phone>
<date_registered>2012-06-23T00:00:00</date_registered>
<date_checked_in/>
<paid>1</paid>
<amount_paid>0</amount_paid>
<amount_refunded>0</amount_refunded>
<how_found/>
<attendee_comments/>
<admin_comments/>
<trusted>0</trusted>
<interested_working>0</interested_working>
<hours_worked>0</hours_worked>
<want_shirt>0</want_shirt>
<shirt_paid>0</shirt_paid>
<shirt_size>XXS</shirt_size>
<how_attending>3</how_attending>
</record>
..............................................
</attendees>
</Data>
</eForm>
Why the differences? How do I fix this?
This is rather important that I get this fixed asap because this system is to be used live tomorrow.
BTW the live server architecture is ubuntu linux running nginx reverse proxied to tomcat which is running the webmaker app. With this same architecture the app was working perfectly in the past.
My browser that I am experiencing this in is chrome 21.0.1180.60 m
BTW with the number of rows on the repating record set for editing, the resulting document that gets shown in the test dashboard is about 180kB. I have ensured the tomcat and nginx configuration is set to allow a payload of a much larger size than this.
RE: error on live system not present on local dev
I'm sorry you are having problems with your published project.
From the details you have provided it looks like the data binding process (sxforms) is not happening on your published project. This is what maps all the incoming details from the browser into the required structure that you expect to see, and creates the +?+?++unbound+?+?+? section where needed.
The first thing I would check is the xgate.xml configuration file found in the +?+?++doc+?+?+? directory of the web app structure. This should contain an sxforms tag with a value of +?+?++true+?+?+?.
I would also check the container logs for tomcat. If the platform finds a problem parsing this xgate.xml configuration file, then this will be logged to the container logs, as the normal WebMaker logging has not been initialised by this point. If there is a problem, you should see a log message +?+?++Error Loading XGate configuration+?+?+?, with some additional details.
Can you also provide some details on the WebMaker version you are using, and the type of publication being performed?
Also, please make sure you have all the available patches installed, both to your design studio installation and the server if appropriate (eg for BizFlow publication).
I have seen a similar problem previously when the underlying WebMaker JAR versions available on the server were older than those from the design studio.
I hope this information helps you to start debugging this problem.
Please let me know how you get on.
Regards,
Gerard
RE: error on live system not present on local dev
Thank you for the reply. I am using tomcat publication to the server and I believe the latest version of webmaker. I am not using BizFlow, just the hyfinity webmaker. Interesting you note the differences in jar versions being an issue, this all started happening when I installed the patches that I was prompted to when I started webmaker up recently. I have 3 different apps published to the tomcat server all webmaker, will I need to remove them all and then republish each one with the new version of webmaker? How would I make sure the jar files are all the same versions?
RE: error on live system not present on local dev
When you use the tomcat publication option it will create a standalone WAR file (including all the needed JARs) that will then be published to the server.
After installing any patches you will need to republish to make sure any relevant changes, including JAR updates, are pushed to the live environment.
Were you able to look at the container logs for your live tomcat installation? Was there mention of a problem with the xgate.xml configuration file?
If you are able to try publishing to a clean environment that might be useful in trying to isolate what the potential problem could be.
Regards,
Gerard
RE: error on live system not present on local dev
The details of your current WebMaker version are listed below: Version: MVC WebMaker 3.2 Build: build.831 Revision: r13810 Date: May 17 2011 Installed Patches: MVC_3.2.0001 MVC_3.2.0002
After installing the patches I did republish. Let me try clearing out the tomcat webapps directory and re-publish the apps. I checked the catalina.out file for any mention of the string "XGate" but I could not find it in the logs.
I think I have found the issue, this is the log from catalina.out after removing all the apps from the webapps directory, clearing out the work directory, and stopping tomcat, then starting again and doing a clean publish of my app:
Aug 9, 2012 1:09:24 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64:/usr/lib/jvm/java-6-openjdk/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib/jni:/lib:/usr/lib Aug 9, 2012 1:09:46 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Aug 9, 2012 1:09:46 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 22791 ms Aug 9, 2012 1:09:46 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Aug 9, 2012 1:09:46 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.24 Aug 9, 2012 1:09:46 PM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor manager.xml Aug 9, 2012 1:09:47 PM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor ROOT.xml Aug 9, 2012 1:09:47 PM org.apache.catalina.core.StandardContext resourcesStart SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base /var/lib/tomcat6/webapps/ROOT does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4086) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4255) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:722) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:593) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Aug 9, 2012 1:09:47 PM org.apache.catalina.core.StandardContext start SEVERE: Error in resourceStart() Aug 9, 2012 1:09:47 PM org.apache.catalina.core.StandardContext start SEVERE: Error getConfigured Aug 9, 2012 1:09:47 PM org.apache.catalina.core.StandardContext start SEVERE: Context [] startup failed due to previous errors Aug 9, 2012 1:09:47 PM org.apache.catalina.core.StandardContext stop INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/] has not been started Aug 9, 2012 1:09:47 PM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor host-manager.xml Aug 9, 2012 1:09:47 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Aug 9, 2012 1:09:47 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 799 ms Aug 9, 2012 1:12:11 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive magmin.war [magmin] Initialising... [magmin] Running in normal mode [magmin] Starting Application [magmin] Using Morphyc File: /var/lib/tomcat6/webapps/magmin/doc/morphyc.xml [magmin] Parsed mapping file [magmin] Started Aug 9, 2012 1:14:36 PM org.apache.tomcat.util.http.Parameters processParameters WARNING: More than the maximum number of request parameters (GET plus POST) for a single request ([10,000]) were detected. Any parameters beyond this limit have been ignored. To change this limit, set the maxParameterCount attribute on the Connector.
Let me see if changing that parameter will make the app work again.[hr][/hr]
Ok that appears to be the problem. After I set the maxParameterCount on the <Connector .../> tag in the server.xml to a higher number and restarted tomcat things started working again.
I'm kind of surprised the debug logs showed any of the data being submitted.
Thank you for your help!
RE: error on live system not present on local dev
I guess you must have quite a big page! :)
Just for info, we released WebMaker version 4 last month, and I think it is a big improvement over 3.2. It might be worth giving it a try if you get the chance.
Regards,
Gerard