-
Hi, My Situation is the following: I have implemented a GLSP Java Server based on GLSP 2.0.0 - I think this code is fine and I can start the java server as an external process listening on Port 5007. To test the client part I want to start Theia Integration, so that I can test the result in Web Browser on http://loccalhost:3000 Still it is not totally clear which example best fits this scenario (Server=Java, Client=Theia ). I came to the conclusion that the eclipse-glsp/glsp-examples/workflow seems to be the newest code base - at least it uses Theia 1.40.1 After I launched the server and the client, Theia starts in my Browser Window. But I can't open a diagram file (.bpmn in my case). I got two error message in the Theia frontend:
Hm... this seems to indicate that the client try to start a sever himself? What does the messages mean? And where should I focus on. I know this is very less information but still after hours I am unable to give a better error description... Off-Topic: |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 13 replies
-
Hi Ralph, yeah, this is a little involved, since there are many different combinations with Theia starting the GLSP server on its own or connect to an existing one, via Socket or Websocket. I think the simplest example that matches your configuration is the Java - EMF - Theia project template, rather than the Workflow, because the Workflow also supports direct Websocket connections. So I'll try to explain the involved code and configuration options below. Server in TheiaOn the server in Theia, there is a contribution point
The default implementation for launching in The examples you've linkedThis example the other example you've linked above, are subclasses of the Your mentioned issueI don't have a concrete idea what's wrong in your example, unfortunately. But I'd compare your theia-integration code, launch configs in the Maybe you can also debug through the code of I hope this helps! |
Beta Was this translation helpful? Give feedback.
-
Hi Philip,
Note: I think there is never a communication to my backend java server listening on port 5007 as normally I also see some initial messages after the diagram was launched. But nothing happens on my java server. It looks like there is no communication at all |
Beta Was this translation helpful? Give feedback.
-
Hi Philip, The Theia framework starts but the connection to the server failed (using the embedded server): The log file did not show much useful information:
When I check the browser console I think there is the more interesting information indicating that there was a problem with logger-protocol.ts The corresponding method seems to be a kind of logger with nothing special: export function log(name: string, logLevel: number, message: string, params: any[]): void {
const console = consoles.get(logLevel) || originalConsoleLog;
const severity = (LogLevel.strings.get(logLevel) || 'unknown').toUpperCase();
const now = new Date();
console(`${now.toISOString()} ${name} ${severity} ${message}`, ...params);
} The last days, when I tried to find the root of the problem, sometimes I stumbled over discussions about a missing write-access to some log files within the node.js stack. And maybe this is the root problem here that breaks everything. Have you ever heard from such a problem regarding Node.js on Linux Systems? I will try to track the problem further in this direction.... |
Beta Was this translation helpful? Give feedback.
-
Hi Philip, When I try to open a diagram I can see the following error in the browser console:
I have no glue what this means :-( Could it be possible that migrating to 2.0 need more refactoring on my old code base? Look at this previous implementation of my When I follow the java-emf-theia example my FrontendModule code is reduced to this: import { ContainerContext, DiagramConfiguration, GLSPTheiaFrontendModule } from '@eclipse-glsp/theia-integration';
import { BPMNLanguage } from '../common/bpmn-language';
import { BPMNDiagramConfiguration } from './diagram/bpmn-diagram-configuration';
export class BPMNTheiaFrontendModule extends GLSPTheiaFrontendModule {
protected override enableCopyPaste = true;
readonly diagramLanguage = BPMNLanguage;
// override configure(context: ContainerContext): void {
// // Custom workflow commands and menus
// context.bind(CommandContribution).to(BPMNPropertiesCommandContribution);
// context.bind(MenuContribution).to(BPMNPropertiesMenuContribution);
// }
bindDiagramConfiguration(context: ContainerContext): void {
context.bind(DiagramConfiguration).to(BPMNDiagramConfiguration);
}
} I am of course a friend of simplification, but I fear that I loose parts of my core implementation...? |
Beta Was this translation helpful? Give feedback.
-
Finally Open-BPMN saw the light of day again and is running with GLSP 2.0. The Theia Platform works and models are loaded and rendered again. |
Beta Was this translation helpful? Give feedback.
-
@rsoika Great news! Regarding the |
Beta Was this translation helpful? Give feedback.
Hi @tortmayr , Yes - your workaround solved the problem 👍 Thanks!