Install apache tomcat 9 and add it to systemctl to start and stop fail

I have a SLES 15 SP2 server where I installed OpenJDK and apache tomcat 9. I used the following commands to install it.
OpenJDK is installed :

  • java --version
  • openjdk 11.0.11 2021-04-20
    Download and installed apache tomcat 9.0.34 using the following steps :
    wget -c https://downloads.apache.org/tomcat/tomcat-9/v9.0.34/bin/apache-tomcat-9.0.34.tar.gz
  • echo “export CATALINA_HOME=”/usr/local/tomcat9"" >> ~/.bashrc
  • source ~/.bashrc
  • cd /bin
  • chmod a+x catalina.sh startup.sh
    -. /startup.sh - see that Tomcat was started.
  • Test on browser IP_address_of_server: Port 8080
  • Tested OK no problems.
    The developers requested that they want apache tomcat services to startup using systemctl.
    I used this under mentioned TID to add the apache-tomcat services to systemctl
    https://www.suse.com/support/kb/doc/?id=000019672
    But I am getting the following error message :
    systemctl status tomcat.service
    ? tomcat.service - example systemd service unit file.
    Loaded: loaded (/etc/systemd/system/tomcat.service; enabled; vendor preset: disabled)
    Active: failed (Result: exit-code) since Mon 2021-08-02 12:53:01 UTC; 1s ago
    Process: 29383 ExecStart=/bin/bash /usr/sbin/catalina.sh (code=exited, status=1/FAILURE)
    Main PID: 29383 (code=exited, status=1/FAILURE)
    Aug 02 12:53:01 ip------45 systemd[1]: Started example systemd service unit file…
    Aug 02 12:53:01 ip-------45 bash[29383]: Cannot find /usr/bin/setclasspath.sh
    Aug 02 12:53:01 ip------45 bash[29383]: This file is needed to run this program
    Aug 02 12:53:01 ip-----45 systemd[1]: tomcat.service: Main process exited, code=exited, status=1/FAILURE
    Aug 02 12:53:01 ip-------45 systemd[1]: tomcat.service: Unit entered failed state.
    Aug 02 12:53:01 ip-------45 systemd[1]: tomcat.service: Failed with result ‘exit-code’.

May somebody please help me.

@plaubscher Hi
These forums are officially closed now… Please head over to the new Community to ask about this. See https://forums.suse.com/discussion/15459/announcing-sunset-of-suse-forums-on-august-31-2021

I would suggest asking you question at https://community.suse.com/topics/3776090