probs with java when trying to start jstock [ solved ]

Help for Current Versions of MX
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
User avatar
saturn1955
Posts: 187
Joined: Sun Nov 03, 2019 9:58 am

probs with java when trying to start jstock [ solved ]

#1 Post by saturn1955 »

I recently made a freh installation with mxlinux 23.4 on my samsung R41 and tried to set up jstock, a stock administration prog.
wget https://github.com/yccheok/jstock/relea ... 60-bin.zip
unzip jstock-1.0.7.60-bin.zip
cd jstock/
chmod 755 jstock.sh
./jstock.sh
with the last command I get
./jstock.sh
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.thoughtworks.xstream.XStream.setupConverters(XStream.java:990)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:593)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:515)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:484)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:430)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:369)
at org.yccheok.jstock.gui.Utils.getXStream(Utils.java:1785)
at org.yccheok.jstock.gui.Utils.fromXML(Utils.java:1819)
at org.yccheok.jstock.gui.JStock.getJStockOptionsViaXML(JStock.java:1803)
at org.yccheok.jstock.gui.JStock.main(JStock.java:1819)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module @1e8b406
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
at com.thoughtworks.xstream.core.util.Fields.locate(Fields.java:40)
at com.thoughtworks.xstream.converters.collections.TreeMapConverter.<clinit>(TreeMapConverter.java:50)
... 10 more
orion1955@SamsungR41:~/jstock
how can I solve that prob.?
Last edited by saturn1955 on Wed Feb 05, 2025 7:21 am, edited 1 time in total.

User avatar
Eadwine Rose
Administrator
Posts: 15011
Joined: Wed Jul 12, 2006 2:10 am

Re: probs with java when trying to start jstock

#2 Post by Eadwine Rose »

According to the forum rules (please read): Please provide full Quick System Info, use copy for forum button, no edits.
LiveUSB version is OK if needed.


Please encase the code in code tags, like so: [code]code output here[/code], not quotes,

Thanks.
MX-23.6_x64 July 31 2023 * 6.1.0-37amd64 ext4 Xfce 4.20.0 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 535.247.01 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 870EVO * Samsung S24D330 & P2250 * HP Envy 5030

User avatar
saturn1955
Posts: 187
Joined: Sun Nov 03, 2019 9:58 am

Re: probs with java when trying to start jstock

#3 Post by saturn1955 »

Code: Select all

System:
Kernel: 6.1.0-25-686-pae [6.1.106-3] arch: i686 bits: 32 compiler: gcc v: 12.2.0
parameters: BOOT_IMAGE=/boot/vmlinuz-6.1.0-25-686-pae root=UUID=<filter> ro quiet splash
Desktop: Xfce v: 4.20.0 tk: Gtk v: 3.24.38 info: xfce4-panel wm: xfwm v: 4.20.0 vt: 7
dm: LightDM v: 1.32.0 Distro: MX-23.4_386 Libretto September 15 2024 base: Debian GNU/Linux 12
(bookworm)
Machine:
Type: Other-vm? System: SAMSUNG product: R40/R41 v: 07YA serial: <superuser required> Chassis:
type: 1 serial: <superuser required>
Mobo: SAMSUNG model: R40/R41 serial: <superuser required> BIOS: Phoenix v: 07YA
date: 12/18/2006
Battery:
ID-1: BAT1 charge: 10.0 Wh (100.0%) condition: 10.0/44.4 Wh (22.5%) volts: 12.5 min: 11.1
model: SAMSUNG Electronics type: Li-ion serial: N/A status: full
CPU:
Info: model: Intel T2060 bits: 32 type: MCP arch: M Yonah built: 2006-08 process: Intel 65nm
family: 6 model-id: 0xE (14) stepping: 0xC (12) microcode: 0x59
Topology: cpus: 1x cores: 2 smt: <unsupported> cache: L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB
L2: 1024 KiB desc: 1x1024 KiB
Speed (MHz): avg: 800 min/max: 1000/2000 scaling: driver: acpi-cpufreq governor: ondemand
cores: 1: 800 2: 800 bogomips: 6400
Flags: ht nx pae sse sse2 sse3
Vulnerabilities:
Type: gather_data_sampling status: Not affected
Type: itlb_multihit status: KVM: VMX unsupported
Type: l1tf mitigation: PTE Inversion
Type: mds status: Vulnerable: Clear CPU buffers attempted, no microcode; SMT disabled
Type: meltdown mitigation: PTI
Type: mmio_stale_data status: Unknown: No mitigations
Type: reg_file_data_sampling status: Not affected
Type: retbleed status: Not affected
Type: spec_rstack_overflow status: Not affected
Type: spec_store_bypass status: Not affected
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Retpolines; STIBP: disabled; RSB filling; PBRSB-eIBRS: Not
affected; BHI: Not affected
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: AMD RC410M [Mobility Radeon Xpress 200M] vendor: Samsung Co driver: radeon v: kernel
alternate: radeonfb,amdgpu arch: Rage-8 code: R300 process: TSMC 130nm built: 2002-07 ports:
active: LVDS-1 empty: SVIDEO-1,VGA-1 bus-ID: 01:05.0 chip-ID: 1002:5a62 class-ID: 0300
Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.20.0 driver: X: loaded: radeon
unloaded: fbdev,modesetting,vesa dri: r300 gpu: radeon display-ID: :0.0 screens: 1
Screen-1: 0 s-res: 1280x800 s-dpi: 96 s-size: 338x211mm (13.31x8.31") s-diag: 398mm (15.69")
Monitor-1: LVDS-1 mapped: LVDS res: 1280x800 hz: 60 size: N/A modes: max: 1280x800 min: 640x480
API: OpenGL v: 2.1 Mesa 22.3.6 renderer: ATI RC410 direct-render: Yes
Audio:
Device-1: AMD IXP SB4x0 High Definition Audio vendor: Samsung Co driver: snd_hda_intel v: kernel
bus-ID: 00:14.2 chip-ID: 1002:437b class-ID: 0403
API: ALSA v: k6.1.0-25-686-pae status: kernel-api tools: alsamixer,amixer
Server-1: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse status: active
2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
tools: pactl,pw-cat,pw-cli,wpctl
Network:
Device-1: Realtek RTL-8100/8101L/8139 PCI Fast Ethernet Adapter vendor: Samsung Co
driver: 8139too v: 0.9.28 modules: 8139cp port: a000 bus-ID: 02:05.0 chip-ID: 10ec:8139
class-ID: 0200
IF: eth0 state: down mac: <filter>
Device-2: Qualcomm Atheros AR2413/AR2414 Wireless Network Adapter [AR5005G 802.11bg]
vendor: Askey driver: ath5k v: kernel bus-ID: 02:07.0 chip-ID: 168c:001a class-ID: 0200
IF: wlan0 state: up mac: <filter>
Drives:
Local Storage: total: 104.68 GiB used: 8.57 GiB (8.2%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: Hitachi model: HTS541612J9AT00 size: 104.68 GiB block-size:
physical: 512 B logical: 512 B speed: <unknown> type: N/A serial: <filter> rev: A70H scheme: MBR
Partition:
ID-1: / raw-size: 104.68 GiB size: 102.48 GiB (97.90%) used: 8.57 GiB (8.4%) fs: ext4
dev: /dev/sda1 maj-min: 8:1
Swap:
Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: file size: 1024 MiB used: 0 KiB (0.0%) priority: -2 file: /swap/swap
Sensors:
System Temperatures: cpu: 81.0 C mobo: N/A
Fan Speeds (RPM): N/A
Repos:
Packages: pm: dpkg pkgs: 2132 libs: 1061 tools: apt,apt-get,aptitude,nala,synaptic pm: rpm
pkgs: 0 pm: flatpak pkgs: 0
No active apt repos in: /etc/apt/sources.list
Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
Active apt repos in: /etc/apt/sources.list.d/debian.list
1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
Active apt repos in: /etc/apt/sources.list.d/mx.list
1: deb http://ftp.halifax.rwth-aachen.de/mxlin ... s/mx/repo/ bookworm main non-free
Info:
Processes: 178 Uptime: 5m wakeups: 2 Memory: 1.84 GiB used: 705.3 MiB (37.5%) Init: SysVinit
v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 12
Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: BIOS (legacy, CSM, MBR) 
Last edited by saturn1955 on Tue Feb 04, 2025 12:26 pm, edited 1 time in total.

User avatar
Eadwine Rose
Administrator
Posts: 15011
Joined: Wed Jul 12, 2006 2:10 am

Re: probs with java when trying to start jstock

#4 Post by Eadwine Rose »

Please reread what I said about code and code tags. And how to get the QSI on the forum.
MX-23.6_x64 July 31 2023 * 6.1.0-37amd64 ext4 Xfce 4.20.0 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 535.247.01 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 870EVO * Samsung S24D330 & P2250 * HP Envy 5030

User avatar
saturn1955
Posts: 187
Joined: Sun Nov 03, 2019 9:58 am

Re: probs with java when trying to start jstock

#5 Post by saturn1955 »

any help would be appreciated

User avatar
CharlesV
Global Moderator
Posts: 7771
Joined: Sun Jul 07, 2019 5:11 pm

Re: probs with java when trying to start jstock

#6 Post by CharlesV »

Is your firewall on and enabled?

This sounds like its a java mismatch possibily.

I have had my java library's loaded since MX install, so not positive which one it might be using, but I believe it is using openjdk 17.

if you open a terminal and type in

Code: Select all

java --version

what is the result?
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

User avatar
saturn1955
Posts: 187
Joined: Sun Nov 03, 2019 9:58 am

Re: probs with java when trying to start jstock

#7 Post by saturn1955 »

Code: Select all

$ java -version
openjdk version "17.0.14" 2025-01-21
OpenJDK Runtime Environment (build 17.0.14+7-Debian-1deb12u1)
OpenJDK Server VM (build 17.0.14+7-Debian-1deb12u1, mixed mode, sharing)
orion1955@SamsungR41:~/jstock

Code: Select all

$ dpkg -l | grep java
ii  ca-certificates-java                         20230710~deb12u1                       all          Common CA certificates (JKS keystore)
ii  gir1.2-javascriptcoregtk-4.0:i386            2.46.5-1~deb12u1                       i386         JavaScript engine library from WebKitGTK - GObject introspection data
ii  gjs                                          1.74.2-1+deb12u1                       i386         Mozilla-based javascript bindings for the GNOME platform (cli tool)
ii  java-common                                  0.74                                   all          Base package for Java runtimes
ii  libel-api-java                               3.0.0-3                                all          Expression Language API
ii  libgjs0g:i386                                1.74.2-1+deb12u1                       i386         Mozilla-based javascript bindings for the GNOME platform
ii  libhsqldb1.8.0-java                          1.8.0.10+dfsg-11+deb12u1               all          Java SQL database engine
ii  libjavascriptcoregtk-4.0-18:i386             2.46.5-1~deb12u1                       i386         JavaScript engine library from WebKitGTK
ii  libjavascriptcoregtk-4.1-0:i386              2.46.5-1~deb12u1                       i386         JavaScript engine library from WebKitGTK
ii  libjsp-api-java                              2.3.4-3                                all          JavaServer Pages API
ii  liblibreoffice-java                          4:7.4.7-1+deb12u6                      all          LibreOffice UNO runtime environment -- Java library
ii  libreoffice-java-common                      4:7.4.7-1+deb12u6                      all          office productivity suite -- arch-independent Java support files
ii  libservlet-api-java                          4.0.1-2                                all          Java Servlet API
ii  libservlet3.1-java                           1:4.0.1-2                              all          Java Servlet API 3.1 (transitional package)
ii  libunoloader-java                            4:7.4.7-1+deb12u6                      all          LibreOffice UNO runtime environment -- (Java) UNO loader
ii  libwebsocket-api-java                        1.1-2                                  all          Java WebSocket API
ii  ure-java                                     4:7.4.7-1+deb12u6                      i386         LibreOffice UNO runtime environment -- Java support
orion1955@SamsungR41:~/jstock

no firewall enabled

User avatar
saturn1955
Posts: 187
Joined: Sun Nov 03, 2019 9:58 am

Re: probs with java when trying to start jstock

#8 Post by saturn1955 »

Finally, I got the stuff running.
I think this is an issue with Open JDK.
Jstock worked for me after I downloaded the Oracle JDK and set the JAVA_HOME variable inside jstock.sh to the unpacked JDK directory.

User avatar
CharlesV
Global Moderator
Posts: 7771
Joined: Sun Jul 07, 2019 5:11 pm

Re: probs with java when trying to start jstock [ solved ]

#9 Post by CharlesV »

Excellent! And good job fixing that!
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

Post Reply

Return to “MX Help”