Show TOC Start of Content Area

Procedure documentation Fixing Broken Development Components  Locate the document in its SAP Library structure

Use

If a development component (DC) is broken by itself, there are two alternatives:

·        The DC is broken because of DC problems with meta data that are checked by Component Build Service (CBS) before the actual build is started. In this case, there is no build log and only the request log exists. The request log contains the details about the error. You find a link to the request log in the CBS Web UI in the DC details page. Examples for typical errors that appear in request log are:

       A used DC or public part does not exist.

¡        Using and used DC are in different software component (SC) compartments but there is no usage dependency between the two SCs.

¡        The black box rule for child DCs was violated. A DC tries to use the child DC of some other DC, which is not allowed.

·        The DC is broken because of build errors. Here the CBS actually started the DC build, which is executed by the DC build tool in a separate VM. The build failed and you should see the error messages in the build log. The build log is created for each DC separately. It looks very much like a normal ANT build log. You find a link to the build log in the CBS Web UI in the DC details page. Examples for errors in the build log are:

       The used DC is protected by an access control list. For example: someone changed the Access Control List (ACL) for a used DC in an incompatible way.

¡        Errors reported by Java compiler (class missing, method not found and so on). For example: someone removed a class from a public part, removed a method and so on.

¡        Error reported by generators like Web Dynpro generator. For example: some Web Dynpro component interface changed in incompatible way.

¡        Technical problems with generators, packaging steps and so on. In this case there should be an error text or stack trace in the build log.

Procedure

There are several ways to repair a broken DC, depending on the reason why it got broken:

·        Activate fixed version of broken DC.

If the DC itself contains the error you should check out the affected files from DTR, fix the problem in the SAP NetWeaver Developer Studio and then check in and activate the new version. As a result of the activation the DC will directly go from broken state to OK state. For example: as announced before a deprecated interface was deleted by the provider. You change your code and use a new interface that was specified as an alternative.

·        Activate/Import fixed version of used DC.

If the DC was broken because of a problem in a used DC or build plug-in, the solution is to fix the used DC. This can be done by editing and activating a new version of the used DC (if it is available with its sources) or by importing a patched version of the used SC into CMS (if it is available as archives). In both cases, the broken DC will become dirty first (scheduled for rebuild). After successful rebuild, the DC will get the OK state.

For example: the owner of some DC has accidentally deleted a public part you are using. This DC was built somewhere else and it was imported into your NWDI track as part of some used software component. After you reported the problem, the owner of the DC has provided a fixed version. Your SAP NetWeaver Development Infrastructure (NWDI) administrator imports the SC archive with the fixed version into your track. CBS automatically rebuilds all dependent DCs including your DC. Because the used public part is now found, your DC can be built successfully and is no longer broken.

·        Administrative rebuild.

Sometimes a DC gets broken if a rebuild fails because of resource problems. In these cases, it is enough to fix the resource problem and then trigger a rebuild. Therefore, it is not necessary to change anything in the DCs themselves. For example: there is not enough memory or the disk is full in the CBS server for some time. After the server administrator has fixed the resource problem, NWDI administrators can use CBS Web UI to rebuild individual DCs or whole SC compartments. After the successful rebuild, the DCs will go directly from broken to OK state.

·        Initialize compartment.

In some rare cases internal caches of the CBS may be out of sync with the Design Time Repository (DTR). For example: think of a situation where you have no broken DCs or any pending requests but you have a mismatch between the content of the files in the active workspace of DTR and the DC meta data or build results on CBS. Maybe the content of DTR had to be restored from a backup that does not contain the latest changes.

NWDI administrators can use the initialize compartment operation to repair this kind of inconsistency. When initializing a compartment, the CBS discards all the build results and the cached source code for all the DCs in that compartment. The compartment is now empty on CBS and must be filled again from scratch. All source files will be fetched from DTR again and all DCs must be rebuilt. For a compartment that contains several hundred DCs this may take hours. So this feature should only be used if you have strong reason to believe that there is some inconsistency, which can be cured by re-initialization.

One fix can repair dozens of broken DCs:

...

       1.      Use the CBS Web UI to find out which DCs are broken by itself.

To find it in a browser, open URL: http://<host>:<port>/devinf and navigate to the CBS.

                            a.      Locate your build space and open the Compartments view.

                            b.      Select one compartment. At the bottom of the page, you see a list of DCs. There you can filter for DCs that are broken by itself.

                            c.      If there are DCs broken by itself find out why these DCs are broken and fix them.

                            d.      Repeat for other compartments.

       2.      After the broken by itself DCs are fixed, CBS tries to rebuild the DCs using them again. The rebuild could reveal new errors. If this happens for some DC its state changes from broken because of used DC to broken by itself. And you have to continue investigation with that DC.

End of Content Area