Primefaces application stops working when click button - primefaces

Hello please help with the following problem
At times the network is slow and my application programmed in java with primefaces 6.0 and glassfish 3.1 stops working
When I open the page it is shown and the values of the components are load a few seconds late, when clicking on a button when the values of the whole page are not loaded, an error is presented and the application stops working.
Example:
1)The screen is presented and the values of the p: selectOneMenu are not loaded
2)When clicking on the first button, shows the following error:
Javascript error:
Error de lectura XML: sección CDATA no cerrada Ubicación: http://localhost:8080/....pag1.xhtml Número de línea 2, columna 43: ....pag1.xhtml:2:43
Error de lectura XML: sección CDATA no cerrada Ubicación: http://localhost:8080/....pag1 Número de línea 2, columna 43: ....pag1.xhtml:2:43
TypeError: PF(...) is undefined
Java error:
Grave: JSF1073: se ha interceptado javax.faces.event.AbortProcessingException durante el procesamiento de RENDER_RESPONSE 6 : UIComponent-ClientId=, Mensaje=java.lang.NullPointerException
Grave: java.lang.NullPointerException
javax.faces.event.AbortProcessingException: java.lang.NullPointerException
at org.primefaces.context.PrimePartialResponseWriter.startMetadataIfNecessary(PrimePartialResponseWriter.java:303)
3)Seconds later load the values of p: selectOneMenu but the application stopped working due to the previous error.
Now if I open the screen and wait until the values of p: selectOneMenu are loaded, the screen works correctly
How can i fix this

Related

Facebook Filtering New Page Experience

As some of you may know Facebook is migrating its users pages progressively to what is called the "New Page Experience" (NPE), the thing is some previous endpoints and data such as "locations" are not available by the same means anymore, for NPE you need to use the page token.
In my case, I used to do the following query on the facebook-graph-api with a facebook user token:
me/accounts?fields=access_token,category,tasks,name,is_published,locations.limit(100){access_token,category,name,is_published,parent_page}
This returned a JSON array with all the pages linked to the account of the user token, and the associated locations for each page.
However since the New Page Experience partial migration, if at least one page has been migrated to New Experience by Facebook, the whole call returns an error
{
"error": {
"message": "Invalid OAuth 2.0 Access Token",
"type": "OAuthException",
"code": 190,
"error_subcode": 2069032,
"is_transient": false,
"error_user_title": "Token d’accès utilisateur non pris en charge",
"error_user_msg": "Un token d’accès de Page est requis pour cet appel dans la nouvelle version des Pages."
}
Facebook has added a boolean field on pages called has_transitioned_to_new_page_experience, which should allow us to filter the pages.
However it doesn't seem to work, I've tried thing such as (true, 1, "true"...) which do work for other boolean parameters but not for has_transitioned_to_new_page_experience :
me/accounts?has_transitioned_to_new_page_experience=true // return all pages without filtering
me/accounts?is_place=true // Filters properly based on if the page is a place
I'd like to be able to single out the NPE, or do a filtered query to avoid needless calls through loops and array management, as most of the pages are still not NPE yet, and this would allow me to keep my code for "legacy pages" untouched.
Have any of you experienced this issue, or been able to solve it?
Maybe talk with the Facebook dev support?
Do you think this behavior is buggy?
Thanks!

JMeter generates server error when trying to reproduce an autoComplete tag

I am trying to load test with JMeter.
I have a program where incidents are created.
For now, when playing the recording, it logs in fine, but when saving data it generates the following error:
SEVERE [javax.enterprise.resource.webcontainer.jsf.application] (default task-5) Error Rendering View[/alta.xhtml]: javax.el.PropertyNotFoundException: /alta.xhtml #840,111 value="#{alta.nombre}": Target Unreachable, 'null' returned null
I have noticed that maybe the error is thrown because I have auto-complete lists.
Since, an error that is also seen in the console is:
SEVERE [javax.enterprise.resource.webcontainer.jsf.application] (default task-5) Error Rendering View[/alta.xhtml]: java.lang.NullPointerException
at org.primefaces.component.autocomplete.AutoCompleteRenderer.encodeSuggestionsAsList(AutoCompleteRenderer.java:647)
How can i fix this? Apparently in the JMeter recording all the values ​​are saved...
The autocomplete of the first error that I have put is the following:
<p:autoComplete id="via"
rendered="#{not alta.isNuevoNivel}"
dropdown="true"
widgetVar="viaWV"
placeholder="Seleccione la via"
value="#{alta.nombre}"
requiredMessage="Falta la via"
completeMethod="#{alta.completeTextPrimeraVia}"
required="true"
queryDelay="100"
cache="true"
forceSelection="true"
scrollHeight="200"
minQueryLength="0"
onfocus="if (#{null eq alta.via}) {PF('viaWV').search('');};"
onclick="PF('viaWV').search('');"
autoHighlight="false"
inputStyleClass="comboEditorAutoInput"
styleClass="comboEditorAuto"
panelStyleClass="panStyleAuto"
tabindex="24"
disabled="#{alta.isObligada() or not alta.isNueva()}" >
<p:ajax event="itemSelect"
partialSubmit="true"
delay="100"
listener="#{alta.onChangeViaEdicion()}"
update="rcCampoViaModificado :formEdicionVia:via_valor"
oncomplete="rcCampoViaModificado();"
onerror="onError();"/>
<p:ajax event="clear"
immediate="true"
delay="100"
listener="#{alta.clearVialEdicion()}"
update="rcCampoViaModificado"
oncomplete="rcCampoViaModificado();"
onerror="onError();"/>
</p:autoComplete>
Most probably your request fails due to missing or improperly implemented correlation, for modern Web 2.0 applications the chance of successful replaying recorded script is close to zero as the applications heavily rely on dynamic parameters which are used for client-side state tracking or security
When you record the actions in browser JMeter saves the values which are actual at the moment, but when you try to replay the script the values are not actual anymore so you need to extract the dynamic parameters from server response (or replicate their generation logic if they cannot be extracted) and substitute hard-coded values with their dynamic counterparts.
One of the possible ways of detecting dynamic values is recording the same scenario one more time and then comparing generated JMeter test plans - all the values which differ are a subject to correlation

Problems while following the tutorial: "Tutorial: Create a Custom Browser Guide" in Neo4j

I have some problems while following the tutorial: "Tutorial: Create a Custom Browser Guide" in Neo4j.
I get stuck at the point where I should pass the adoc file to HTML.
My prompt is giving me this feedback in Spanish
"/run.sh" no se reconoce como un comando interno o externo, programa o archivo por lotes ejecutable.
Translated into English:
"/run.sh" could no be recognized as an internal o external command, programm or executable file"
Here you can find the part of the tutorial, where I get stuck.
Pass the test.adoc file to the run.sh script (as shown below) to
convert to the HTML slides.
./run.sh adoc/test.adoc html/test.html
#optional arguments, leveloffset - to change the heading level up or down, base-url and additional attributes
./run.sh path/to/test.adoc path/to/test.html [+1] https://example.com/guides/test
#run the local python server to serve on localhost:8001
python http-server.py

Random Servlet UnavailableException

My application is trying to connect to a third party website (url) and sometimes I get the javax.servlet.UnavailableException. If I try to connect again (click submit button), then it works. If I click submit again, it may or may not work. So it is inconsistent. The application is deployed in WebSphere.
The error message is:
Error page exception
The server cannot use the error page specified for your application to handle the Original Exception printed below. Please see the Error Page Exception below for a description of the problem with the specified error page.
Original Exception:
Error Message:
Error Code: 404
Target Servlet: action
Error Stack:
javax.servlet.UnavailableException
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:361)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:526)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3673)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:269)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:831)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1478)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:133)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:457)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:515)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:300)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:271)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1593)
Is it a config issue or issue with my code or the 3rd party website?

downloading image in as3 from client url

here is the link of my Flash application
http://www.asa.com.pk/
hit the above URL and click on the PostCard section shown.. This will show you image and button to download that image. Application works fine at above URL and it downloads the file too but when any user hits the alternate url , the file is not downloaded..
http//asa.com.pk/
My debugger shows:
Error #2044: SecurityErrorEvent no controlado: text=Error #2048: Violación de la seguridad Sandbox: http://asa.com.pk/main.swf no puede cargar datos desde http://www.asa.com.pk/downloads/largeimage/mcb.gif.
at main_fla::MainTimeline/Download_Started()
Quick Google Search ended on:
Actionscript Error #2044: Unhandled SecurityErrorEvent:. text=Error #2047: Security sandbox violation: LocalConnection.send: 127.0.0.1 cannot access
http://www.actionscript.org/forums/showthread.php3?t=148714
I think you will get it after this, basically it's a crossdomain.xml thing.
I have tested your app, and the error it's exactly because of the flash player 10 sandbox feature, you need to use a crossdomain.xml file where you allow both domains to be cross-accessed.
There are a number of things you can do to fix security errors like this.
Create a valid crossdomain.xml file under both http://domain.com & http://www.domain.com
Set the DNS to forward http://domain.com to http://www.domain.com permanently
In your AS code add Secuirty.allowdomain( "*" );
Hope this helps.