Why always getting Nullpointer when doubleclicking link on XPage? - exception

I have a difficult problem: I always get a Nullpointer exception on my webpace, when I
rapidly click on the same link. Or when I reload the page rapidly.
This is the error I get:
java.lang.NullPointerException
com.ibm.xsp.webapp.FacesServlet.acquireSyncToken(FacesServlet.java:285)
com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:161)
com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:160)
com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:138)
com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:103)
com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(ComponentModule.java:576)
com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1281)
com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:847)
com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:796)
com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:565)
com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1265)
com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:653)
com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:476)
com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:341)
com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:297)
com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)
Question: Can someone explain in detail what this acquireSyncToken does? Maybe then I can find the bug...
In my XPages I use
sessionScope.get(key) // same with applicationScope
sessionScope.put(key, value) // same with applicationScope
a LOT ;)
I tried very much, e.g. to wrap my lookups within
synchronize(applicationScope){
// lookups and so on...
}
and stuff like that, but that only made it worse, so I removed the synchronize-stuff...
Environment:
Domino Server 8.5.3 FP1
XPages
testing on modern Browsers like FF, Chrome
MacOS / Win7
Architecture:
I have one BIG xPage, where I basically add some CustomControls and due to the current URL embed another XPage.
Inside the CustomControls and XPages I have more Custom Controls and I added some Views as Datasources and did the wildest things with "repeat controls" and SSJS inside Computed Fields.
The heavy-weight DB-Lookups are cached in the applicationScope.
For more Info, please ask!
Thanks in advance!

This is a known issue. IBM advises to downgrade from FP1 or FP2 to 8.5.3 or UP1.
See Dojo xhrGet with sync:false issue with xe:viewJsonLegacyService and Domino 8.5.3 SP1 or http://www-01.ibm.com/support/docview.wss?uid=swg1LO71603

Related

Google model-viewer - how to set max zoom?

I'm very happy about what I'm able to do using Google model-viewer. It's relatively configurable, but there's more I'd like to be able to do with the camera-- for instance, setting a max zoom/min distance from the target. I've found code that seems to suggest how to modify this, but I don't know how to override the script delivered via the CDN. Is my only option to download using npm?
Excuse my naivete!
You can see this issue Zoom in/out #1172
Now it's possible to use camera control settings:
max-camera-orbit
min-camera-orbit
max-field-of-view
min-field-of-view
model-viewer(
src="https://cwervo.com/assets/3D-models/logo.glb" ios-
src="https://cwervo.com/assets/3D-models/logo-3m-scaled.usdz"
auto-rotate
camera-controls
min-camera-orbit='auto auto 100%'
max-camera-orbit='auto auto 100%'
min-field-of-view='110deg'
max-field-of-view='110deg'
)
Source: https://codepen.io/schmidtsonian/pen/VwvEwVw
I'm the maintainer of the <model-viewer> project. You aren't crazy; we haven't added the ability to control this yet.
But don't worry! We are planning to add this feature to a release very soon (currently planned for v0.7.0). Please track https://github.com/GoogleWebComponents/model-viewer/issues/458 for progress!
[edit] Also to answer your question about NPM: you can download the module from NPM and assemble a customized version of the pieces that make up <model-viewer>. Also, you could fork the project and patch it that way. I don't necessarily recommend these things, but they are options if you are desperate. If you go this route, I highly recommend asking questions on our Github project page. We are friendly and responsive to everyone.

Asp.net link to file: in IE strange behaviour

We are working on migrating an older ASP.Net application to the cloud and for that we did several things also updated the application to use a newer .net framework.
Now we face a strange problem, in the application a link is created from data in the database. The html:
<asp:HyperLink ID="linkProjectFolder" CssClass="imageLink" runat="server" ToolTip="Open de folder in de Windows Explorer">
<asp:Image ID="Image1" runat="server" ImageUrl="~/pages/img/openHS.png" />
</asp:HyperLink>
The code behind:
string url = string.Concat(((TextBox)viewINFO.FindControl("txtProjectmapBasePath")).Text, ((TextBox)viewINFO.FindControl("txtProjectmapPath")).Text);
HyperLink hl = (HyperLink)viewINFO.FindControl("linkProjectFolder");
if (hl != null)
{
hl.NavigateUrl = Uri.EscapeUriString(#"file:///" + url);
}
Nothing special and this code has not changed between the old version and the new version. I know that this code does not work in firefox and chrome, but the old version does work in IE11.
Now from the enduser the old version in IE just works, if you click the link a windows explorer window is opened to the file path. For the same end user, from the same workstation with the same browser the new version does not work. When you click the link nothing happens.
Now the strange part, on my development machine, I simulate a network drive by mapping a folder to a drive letter (susbst N: c:\temp\Ndrive) when I try the link I see the same behavior as the end user, just nothing happens. Now if I unmap the drive, start the application and click the link, the link opens in the browser and I get a "page cannot be displayed". If I remap the drive at that moment, go back in the browser and retry the link it works.....
There are of course differences, the .net framework, IIS vs IISExpress vs IIS on azure, but as it is just a simple href I would say it must be client side. Also that the code sometimes works suggests that the urlencoding at least is correct (it does exactly the same as in the old version for the tested url's)
In the database the links are a path to a mapped drive so something like "N:\folder\folder 2\folder & folder\", that is correctly urlencoded and that only works half the time as described above. If I use a link to my C drive "C:\Temp" it never works, if I use "127.0.0.1/C$/Temp/" as link it always works but changing all the links in the database to use an IP address is not really the way we want to go.
After eliminating all the things above I have no clue on what could cause this behavior. Can anybody point me in the right direction ?
Consider revising the asp:HyperLink tag with a nested asp:Image tag with one of these two (2) options:
1) Use an asp:HyperLink tag with ImageUrl property and remove the nested image tag. See this Microsoft Hyperlink.ImageUrl Property page for more information.
2) Use an asp:ImageButton tag with the ImageUrl property. See this SO question titled: how to link imagebutton to url visual developer for more information.
If none of these options resolves your problem, then you may have a file resource access issue rather than an ASP.NET syntax issue.

Using history.pushState in Angular results in "10 $digest() iterations reached. Aborting!" error

I'm trying to change the url in my app from "http://www.test.com/foo" to "http://www.test.com/bar+someVariable" (somevariable is a string that I recieve from an http request inside bar's controller) using history.pushState() . In my routes I enabled html5mode and everything works fine. I'm also using location.path() to switch between views and controllers as instructed in the docs. Now once the app switches view and controller I added history.pushState(null,null,"/bar"+somevariable) to "/bar"'s controller. Everything works and the url is updated but in the console I receive the "10 $digest() iterations reached. Aborting!" error. I suspect that activating the history.pushState function is somehow interfering with angular's $location or $route service.
What is the correct way to use history.pushState() within angular without receiving the $digest error?
By the way I'm using angular 1.0.3
Thanks ahead,
Gidon
Change the path with
$location.path('/newValue')
See: http://docs.angularjs.org/guide/dev_guide.services.$location
It is hard to know for sure without seeing the relevant source, but this is a common issue in older versions of IE (8 and 9 mostly I think). The solution that worked for me a few weeks ago when I encountered this (and may work for you if you're using IE) was changing my anchor tags in my navigation.
I had:
what fixed it:

AngularJs project doesnt run in ie-8 and onward?

Please help how to run angularjs project in ie-8 and onward?
we have venueSvc angular service that are working fine in other browsers(chrome,firefox,opera etc) but not working in ie-8 and onward.
it is giving the following error.
Unknown provider: venueSvcProvider <- venueSvc
Looks like your service is not being included properly. Ie8 has some issues with directives being used as elements without being specified, however it should work in general. That error looks as though the program cannot find the provider, so make sure it exists in your source.

What is VHTML? How it works? Where can I find information about it?

The code below continues many lines until it ends with a expected /veotherwise /vechoose. I started working on a development firm a little ago where they use this html version called vhtml. I have search the web but it brings different definitions for vhtml. I have seen some posts in Joomla about vhtml but they don't look like the code below. I was expecting to get a pointer on how to understand the language.
It looks very similar to normal html with even very similar commands, or maybe smalltalk. But I just can decipher it. Any help will be appreciated. Please post comments if you want more information.
<vechoose>
<vewhen criteria='isPortalEdit'>
widget: practices-landing-page
</vewhen>
<veotherwise>
<veinclude src='private/webportal/webtemplate-content.vhtml'>
<vesection name='content-body'>
<% // Determine portlet visibility %>
<vecalc expression='isEmpty = false' output='none' />
<vechoose>
<vewhen criteria='isEmpty'>
<veif criteria='portlet.ifEmptyDo == "Hide"'>
<script>getTag( 'portlet_<%=portlet.order%>' ).style.display = "none";</script>
</veif>
<veif criteria='portlet.ifEmptyDo == "Show Message"'>
<%#portlet.ifEmptyMessage%>
</veif>
</vewhen>
...
Managed to find this: http://vitrage.sibweb.ru/english/ Looks like it could be an Apache Module called VITRAGE. Not much available in English however so am really unsure if it's a match.
On reading the code sample you posted, it looks like a XML styled procedural language. Are you sure it's available elsewhere or perhaps something that was developed internally?
I think this is an internal language between to bring server side aspect to a display on the browser. I have been unable to find documentation on this language, and I don't think Vitrage explains it. The server uses coyote as web browser, tomcat as a servlet handler and java as the backend.
Any new information please post.