Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-1724

rmiservice and rmiclient

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Won't Fix
    • Release Branch 4.0
    • Release Branch 4.0
    • None
    • None
    • FC7 + JDK 1.6 + OFBiz 4.0 + Tomcat 5.5.26

    Description

      My colleage Li Shuang removed the dependence of rmiclient code and OpenCms. And I tested the new code with OFBiz 4.0, seems ok. Here are the steps on how to make the rmiservice and rmiclient work:

      1. Unzip rmiservice.zip and rmiclient under specialpurpose.

      2. Edit specialpurpose/component-load.xml, add
      <load-component component-location="${ofbiz.home}/specialpurpose/rmiservice"/>

      3. In specialpurpose/rmiclient/sslcert/, run createcsr.sh

      4. If you run a Linux box, you can use TinyCA2 to sign the rmiserver.csr and rmiclient.csr. Export your CA public key(cacert.der) and the signed rmiserver.der and rmiclient.der to specialpurpose/rmiclient/sslcert/.

      5. In specialpurpose/rmiclient/sslcert/, run importcerts.sh

      6. Run specialpurpose/rmiclient/build.xml, select target war. This will produce an ofbizrmiclient.war under specialpurpose/rmiclient/build/.

      7. Deploy ofbizclient.war in tomcat. I use tomcat 5.5.26. I

      8. Config framework/base/config/ofbiz-containers.xml, change rmi-dispatcher bound-host if you don't use localhost.

      9. If you run ofbiz with "ant run", edit

      {ofbiz_home}

      /build.xml, add trustStore config:
      <target name="run" depends="build">
      <java jar="ofbiz.jar" fork="true">
      <jvmarg value="${memory.max.param}"/>
      <jvmarg value="-Djavax.net.ssl.trustStore=${basedir}/framework/base/config/ofbiztrust.jks"/>
      <jvmarg value="-Djavax.net.ssl.trustStorePassword=changeit"/>
      </java>
      </target>

      10. Rebuild and run ofbiz.

      11. If localhost is not your ofbiz server name, edit

      {tomcat_home}/webapps/ofbizclient/index.jsp, change
      OFBizRmiClient rc = new OFBizRmiClient("rmi://localhost:1099/RMIDispatcher");
      String ofbizUrl = "http://localhost:8080";
      accordingly.

      12. In web browser, type in your ofbizrmiclient address:. A correct result should be similar to correct-result.png.

      Trouble shootings:
      1. sun.security.validator.ValidatorException: No trusted certificate found
      Edit {tomcat_home}

      /ofbizrmiclient/WEB-INF/classes/jsse.properties, modify the trustStore and keyStore configuration.

      2. javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate
      Check the server side trustStore configuration.

      Attachments

        1. rmiservice.zip
          121 kB
          Shi Yusen
        2. rmi-handshake.png
          123 kB
          Shi Yusen
        3. rmiclient.zip
          7.03 MB
          Shi Yusen
        4. correct-result.png
          116 kB
          Shi Yusen

        Activity

          People

            Unassigned Unassigned
            shiys Shi Yusen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: