Hi,
I haven't been able to investigate how to configure the logging for the traceserver (e.g. to get the jetty logs) when starting it from the command-line. I was able to make it work in my development Eclipse version to change the launch configuration as shown
in pictures below (add slf4j and spifly as well as set their start level to 1).
If you have any suggestions to do that from command-line, please let me know.
Regards,
Bernd
From: tracecompass-dev <tracecompass-dev-bounces@xxxxxxxxxxx> on behalf of Xiaolin Liu via tracecompass-dev <tracecompass-dev@xxxxxxxxxxx>
Sent: June 24, 2024 10:54 AM
To: tracecompass developer discussions <tracecompass-dev@xxxxxxxxxxx>
Cc: Xiaolin Liu <xiaolinl@xxxxxx>
Subject: Re: [tracecompass-dev] Fw: incubator version compilation error
Dear All,
Hi Kevin, thank you very much for your detailed instructions and kind suggestions. It is very much appreciated! However, I thought the previous error might have been caused by my Ubuntu OS system, so I updated my entire
Linux system to the newest 24, and the previous error was not shown anymore. I am running into the first running error I encountered (Please see the screenshot). I have looked it up online. It seems to be a warning, but I have no application interface showing
up, so I asked ChatGPT and followed the following instructions to fix the problem, but the same error was still there. Does anyone else also encounter the same problem when compiling and running the incubator version of the Eclipse trace compass?
Need some help!
Best,
Xiaolin
1. Download an SLF4J Provider
First, you need to download one of the SLF4J provider JAR files. Here, I'll use
slf4j-simple.jar as an example.
- SLF4J Simple: A simple implementation of the SLF4J API that writes all log messages to the console.
Download the JAR file from the official Maven repository:
- Go to the SLF4J Simple Maven repository page.
- Select the latest version.
- Download the JAR file.
2. Place the JAR in Your Project Directory
Move the downloaded JAR file to a directory where you keep your project dependencies. For example, you can create a
lib directory within your project:
mkdir -p ~/org.eclipse.tracecompass.incubator/trace-server/org.eclipse.tracecompass.incubator.trace.server.product/target/products/traceserver/linux/gtk/x86_64/lib
mv path/to/downloaded/slf4j-simple-1.7.32.jar ~/org.eclipse.tracecompass.incubator/trace-server/org.eclipse.tracecompass.incubator.trace.server.product/target/products/traceserver/linux/gtk/x86_64/lib/
3. Update the Classpath
Next, you need to include the JAR file in your classpath when running the application. This can be done by setting the
CLASSPATH environment variable or by specifying the classpath directly in the command line.
Option 1: Setting the CLASSPATH Environment Variable
Set the CLASSPATH environment variable to include the path to the JAR file:
export CLASSPATH=$CLASSPATH:~/org.eclipse.tracecompass.incubator/trace-server/org.eclipse.tracecompass.incubator.trace.server.product/target/products/traceserver/linux/gtk/x86_64/lib/slf4j-simple-1.7.32.jar
4. Run Your Application
Finally, run your application again:
cd ~/org.eclipse.tracecompass.incubator/trace-server/org.eclipse.tracecompass.incubator.trace.server.product/target/products/traceserver/linux/gtk/x86_64/
./tracecompass-server
Summary
By downloading and including the SLF4J provider JAR (slf4j-simple.jar in this case) in your classpath, you should be able to resolve the warnings related to SLF4J. The application will now be able to log messages using the SLF4J framework.
![](pngN9eiER8zIF.png)
From: tracecompass-dev <tracecompass-dev-bounces@xxxxxxxxxxx> on behalf of Kevin Mills via tracecompass-dev <tracecompass-dev@xxxxxxxxxxx>
Sent: Monday, June 24, 2024 4:23:33 PM
To: tracecompass developer discussions
Cc: Kevin Mills
Subject: Re: [tracecompass-dev] Fw: incubator version compilation error
Hi Xiaolin,
I'm not on the tracecompass team, but I do have a successful build of the incubator trace server running on my Linux system. The only information we have from your failure is the exit code (3). Looking at the startup code for trace-server, there is an
ExitCode class in Application.java that indicates that exit code 3 may be caused by the workspace location already being in use (i.e. maybe there is another tracecompass-server process running. It might be a long lost zombie process on your system. Or it
might be a .lock file in the workspace folder that was not properly removed when a trace-server process was shut down.
I can replicate your error by starting one trace-server process (successfully), then starting a second instance of trace-server. When I do this I get exactly the error you are seeing. So if you can find a nold trace-server process, try killing it. If
not, then you need to know where the workspace root is (see the getWorkspaceRoot() method below). By default it will be a folder called ".tracecompass-webapp" your home folder, Check the .metadata folder within that folder for a ".lock" file. If you find
one just manually delete it and try starting trace trace-server again.
Default workspace folder lock file: ~/.tracecompass-webapp/.metadata/.lock
It looks like you can also specify a different workspace folder by defining the TRACING_SERVER_ROOT environment variable to point to a different location. You could try that also. Try starting trace-server like this:
TRACING_SERVER_ROOT=~/.tracecompass-webapp-other ./trace-server
Hope this helps you get going again.
-Kevin
private
enum ExitCode {
OK(""),
//$NON-NLS-1$
ERROR_NO_WORKSPACE_ROOT("Trace server error: Workspace root doesn't exist."),
//$NON-NLS-1$
ERROR_WORKSPACE_ROOT_PERMISSION("Trace server error: Workspace not writable."),
//$NON-NLS-1$
ERROR_WORKSPACE_ALREADY_IN_USE("Trace server error: Workspace already in use."),
//$NON-NLS-1$
ERROR_RUNNING_TRACE_SERVER("Trace server error: Error running trace server.");
//$NON-NLS-1$
@NonNull
private String
fErrorText;
private
ExitCode(@NonNull
String errorText) {
fErrorText = errorText;
}
@NonNull
public String
getErrorText() {
return fErrorText;
}
}
private
static String
getWorkspaceRoot() {
/* Look for the environment variable in the global environment variables */
String
workspaceRoot =
System.getenv().get("TRACING_SERVER_ROOT");
//$NON-NLS-1$
if (workspaceRoot
== null) {
/* Use the user's home directory */
workspaceRoot =
System.getProperty("user.home");
//$NON-NLS-1$
}
return workspaceRoot;
}
Dear all,
I have been reporting the compiling error for about a week now, but I can find no technical instruction or support online. Please take a detailed look at the error that was generated. The exit code = 3 seems to be generated because the Java memory was not
enough to load the program itself. It did not help when I increased the Xms and Xmx limits. What should I do to fix this problem?
Best,
Xiaolin
Dear all,
I am currently compiling the incubator version of the trace-compass on my Linux system. The Ubuntu version is 20. The building process throws out the exit code = 3 error with DMV terminated so that it might be caused by the Java memory storage. I have manually
edited the Xms and the Xmx limit, but the same type of error is popping up. I am not sure what else I could do to get the compilation built successfully.
I have been stuck at this step for a while and need help.
Best,
Xiaolin
![](pngzVh4J89C70.png)
_______________________________________________
tracecompass-dev mailing list
tracecompass-dev@xxxxxxxxxxx
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/tracecompass-dev
|