On June 3, 2025 2:17:59 PM PDT, viktor_krumm <[email protected]> 
wrote:
>I am attempting to write an event listener using the documentation. I have 
>successfully compiled a basic jar with Maven with no errors. When I load it 
>into guacamole, I get "Extension guac-listener.jar could not be loaded: 
>Listener class cannot be loaded (wrong version of API?)".
>
>My files are simple:
>
>guac-manifest.json:
>{
>
>"guacamoleVersion" : "1.5.5",
>
>"name" : "Guacamole Login Listener",
>"namespace" : "guac-listener",
>
>"listeners" : [
>"org.apache.guacamole.event.LoginListener"
>]
>}
>
>LoginListener.java:
>package org.apache.guacamole.event;
>
>import org.apache.guacamole.GuacamoleException;
>import org.apache.guacamole.net.event.listener.Listener;
>import java.io.FileWriter;
>import java.io.IOException;
>
>public class LoginListener implements Listener {
>
>@Override
>public void handleEvent(Object event) throws GuacamoleException {
>String path = "/tmp/dummy.txt";
>String msg = "handler called!";
>
>try (FileWriter writer = new FileWriter(path, true)) {
>writer.write(msg);
>}
>
>catch (IOException e) {
>System.out.println("Err");
>}
>
>}
>
>}
>
>pom.xml dependencies:
><dependencies>
><dependency>
><groupId>org.apache.guacamole</groupId>
><artifactId>guacamole-ext</artifactId>
><version>1.5.5</version>
></dependency>
></dependencies>
>My first guess is I am somehow linking the wrong library. The guacamole 
>webserver is docker latest tag.
>
>Thanks
>
>Sent with [Proton Mail](https://proton.me/mail/home) secure email.
If you extract the extension .jar as a zip file, do you see the expected 
contents (guac-manifest.json at the root level plus your LoginListener class 
nested beneath its package directories)?

What do you see in the Guacamole logs with debug-level logging enabled?

- Mike

Reply via email to