čtvrtek 8. srpna 2013

Deploying Bonita on WebSphere (linux) for newbies

Last few days, I have been trying to setup Bonita Open Solution on WebSphere Application Server version 7 on a Linux machine (CentOS6.3). This article describes specifics that you need to keep in mind when being on this track.



Although Bonita team is trying hard to provide with documentation, docs on linking Bonita with WebSphere are missing. After few hours searching I found this tutorial, which was very helpful since I was pretty new to the world of WebSphere and EE applications in general.

The tutorial, however, needs some more steps to be followed, otherwise you get a non working instance of Bonita.







OK, so what I wanted to achieve was: Having the Bonita execution Engine and Bonita User Experience running on the platform of WebSphere. These are the steps that might help you to accomplish the goal:

  • Follow he steps of the tutorial mentioned up on the page
    • There might be some problems in the course of actions
      1. xcmis.war file application is missing in the bundle.
        • the .war files are the same for all application servers
        • so you can download a different Bonita bundle (like Bonita-Tomcat) and get it from there. You can find it in "BUNDLE_DIR/webapps/xcmis.war". You will use this file to install the xcmis application in WebSphere console.
        • !! xcmis.war is not the only file you need to import from the tomcat/jboss bundle. You also need to copy the xcmis conf directory (to be found in "BUNDLE_DIR/external/xcmis". You need to copy this folder to <Websphere_HOME>/external/xcmis on your server.
  • After starting bonita.war and xcmis.war applications you will try to access your Bonita User Experience (typically somewhere on localhost:9080/bonita/). This might fail with "Error occured while applying the theme". You might skip this this message with clicking on Use default theme.
  • Then, another error appeared. "BonitaInternalException: Bonita Error: bai_APII_2"
    • This may have two reasons:
      1. the WAS_INSTALL_ROOT environment variable is missing
        • to check that go on command line and write 'set | grep WAS_INSTALL_ROOT"
        • if an empty line is returned, the variable is missing
        • to fix this:
          •  make a file in /etc/profile.d/bonita.sh (as root)
          • put these lines into the file: 
            • WAS_INSTALL_ROOT=<path_to_your_install_root>
            • export WAS_INSTALL_ROOT
      2. there is a wrong \ sign in the tutorial
        • You can avoid this error if you got to WebSphere -> Servers -> Enterprise Application Server -> server1 -> Java and processes -> Process definitions -> Java Virtual Machine and  edit the JVM arguments field the following way:
        • change the beginning of the line from "-DBONITA_HOME=${WAS_INSTALL_ROOT}\bonita" to "-DBONITA_HOME=${WAS_INSTALL_ROOT}/bonita" (backslash to slash change)
  • Restart the server
  • Reload Bonita User Experience.
  • You may get "Unable to login. Check your username and password" after entering default (admin/bpm) credentials.
    • When you the check the server log in <WAS_INSTALL_ROOT>/AppServer/profiles/AppServer01/logs/server1/SystemOut.log, you may find "No LoginModules configured for BonitaAuth" error message
      • The  reason is WebSphere cannot load the external/security/jaas-standard.cfg file
      • You need to add this line to WebSphere JVM arguments: "-Djava.security.auth.login.config="<WAS install folder>/external/security/jaas-standard.cfg"
      • restart websphere
    • Note: WebSphere also cannot interpret /* comments in config files. Please check if there are no /* comments in yout jaas-standard.cfg file. If yes, simply remove them. Otherwise you will get another error in the websphere SystemOut.log
  • restart the server.
  • now the bonita user experience should work fine on localhost:9080

Žádné komentáře:

Okomentovat