KB Article #182293

Policy Studio reports a stack trace when creating new project from existing instance

Problem

Policy Studio reports a stack trace like the following when trying to create a new project from an existing instance:


ERROR   01/Jan/2022:00:00:00.000 [0000:000000000000000000000000] java exception: 
java.lang.NullPointerException
    at java.io.File.<init>(File.java:362)
    at com.vordel.common.util.FileUtil.createValidFile(FileUtil.java:315)
    at com.vordel.archive.fed.FedArchiveExtractor.extractContentToDir(FedArchiveExtractor.java:39)
    at com.vordel.archive.fed.Archive.extractContentToDir(Archive.java:222)
    at com.vordel.archive.fed.Archive.extractContentToDir(Archive.java:205)

Resolution

This happens when the gateway is running in EMT mode. EMT mode disables all APIs under /api/deployment/archive/ and causes them to return an error like {"errors":[{"code":102,"message":"Method unavailable. Externally Managed Topology enabled."}]} to clients, including Policy Studio. In such cases, you have to get a copy of the project from elsewhere, e.g. by taking the files for the EMT image and extracting the config from /apigateway/groups/group-X/conf/ and loading that with Policy Studio. That said, it is best if you do not use your instances as your source of truth and instead follow Team Development best practices to store your configuration in source control, in which case this operation should not be required.