-
Notifications
You must be signed in to change notification settings - Fork 75
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
java.lang.UnsupportedOperationException during Startup #2036
Comments
I get a similar message when I try to open the engines tab. In addition the engines don't load. |
I can reproduce this. |
Can you do what the error message says and add a |
For this particular error: It seems that something pollutes the context. Try the following in public void fetchAvailableEngineSettings(RepositoryDTO repositoryDTO,
Consumer<Map<String, List<EngineSetting>>> callback, Consumer<Exception> errorCallback) {
executorService.execute(() -> {
final List<SettingConfig> configurations = fetchSettingConfigurations(repositoryDTO);
final Map<String, List<EngineSetting>> result = configurations.stream()
.collect(Collectors.groupingBy(
configuration -> configuration.engineId,
Collectors.mapping(configuration -> {
// the script engine needs to be created inside the correct thread otherwise GraalJS
// throws an error
final PhoenicisScriptEngine phoenicisScriptEngine = phoenicisScriptEngineFactory
.createEngine();
final String include = String.format("include(\"engines.%s.settings.%s\");",
configuration.engineId, configuration.settingId);
final Value settingClass = (Value) phoenicisScriptEngine.evalAndReturn(include,
errorCallback);
if (settingClass == null || !settingClass.canInstantiate()) {
System.out.println("include: " + include);
}
return settingClass.newInstance().as(EngineSetting.class);
}, Collectors.toList())));
callback.accept(result);
});
} |
If I execute your method I get:
Is it possible that |
If I execute: public void fetchAvailableEngineSettings(RepositoryDTO repositoryDTO,
Consumer<Map<String, List<EngineSetting>>> callback, Consumer<Exception> errorCallback) {
executorService.execute(() -> {
final List<SettingConfig> configurations = fetchSettingConfigurations(repositoryDTO);
// the script engine needs to be created inside the correct thread otherwise GraalJS throws an error
final PhoenicisScriptEngine phoenicisScriptEngine = phoenicisScriptEngineFactory.createEngine();
final Map<String, List<EngineSetting>> result = configurations.stream()
.collect(Collectors.groupingBy(
configuration -> configuration.engineId,
Collectors.mapping(configuration -> {
final String include = String.format("include(\"engines.%s.settings.%s\");",
configuration.engineId, configuration.settingId);
final Value settingClass = (Value) phoenicisScriptEngine.evalAndReturn(include,
errorCallback);
if (settingClass == null || !settingClass.canInstantiate()) {
System.out.println("include: " + include);
}
return settingClass.newInstance().as(EngineSetting.class);
}, Collectors.toList())));
callback.accept(result);
});
} I get: |
Can you check if |
I've compiled the latest source code with #2040 merged and I still get errors right after the main window shows up:
Also, the list of installable apps stops at Civilization 5 for some reason. |
@Zemogiter can you try changing Line 58 in 06c69e6
to: <graalvm.version>19.0.2</graalvm.version> See PhoenicisOrg/scripts#1075 for details |
@madoar after that change engine tools and verb installation works but the application list is still broken
|
Can you try with a clean |
Removing the content of cache folder changed nothing but removing the content of |
I guess something was corrupted. |
But wait, there is more. Readding my local repo reintroduced the exact same error message and the application tab issue. Solved by removing the local directory and downloading a clear copy from github. |
On the latest commit I get this exception:
Removing local repo from the list didn't help. Also the engines tab dosen't load wine versions. |
The exception is thrown in: Somehow the plugin is called without a |
Forgot to mention this error also happens right after the main window appears. |
In my opinion this is still PhoenicisOrg/scripts#1075. |
I've taken a look at the code.
@Zemogiter I'm trying to fix the graaljs issue in PhoenicisOrg/scripts#1076 and #2050 but there is still an open question which need to be answered before I can complete the changes (how to access |
Removal of local repo solves nothing but now I get different error:
|
Seems like #2050 fixes the errors I had reported here previously. |
The current master branches are also working for me (tested with Notepad++) |
Somehow I get the following error since today when I start Phoenicis:
I can't remember that we changed anything that could produce this. Any ideas? Does anyone else get this message on the current master branches?
The text was updated successfully, but these errors were encountered: