Form session issue?

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

aschultz
Ebase User
Posts: 11
Joined: Sun Oct 11, 2015 12:56 pm

Form session issue?

#1

Postby aschultz » Mon Oct 12, 2015 7:55 am

Hi,

I'm having a vague problem with my form, I can't figure out what the problem is.

The issue seems to be that when a user is interacting with the first page of the form, the form suddenly starts over, creating a new form session and thereby executing the before form scripts again, which isn't desirable! Also I've done an export of my project, and used that to see if I use form.gotoForm() anywhere that may trigger the issue, but that's not the case.The weird part is that this doesn't happen every time that someone uses the form, which makes it very hard for me to figure out if it is something in the code, or maybe something else. I've added extra logging but it hasn't made the issue clear.

Can there be something else that forces the form to restart? Maybe to much calls to server side scripts?
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Mon Oct 12, 2015 10:15 am

Do you know if the ebz parameter in the URL changes? - this will cause the form to re-initialise. Or any other manipulation of the URL by the user might do it. The system uses the ebz parameter to load the state of the form and if it changes the previous state is lost. Other obvious candidates are call form, go to form, go to url.
0 x

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

#3

Postby Segi » Mon Oct 12, 2015 2:59 pm

Just a thought but are you using any server side jQuery with your form ? That sounds to me like client side code that is reloading/refreshing the page.
0 x

aschultz
Ebase User
Posts: 11
Joined: Sun Oct 11, 2015 12:56 pm

#4

Postby aschultz » Wed Oct 14, 2015 10:53 am

@Segi: I mostly use server side javascript, and very little client side javascript. The client side code i use would/shouldn't result in a reload of the form.

@Jon: When logging happens during the execution of the form, the HTTP session and corresponding form session are also logged. That's how i discovered that in some cases the form suddenly re-initialises. The HTTP-session stays the same, and the form session is suddenly different. I'm trying to reproduce the problem, so that i have a better understanding of when it happens.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#5

Postby Jon » Wed Oct 14, 2015 11:04 am

OK, for your interest, if you add the following Java flag to the server start up, the system will log form session activity - creation, reuse and deletion:

Code: Select all

-DsessionDebug=true
Might help to figure out what's happening.
0 x

aschultz
Ebase User
Posts: 11
Joined: Sun Oct 11, 2015 12:56 pm

#6

Postby aschultz » Mon Dec 14, 2015 8:51 am

Hi, i'm back again. I'm still having these troubles. I have figured out that before the form spontaneously creates a new form session, this (not so helpful) error is shown in catalin.out:

Code: Select all

Tue Dec 08 09:17:10:  Unexpected error occurred - see server log
Tue Dec 08 09:17:10: ERROR Unexpected error occurred
 
Also, this error always occurs when the user is still on page 1. I hope someone can help!
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#7

Postby Jon » Mon Dec 14, 2015 9:20 am

There should be a Java stack trace produced at the same time as this message. Could you check the other log files to see if you can find this - it might not have a timestamp.
0 x

aschultz
Ebase User
Posts: 11
Joined: Sun Oct 11, 2015 12:56 pm

#8

Postby aschultz » Tue Dec 15, 2015 8:10 am

Thank you for your quick response. I found It! This stacktrace is shown after the mentioned error

Code: Select all

 
Tue Dec 08 10:02:32:  Unexpected error occurred - see server log
Tue Dec 08 10:02:32: ERROR Unexpected error occurred

--
        at com.ebasetech.ufs.runtime.runtimeControls.fields.FieldRuntimeControl$FieldValidationExecutable$1.performAction(FieldRuntimeControl.java:407)
        at com.ebasetech.ufs.runtime.runtimeControls.repeating.TableRowSetter.execute(TableRowSetter.java:30)
        at com.ebasetech.ufs.runtime.runtimeControls.fields.FieldRuntimeControl$FieldValidationExecutable.execute(FieldRuntimeControl.java:412)
        at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
        at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
        at com.ebasetech.ufs.runtime.RuntimePage$ValidationPlanExecutable.execute(RuntimePage.java:232)
        at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
        at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
        at com.ebasetech.ufs.runtime.events.SuspendableContainerExecutable.execute(SuspendableContainerExecutable.java:26)
        at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
        at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
        at com.ebasetech.ufs.runtime.events.SuspendableContainerExecutable.execute(SuspendableContainerExecutable.java:26)
        at com.ebasetech.ufs.runtime.runtimeControls.fields.ImmediateValidationRequestAction$ValidationExecutable.execute(ImmediateValidationRequestAction.java:128)
        at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
        at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
        at com.ebasetech.ufs.runtime.events.SuspendableContainerExecutable.execute(SuspendableContainerExecutable.java:26)
        at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
        at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
        at com.ebasetech.ufs.runtime.events.SuspendableContainerExecutable.execute(SuspendableContainerExecutable.java:26)
        at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
        at com.ebasetech.ufs.runtime.Request.execute(Request.java:436)
        at com.ebasetech.ufs.runtime.Request.execute(Request.java:405)
        at com.ebasetech.ufs.runtime.Request._execute(Request.java:343)
        at com.ebasetech.ufs.runtime.Request.execute(Request.java:308)
        at formservlets.FormProcessingUtil.executeRequest(FormProcessingUtil.java:480)
        at formservlets.EbaseAjaxServlet.process(EbaseAjaxServlet.java:71)
        at formservlets.EbaseAjaxServlet.doPost(EbaseAjaxServlet.java:41)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
        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 formservlets.EbaseFilter.processRequest(EbaseFilter.java:192)
        at formservlets.EbaseFilter.performFilter(EbaseFilter.java:141)
        at formservlets.EbaseFilter.doFilter(EbaseFilter.java:94)
        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:225)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
        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:98)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
        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.AjpProcessor.process(AjpProcessor.java:200)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
0 x

aschultz
Ebase User
Posts: 11
Joined: Sun Oct 11, 2015 12:56 pm

#9

Postby aschultz » Wed Dec 23, 2015 8:47 am

According to the stacktrace something seems to be going wrong when validating some field control? Am I right?
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#10

Postby Jon » Wed Dec 30, 2015 10:02 am

Yes, you're right. I don't know what's causing this problem, it doesn't seem to have been reported by anybody else. Which Ebase version are you using?
0 x


Who is online

Users browsing this forum: No registered users and 19 guests