2

we have a XPage project in the Domino Designer. The project contains a file [database.nsf]/Code/Java/META-INF/services/com.ibm.xsp.core.events.ApplicationListener, which configures an com.ibm.xsp.application.events.ApplicationListener2 (same with com.ibm.xsp.application.events.ApplicationListener) to be executed when the application is created, refreshed and destroyed. When I clean and rebuild the project I often get the following error in the problem section:

The project was not built due to "Resource already exists on disk: '[database.nsf]/WebContent/WEB-INF/classes/META-INF/services/com.ibm.xsp.core.events.ApplicationListener'." Fix the problem, then try refreshing this project and building it since it may be inconsistent.

This message is correct: the file is than available at that location. (You have to use the Eclipse view "Navigator" to see it, because the directory /WebContent/WEB-INF/classes is hidden in the project explorer.). When I open the file, it is empty. When I open the properties of the file, the size is "-1 bytes" (yes, minus). When I delete the file and refresh the folder in the Navigator, sometimes the file come directly back again with size -1 bytes, sometimes not. Sometimes the bug is solved after next clean project, but sometimes it reoccurs.

When the Designer compiles the project without error, the file has the correct content. At runtime this file is read and the ApplicationListener is executed, all events are fired as expected.

When the error occurs I could copy the content by hand into the problematic file and save it, delete the error task in the Domino Designer. Than the application also works fine (?).

I tried to create a minimal example, with a new project (nsf database) with only the configuration file (/Code/Java/META-INF/services/com.ibm.xsp.core.events.ApplicationListener) and the application listener implementation. Unfortunately the error does not occur. The reason may be, that our project has a lot of files. We had this problem only with the services definition file. The problem also occurs when I rename the file (I appended two underscores as test).

The problem occurs with Domino Designer 9.0.1 and Notes 9.0.1 FP3. Our project has an associated on disk project. But I had the same problem after removing the association. After associate again the problem was there again.

Is there a solution, except removing the file? (Whithout the file our application will not work correctly.)

Thanks in advance Stephan Koops

1 Answers1

3

I have had the same issue. In the 'Problems' view it lists 'The project was not built due to "Resource already exists on disk .../WebContent/WEB-INF/Classes/... then a file with a long hex name ending in .js.

Even simple Xpage changes would not appear on the browser no matter what I did with clean/build etc

What I find works is:

  1. Open the 'Package Explorer' view, and in the first Folder called Local you will see a series of *.js files as mentioned above.
  2. Delete them all.
  3. Clean and build.

Bingo, my xpage is now working again.