On Sun, Jan 13, 2019 at 12:11 PM Joachim Lindenberg <[email protected]>
wrote:

> Hi Nick,
>
> thanks. I am attaching my source code. You´ll likely notice, Java is not
> my favorite programming language, but anyway. Testing the code could be
> more challenging. My software is available from
> https://software.lindenberg.one/backup, and the integration is documented
> at
> https://software.lindenberg.one/backup/en/documentation/guacamole-integration
> (replacing 0.9.14 by 1.0.0)... I actually also have some unit test classes
> but removed them do to passwords etc.
>
>
>
> The goal of the extension is that my customers can fire up a virtual
> machine out of their backups of windows systems. E.g. in case their laptop
> is lost, they can access the most recent version from another system
> (keyboard and screen resolution makes sense though). There are multiple
> ways to start – via guacamole entry point, via my web  ui, and via the
> windows ui.
>
>
>
> *This error points you exactly where you need to look - there's a
> NullPointerException occuring in the ConfiguredGuacamoleSocket.java file,
> in the init() method, on line 128, which is called by the SimpleConnection
> connection() method, on line 124, etc.  You need to trace back why
> something null is being passed there (presumably from your custom
> extension) and correct that issue.*
>
>
>

You are passing a null GuacamoleConfiguration to the constructor:

https://github.com/apache/guacamole-client/blob/801a5df9f1d7095c52e594dda1a5276fe8cf6524/guacamole-common/src/main/java/org/apache/guacamole/protocol/ConfiguredGuacamoleSocket.java#L128

As for your overridden connect(GuacamoleClientInformation info, Map<String,
String> tokens) method, that is not being called because that is not the
prototype of that function. The prototype has changed on git master, yes,
but this API change was not part of 1.0.0. The connect() for Connectable in
the 1.0.0 extension API only takes a GuacamoleClientInformation. See:

http://guacamole.apache.org/doc/1.0.0/guacamole-ext/org/apache/guacamole/net/auth/Connectable.html#connect-org.apache.guacamole.protocol.GuacamoleClientInformation-

Since your connection is based on SimpleConnection, you're not actually
overriding a method of SimpleConnection, but adding a new method which
isn't used elsewhere. The original connect() function remains unoverridden
and continues to be called.

I suggest wiping out your local Maven repository and rebuilding your
extension. I haven't looked at your code, but assuming you're using a
proper @Overrides annotation, I suspect your code won't compile due to
there being no such function to override. If you recently built from
guacamole-client git, your local Maven repository likely has a git master
build of guacamole-ext (which would still have the 1.0.0 version number),
not the guacamole-ext which is part of the 1.0.0 release and on Maven
central.

Sure, but why is not my overridden method called? I want to do some magic
> (starting virtual machines) behind the scenes. This actually took most of
> the time to figure out what call sequence on which objects is done and
> where I can intercept – and then I didn´t really spend time to clean the
> code up once I got it to work – and also I see that would probably have
> been waste as now the inner logic changes.
>
>
>
> *There are *many* things that have changed between 0.9.14 and 1.0.0, and
> pretty much of all of those changes are intentional :-).*
>
>
>
> Sure, but what I kind of miss is a docuemtation what changed for extension
> coders and how to adopt to the changes. Or did I miss that?
>
>
>
Yep. What you're looking for is the "deprecation / compatibility notes"
section of the release notes. We write one whenever a release breaks
compatibility in some way with a past release, including changes to the
extension API:

http://guacamole.apache.org/releases/1.0.0/#deprecation--compatibility-notes

The changes to SimpleUser and the Simple*Directory classes are deprecations
and don't break anything directly. Your code will produce warnings during
compilation, and you should migrate when possible, but it should continue
to build:

http://guacamole.apache.org/releases/1.0.0/#deprecation-of-simpleuserdirectory-simpleconnectiondirectory-and-simpleconnectiongroupdirectory-classes
http://guacamole.apache.org/releases/1.0.0/#deprecation-of-simpleuser-convenience-constructors

There are changes to the User interface which would break the build for you
if you implemented User directly, but users of AbstractUser or SimpleUser
should be unaffected. Default implementations of the new functions are
provided:

http://guacamole.apache.org/releases/1.0.0/#support-for-user-groups-1

If you continue chasing things down and things still aren't working for
you, I suggest bringing this over to a new thread on the
[email protected] list. The release announcement on the user@ list
was meant to be just that - an announcement. It is probably not the best
thread for a development discussion.

- Mike

Reply via email to