rgammans / AvocentViewer

AppImage Builder for Avocent IP KVM client.
4 stars 1 forks source link

java.lang.NoClassDefFoundError: com/avocent/video/Nautilus #2

Open jelabarre59 opened 5 months ago

jelabarre59 commented 5 months ago

Once I got the package to build, I've hit a new error. On my home machine, running Fedora 39, Cinnamon Desktop, the appimage fails with:

jelabarre@b450a-lx:~/src/AvocentViewer$ out/Avocent_KVM_Console_viewer-.glibc2.3-x86_64.AppImage TS200 192.168.3.92 Exception in thread "main" java.lang.NoClassDefFoundError: com/avocent/video/Nautilus Caused by: java.lang.ClassNotFoundException: com.avocent.video.Nautilus at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) Could not find the main class: com.avocent.video.Nautilus. Program will exit.

(adding username & password doesn't change anything)

On my work computer (also Fedora 39 Cinnamon) it just exits with "cannot execute: required file not found"

This is for a Lenovo TS200 (equivalent to an IBM x3200 M3, apparently).

Three JAR files: avctIBMViewer.jar avctKVMIOLinux.jar avctVMLinux.jar

rgammans commented 5 months ago

I'd expect there be to an avctVideo.jar file, which normally contains that class file.

In case you're not aware, you can see what classes are in each jar file with unzip -l <jarfile>.

I don't have a Lenovo unit to test with so you might be on your own unless you can identify an alternate class name yourself.

Also you will need a -p, or -r switch and port id/adaptor Id to complete the connection, and it might be worth also trying with '-o IBM' switch to see if that makes any difference.

jelabarre59 commented 5 months ago

No, the JavaWebStart (using OpenWebStart to try it) only pulls down those three jar files. I can't browse the filesystem within the IMM itself, so I can't find if there is a hidden JAR file. The firmware flash file for the IMM isn't in a form that I can extract.

adding the extra switches (including -o IBM) didn't help. At one time I almost got a container or some other workaround to work, but the jar files are 32bit. The certificates took me weeks to try to work around (and at this point I don't even remember how)

Oh, and I searched for that class path name in the three jar files, and didn't see it in any of them

rgammans commented 5 months ago

I don't know how much I can help, but I am willing to consider any PRs if you find out what you need to do.

This whole project is the result of my investigations into what the JavaWebStart does on the HP branded units, where the main class it launches is com.avocent.video.Nautilus. It is named in the startup shell script explicitly, and the SSL limitations of the device firmware.

If the Lenovo unit doesn't have that class, the project won't work without additional development to support the differences between the HP & Lenovo OEMs.

(As an aside the cert problems are the basic issue this these devices as they only support small key sizes for certs and DHKE. Also IIRC they have a maximum TLS version of 1.0 )

You could try to guess the main class file name based on what you can see there - or if you can attach the JavaWebStart XML here I might be able to help more.

[ The avctVideo.jar I have may also work just for you but I don't think the license covers me sharing it. ]

jelabarre59 commented 5 months ago

I can attach a couple of .jnlp files here (one single-user mode, one multi-user mode) and the class listings in the files

(had to rename the jnlp files in order to upload them)

VMLinux.list.txt KVMIOLinux.list.txt IBMViewer.list.txt Lenovo-TS200-multiuser.jnlp.txt Lenovo-TS200-singleuser.jnlp.txt

rgammans commented 5 months ago

That jnlp is quite different from the HP unit's JNLP that I have here.

The relevant section on yours reads:

<application-desc main-class="com.avocent.ibmc.kvm.Main">
      <argument>ip=192.168.3.92</argument>
      <argument>helpurl=http://192.168.3.92/aessrp/help/contents.html</argument>
      <argument>user=0x66334873</argument>
      <argument>passwd=</argument>
    <argument>apcp=1</argument>
    <argument>version=2</argument>
    <argument>kmport=3900</argument>
    <argument>vport=3900</argument>
    <argument>title=192.168.3.92-Video Viewer</argument>
</application-desc>

whereas in the HP units I have it is more like this:

<application-desc main-class="com.avocent.video.Nautilus">
      <argument>title="$SERVERNAME - Video Session Viewer"</argument>
      <argument>devicetype=avsp</argument>
      <argument>path=a:$IP,r:,c:0,e:1,s:"$SERVERNAME",l:120</argument>
      <argument>oem=HP</argument>
      <argument>user=Admin</argument>
      <argument>password=</argument>
</application-desc>

I've created a Lenovo branch for you where I've modified the shells script to use the main class in the Lenovo and jnlp and then forward the arguments from the command line, so you will need to copy the contents of the individual arguments in the above block onto the command line, but that should hopefully also give you the ability to try different options and see what works as doesn't.