open-power / serverwiz

Apache License 2.0
4 stars 18 forks source link

NullPointerException crash when attempting to run #22

Open ghost opened 8 years ago

ghost commented 8 years ago

Considering there's no README, I did my best:

stewart@birb serverwiz]$ ant -f build.xml clean compile jar
Buildfile: /home/stewart/serverwiz/build.xml

clean:

compile:
    [mkdir] Created dir: /home/stewart/serverwiz/build/classes
    [javac] /home/stewart/serverwiz/build.xml:20: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 30 source files to /home/stewart/serverwiz/build/classes

jar:
  [one-jar] Building jar: /home/stewart/serverwiz/build/serverwiz2.jar
  [one-jar] No 'manifest' attribute was specified for the <one-jar> task, a default manifest will be generated.
  [one-jar] Building jar: /home/stewart/serverwiz/build/serverwiz2_win64.jar
  [one-jar] No 'manifest' attribute was specified for the <one-jar> task, a default manifest will be generated.
  [one-jar] Building jar: /home/stewart/serverwiz/build/serverwiz2_linux64.jar
  [one-jar] No 'manifest' attribute was specified for the <one-jar> task, a default manifest will be generated.
  [one-jar] Building jar: /home/stewart/serverwiz/build/serverwiz2_win32.jar
  [one-jar] No 'manifest' attribute was specified for the <one-jar> task, a default manifest will be generated.
  [one-jar] Building jar: /home/stewart/serverwiz/build/serverwiz2_macosx64.jar
  [one-jar] No 'manifest' attribute was specified for the <one-jar> task, a default manifest will be generated.
      [zip] Building zip: /home/stewart/serverwiz/build/serverwiz2_lib.zip

BUILD SUCCESSFUL
Total time: 5 seconds

and then, considering there's no instructions on how to run, i tried this:

stewart@birb serverwiz]$ cd build/
[stewart@birb build]$ ls
classes             serverwiz2_linux64.jar   serverwiz2_win64.jar
serverwiz2.jar      serverwiz2_macosx64.jar
serverwiz2_lib.zip  serverwiz2_win32.jar
[stewart@birb build]$ java -jar serverwiz2.jar 
09/05/2016 03:25:15.502 - ======================================================================
09/05/2016 03:25:15.508 - Retreiving ServerWiz...
03:25:15.511 - [INFO] - Arch: amd64
03:25:15.514 - [INFO] - JarName = serverwiz2_linux64.jar
03:25:15.518 - [INFO] - Current jar version: NONE
03:25:15.519 - [INFO] - Updating: /home/stewart/serverwiz/build/jars/serverwiz2_linux64.jar
03:25:15.520 - [INFO] - Querying: https://api.github.com/repos/open-power/serverwiz/releases/latest
03:25:17.169 - [INFO] - Remote File: https://github.com/open-power/serverwiz/releases/download/v2.2/serverwiz2_linux64.jar
03:25:17.175 - [INFO] - Latest version: v2.2
03:25:17.176 - [INFO] - Downloading: https://github.com/open-power/serverwiz/releases/download/v2.2/serverwiz2_linux64.jar
03:25:19.552 - [INFO] - File Size: 3218429
03:25:19.555 - [INFO] - Starting Download...
03:25:22.815 - [INFO] - Updating: /home/stewart/serverwiz/build/jars/serverwiz2_lib.zip
03:25:22.816 - [INFO] - Querying: https://api.github.com/repos/open-power/serverwiz/releases/latest
03:25:23.895 - [INFO] - Remote File: https://github.com/open-power/serverwiz/releases/download/v2.2/serverwiz2_lib.zip
03:25:23.895 - [INFO] - Downloading: https://github.com/open-power/serverwiz/releases/download/v2.2/serverwiz2_lib.zip
03:25:25.159 - [INFO] - File Size: 150413
03:25:25.160 - [INFO] - Starting Download...
03:25:25.413 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/attribute_types.xml
03:25:25.420 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/attribute_types_fsp.xml
03:25:25.422 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/attribute_types_hb.xml
03:25:25.424 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/attribute_types_mrw.xml
03:25:25.431 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/attribute_types_obmc.xml
03:25:25.433 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/errata/errata_example.xml
03:25:25.437 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/89LPC932.xml
03:25:25.439 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/ANDGATE.xml
03:25:25.441 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/AST2500.xml
03:25:25.443 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/BMP280.xml
03:25:25.453 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/CY14B101I.xml
03:25:25.458 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/EPSON-MOSO.xml
03:25:25.460 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/FAN_COUNTER_ROTATING.xml
03:25:25.461 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/IDT9DBL04.xml
03:25:25.463 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/IDT9FGS9093.xml
03:25:25.467 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/IR35219.xml
03:25:25.469 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/IR35219_special.xml
03:25:25.472 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/IR35220.xml
03:25:25.474 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/NOR_FLASH.xml
03:25:25.476 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/NPCT501.xml
03:25:25.477 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/PCA9551.xml
03:25:25.480 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/PCA9552.xml
03:25:25.481 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/PCA9554.xml
03:25:25.484 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/PIC16F882.xml
03:25:25.485 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/POWER_SUPPLY.xml
03:25:25.488 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/RJ45_1PORT.xml
03:25:25.490 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/SI5335.xml
03:25:25.492 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/SMARTCHIP.xml
03:25:25.494 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/SPIVID.xml
03:25:25.495 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/SWITCH.xml
03:25:25.496 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/TCA6408A.xml
03:25:25.497 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/TOD_BATTERY.xml
03:25:25.499 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/TPS544C25.xml
03:25:25.500 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/UART_1PORT.xml
03:25:25.501 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/USB2_1PORT.xml
03:25:25.502 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/USB2_2PORT.xml
03:25:25.505 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/USB3_1PORT.xml
03:25:25.506 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/apss.xml
03:25:25.508 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/card-daughtercard.xml
03:25:25.509 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/card-motherboard.xml
03:25:25.510 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/card-pciecard-cablecard.xml
03:25:25.512 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/card-pciecard-card.xml
03:25:25.513 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/card-pciecard.xml
03:25:25.514 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/chip-apss-psoc.xml
03:25:25.516 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/chip-gpioexp-generic.xml
03:25:25.518 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/chip-membuf-centaur.xml
03:25:25.519 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/chip-membuf_vpd-device.xml
03:25:25.521 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/chip-pcie-endpoint.xml
03:25:25.522 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/chip-planar_vpd-device.xml
03:25:25.523 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/chip-vpd-device.xml
03:25:25.526 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/chip-vreg-generic.xml
03:25:25.527 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/connector-card-generic.xml
03:25:25.528 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/connector-cdimm-cdimm.xml
03:25:25.529 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/connector-dimmconn-dd4.xml
03:25:25.530 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/connector-dimmconn-ddr3_jedec.xml
03:25:25.531 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/connector-hmc-generic.xml
03:25:25.532 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/connector-uart-generic.xml
03:25:25.534 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/connector-usb-generic.xml
03:25:25.535 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/dummy-presence-generic.xml
03:25:25.536 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/enc-node-power8.xml
03:25:25.539 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/enc-node-power9.xml
03:25:25.544 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/fsi_passthrough.xml
03:25:25.546 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/i2c_passthrough.xml
03:25:25.547 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/lcard-dimm-ddr4.xml
03:25:25.548 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/lcard-dimm-jedec.xml
03:25:25.549 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/lcard-dimm.xml
03:25:25.550 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/led-led-generic.xml
03:25:25.552 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/module-module-dellovo.xml
03:25:25.553 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/module-module-lagrange.xml
03:25:25.555 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/module-module-monza.xml
03:25:25.557 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/module-module-sforza.xml
03:25:25.559 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/module-module-turismo.xml
03:25:25.561 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/slot-pcieslot-generic.xml
03:25:25.562 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/smartchip-generic.xml
03:25:25.563 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/socket-proc_socket-50mm.xml
03:25:25.564 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/socket-proc_socket-68mm.xml
03:25:25.565 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/sys-sys-power8.xml
03:25:25.566 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/parts/sys-sys-power9.xml
03:25:25.568 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/target_types_mrw.xml
03:25:25.570 - [INFO] - Unzipping: /home/stewart/serverwiz/build/xml/target_types_override.xml
03:25:25.571 - [INFO] - Writing update file; Version = v2.2
03:25:27.073 - [INFO] - Running: java -jar /home/stewart/serverwiz/build/jars/serverwiz2_linux64.jar -v v2.2 
03:25:27.550 - [INFO] - 09/05/2016 03:25:27.549 - ======================================================================
03:25:27.551 - [INFO] - 09/05/2016 03:25:27.550 - ServerWiz2 Version 2.1 Starting...
03:25:28.318 - [INFO] - 
03:25:28.319 - [INFO] - (SWT:11923): Gtk-WARNING **: Allocating size to GtkTreeView 0x7ff51c8187f0 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?
03:25:28.324 - [INFO] - 
03:25:28.325 - [INFO] - (SWT:11923): Gtk-WARNING **: Allocating size to GtkTreeView 0x7ff51c8187f0 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?
03:25:28.325 - [INFO] - 
03:25:28.326 - [INFO] - (SWT:11923): Gtk-WARNING **: Allocating size to GtkTreeView 0x7ff51c8187f0 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?
03:25:28.327 - [INFO] - 
03:25:28.327 - [INFO] - (SWT:11923): Gtk-WARNING **: Allocating size to GtkTreeView 0x7ff51c8187f0 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?
03:25:28.334 - [INFO] - 
03:25:28.335 - [INFO] - (SWT:11923): Gtk-WARNING **: Allocating size to GtkTreeView 0x7ff51c8187f0 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?
03:25:28.345 - [INFO] - Exception in thread "main" java.lang.reflect.InvocationTargetException
03:25:28.346 - [INFO] -     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
03:25:28.347 - [INFO] -     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
03:25:28.348 - [INFO] -     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
03:25:28.349 - [INFO] -     at java.lang.reflect.Method.invoke(Method.java:498)
03:25:28.350 - [INFO] -     at com.simontuffs.onejar.Boot.run(Boot.java:342)
03:25:28.351 - [INFO] -     at com.simontuffs.onejar.Boot.main(Boot.java:168)
03:25:28.355 - [INFO] - Caused by: java.lang.NullPointerException
03:25:28.355 - [INFO] -     at org.eclipse.swt.widgets.TabFolder.gtk_switch_page(Unknown Source)
03:25:28.356 - [INFO] -     at org.eclipse.swt.widgets.Widget.windowProc(Unknown Source)
03:25:28.356 - [INFO] -     at org.eclipse.swt.widgets.Display.windowProc(Unknown Source)
03:25:28.358 - [INFO] -     at org.eclipse.swt.internal.gtk.OS._gtk_widget_show(Native Method)
03:25:28.358 - [INFO] -     at org.eclipse.swt.internal.gtk.OS.gtk_widget_show(Unknown Source)
03:25:28.358 - [INFO] -     at org.eclipse.swt.widgets.TabFolder.createItem(Unknown Source)
03:25:28.359 - [INFO] -     at org.eclipse.swt.widgets.TabItem.createWidget(Unknown Source)
03:25:28.359 - [INFO] -     at org.eclipse.swt.widgets.TabItem.<init>(Unknown Source)
03:25:28.365 - [INFO] -     at com.ibm.ServerWizard2.view.MainDialog.createDialogArea(Unknown Source)
03:25:28.368 - [INFO] -     at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:768)
03:25:28.369 - [INFO] -     at org.eclipse.jface.window.Window.create(Window.java:435)
03:25:28.371 - [INFO] -     at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1101)
03:25:28.374 - [INFO] -     at org.eclipse.jface.window.Window.open(Window.java:797)
03:25:28.381 - [INFO] -     at com.ibm.ServerWizard2.ServerWizard2.main(Unknown Source)
03:25:28.382 - [INFO] -     ... 6 more
[stewart@birb build]$ 

I certainly did not expect it to download code and execute it... very unexpected (is it even running what I built?)

ghost commented 8 years ago

This is running on Fedora 24 with openjdk 1.8:

$ java -version
openjdk version "1.8.0_102"
OpenJDK Runtime Environment (build 1.8.0_102-b14)
OpenJDK 64-Bit Server VM (build 25.102-b14, mixed mode)
williamspatrick commented 8 years ago

If you look at the messages, it only appears to be unpacking XML files. This is a feature of the tool to always grab the latest XML.

ghost commented 8 years ago

The log messages may be misleading then, because .jar pretty much always means "java executable code" (at least to me):

03:25:15.519 - [INFO] - Updating: /home/stewart/serverwiz/build/jars/serverwiz2_linux64.jar
03:25:15.520 - [INFO] - Querying: https://api.github.com/repos/open-power/serverwiz/releases/latest
03:25:17.169 - [INFO] - Remote File: https://github.com/open-power/serverwiz/releases/download/v2.2/serverwiz2_linux64.jar
03:25:17.175 - [INFO] - Latest version: v2.2
03:25:17.176 - [INFO] - Downloading: https://github.com/open-power/serverwiz/releases/download/v2.2/serverwiz2_linux64.jar
03:25:19.552 - [INFO] - File Size: 3218429
nkskjames commented 8 years ago

I added README with build instructions and behavior description of jars.

For the NullPointerException, do you see the GUI come up?

nkskjames commented 8 years ago

Looks like there have been some issues with GTK3 and SWT. For a temporary workaround:

export SWT_GTK3=0

I tested on Fedora24 and this worked for me. I will continue to investigate root cause.

ghost commented 8 years ago

With that work around, the GUI launched for me.

nkskjames commented 8 years ago

I pulled in newest jface jar and it fixes NPE, but the GUI is not pretty without SWT_GTK3=0. The GTK3 themes mess up the colors. You can switch to a high contrast theme and can see everything, but still not pretty. If you use GNOME, you can use gnome-tweak-tool to change theme.

ghost commented 8 years ago

nkskjames notifications@github.com writes:

I pulled in newest jface jar and it fixes NPE, but the GUI is not pretty without SWT_GTK3=0. The GTK3 themes mess up the colors. You can switch to a high contrast theme and can see everything, but still not pretty. If you use GNOME, you can use gnome-tweak-tool to change theme.

I love how Java is write once and run anywhere.

FWIW, on Fedora 24 it looks fine with SWT_GTK=0 or as default.

Stewart Smith OPAL Architect, IBM.