1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

B4J Question [ABMaterial] Problem deploying to a Raspberry Pi

Discussion in 'B4J Questions' started by janderkan, Aug 20, 2019.

  1. janderkan

    janderkan Active Member Licensed User

    I have OpenJDK11 on my PC and on the first deployment i got an error that my jar was built to a newer version.

    Then I followed instructions in this link and installed bellsoft jdk11 on the Pi
    ABMaterial did not run and the errors was
    Code:
    /js/core.4.30.min.js
    Not Found
    /js/sessioncreator.js
    Not Found
    /css/materialize
    .4.26.min.css
    Not Found
    /favicon.ico
    Not Found
    I started all over with a new SD card and installed openjdk-9 using this command:
    Code:
    apt-get install openjdk-9-jdk-headless
    Everything works fine. :)

    To be sure I started all over with a new SD card and installed bellsoft jdk12 on the Pi
    Exactly the same error again. :(
     
  2. OliverA

    OliverA Expert Licensed User

    Since you only need the server version of the JDK, why did you not try
    Code:
    apt-get install openjdk-11-jdk-headless
    ? With the new Raspian version that !should! install version 11 of the JDK
     
  3. janderkan

    janderkan Active Member Licensed User

    Update:
    I have written all down so I can try again and again, each time with a fresh SD card.
    Up til now I have made it work 2 times with:
    Code:
    apt-get install openjdk-9-jdk-headless
    and Never with:
    Code:
    apt-get install openjdk-10-jdk-headless
    or
    Code:
    apt-get install openjdk-11-jdk-headless
    I use the same objects folder every time.

    My installation is DietPi and now I will try NOOBS before i go to bed :(
     
  4. OliverA

    OliverA Expert Licensed User

    It's should actually be
    Code:
    apt-get install openjdk-11-jre-headless
    You don't need JDK to run ABMaterial. This will also set up your Pi to run the java command. So after install (if successful), try
    Code:
    java -version
    and you should get 11.0.4 something. Please note that I'm sort of guessing that this will work on you Pi. As to the missing files, it looks like the .jar is not in the right location, not everything is copied over. Is ABM 4.3 the current public release? The donator's release is 4.51
     
  5. janderkan

    janderkan Active Member Licensed User

    Thank you for your input, I will continue :)
    The files are not missing and I got it to work 2 times.

    What came first, the hen or the egg ? I will donate when I know it works :)
     
  6. OliverA

    OliverA Expert Licensed User

    Looks like my signature is doing me proud on this one. If you have a Pi 4, my advise would apply. For any Pi's before that, you'll need the 32 bit version. If you use the official Raspbian, then you should download the .deb packages and install them. This way it may set up everything as needed (the Debian way).

    32 bit versions:
    https://bell-sw.com/pages/java-11.0.4/
    Install instructions for .deb for above: http://hirt.se/blog/?p=1116

    Update: Change the wget and other commands given in the above link to use the new 11.0.4 update of the JDK

    https://www.azul.com/downloads/zulu-community/
    .tar.gz, so install more manual (like in @Erel's example).
     
  7. janderkan

    janderkan Active Member Licensed User

    Now I have tried Raspbian Buster Lite and OpenJdk11.0.4 32 bit, this is the output of java -version:
    openjdk version "11.0.4-BellSoft" 2019-07-16
    OpenJDK Runtime Environment (build 11.0.4-BellSoft+10)
    OpenJDK 32-Bit Server VM (build 11.0.4-BellSoft+10, mixed mode)

    and this is the output when I start lesson2 from ABM for Dummies:
    /js/core.4.30.min.js
    /js/sessioncreator.js
    Not Found
    /css/materialize.4.26.min.css
    Not Found
    Not Found
    /favicon.ico
    Not Found

    I get the 3 circular lines and nothing more.
    I works when I start it on my PC
    The files 'missing' are present on the PI
     
  8. janderkan

    janderkan Active Member Licensed User

    Now I tried with the Demo project included in the 4.30 package.
    Runs fine in debug and release on PC
    On Pi I only gets the PC/Tablet/Phone animation.
    BUT, there are no errors in the Putty window.
     
  9. OliverA

    OliverA Expert Licensed User

    I can get my hands on a Pi 3 tomorrow. I'll try to reproduce your issue(s) then and report back.
     
  10. janderkan

    janderkan Active Member Licensed User

    Now it is working, both on my TinkerBoard and my Pi3

    I have been using 2 pcs. 32Gb and 1 pcs, 8Gb SD cards.
    Looks like the problem are the 32 Gb card, even everybody writes that there is no limit to the size.
    I go to bed and continue tomorrow :)
     
    OliverA likes this.
  11. janderkan

    janderkan Active Member Licensed User

    I was tired yesterday, and today I cannot prove that the size of the SD cards means anything.
     
  12. OliverA

    OliverA Expert Licensed User

    So now everything working on both the 8GB and the 32GB cards?
     
  13. alwaysbusy

    alwaysbusy Expert Licensed User

    We deploy on many different sizes (sometimes needed because if you take an image of let's say a 8GB SD card, it doesn't fit on another 8GB card so we have to take the next bigger size like 16GB, 32GB, 64GB etc).

    ABM runs fine using Java v9+, but we do also use OpenJDK 11 on some other vps's (debian based). Never tried OpenJDK 11 on raspberry pi, but it should make any difference.
     
    Erel likes this.
  14. alwaysbusy

    alwaysbusy Expert Licensed User

    Side note: on our more recent deployments, we have moved to USB sticks and even USB harddisks (boots from SD, all the rest happens on the external drive). We have noticed the SDcard-only solution doesn't last long ( < 1yr) and the speed on USB devices is a lot faster too.
     
    OliverA likes this.
  15. janderkan

    janderkan Active Member Licensed User

    I am a beginner, and I have not figured out what went wrong.
    Router, case sensitive filenames, etc.
    But now it all works and I can reproduce it again and again :)
    I have published the document I made to help other beginners.
    Please tell me if something I did is stupid, bad practice and so on.
    Find it here.
     
  16. janderkan

    janderkan Active Member Licensed User

    Can you point me to more info on how to do this?
     
  17. alwaysbusy

    alwaysbusy Expert Licensed User

    I don't have a step-by-step guide (our tech guy did it and probably has written down how but he is on vacation right now). I'll ask if he comes back. But I know he just used one of the many tutorials on the the net and it was quite a simple task.
     
  18. alwaysbusy

    alwaysbusy Expert Licensed User

  19. Cableguy

    Cableguy Expert Licensed User

    Can this be one of the "classical" situations where the "www" folder has not been updated/copied to the pi???
     
    alwaysbusy likes this.
  20. janderkan

    janderkan Active Member Licensed User

    I like this tool https://www.diskgenius.com/
     
    alwaysbusy likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice