1

I create new default .net connector using this page for Sites 9.5: https://docs.rws.com/972952/741535/sdl-tridion-sites-9-5-connector-reference/creating-a-connector-using-the-template-for--net

However, when I try to run it, I get the following exception in the logs, and that is the only exception.

2024-03-18 21:02:23,567 ERROR [Thread-6] RemotingContext - Fatal error in remoting context.
java.lang.NullPointerException: null
    at com.sdl.tridion.remoting.core.internal.launcher.NetCoreLauncher.escapeSpace(NetCoreLauncher.java:127)
    at com.sdl.tridion.remoting.core.internal.launcher.NetCoreLauncher.getCommands(NetCoreLauncher.java:44)
    at com.sdl.tridion.remoting.core.internal.launcher.Launcher.runLauncherProcess(Launcher.java:44)
    at com.sdl.tridion.remoting.core.internal.RemotingContext.initializeChannelInitiatorConnection(RemotingContext.java:462)
    at com.sdl.tridion.remoting.core.internal.RemotingContext.run(RemotingContext.java:327)
    at com.sdl.tridion.remoting.core.RemotingChannel.run(RemotingChannel.java:244)
    at java.base/java.lang.Thread.run(Thread.java:829)

On my machine, I have installed .net core 3.1 installed:

enter image description here

Just as a note, connector works ok ON CM SIDE, it fails only on Delivery SIDE.

Also, my configuration is as follows:

{
  "configuration": {
    "CConnector": {
      "configuration": {
        "pageSize": 3
      }
    }
  },
  "sitesCm": {
    "isEnabled": true,
    "CConnector": {
      "namespaces": {
        "cel": {
          "displayName": "test",
          "stubFolders": [ "tcm:11-256-2" ]
        }
      }
    }
  },
  "staging": {
    "isEnabled": true,
    "CConnector": {
      "namespaces": {
        "cel": {
        }
      }
    }
  }
}

2 Answers 2

3

That's strange. Looking at the Stack Trace in the error message, it seems there is a problem with resolving the path of the TIF .NET Core Launcher, yielding a null path which then causes the NullPointerException later on.

The code which determines the path is as follows:

private String getLauncherFilePath() {
    String launcherPath = null;
    try {
        launcherPath = super.getLauncherPath();
    }
    catch (RemotingInfrastructureException e) {}
    if (launcherPath == null) {
        return System.getProperty("Tridion.Remoting.NetCoreLauncherPath");
    }
    return launcherPath + File.separator + LAUNCHER_NETCORE_FILENAME;
}

protected String super.getLauncherPath() {
    String launcherPath = System.getProperty("Tridion.Remoting.Launcher.BasePath");
    if (launcherPath == null) {
        File jarLocation = new File(this.getClass().getProtectionDomain().getCodeSource().getLocation().getFile());
        launcherPath = jarLocation.getParent();
    }
    return getAbsolutePath(launcherPath + File.separator + this.getClass().getSimpleName());
}

The only way I see that you can get null out of this method is that a RemotingInfrastructureException occurred and that System.getProperty("Tridion.Remoting.NetCoreLauncherPath") is also null (i.e. no environment variable with that name is defined).

Frankly, I don't see yet how a RemotingInfrastructureException could occur in the super.getLauncherPath() implementation, but I hope the code gives you some more background in the resolving logic and may lead to the root cause (or a work-around, e.g. setting some of these environment variables)

1

I am adding an answer so that it can be more visible. @Rick was right to point me to the correct direction. The problem was visible when file path to the .netcore launcher (which resides in the TIF content extension) had empty spaces.

For example:

C:\Tridion Delivery\Content Service\.....

This has to be:

C:\TridionDelivery\ContentService\.....

Which is mental. Only when this was changed, did the code start working correctly. Hopefully, it helps someone else.

4
  • Really?! That sound like a bug worth reporting with RWS Customer Support. Have you tried the work-around using environment variables, e.g. Tridion.Remoting.Launcher.BasePath ? Mar 21 at 8:06
  • oh yes, it happens when microservices are on windows.
    – Marko Milic
    Mar 22 at 12:53
  • Are you sure it was the spaces and not the parenthesis in the path?
    – Atila Sos
    Mar 25 at 19:41
  • yes, i tested with spaces, and it still is not working. only when I completely remove the spaces, it starts working
    – Marko Milic
    Mar 25 at 20:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.