Requested View Couldn't be restored - glassfish-3

I made a web application using (JSF and JPA) and then deployed it to Glassfish Application Server.
It works fine, but when I leave the Application idle for a period of time, maybe one hour, and then trying to use the application, it throws exception said that (the requested view couldn't be restored).
And when reloading my application in Glassfish it works fine again, how can I solve this problem?

This is a ViewExpiredException and is fired when the state saving method is set to server(default) and you make a post request to the view which is not available in the session anymore.
One way to solve the problem is to redirect users to a particular page when this type of exception is thrown. You can configure an error page for this in web.xml.
<error-page>
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
<location>/errorpage.xhtml</location>
</error-page>

Related

500 Internal Server Error - When I login to the application with Spring MVC

I'm using Spring MVC and I'm trying to login to an application in a PRE environment, despite entering the correct user and password I throw the following error:
Viewing the log of the application the last one that is visualized is an access to a DAO, and aparantemente never ends to solve the query.
And the last thing I can say is that if we clean the chrome cache, the application is logged without problems.
Could it be that the j_query_spring_security_check is causing a problem?
Please help.
Sorry for not adding the code, finally the problem was that the application had a load balancer with 2 nodes, and one of the nodes always fails :/
Regards.

Azure Web App suddenly returns 401.72 for all request

I have a problem which is similar to this one, but not quite.
We have a solution with two Azure Web Apps, built and deployed by Visual Studio Online. It has been working just fine for a few months, but suddenly all requests end in a 401.72 response:
HTTP Error 401.71 - Unauthorized You do not have permission to view
this directory or page.
Most likely causes: The authenticated user does not have access to a
resource needed to process the request.
Things you can try: Create a tracing rule to track failed requests for
this HTTP status code. For more information about creating a tracing
rule for failed requests, click here.
Detailed Error Information: Module EasyAuthModule_32bit
Notification AuthenticateRequest Handler
ExtensionlessUrlHandler-Integrated-4.0 Error Code 0x80004005
Requested URL https://[appname]:80/ Physical Path
D:\home\site\wwwroot Logon Method Not yet determined Logon User
Not yet determined
More Information: This is the generic Access Denied error returned by
IIS. Typically, there is a substatus code associated with this error
that describes why the server denied the request. Check the IIS Log
file to determine whether a substatus code is associated with this
failure. View more information ยป
Microsoft Knowledge Base Articles:
As far as I can figure out, no relevant configuration changes has been done.
Restarting the Web App and redeploying the solution didn't solve the problem
As it happens, we were due to recreate the environment anyway, and after this was done, the same deployment setup (with updated target) deployed successfully and it's working fine on the new Web App intsance.
Even if we now have a working environment, we'd really like to know what happened, so we can be sure it doesn't happen again.
Can anyone shed any light on this?
You had easy auth turned on. Do you expect it to be turned on? That appears to be causing the issue.
If you don't intend for it to be on, please turn it off via either portal (old|new) by navigating to your Web App and finding it in your settings.
If you do intend for it to be on, you need to check your configuration to make sure you've properly set up AAD. Maybe the App Configuration within AAD has changed?
If neither of those things helps, let me know.

Randonmly access denied error occured while accessing pages HDIV

I am facing issue of access denied randomly for any secure request. Access denied page is nothing but error page will appeared HDIV exception occures. The trouble part is that we have configured log for HDIV but we haven't getting any exception. When the same page refreshed then page loaded correctly.
we have following application configuration and environmentJBoss 5 and spring mvc security 2.5 and HDIV version 1.1.
In Log now we are geting eeror message INVALID_HDIV_PARAMETER_VALUE But not much details
I am not able to identify what is going wrong.
INVALID_HDIV_PARAMETER_VALUE means the request does not contains the HDIV_STATE parameter. If this happens once in a while then you are submiting the form before it completly loaded. I faced the same problem i solved it by placing a div with higher z-index the using jQuery fadeout the div on document ready

ASP.NET Web Application Error

I have an application with the main and 2 sub pages. The main page works and one of the sub pages work fine. But the other sub page gives me an error:
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off".
When trying to run on my local, i get
An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.
These were working fine a week ago and this problem is sudden. help please.
You are facing this issue because the SubPage you are getting error on accessing might be under some security. The error you have described comes on a page which is not accessible to the anonymous user.
You must check the Web.config firstly to see if there is some Location Access permissions defined for that Webpage and ensure that they are correctly defined.
You may read about more to this problem by a previous Answer.
web site configuration

How to make Asp.Net ignore my physical directory?

I'm creating my first FubuMVC application. I've got a physical folder Demo and a route that should handle the "/demo" url. For some reason, when I try to debug it in Visual Studio, it issues a permanent redirect to "/demo/", and then returns HTTP Error 404.20 - Not Found (No default document). When I route the same action to /demostuff, everything works just fine. I noticed that my application startup scripts are fired on the first request, but it's somehow not routed to Fubu's HttpHandler.
I'm using IIS Express.

Resources