To prevent spam users, you can only post on this forum after registration, which is by invitation. If you want to post on the forum, please send me a mail (h DOT m DOT w DOT verbeek AT tue DOT nl) and I'll send you an invitation in return for an account.

Struggling with loading a new plugin (Fodina)

Hi,

Once again, I struggle with adding a new plugin to my ProM69.
Fodina site (http://www.processmining.be/fodina/#_) gives clear instruction:
- download 2 JAR's
- create /plugins folder on root folder of ProM69
- make sure that ProM can find the downloaded JAR in its classpath: start ProM with the following command (Windows example): java -da -Xmx4G -classpath "./ProM68_dist/*;./ProM68_lib/*;./plugins/*" -Djava.library.path=.//ProM68_lib -Djava.util.Arrays.useLegacyMergeSort=true org.processmining.contexts.uitopia.UI

This runs into ERROR: "Error: Could not find or load main class org.processmining.contexts.uitopia.UI"

Now, with my limited technical skills,  I use ProM69 on MacBook and normally start ProM69 from command line with './Prom69.sh'.
I think it uses the locally supplied (some root folder) jre that came with the ProM69 download.
So HOW to update that class path?
Maybe update the .sh script? (see ProM69.sh below)
(also ProMPM package manager does not see new JAR's in subfolder)

Must be something *stupid* I missed, but cannot find what?
Sorry, it sounds like a novice mistake, but I never get these class path settings....


My ProM69.sh file:


###
## ProM specific
###
PROGRAM=ProM
CP=./ProM69_dist/ProM-Framework-6.9.97.jar:./ProM69_dist/ProM-Contexts-6.9.56.jar:./ProM69_dist/ProM-Models-6.9.32.jar:./ProM69_dist/ProM-Plugins-6.9.67.jar
LIBDIR=./ProM69_lib
MAIN=org.processmining.contexts.uitopia.UI

####
## Environment options
###
JAVABIN=./jre/jre1.8.0_172.jre/Contents/Home/bin/java

###
## Main program
###

add() {
CP=${CP}:$1
}


for lib in $LIBDIR/*.jar
do
add $lib
done

$JAVABIN -version
$JAVABIN -Djava.system.class.loader=org.processmining.framework.util.ProMClassLoader -classpath ${CP} -Djava.library.path=${LIBDIR} -Xmx4G ${MAIN}
"

Answers

  • Hi,

    It seems that you are mixing ProM 6.9 with ProM 6.8. The Fodina procedure assumes ProM 6.8, I guess that was the latest release when the released this version of Fodina. Did you replace every occurrence of "ProM68" with "ProM69" to compensate for this? If not, then the ProM framework jar files will not be in the classpath, which results in the error as shown.

    The JRE should not really be a problem. If it complains that it cannot find classes, then at least Java is running. But if you want to change to another version of Java, change the line setting JAVABIN. JAVABIN should be the path to the Java executable.

    Kind regards,
    Eric.
  • Thanks a lot, hverbeek.
    yes, I have replaced ProM68 with ProM69, sorry not to mention that.
    I will dig and search a bit more, it must be something small/stupid that I am not seeing.

    (but would this not be the nice function of the ProM Package Manager, to point to/load a new plugin file (jars) and that the PM will install it properly? I was a bit expecting such a function in a PM.

    Many thanks nevertheless!
    Will let you know if I manage to succeed.

    Thanks for (all) your help on this forum.
  • Hi,

    The fodina plugin can unfortunately not be loaded by the ProM Package Manager, as the authors distribute it as a standalone jar. If the authors would have put the package into our (or some) repository, then the Package Manager might have been able to load it.

    The class org.processmining.contexts.uitopia.UI should be in the ProM69_lib folder (file named Uitopia-0.6-20181030.jar or something like that). Please make sure that that folder is in the classpath.

    Kind regards,
    Eric.


  • Hi,

    Thanks for your reply.
    I think I have made small step the classpath issue, but still run into error.
    I have the fodina files in:
     ./plugins/fodina-2019-06-17.jar
    ./ProM69_lib/fodina-libs-2019-06-17.jar

    Both file have full permissions (OSX).

    I found different start command (in other plugin description).
    When I start ProM via command line as per instruction:
    "java -classpath ./plugins/*;./ProM69_lib/*;./ProM69_dist/*;./* -Djava.util.Arrays.useLegacyMergeSort=true -Djava.library.path=./ProM69_lib -ea -Xmx2g -XX:MaxPermSize=512m -XX:+UseCompressedOops org.processmining.contexts.uitopia.UI"

    I do NOT get the original error (top of this post) "Error: Could not find or load main class org.processmining.contexts.uitopia.UI"

    Instead, it now throws new error:
    "Error: Could not find or load main class ..plugins.fodina-2019-06-17.jar
    Caused by: java.lang.ClassNotFoundException: //plugins/lfodina-2019-06-17/jar
    zsh: exec format error: ./ProM69_lib/Spex-1.1.jar
    zsh: exec format error: ./ProM69_dist/ProM-Contexts-6.9.56.jar
    ./AppSettings.plist: line 1: syntax error near unexpected token `newline'
    ./AppSettings.plist: line 1: `<?xml version="1.0" encoding="UTF-8"?>'
    "

    To me it looks like java has found the ./plugins folder and tries to load fodina-2019-06-17.jar


    Again, it must be something small/stupid on my machine that I am not seeing....




  • HI,

    Please put some quotes around the classpath, like follows:
    java -classpath "./plugins/*;./ProM69_lib/*;./ProM69_dist/*;./*" -Djava.util.Arrays.useLegacyMergeSort=true etc.
    Otherwise the script interpreter tends to break it up into parts and it will only see the first part as the classpath, and the other parts as additional arguments.

    Kind regards,
    Eric.
  • Hi,

    I am having the same issue with installing Fodina on Mac. I have tried everything above, also saved the Fodina jar files in the Packages folder inside the installation files of Prom. However, I still cannot see the plugin on the list. Is there any update on this issue?

    Thanks!
  • (in the end I swiched to a WIN10 machine and all was fixed.
    I guess (but no sure) that OSX is getting more strict on internal (java) process rights etc, preventing from working.)

  • Hi @w'tz,

    I am currently having the similar issues with implemeting Fodina on Windows. This runs into ERROR: "Error: Could not find or load main class org.processmining.contexts.uitopia.UI"

    Could you please provide me the exact command you used?

    Thanks a lot in advance!

Sign In or Register to comment.