Webpos session timeout

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Webpos session timeout

Frank Herrman
Hi there,

Another question from me. It seems that on different environments we experience issues with the webpos component. We are not able to login because the session expires immideatly. If we remove the cookies we can get in, but in the next step we are being logged out again. We experience this behaviour in Chrome, Firefox and Safari on multiple computers. The exact error:


The Following Errors Occurred: Error calling event: org.apache.ofbiz.webapp.event.EventHandlerException: Problems processing event: java.lang.IllegalStateException: getAttribute: Session already invalidated (getAttribute: Session already invalidated)
Is there something we can do about this to prevent it from happening? Thanks again!

kind regards,

Frank

Reply | Threaded
Open this post in threaded view
|

Re: Webpos session timeout

William Cunningham
Please remove me from your group.

Sent from my iPhone

> On Jul 31, 2018, at 6:34 AM, Frank Herrman <[hidden email]> wrote:
>
> Hi there,
>
> Another question from me. It seems that on different environments we experience issues with the webpos component. We are not able to login because the session expires immideatly. If we remove the cookies we can get in, but in the next step we are being logged out again. We experience this behaviour in Chrome, Firefox and Safari on multiple computers. The exact error:
>
>
> The Following Errors Occurred: Error calling event: org.apache.ofbiz.webapp.event.EventHandlerException: Problems processing event: java.lang.IllegalStateException: getAttribute: Session already invalidated (getAttribute: Session already invalidated)
> Is there something we can do about this to prevent it from happening? Thanks again!
>
> kind regards,
>
> Frank
>
Reply | Threaded
Open this post in threaded view
|

Re: Webpos session timeout

deepak nigam-2
Hi William,

Here is the link <https://ofbiz.apache.org/mailing-lists.html> having the
instructions to unsubscribe from mailing lists. Please help yourself.


Thanks & Regards
--
Deepak Nigam


On Tue, Jul 31, 2018 at 4:10 PM William Cunningham <
[hidden email]> wrote:

> Please remove me from your group.
>
> Sent from my iPhone
>
> > On Jul 31, 2018, at 6:34 AM, Frank Herrman <[hidden email]> wrote:
> >
> > Hi there,
> >
> > Another question from me. It seems that on different environments we
> experience issues with the webpos component. We are not able to login
> because the session expires immideatly. If we remove the cookies we can get
> in, but in the next step we are being logged out again. We experience this
> behaviour in Chrome, Firefox and Safari on multiple computers. The exact
> error:
> >
> >
> > The Following Errors Occurred: Error calling event:
> org.apache.ofbiz.webapp.event.EventHandlerException: Problems processing
> event: java.lang.IllegalStateException: getAttribute: Session already
> invalidated (getAttribute: Session already invalidated)
> > Is there something we can do about this to prevent it from happening?
> Thanks again!
> >
> > kind regards,
> >
> > Frank
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Webpos session timeout

Frank Herrman
In reply to this post by Frank Herrman
Hi there,



Haven't got much response to this issue, is this something only happening to me? It just feels the webpos is much too basic right now. Does anyone know the status of it?



Met vriendelijke groet / kind regards,

 

Frank Herrman

Solutions Architect

 

Typify B.V.

Regulusweg 11

2516 AC Den Haag

Tel.                        +31 70 780 11 55

Mob.                     +31 62 806 52 79

E-mail                    [hidden email]

Web                       www.typify.com



Op 31-07-18 12:34 heeft Frank Herrman <[hidden email]> geschreven:



    Hi there,

   

    Another question from me. It seems that on different environments we experience issues with the webpos component. We are not able to login because the session expires immideatly. If we remove the cookies we can get in, but in the next step we are being logged out again. We experience this behaviour in Chrome, Firefox and Safari on multiple computers. The exact error:

   

   

    The Following Errors Occurred: Error calling event: org.apache.ofbiz.webapp.event.EventHandlerException: Problems processing event: java.lang.IllegalStateException: getAttribute: Session already invalidated (getAttribute: Session already invalidated)

    Is there something we can do about this to prevent it from happening? Thanks again!

   

    kind regards,

   

    Frank

   

   


Reply | Threaded
Open this post in threaded view
|

Re: Webpos session timeout

Frank Herrman
It seems I got it to work somehow, but not in the right way. I installed ofbiz without the full demo data (which caused me many more issues, so I wouldn't recommend doing that...), in that case you need to manually create the terminals yourself in the database. That was not the issue though, I already did that. But if someone has this issue as well, make sure you have done that.

I did notice in the logs an error saying posTerminalId was empty. Where this happens I'm not sure, but therefore I altered the code (specialpurpose/webpos/src/main/java/org/apache/ofbiz/webpos/WebPosEvents.java). In getWebPosSession() I added a check if posTerminalId is not empty:

                if(UtilValidate.isEmpty(posTerminalId)) {
                    posTerminalId = request.getParameter("posTerminalId");
                }
This is still somehow acceptable. However, this did not resolve the exception I was experiencing. This was raised in the same file in the posLogin method. I simply added a try/catch there:

        try {
        GenericValue userLoginNew = (GenericValue)session.getAttribute("userLogin");
        if (userLoginNew != null && UtilValidate.isNotEmpty(posTerminalId)) {
        webPosSession.setUserLogin(userLoginNew);
        }
        } catch(Exception e) {

        }

Which is a really nasty solution. I'm sharing this since I hope someone can tell me why I needed to add this code and if I can solve it in another way without messing around with the code. Since I don't want to leave this code in there if not necessary. Furthermore, after logging in I still need to manually go to /main , so the function does not seem to return 'success', so I'm not there yet.

Anyway, any advice would be appreciated. Thanks!

Best regards,
Frank

Op 10-08-18 11:55 heeft Frank Herrman <[hidden email]> geschreven:

    Hi there,
   
   
   
    Haven't got much response to this issue, is this something only happening to me? It just feels the webpos is much too basic right now. Does anyone know the status of it?
   
   
   
    Met vriendelijke groet / kind regards,
   
     
   
    Frank Herrman
   
    Solutions Architect
   
     
   
    Typify B.V.
   
    Regulusweg 11
   
    2516 AC Den Haag
   
    Tel.                        +31 70 780 11 55
   
    Mob.                     +31 62 806 52 79
   
    E-mail                    [hidden email]
   
    Web                       www.typify.com
   
   
   
    Op 31-07-18 12:34 heeft Frank Herrman <[hidden email]> geschreven:
   
   
   
        Hi there,
   
       
   
        Another question from me. It seems that on different environments we experience issues with the webpos component. We are not able to login because the session expires immideatly. If we remove the cookies we can get in, but in the next step we are being logged out again. We experience this behaviour in Chrome, Firefox and Safari on multiple computers. The exact error:
   
       
   
       
   
        The Following Errors Occurred: Error calling event: org.apache.ofbiz.webapp.event.EventHandlerException: Problems processing event: java.lang.IllegalStateException: getAttribute: Session already invalidated (getAttribute: Session already invalidated)
   
        Is there something we can do about this to prevent it from happening? Thanks again!
   
       
   
        kind regards,
   
       
   
        Frank