0
votes

I'm using Suse 12 SP1 and I'm trying to startup a WebSphere Application Server on SO startup using systemd script. If I run it manually, it works perfectly, but when running using systemd, it doesn't.

Here are the script I'm using to run it on SO startup.

ibmbpm.service

[Unit]
Description=IBM Business Process Management

[Service]
User=root
Type=oneshot
RemainAfterExit=yes
ExecStart=/opt/ibm/startBPM.sh

[Install]
WantedBy=multi-user.target

startBPM.sh

#!/bin/bash

/opt/ibm/BPM/v8.5/profiles/Node1Profile/bin/startNode.sh
/opt/ibm/BPM/v8.5/profiles/Node1Profile/bin/startServer.sh SingleClusterMember1

I've checked the status of the service with systemctl status command, here is the output

systemctl status ibmbpm.service -l

ibmbpm.service - IBM Business Process Management
   Loaded: loaded (/etc/systemd/system/ibmbpm.service; enabled)
   Active: active (exited) since Thu 2016-11-17 09:06:37 BRST; 33min ago
  Process: 2887 ExecStart=/opt/ibm/startBPM.sh (code=exited, status=0/SUCCESS)
 Main PID: 2887 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/ibmbpm.service

Nov 17 09:06:37 bpm857 startBPM.sh[2887]: at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:282)
Nov 17 09:06:37 bpm857 startBPM.sh[2887]: Caused by: java.lang.ClassNotFoundException: org.eclipse.emf.ecore.EFactory
Nov 17 09:06:37 bpm857 startBPM.sh[2887]: at java.net.URLClassLoader.findClass(URLClassLoader.java:600)
Nov 17 09:06:37 bpm857 startBPM.sh[2887]: at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:243)
Nov 17 09:06:37 bpm857 startBPM.sh[2887]: at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:777)
Nov 17 09:06:37 bpm857 startBPM.sh[2887]: at java.lang.ClassLoader.loadClass(ClassLoader.java:754)
Nov 17 09:06:37 bpm857 startBPM.sh[2887]: at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:134)
Nov 17 09:06:37 bpm857 startBPM.sh[2887]: at java.lang.ClassLoader.loadClass(ClassLoader.java:731)
Nov 17 09:06:37 bpm857 startBPM.sh[2887]: at java.lang.ClassLoader.defineClassImpl(Native Method)
Nov 17 09:06:37 bpm857 startBPM.sh[2887]: ... 31 more

As the log above shows, something wrong is happening when it tries to start the server, but I really don't understand what's happening because running manually as root (/opt/ibm/startBPM.sh) everything works fine.

I really appreciate any help.

1

1 Answers

0
votes

I've found the solution. If you're having the same problem, check the solution at https://ranierimazili.wordpress.com/2016/11/18/starting-websphere-as-a-systemd-service/