This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Nov 11, 2011, 7:57 AM
54 Posts

Problems during xpages development

  • Category: Other
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags:
  • Replies: 5
We are having following odd thing in our XPages server.
 
Every now and then (read: way too often) XPages server returns some old version of the page to browser. First I thought this is a browser cache related thing but then I noticed that server is changing (saving / signing...) the design elements without any reasons.
Example: developer A developes xpages1.xsp page and developer B updates xpages2.xsp page. At some point when developer A saves a new change to (s)he's page, the other xpages2.xsp page will be saved as well (not sure if save is the right word here, but domino makes some kind of change into this page as well). The end result is that developer B will see an "old" version of (s)he's xpages (xpages2.xsp) in the browser. To fix this, (s)he must recompile this page.
 
There are 3-4 developers in the same project.
 
Has any one else faced same kind of problem?
 
Detailed info of our environment:
- Windows 2008 (I believe it's 2008, Windows atleast)
- Domino 8.5.3
- XPages Extension Library (latest version from 8.5.3 branch)
 
Nov 11, 2011, 8:47 AM
272 Posts
Re: Problems during xpages development
Hi,
 
This also happens on 8.5.2. In one of the companies I am working for we have sometimes the same phenomenon, and keeping an eye on this, but we never were able to reproduce this behaviour. It occurs sporadically.
As far as I understand, the problem occures during the build process. Under *undefined* circumstances, the designer seems to cache the code, and rebuilds it locally, then pushes everything on the server.
The XPages then will be modified by a user who did  not touch them...
 
If the other developer reopens the database and recompiles, the "newer" version will be recovered.
 
Sven
 
Nov 11, 2011, 9:00 AM
54 Posts
Re: Problems during xpages development
Thanks Sven for quick reply.
 
Yes, this is the exact same scenario here too.
 
It is really frustrating to work with this "feature". First everything worked just fine. Unfortunatelly I don't know when this started to happen; after 8.5.3 upgrade? don't know after new developer joined our team? We all have same kind of environment installed (except that I have some additional plugins installed, like WildFire and one of my own side bar app).
 
There also one other on going problem in same server. I think I'll post another topic on this one.

Nov 11, 2011, 9:35 AM
122 Posts
Re: Problems during xpages development
I'm not sure if this is related, but part of the problem may be around the build process and the files that get created to convert an XPage to what actually runs on the server.
 
I'll preface this by saying this is my understanding from development of Java in XPages and plugins for Notes, not based on any authorised documentation from IBM (I'm not sure if there is any).
 
In the Designer Client there's the XPage and, in Package Explorer, under Local - xsp you can see a Java class for each XPage or Custom Control. So it's not the XPage that gets run from the server, but it's not even the Java class. During the build process the Java classes get compiled by Designer into Java bytecode. (Effectively it's Eclipse not Designer, because the nsf is an Eclipse plugin, with it's own plugin.xml, doing the same with the Java classes that a plugin would do.) I think this may be the cause of the problem.
 
What I saw with XPages Help Application was, when I did a design refresh, my custom Java classes that I put in WebContent/src were updated and looked right, but the old code was run. Even a clean of the project in 8.5.2 had no effect. I had to delete my classes from the target database, refresh the design, then clean the project. With 8.5.3 I think the design refresh issue is resolved.
 
I'm not sure when you build whether it rebuilds everything, or just everything that that developer has touched. But the process may push up byte code for the whole project. Or it may be that developer B's Designer project has not been updated with developer A's changes. But it makes sense that cleaning the project or recompiling that page resolves the problem.
 
Do the developers have Build Automatically ticked on the Project menu? If so, it may be worth turning that off, so the project is not rebuilt every time they save a design element. It takes a bit of getting used to, but it's now the default setting for my PC.
Nov 11, 2011, 9:52 AM
54 Posts
Re: Problems during xpages development
Thanks Paul :)
 
I agree with you on the way xpages are built and executed on the server (java byte code, not "xpages").
 
However this should (read: MUST) work on multiple developers on the same time. Doing clean / recompile all the time is out of the question, it takes too much time and is way too complicated (as far as I see it). I rather create private "sandboxes" to each developer and do the development there and copy+paste the finished code to the actual database (well, maybe in the worst case) :)
 
Does any one know what does the setting in Preferences ==> XPages ==> Automatic Recompile do? We already turned this to "Manually recompile XPages" without any luck? What and where does this setting affect?
 
At the moment we have the "Build Automatically" turned on (in Project menu). Do you know where all does this affect? If it's turned on, does it compile the WHOLE application or just the design element you were editing? I don't see the difference here is the compile done automatically or manually, a compile still has to be done to see the changes in the client.
 

Nov 11, 2011, 10:58 AM
272 Posts
Re: Problems during xpages development
Sure, it's not the XPage which runs on the server, it's the java byte code compiled by the developer.
 
But this is a problem, because if the designer client of developer B is not noticed correctly that developer A has made a change to another part of the project, the rebuild of the project by developer B results in an "old" version which not contains the changes of developer A. After a refresh and a rebuild/clean all java classes in the designer client are updated from the server, and all changes made are included.
 
But how to force this (a refresh before a build) in designer?
 
Edit 2:
And yes, we have disabled "Build Automatically" AND "Automatic Recompile"
 



 
 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal