You are not logged in.

#1 2023-06-13 09:42:40

PolGZ
Member
Registered: 2021-08-30
Posts: 5

Error launching JAVA program (for my job)

Hi, guys

I have a laptop with arch linux and a desktop system with Debian Linux. Today I'm working from home so I tried to use the script.sh that they provide for Linux desktop for the assistant tool to work with our electronic web platform.

It runs as expected on my Debian install. I've send the error log to the company that provides the desktop integration client and the web platform itself. At firs, they said that "it is just a regular issue, try executing with administrator permissions". I tried to run the script as root, but it gives the same error. To that they just answer: "In Ubuntu works for us. We only provide support for Ubuntu".

The error is as follows:

java.lang.ArrayIndexOutOfBoundsException: 8
	at java.util.Arrays$ArrayList.get(Arrays.java:3841)
	at es.core.espublico.urihandler.GestionaUriHandler.<init>(Unknown Source)
	at es.core.espublico.urihandler.GestionaUriHandler.main(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:65)
	at com.install4j.runtime.launcher.UnixLauncher.main(UnixLauncher.java:57)

I've tried with both:

jre11-openjdk
and
jre8-openjdk

This is the .sh content:

#!/bin/sh

# Uncomment the following line to override the JVM search sequence
# INSTALL4J_JAVA_HOME_OVERRIDE=
# Uncomment the following line to add additional VM parameters
# INSTALL4J_ADD_VM_PARAMS=


INSTALL4J_JAVA_PREFIX=""
GREP_OPTIONS=""

read_db_entry() {
  if [ -n "$INSTALL4J_NO_DB" ]; then
    return 1
  fi
  if [ ! -f "$db_file" ]; then
    return 1
  fi
  if [ ! -x "$java_exc" ]; then
    return 1
  fi
  found=1
  exec 7< $db_file
  while read r_type r_dir r_ver_major r_ver_minor r_ver_micro r_ver_patch r_ver_vendor<&7; do
    if [ "$r_type" = "JRE_VERSION" ]; then
      if [ "$r_dir" = "$test_dir" ]; then
        ver_major=$r_ver_major
        ver_minor=$r_ver_minor
        ver_micro=$r_ver_micro
        ver_patch=$r_ver_patch
      fi
    elif [ "$r_type" = "JRE_INFO" ]; then
      if [ "$r_dir" = "$test_dir" ]; then
        is_openjdk=$r_ver_major
        if [ "W$r_ver_minor" = "W$modification_date" ]; then
          found=0
          break
        fi
      fi
    fi
  done
  exec 7<&-

  return $found
}

create_db_entry() {
  tested_jvm=true
  version_output=`"$bin_dir/java" $1 -version 2>&1`
  is_gcj=`expr "$version_output" : '.*gcj'`
  is_openjdk=`expr "$version_output" : '.*OpenJDK'`
  if [ "$is_gcj" = "0" ]; then
    java_version=`expr "$version_output" : '.*"\(.*\)".*'`
    ver_major=`expr "$java_version" : '\([0-9][0-9]*\).*'`
    ver_minor=`expr "$java_version" : '[0-9][0-9]*\.\([0-9][0-9]*\).*'`
    ver_micro=`expr "$java_version" : '[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*'`
    ver_patch=`expr "$java_version" : '[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*[\._]\([0-9][0-9]*\).*'`
  fi
  if [ "$ver_patch" = "" ]; then
    ver_patch=0
  fi
  if [ -n "$INSTALL4J_NO_DB" ]; then
    return
  fi
  db_new_file=${db_file}_new
  if [ -f "$db_file" ]; then
    awk '$2 != "'"$test_dir"'" {print $0}' $db_file > $db_new_file
    rm "$db_file"
    mv "$db_new_file" "$db_file"
  fi
  dir_escaped=`echo "$test_dir" | sed -e 's/ /\\\\ /g'`
  echo "JRE_VERSION    $dir_escaped    $ver_major    $ver_minor    $ver_micro    $ver_patch" >> $db_file
  echo "JRE_INFO    $dir_escaped    $is_openjdk    $modification_date" >> $db_file
  chmod g+w $db_file
}

check_date_output() {
  if [ -n "$date_output" -a $date_output -eq $date_output 2> /dev/null ]; then
    modification_date=$date_output
  fi
}

test_jvm() {
  tested_jvm=na
  test_dir=$1
  bin_dir=$test_dir/bin
  java_exc=$bin_dir/java
  if [ -z "$test_dir" ] || [ ! -d "$bin_dir" ] || [ ! -f "$java_exc" ] || [ ! -x "$java_exc" ]; then
    return
  fi

  modification_date=0
  date_output=`date -r "$java_exc" "+%s" 2>/dev/null`
  if [ $? -eq 0 ]; then
    check_date_output
  fi
  if [ $modification_date -eq 0 ]; then
    stat_path=`which stat 2> /dev/null`
    if [ -f "$stat_path" ]; then
      date_output=`stat -f "%m" "$java_exc" 2>/dev/null`
      if [ $? -eq 0 ]; then
        check_date_output
      fi
      if [ $modification_date -eq 0 ]; then
        date_output=`stat -c "%Y" "$java_exc" 2>/dev/null`
        if [ $? -eq 0 ]; then
          check_date_output
        fi
      fi
    fi
  fi

  tested_jvm=false
  read_db_entry || create_db_entry $2

  if [ "$ver_major" = "" ]; then
    return;
  fi
  if [ "$ver_major" -lt "1" ]; then
    return;
  elif [ "$ver_major" -eq "1" ]; then
    if [ "$ver_minor" -lt "8" ]; then
      return;
    fi
  fi

  if [ "$ver_major" = "" ]; then
    return;
  fi
  if [ "$ver_major" -gt "1" ]; then
    return;
  elif [ "$ver_major" -eq "1" ]; then
    if [ "$ver_minor" -gt "8" ]; then
      return;
    fi
  fi

  app_java_home=$test_dir
}

add_class_path() {
  if [ -n "$1" ] && [ `expr "$1" : '.*\*'` -eq "0" ]; then
    local_classpath="$local_classpath${local_classpath:+:}$1"
  fi
}

compiz_workaround() {
  if [ "$is_openjdk" != "0" ]; then
    return;
  fi
  if [ "$ver_major" = "" ]; then
    return;
  fi
  if [ "$ver_major" -gt "1" ]; then
    return;
  elif [ "$ver_major" -eq "1" ]; then
    if [ "$ver_minor" -gt "6" ]; then
      return;
    elif [ "$ver_minor" -eq "6" ]; then
      if [ "$ver_micro" -gt "0" ]; then
        return;
      elif [ "$ver_micro" -eq "0" ]; then
        if [ "$ver_patch" -gt "09" ]; then
          return;
        fi
      fi
    fi
  fi


  osname=`uname -s`
  if [ "$osname" = "Linux" ]; then
    compiz=`ps -ef | grep -v grep | grep compiz`
    if [ -n "$compiz" ]; then
      export AWT_TOOLKIT=MToolkit
    fi
  fi

}


read_vmoptions() {
  vmoptions_file=`eval echo "$1" 2>/dev/null`
  if [ ! -r "$vmoptions_file" ]; then
    vmoptions_file="$prg_dir/$vmoptions_file"
  fi
  if [ -r "$vmoptions_file" ] && [ -f "$vmoptions_file" ]; then
    exec 8< "$vmoptions_file"
    while read cur_option<&8; do
      is_comment=`expr "W$cur_option" : 'W *#.*'`
      if [ "$is_comment" = "0" ]; then
        vmo_classpath=`expr "W$cur_option" : 'W *-classpath \(.*\)'`
        vmo_classpath_a=`expr "W$cur_option" : 'W *-classpath/a \(.*\)'`
        vmo_classpath_p=`expr "W$cur_option" : 'W *-classpath/p \(.*\)'`
        vmo_include=`expr "W$cur_option" : 'W *-include-options \(.*\)'`
        if [ ! "W$vmo_include" = "W" ]; then
            if [ "W$vmo_include_1" = "W" ]; then
              vmo_include_1="$vmo_include"
            elif [ "W$vmo_include_2" = "W" ]; then
              vmo_include_2="$vmo_include"
            elif [ "W$vmo_include_3" = "W" ]; then
              vmo_include_3="$vmo_include"
            fi
        fi
        if [ ! "$vmo_classpath" = "" ]; then
          local_classpath="$i4j_classpath:$vmo_classpath"
        elif [ ! "$vmo_classpath_a" = "" ]; then
          local_classpath="${local_classpath}:${vmo_classpath_a}"
        elif [ ! "$vmo_classpath_p" = "" ]; then
          local_classpath="${vmo_classpath_p}:${local_classpath}"
        elif [ "W$vmo_include" = "W" ]; then
          needs_quotes=`expr "W$cur_option" : 'W.* .*'`
          if [ "$needs_quotes" = "0" ]; then
            vmoptions_val="$vmoptions_val $cur_option"
          else
            if [ "W$vmov_1" = "W" ]; then
              vmov_1="$cur_option"
            elif [ "W$vmov_2" = "W" ]; then
              vmov_2="$cur_option"
            elif [ "W$vmov_3" = "W" ]; then
              vmov_3="$cur_option"
            elif [ "W$vmov_4" = "W" ]; then
              vmov_4="$cur_option"
            elif [ "W$vmov_5" = "W" ]; then
              vmov_5="$cur_option"
            fi
          fi
        fi
      fi
    done
    exec 8<&-
    if [ ! "W$vmo_include_1" = "W" ]; then
      vmo_include="$vmo_include_1"
      unset vmo_include_1
      read_vmoptions "$vmo_include"
    fi
    if [ ! "W$vmo_include_2" = "W" ]; then
      vmo_include="$vmo_include_2"
      unset vmo_include_2
      read_vmoptions "$vmo_include"
    fi
    if [ ! "W$vmo_include_3" = "W" ]; then
      vmo_include="$vmo_include_3"
      unset vmo_include_3
      read_vmoptions "$vmo_include"
    fi
  fi
}


unpack_file() {
  if [ -f "$1" ]; then
    jar_file=`echo "$1" | awk '{ print substr($0,1,length-5) }'`
    bin/unpack200 -r "$1" "$jar_file"

    if [ $? -ne 0 ]; then
      echo "Error unpacking jar files. The architecture or bitness (32/64)"
      echo "of the bundled JVM might not match your machine."
      echo "You might also need administrative privileges for this operation."
exit 1
    fi
  fi
}

run_unpack200() {
  if [ -f "$1/lib/rt.jar.pack" ]; then
    old_pwd200=`pwd`
    cd "$1"
    echo "Preparing JRE ..."
    for pack_file in lib/*.jar.pack
    do
      unpack_file $pack_file
    done
    for pack_file in lib/ext/*.jar.pack
    do
      unpack_file $pack_file
    done
    cd "$old_pwd200"
  fi
}

search_jre() {
if [ -z "$app_java_home" ]; then
  test_jvm $INSTALL4J_JAVA_HOME_OVERRIDE
fi

if [ -z "$app_java_home" ]; then
if [ -f "$app_home/.install4j/pref_jre.cfg" ]; then
    read file_jvm_home < "$app_home/.install4j/pref_jre.cfg"
    test_jvm "$file_jvm_home"
    if [ -z "$app_java_home" ] && [ $tested_jvm = "false" ]; then
if [ -f "$db_file" ]; then
  rm "$db_file" 2> /dev/null
fi
        test_jvm "$file_jvm_home"
    fi
fi
fi

if [ -z "$app_java_home" ]; then
  test_jvm "$app_home/jre"
  if [ -z "$app_java_home" ] && [ $tested_jvm = "false" ]; then
if [ -f "$db_file" ]; then
  rm "$db_file" 2> /dev/null
fi
    test_jvm "$app_home/jre"
  fi
fi

if [ -z "$app_java_home" ]; then
  prg_jvm=`which java 2> /dev/null`
  if [ ! -z "$prg_jvm" ] && [ -f "$prg_jvm" ]; then
    old_pwd_jvm=`pwd`
    path_java_bin=`dirname "$prg_jvm"`
    cd "$path_java_bin"
    prg_jvm=java

    while [ -h "$prg_jvm" ] ; do
      ls=`ls -ld "$prg_jvm"`
      link=`expr "$ls" : '.*-> \(.*\)$'`
      if expr "$link" : '.*/.*' > /dev/null; then
        prg_jvm="$link"
      else
        prg_jvm="`dirname $prg_jvm`/$link"
      fi
    done
    path_java_bin=`dirname "$prg_jvm"`
    cd "$path_java_bin"
    cd ..
    path_java_home=`pwd`
    cd "$old_pwd_jvm"
    test_jvm $path_java_home
  fi
fi


if [ -z "$app_java_home" ]; then
  common_jvm_locations="/opt/i4j_jres/* /usr/local/i4j_jres/* $HOME/.i4j_jres/* /usr/bin/java* /usr/bin/jdk* /usr/bin/jre* /usr/bin/j2*re* /usr/bin/j2sdk* /usr/java* /usr/java*/jre /usr/jdk* /usr/jre* /usr/j2*re* /usr/j2sdk* /usr/java/j2*re* /usr/java/j2sdk* /opt/java* /usr/java/jdk* /usr/java/jre* /usr/lib/java/jre /usr/local/java* /usr/local/jdk* /usr/local/jre* /usr/local/j2*re* /usr/local/j2sdk* /usr/jdk/java* /usr/jdk/jdk* /usr/jdk/jre* /usr/jdk/j2*re* /usr/jdk/j2sdk* /usr/lib/jvm/* /usr/lib/java* /usr/lib/jdk* /usr/lib/jre* /usr/lib/j2*re* /usr/lib/j2sdk* /System/Library/Frameworks/JavaVM.framework/Versions/1.?/Home /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home /Library/Java/JavaVirtualMachines/*.jdk/Contents/Home/jre"
  for current_location in $common_jvm_locations
  do
if [ -z "$app_java_home" ]; then
  test_jvm $current_location
fi

  done
fi

if [ -z "$app_java_home" ]; then
  test_jvm $JAVA_HOME
fi

if [ -z "$app_java_home" ]; then
  test_jvm $JDK_HOME
fi

if [ -z "$app_java_home" ]; then
  test_jvm $INSTALL4J_JAVA_HOME
fi

if [ -z "$app_java_home" ]; then
if [ -f "$app_home/.install4j/inst_jre.cfg" ]; then
    read file_jvm_home < "$app_home/.install4j/inst_jre.cfg"
    test_jvm "$file_jvm_home"
    if [ -z "$app_java_home" ] && [ $tested_jvm = "false" ]; then
if [ -f "$db_file" ]; then
  rm "$db_file" 2> /dev/null
fi
        test_jvm "$file_jvm_home"
    fi
fi
fi

}

old_pwd=`pwd`

progname=`basename "$0"`
linkdir=`dirname "$0"`

cd "$linkdir"
prg="$progname"

while [ -h "$prg" ] ; do
  ls=`ls -ld "$prg"`
  link=`expr "$ls" : '.*-> \(.*\)$'`
  if expr "$link" : '.*/.*' > /dev/null; then
    prg="$link"
  else
    prg="`dirname $prg`/$link"
  fi
done

prg_dir=`dirname "$prg"`
progname=`basename "$prg"`
cd "$prg_dir"
prg_dir=`pwd`
app_home=.
cd "$app_home"
app_home=`pwd`
bundled_jre_home="$app_home/jre"

if [ "__i4j_lang_restart" = "$1" ]; then
  cd "$old_pwd"
else
cd "$prg_dir"/.

fi
if [ "__i4j_extract_and_exit" = "$1" ]; then
  cd "$old_pwd"
  exit 0
fi
db_home=$HOME
db_file_suffix=
if [ ! -w "$db_home" ]; then
  db_home=/tmp
  db_file_suffix=_$USER
fi
db_file=$db_home/.install4j$db_file_suffix
if [ -d "$db_file" ] || ([ -f "$db_file" ] && [ ! -r "$db_file" ]) || ([ -f "$db_file" ] && [ ! -w "$db_file" ]); then
  db_file=$db_home/.install4j_jre$db_file_suffix
fi
if [ ! "__i4j_lang_restart" = "$1" ]; then
run_unpack200 "$bundled_jre_home"
run_unpack200 "$bundled_jre_home/jre"
fi
search_jre
if [ -z "$app_java_home" ]; then
if [ -f "$db_file" ]; then
  rm "$db_file" 2> /dev/null
fi
  search_jre
fi
if [ -z "$app_java_home" ]; then
  echo No suitable Java Virtual Machine could be found on your system.
  echo The version of the JVM must be at least 1.8 and at most 1.8.
  echo Please define INSTALL4J_JAVA_HOME to point to a suitable JVM.
exit 83
fi


compiz_workaround
i4j_classpath="$app_home/.install4j/i4jruntime.jar"
local_classpath=""
add_class_path "$i4j_classpath"
for i in `ls "$app_home/lib" 2> /dev/null | egrep "\.(jar|zip)$"`
do
  add_class_path "$app_home/lib/$i"
done

vmoptions_val=""
read_vmoptions "$prg_dir/$progname.vmoptions"
INSTALL4J_ADD_VM_PARAMS="$INSTALL4J_ADD_VM_PARAMS $vmoptions_val"

INSTALL4J_ADD_VM_PARAMS="$INSTALL4J_ADD_VM_PARAMS -Di4j.vpt=true"
for param in $@; do
  if [ `echo "W$param" | cut -c -3` = "W-J" ]; then
    INSTALL4J_ADD_VM_PARAMS="$INSTALL4J_ADD_VM_PARAMS `echo "$param" | cut -c 3-`"
  fi
done

if [ "W$vmov_1" = "W" ]; then
  vmov_1="-Di4jv=0"
fi
if [ "W$vmov_2" = "W" ]; then
  vmov_2="-Di4jv=0"
fi
if [ "W$vmov_3" = "W" ]; then
  vmov_3="-Di4jv=0"
fi
if [ "W$vmov_4" = "W" ]; then
  vmov_4="-Di4jv=0"
fi
if [ "W$vmov_5" = "W" ]; then
  vmov_5="-Di4jv=0"
fi

return_code=0
$INSTALL4J_JAVA_PREFIX exec "$app_java_home/bin/java" -Dinstall4j.jvmDir="$app_java_home" -Dexe4j.moduleName="$prg_dir/$progname" "-client" "-Xmx200m" "-Xms200m" "-Djava.net.useSystemProxies=false" "-Dinstall4j.launcherId=422" "-Dinstall4j.swt=false" "$vmov_1" "$vmov_2" "$vmov_3" "$vmov_4" "$vmov_5" $INSTALL4J_ADD_VM_PARAMS -classpath "$local_classpath" com.install4j.runtime.launcher.UnixLauncher launch da7e6dcc "$prg_dir/gestiona-error.log" "$prg_dir/gestiona-output.log" es.core.espublico.urihandler.GestionaUriHandler "$prg_dir/\${installer:sys.fileSeparator}lib\${installer:sys.fileSeparator}espublico-expedientes-clientlauncher-5.45.99.jar" "$prg_dir/" 5.45.99 5.55.100 \${installer:sys.javaHome} W3sibmFtZSI6InByb3h5X2RldGVjdGlvbiIsImZpbGUiOiJlc3B1YmxpY28tZXhwZWRpZW50ZXMtZGVza2xldHMtcHJveHktZGV0ZWN0aW9uLTUuMzcuOTkuamFyIiwidmVyc2lvbiI6IjUuMzcuOTkiLCJzaGEyNTYiOiI1N2UxYTdkYjY2OTk2NGU4YWU5YTQzMmJiZmM5MTIwMTM4ZDQ2MjhkYTdkZmViZDUxMGU0ZmY1OGU5OWUyYzJiIn1d W3sibmFtZSI6ImNlcnRpZmljYXRlIiwiZmlsZSI6ImRlc2tsZXRzLWNlcnRpZmljYXRlcy01LjQwLjEwMC5qa3MiLCJ2ZXJzaW9uIjoiNS40MC4xMDAifV0= 8.121 "$@"
return_code=$?


exit $return_code

Copy here: https://ctxt.io/2/AABQREjoEw

Last edited by PolGZ (2023-06-13 17:06:44)

Offline

#2 2023-06-13 14:55:49

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,233

Re: Error launching JAVA program (for my job)

I've tried with both

Did you select them following https://wiki.archlinux.org/title/Java#S … etween_JVM ?
Does the program make any statements as to required java versions?

tRy eXeCuTiNg wItH AdMiNiStRaToR PeRmIsSiOnS

The only correct answer to that is "No, but why don't you try to jump off a cliff?"
Knuckleheads.
There's an out of bound array access in the es.core.espublico.urihandler.GestionaUriHandler module which sounds very much like it's shipped with the application.
The reaction to "try to sudo it" is as moronic and irresponsible as it gets.

Back on topic:
Start by tracing that script so we know what is executed from there (there may be a bundled JRE at play here…)
Add "set +x" right below the shebang and run it AS YOUR REGULAR USER (forfuckssake)

On a formal note, the bbs predates markdown, please use [code][/code] tags. Edit your post in this regard.

Offline

#3 2023-06-13 16:10:10

PolGZ
Member
Registered: 2021-08-30
Posts: 5

Re: Error launching JAVA program (for my job)

seth wrote:

Yes, I tried first with only jre-11 installed. Then, I tried installing jre-8 since that was the one I was using on Debian. I selected it as explained in the arch wiki (as it suggested when I installed it) but still, same error.

seth wrote:

Does the program make any statements as to required java versions?

Nop! Only thar error.


seth wrote:

Back on topic:
Start by tracing that script so we know what is executed from there (there may be a bundled JRE at play here…)
Add "set +x" right below the shebang and run it AS YOUR REGULAR USER (forfuckssake)

This is what I got:

+ INSTALL4J_JAVA_PREFIX=
+ GREP_OPTIONS=
++ pwd
+ old_pwd=/home/polgz/AsistenteGestiona
++ basename ./Gestiona
+ progname=Gestiona
++ dirname ./Gestiona
+ linkdir=.
+ cd .
+ prg=Gestiona
+ '[' -h Gestiona ']'
++ dirname Gestiona
+ prg_dir=.
++ basename Gestiona
+ progname=Gestiona
+ cd .
++ pwd
+ prg_dir=/home/polgz/AsistenteGestiona
+ app_home=.
+ cd .
++ pwd
+ app_home=/home/polgz/AsistenteGestiona
+ bundled_jre_home=/home/polgz/AsistenteGestiona/jre
+ '[' __i4j_lang_restart = '' ']'
+ cd /home/polgz/AsistenteGestiona/.
+ '[' __i4j_extract_and_exit = '' ']'
+ db_home=/home/polgz
+ db_file_suffix=
+ '[' '!' -w /home/polgz ']'
+ db_file=/home/polgz/.install4j
+ '[' -d /home/polgz/.install4j ']'
+ '[' -f /home/polgz/.install4j ']'
+ '[' -f /home/polgz/.install4j ']'
+ '[' '!' __i4j_lang_restart = '' ']'
+ run_unpack200 /home/polgz/AsistenteGestiona/jre
+ '[' -f /home/polgz/AsistenteGestiona/jre/lib/rt.jar.pack ']'
+ run_unpack200 /home/polgz/AsistenteGestiona/jre/jre
+ '[' -f /home/polgz/AsistenteGestiona/jre/jre/lib/rt.jar.pack ']'
+ search_jre
+ '[' -z '' ']'
+ test_jvm
+ tested_jvm=na
+ test_dir=
+ bin_dir=/bin
+ java_exc=/bin/java
+ '[' -z '' ']'
+ return
+ '[' -z '' ']'
+ '[' -f /home/polgz/AsistenteGestiona/.install4j/pref_jre.cfg ']'
+ read file_jvm_home
+ test_jvm /home/polgz/AsistenteGestiona/jre
+ tested_jvm=na
+ test_dir=/home/polgz/AsistenteGestiona/jre
+ bin_dir=/home/polgz/AsistenteGestiona/jre/bin
+ java_exc=/home/polgz/AsistenteGestiona/jre/bin/java
+ '[' -z /home/polgz/AsistenteGestiona/jre ']'
+ '[' '!' -d /home/polgz/AsistenteGestiona/jre/bin ']'
+ '[' '!' -f /home/polgz/AsistenteGestiona/jre/bin/java ']'
+ '[' '!' -x /home/polgz/AsistenteGestiona/jre/bin/java ']'
+ modification_date=0
++ date -r /home/polgz/AsistenteGestiona/jre/bin/java +%s
+ date_output=1677685140
+ '[' 0 -eq 0 ']'
+ check_date_output
+ '[' -n 1677685140 -a 1677685140 -eq 1677685140 ']'
+ modification_date=1677685140
+ '[' 1677685140 -eq 0 ']'
+ tested_jvm=false
+ read_db_entry
+ '[' -n '' ']'
+ '[' '!' -f /home/polgz/.install4j ']'
+ return 1
+ create_db_entry
+ tested_jvm=true
++ /home/polgz/AsistenteGestiona/jre/bin/java -version
+ version_output='java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)'
++ expr 'java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)' : '.*gcj'
+ is_gcj=0
++ expr 'java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)' : '.*OpenJDK'
+ is_openjdk=0
+ '[' 0 = 0 ']'
++ expr 'java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)' : '.*"\(.*\)".*'
+ java_version=1.8.0_121
++ expr 1.8.0_121 : '\([0-9][0-9]*\).*'
+ ver_major=1
++ expr 1.8.0_121 : '[0-9][0-9]*\.\([0-9][0-9]*\).*'
+ ver_minor=8
++ expr 1.8.0_121 : '[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*'
+ ver_micro=0
++ expr 1.8.0_121 : '[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*[\._]\([0-9][0-9]*\).*'
+ ver_patch=121
+ '[' 121 = '' ']'
+ '[' -n '' ']'
+ db_new_file=/home/polgz/.install4j_new
+ '[' -f /home/polgz/.install4j ']'
++ echo /home/polgz/AsistenteGestiona/jre
++ sed -e 's/ /\\ /g'
+ dir_escaped=/home/polgz/AsistenteGestiona/jre
+ echo 'JRE_VERSION	/home/polgz/AsistenteGestiona/jre	1	8	0121'
+ echo 'JRE_INFO	/home/polgz/AsistenteGestiona/jre	0	1677685140'
+ chmod g+w /home/polgz/.install4j
+ '[' 1 = '' ']'
+ '[' 1 -lt 1 ']'
+ '[' 1 -eq 1 ']'
+ '[' 8 -lt 8 ']'
+ '[' 1 = '' ']'
+ '[' 1 -gt 1 ']'
+ '[' 1 -eq 1 ']'
+ '[' 8 -gt 8 ']'
+ app_java_home=/home/polgz/AsistenteGestiona/jre
+ '[' -z /home/polgz/AsistenteGestiona/jre ']'
+ '[' -z /home/polgz/AsistenteGestiona/jre ']'
+ '[' -z /home/polgz/AsistenteGestiona/jre ']'
+ '[' -z /home/polgz/AsistenteGestiona/jre ']'
+ '[' -z /home/polgz/AsistenteGestiona/jre ']'
+ '[' -z /home/polgz/AsistenteGestiona/jre ']'
+ '[' -z /home/polgz/AsistenteGestiona/jre ']'
+ '[' -z /home/polgz/AsistenteGestiona/jre ']'
+ '[' -z /home/polgz/AsistenteGestiona/jre ']'
+ '[' -z /home/polgz/AsistenteGestiona/jre ']'
+ compiz_workaround
+ '[' 0 '!=' 0 ']'
+ '[' 1 = '' ']'
+ '[' 1 -gt 1 ']'
+ '[' 1 -eq 1 ']'
+ '[' 8 -gt 6 ']'
+ return
+ i4j_classpath=/home/polgz/AsistenteGestiona/.install4j/i4jruntime.jar
+ local_classpath=
+ add_class_path /home/polgz/AsistenteGestiona/.install4j/i4jruntime.jar
+ '[' -n /home/polgz/AsistenteGestiona/.install4j/i4jruntime.jar ']'
++ expr /home/polgz/AsistenteGestiona/.install4j/i4jruntime.jar : '.*\*'
+ '[' 0 -eq 0 ']'
+ local_classpath=/home/polgz/AsistenteGestiona/.install4j/i4jruntime.jar
++ ls /home/polgz/AsistenteGestiona/lib
++ egrep '\.(jar|zip)$'
egrep: warning: egrep is obsolescent; using grep -E
+ for i in `ls "$app_home/lib" 2> /dev/null | egrep "\.(jar|zip)$"`
+ add_class_path /home/polgz/AsistenteGestiona/lib/espublico-expedientes-clientlauncher-5.45.99.jar
+ '[' -n /home/polgz/AsistenteGestiona/lib/espublico-expedientes-clientlauncher-5.45.99.jar ']'
++ expr /home/polgz/AsistenteGestiona/lib/espublico-expedientes-clientlauncher-5.45.99.jar : '.*\*'
+ '[' 0 -eq 0 ']'
+ local_classpath=/home/polgz/AsistenteGestiona/.install4j/i4jruntime.jar:/home/polgz/AsistenteGestiona/lib/espublico-expedientes-clientlauncher-5.45.99.jar
+ for i in `ls "$app_home/lib" 2> /dev/null | egrep "\.(jar|zip)$"`
+ add_class_path /home/polgz/AsistenteGestiona/lib/espublico-expedientes-desklets-proxy-detection-5.37.99.jar
+ '[' -n /home/polgz/AsistenteGestiona/lib/espublico-expedientes-desklets-proxy-detection-5.37.99.jar ']'
++ expr /home/polgz/AsistenteGestiona/lib/espublico-expedientes-desklets-proxy-detection-5.37.99.jar : '.*\*'
+ '[' 0 -eq 0 ']'
+ local_classpath=/home/polgz/AsistenteGestiona/.install4j/i4jruntime.jar:/home/polgz/AsistenteGestiona/lib/espublico-expedientes-clientlauncher-5.45.99.jar:/home/polgz/AsistenteGestiona/lib/espublico-expedientes-desklets-proxy-detection-5.37.99.jar
+ for i in `ls "$app_home/lib" 2> /dev/null | egrep "\.(jar|zip)$"`
+ add_class_path /home/polgz/AsistenteGestiona/lib/espublico-expedientes-urihandler-5.34.99.jar
+ '[' -n /home/polgz/AsistenteGestiona/lib/espublico-expedientes-urihandler-5.34.99.jar ']'
++ expr /home/polgz/AsistenteGestiona/lib/espublico-expedientes-urihandler-5.34.99.jar : '.*\*'
+ '[' 0 -eq 0 ']'
+ local_classpath=/home/polgz/AsistenteGestiona/.install4j/i4jruntime.jar:/home/polgz/AsistenteGestiona/lib/espublico-expedientes-clientlauncher-5.45.99.jar:/home/polgz/AsistenteGestiona/lib/espublico-expedientes-desklets-proxy-detection-5.37.99.jar:/home/polgz/AsistenteGestiona/lib/espublico-expedientes-urihandler-5.34.99.jar
+ vmoptions_val=
+ read_vmoptions /home/polgz/AsistenteGestiona/Gestiona.vmoptions
++ eval echo /home/polgz/AsistenteGestiona/Gestiona.vmoptions
+ vmoptions_file=/home/polgz/AsistenteGestiona/Gestiona.vmoptions
+ '[' '!' -r /home/polgz/AsistenteGestiona/Gestiona.vmoptions ']'
+ '[' -r /home/polgz/AsistenteGestiona/Gestiona.vmoptions ']'
+ '[' -f /home/polgz/AsistenteGestiona/Gestiona.vmoptions ']'
+ exec
+ read cur_option
++ expr 'W# Enter one VM parameter per line' : 'W *#.*'
+ is_comment=34
+ '[' 34 = 0 ']'
+ read cur_option
++ expr 'W# For example, to adjust the maximum memory usage to 512 MB, uncomment the following line:' : 'W *#.*'
+ is_comment=91
+ '[' 91 = 0 ']'
+ read cur_option
++ expr 'W# -Xmx512m' : 'W *#.*'
+ is_comment=11
+ '[' 11 = 0 ']'
+ read cur_option
++ expr 'W# To include another file, uncomment the following line:' : 'W *#.*'
+ is_comment=57
+ '[' 57 = 0 ']'
+ read cur_option
++ expr 'W# -include-options [path to other .vmoption file]' : 'W *#.*'
+ is_comment=50
+ '[' 50 = 0 ']'
+ read cur_option
+ exec
+ '[' '!' W = W ']'
+ '[' '!' W = W ']'
+ '[' '!' W = W ']'
+ INSTALL4J_ADD_VM_PARAMS=' '
+ INSTALL4J_ADD_VM_PARAMS='  -Di4j.vpt=true'
+ '[' W = W ']'
+ vmov_1=-Di4jv=0
+ '[' W = W ']'
+ vmov_2=-Di4jv=0
+ '[' W = W ']'
+ vmov_3=-Di4jv=0
+ '[' W = W ']'
+ vmov_4=-Di4jv=0
+ '[' W = W ']'
+ vmov_5=-Di4jv=0
+ return_code=0
+ exec /home/polgz/AsistenteGestiona/jre/bin/java -Dinstall4j.jvmDir=/home/polgz/AsistenteGestiona/jre -Dexe4j.moduleName=/home/polgz/AsistenteGestiona/Gestiona -client -Xmx200m -Xms200m -Djava.net.useSystemProxies=false -Dinstall4j.launcherId=422 -Dinstall4j.swt=false -Di4jv=0 -Di4jv=0 -Di4jv=0 -Di4jv=0 -Di4jv=0 -Di4j.vpt=true -classpath /home/polgz/AsistenteGestiona/.install4j/i4jruntime.jar:/home/polgz/AsistenteGestiona/lib/espublico-expedientes-clientlauncher-5.45.99.jar:/home/polgz/AsistenteGestiona/lib/espublico-expedientes-desklets-proxy-detection-5.37.99.jar:/home/polgz/AsistenteGestiona/lib/espublico-expedientes-urihandler-5.34.99.jar com.install4j.runtime.launcher.UnixLauncher launch da7e6dcc /home/polgz/AsistenteGestiona/gestiona-error.log /home/polgz/AsistenteGestiona/gestiona-output.log es.core.espublico.urihandler.GestionaUriHandler '/home/polgz/AsistenteGestiona/${installer:sys.fileSeparator}lib${installer:sys.fileSeparator}espublico-expedientes-clientlauncher-5.45.99.jar' /home/polgz/AsistenteGestiona/ 5.45.99 5.55.100 '${installer:sys.javaHome}' W3sibmFtZSI6InByb3h5X2RldGVjdGlvbiIsImZpbGUiOiJlc3B1YmxpY28tZXhwZWRpZW50ZXMtZGVza2xldHMtcHJveHktZGV0ZWN0aW9uLTUuMzcuOTkuamFyIiwidmVyc2lvbiI6IjUuMzcuOTkiLCJzaGEyNTYiOiI1N2UxYTdkYjY2OTk2NGU4YWU5YTQzMmJiZmM5MTIwMTM4ZDQ2MjhkYTdkZmViZDUxMGU0ZmY1OGU5OWUyYzJiIn1d W3sibmFtZSI6ImNlcnRpZmljYXRlIiwiZmlsZSI6ImRlc2tsZXRzLWNlcnRpZmljYXRlcy01LjQwLjEwMC5qa3MiLCJ2ZXJzaW9uIjoiNS40MC4xMDAifV0= 8.121

Last edited by PolGZ (2023-06-13 16:59:24)

Offline

#4 2023-06-13 16:43:09

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,233

Re: Error launching JAVA program (for my job)

Please use [code][/code] tags, not "quote" tags. Edit your post in this regard.

exec /home/polgz/AsistenteGestiona/jre/bin/java -Dinstall4j.jvmDir=/home/polgz/AsistenteGestiona/jre

So it uses a bundled JRE, changing the default JRE in archlinux is irrelevant.

And then their "es.core.espublico.urihandler.GestionaUriHandler" library causes an out-of-bounds exception on its initialization.

I've send the error log to the company that provides the desktop integration client and the web platform itself.

Is the segment you posted in #1 the entire error log?
There's probably a blind assumption about some input or return data and the actual problem ahead of the error, but w/o knowing what the code tries to do at this point it's impossible to speculate about the cause.

Offline

#5 2023-06-13 17:04:11

PolGZ
Member
Registered: 2021-08-30
Posts: 5

Re: Error launching JAVA program (for my job)

seth wrote:

Is the segment you posted in #1 the entire error log?

Yes. That's all. Now I added the output of the script run with set -x as well.

seth wrote:

There's probably a blind assumption about some input or return data and the actual problem ahead of the error, but w/o knowing what the code tries to do at this point it's impossible to speculate about the cause.

I assume you already read the content of the scrpit in itself (that I shared in the #1 post) and you refer to the actual private code that we don't know about, right?

I'll try to convey those ideas to them... Thanks for your help!

Last edited by PolGZ (2023-06-13 17:04:45)

Offline

#6 2023-06-13 20:26:23

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,233

Re: Error launching JAVA program (for my job)

What you could to is to check the environment.
See whether the script comes to the same final execution parameters (save maybe your $HOME) on ubuntu and make sure that eg. the network works on arch etc.

you refer to the actual private code that we don't know about, right?

I don't know about it wink
I guess they don't release the source code?

Edit, If you sudo'd it, you might have root owned files left behind that could inhibit further execution as your regular user:

find /home/polgz/AsistenteGestiona \! -user $USER # ideally empty

Last edited by seth (2023-06-13 21:21:27)

Offline

Board footer

Powered by FluxBB