Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with printing out ChronicleContext after calling .startNewGateway() #614

Open
dave5595 opened this issue Jan 30, 2023 · 0 comments
Open

Comments

@dave5595
Copy link

Using chronicle-bom:2.23ea117

val URL = System.getProperty("url", "tcp://localhost:" + 9099)
ChronicleContext.newContext(URL).use {context-> 
    context.startNewGateway()
    println("context: $context")
}

The code above will result in the following exception:

Exception in thread "main" java.lang.IllegalArgumentException: type=class java.util.concurrent.ThreadPoolExecutor is unsupported, it must either be of type Marshallable, String or AutoBoxed primitive Object.

I'm guessing its due to the CachedThreadPool which is assigned on run() and that the java.util.concurrent package is not supported for serialization in Wire atm. Traced it back to this piece of code in ValueOut.java

if ((Wires.isInternal(value)))
    throw new IllegalArgumentException("type=" + valueClass +
            " is unsupported, it must either be of type Marshallable, String or " +
            "AutoBoxed primitive Object");

...

public static boolean isInternal(@NotNull Object value) {
    String name = value.getClass().getPackage().getName();
    return name.startsWith("java.")
            || name.startsWith("javax.")
            || name.startsWith("jdk.");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant