Modifying a managed bean called from an XPiNC : modifications don't show up

54 Views Asked by At

On an XPiNC, a SSJS button calls a Java method defined in a managed bean (don't ask, not mine).

I alter this method. No big deal, basic Java stuff.

I clean/rebuild : the first test results in error 500. After exiting Notes and Designer, no more error, but the behaviour is as if I had made no modification. Something persists somewhere and I can't figure out what, where nor why.

This database is on a server. "Build automatically" is off.

Two weeks ago I ran into the same problem, that sort of solved itself overnight. Now I've been stuck there for a couple of days.

2

There are 2 best solutions below

5
Paul Stephen Withers On

Building the application will delete the class files used by Domino Designer and Notes Client (the latter for XPiNC). That results in the error 500. It's standard behaviour. If you want to test changes you make for an XPiNC application, you will need to close and re-open Notes and Designer before testing each building each change (with build automatically switched off, you only update the .java files, not the .class files the application actually uses). This is why I would not recommend performing initial testing on XPiNC, but in a browser.

There were issues with updating Java in some 8.x releases. I'm not sure which version you're on.

The fact that the application is on a server is not relevant for XPiNC. By default, the application is still run locally in XPiNC, unless the "Run server-based XPages apps directly on server" option is ticked.

enter image description here

Because the application is on a server, I would recommend testing on a browser. That will identify if the problem is your application or XPiNC.

UPDATE

The Package Explorer will let you see the .class files, by amending the filter to include ".* resources", which can be modified as in the screenshot below.

Package Explorer

1
Éric Viala On

Turns out, my changes didn't produce anything visible ... because they failed. Basic Java mistake of a method returning a result even after an exception was rised and trapped. I guess I didn't monitor xpages.log close enough.

Also got a more fluid workflow after reactivating autobuild, although I was advised against it and saw several posts to that effect here and there. What gives ? What does "Build automatically" does better than manually rebuilding after cleaning ?