You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Shi Yusen (JIRA)" <ji...@apache.org> on 2008/03/29 07:46:24 UTC

[jira] Created: (OFBIZ-1724) rmiservice and rmiclient

rmiservice and rmiclient
------------------------

                 Key: OFBIZ-1724
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1724
             Project: OFBiz
          Issue Type: Improvement
    Affects Versions: Release Branch 4.0
         Environment: FC7 + JDK 1.6 + OFBiz 4.0 + Tomcat 5.5.26

            Reporter: Shi Yusen
            Priority: Trivial
             Fix For: Release Branch 4.0


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.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1724) rmiservice and rmiclient

Posted by "Shi Yusen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12756801#action_12756801 ] 

Shi Yusen commented on OFBIZ-1724:
----------------------------------

Hi Giuliano,

Don't push me :).

Anyway, the good news is the new version can work now. Here are the quick start steps:


Build (if you don't want to build, you can skip this step):
1. Download source code from
http://langhua.org/opensource/ofbiz/rmi/trunk/

2. Use maven to build the source code.


Certificates (skipped)


Server side deploy:
1. Download ofbiz-rmi-server-09.04.zip from http://maven2.langhua.org/archiva/browse/ofbiz/ofbiz-rmi-server/09.04, unzip it in specialpurpose, add rmiservice to specialpurpose/componet-load.xml
2. Download ofbiz-service-customization-09.04.jar from http://maven2.langhua.org/archiva/browse/ofbiz/ofbiz-service-customization/09.04, replay ofbiz-service.jar with this one.
3. Copy the jks files from specialpurpose/rmiservice/certs to framework/base/config.
4. Add "-Djavax.net.ssl.trustStore=/workspace/ofbiz/ofbiz-9.4/framework/base/config/ofbiztrust.jks -Djavax.net.ssl.trustStorePassword=changeit" into OFBiz start script.
5. Run OFBiz.


Client side deploy:
Please note, the rmiclient must be deploy in the same server as OFBiz, because the self-signed server certificate is for localhost.
1. Download ofbiz-rmi-client-09.04.war from http://maven2.langhua.org/archiva/browse/ofbiz/ofbiz-rmi-client/09.04, rename it to ofbizrmiclient.war and deploy it in tomcat.
2. Add -Djavax.net.ssl.trustStore=/usr/share/tomcat5/webapps/ofbizrmiclient/WEB-INF/classes/ofbiztrust.jks -Djavax.net.ssl.trustStorePassword=changeit to tomcat start script.
3. Restart tomcat


Test:
In web browser, visit http://localhost:8080/ofbizrmiclient/, you should see the products in PROMOTION category.
Please note, I only test it with ssl-client-auth=false now. I'll try it's true later.



Good Luck,

Shi Yusen/Beijing Langhua Ltd.


> rmiservice and rmiclient
> ------------------------
>
>                 Key: OFBIZ-1724
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1724
>             Project: OFBiz
>          Issue Type: Improvement
>    Affects Versions: Release Branch 4.0
>         Environment: FC7 + JDK 1.6 + OFBiz 4.0 + Tomcat 5.5.26
>            Reporter: Shi Yusen
>            Priority: Trivial
>             Fix For: Release Branch 4.0
>
>         Attachments: correct-result.png, rmi-handshake.png, rmiclient.zip, rmiservice.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (OFBIZ-1724) rmiservice and rmiclient

Posted by "Shi Yusen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shi Yusen closed OFBIZ-1724.
----------------------------

    Resolution: Won't Fix

I have settled this component here:
http://langhua.org/portal/portal/default/OFBiz/OFBizRmiModulePortletWindow?windowstate=maximized

It's a bilingual portlet, you can choose English or Chinese by changing your firefox language setting.

> rmiservice and rmiclient
> ------------------------
>
>                 Key: OFBIZ-1724
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1724
>             Project: OFBiz
>          Issue Type: Improvement
>    Affects Versions: Release Branch 4.0
>         Environment: FC7 + JDK 1.6 + OFBiz 4.0 + Tomcat 5.5.26
>            Reporter: Shi Yusen
>            Priority: Trivial
>             Fix For: Release Branch 4.0
>
>         Attachments: correct-result.png, rmi-handshake.png, rmiclient.zip, rmiservice.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1724) rmiservice and rmiclient

Posted by "Shi Yusen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shi Yusen updated OFBIZ-1724:
-----------------------------

    Attachment: rmiservice.zip

> rmiservice and rmiclient
> ------------------------
>
>                 Key: OFBIZ-1724
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1724
>             Project: OFBiz
>          Issue Type: Improvement
>    Affects Versions: Release Branch 4.0
>         Environment: FC7 + JDK 1.6 + OFBiz 4.0 + Tomcat 5.5.26
>            Reporter: Shi Yusen
>            Priority: Trivial
>             Fix For: Release Branch 4.0
>
>         Attachments: rmiclient.zip, rmiservice.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1724) rmiservice and rmiclient

Posted by "Shi Yusen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shi Yusen updated OFBIZ-1724:
-----------------------------

    Attachment: rmiclient.zip

As I'm using an ofbiz-base.jar built from OFBiz 514134  which can use trustStore and keyStore configed in jsse.properties, and I don't know how to add it to a patch, so I use zip instead of a patch file.

> rmiservice and rmiclient
> ------------------------
>
>                 Key: OFBIZ-1724
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1724
>             Project: OFBiz
>          Issue Type: Improvement
>    Affects Versions: Release Branch 4.0
>         Environment: FC7 + JDK 1.6 + OFBiz 4.0 + Tomcat 5.5.26
>            Reporter: Shi Yusen
>            Priority: Trivial
>             Fix For: Release Branch 4.0
>
>         Attachments: rmiclient.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1724) rmiservice and rmiclient

Posted by "Shi Yusen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12754893#action_12754893 ] 

Shi Yusen commented on OFBIZ-1724:
----------------------------------

Hi Jacques,

This is version 1. I'm only sure it works fine with 514134.

I'm writing version 2 now, upgrading to OFBiz 9.04 and making it easier to deploy and extend. The new source code is here:
http://langhua.org/opensource/ofbiz/rmi/trunk/

When it's ready (hopefully in this week), I'll write a howto in the wiki.

In version 3, I'll try to add an OFBiz RMI plugin in Eclipse.

> rmiservice and rmiclient
> ------------------------
>
>                 Key: OFBIZ-1724
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1724
>             Project: OFBiz
>          Issue Type: Improvement
>    Affects Versions: Release Branch 4.0
>         Environment: FC7 + JDK 1.6 + OFBiz 4.0 + Tomcat 5.5.26
>            Reporter: Shi Yusen
>            Priority: Trivial
>             Fix For: Release Branch 4.0
>
>         Attachments: correct-result.png, rmi-handshake.png, rmiclient.zip, rmiservice.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (OFBIZ-1724) rmiservice and rmiclient

Posted by "Shi Yusen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12756801#action_12756801 ] 

Shi Yusen edited comment on OFBIZ-1724 at 9/17/09 2:33 PM:
-----------------------------------------------------------

Hi Giuliano,

Don't push me :).

Anyway, the good news is the new version can work now. Here are the quick start steps:


Build (if you don't want to build, you can skip this step):
1. Download source code from
http://langhua.org/opensource/ofbiz/rmi/trunk/

2. Use maven to build the source code.


Certificates (skipped)


Server side deploy:
1. Download ofbiz-rmi-server-09.04.zip from http://maven2.langhua.org/archiva/browse/ofbiz/ofbiz-rmi-server/09.04, unzip it in specialpurpose, add rmiservice to specialpurpose/componet-load.xml
2. Download ofbiz-service-customization-09.04.jar from http://maven2.langhua.org/archiva/browse/ofbiz/ofbiz-service-customization/09.04, replace ofbiz-service.jar with this one.
3. Copy the jks files from specialpurpose/rmiservice/certs to framework/base/config.
4. Add "-Djavax.net.ssl.trustStore=/workspace/ofbiz/ofbiz-9.4/framework/base/config/ofbiztrust.jks -Djavax.net.ssl.trustStorePassword=changeit" into OFBiz start script.
5. Run OFBiz.


Client side deploy:
Please note, the rmiclient must be deploy in the same server as OFBiz, because the self-signed server certificate is for localhost.
1. Download ofbiz-rmi-client-09.04.war from http://maven2.langhua.org/archiva/browse/ofbiz/ofbiz-rmi-client/09.04, rename it to ofbizrmiclient.war and deploy it in tomcat.
2. Add -Djavax.net.ssl.trustStore=/usr/share/tomcat5/webapps/ofbizrmiclient/WEB-INF/classes/ofbiztrust.jks -Djavax.net.ssl.trustStorePassword=changeit to tomcat start script.
3. Restart tomcat


Test:
In web browser, visit http://localhost:8080/ofbizrmiclient/, you should see the products in PROMOTION category.
Please note, I only test it with ssl-client-auth=false now. I'll try it's true later.



Good Luck,

Shi Yusen/Beijing Langhua Ltd.


      was (Author: shiys):
    Hi Giuliano,

Don't push me :).

Anyway, the good news is the new version can work now. Here are the quick start steps:


Build (if you don't want to build, you can skip this step):
1. Download source code from
http://langhua.org/opensource/ofbiz/rmi/trunk/

2. Use maven to build the source code.


Certificates (skipped)


Server side deploy:
1. Download ofbiz-rmi-server-09.04.zip from http://maven2.langhua.org/archiva/browse/ofbiz/ofbiz-rmi-server/09.04, unzip it in specialpurpose, add rmiservice to specialpurpose/componet-load.xml
2. Download ofbiz-service-customization-09.04.jar from http://maven2.langhua.org/archiva/browse/ofbiz/ofbiz-service-customization/09.04, replay ofbiz-service.jar with this one.
3. Copy the jks files from specialpurpose/rmiservice/certs to framework/base/config.
4. Add "-Djavax.net.ssl.trustStore=/workspace/ofbiz/ofbiz-9.4/framework/base/config/ofbiztrust.jks -Djavax.net.ssl.trustStorePassword=changeit" into OFBiz start script.
5. Run OFBiz.


Client side deploy:
Please note, the rmiclient must be deploy in the same server as OFBiz, because the self-signed server certificate is for localhost.
1. Download ofbiz-rmi-client-09.04.war from http://maven2.langhua.org/archiva/browse/ofbiz/ofbiz-rmi-client/09.04, rename it to ofbizrmiclient.war and deploy it in tomcat.
2. Add -Djavax.net.ssl.trustStore=/usr/share/tomcat5/webapps/ofbizrmiclient/WEB-INF/classes/ofbiztrust.jks -Djavax.net.ssl.trustStorePassword=changeit to tomcat start script.
3. Restart tomcat


Test:
In web browser, visit http://localhost:8080/ofbizrmiclient/, you should see the products in PROMOTION category.
Please note, I only test it with ssl-client-auth=false now. I'll try it's true later.



Good Luck,

Shi Yusen/Beijing Langhua Ltd.

  
> rmiservice and rmiclient
> ------------------------
>
>                 Key: OFBIZ-1724
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1724
>             Project: OFBiz
>          Issue Type: Improvement
>    Affects Versions: Release Branch 4.0
>         Environment: FC7 + JDK 1.6 + OFBiz 4.0 + Tomcat 5.5.26
>            Reporter: Shi Yusen
>            Priority: Trivial
>             Fix For: Release Branch 4.0
>
>         Attachments: correct-result.png, rmi-handshake.png, rmiclient.zip, rmiservice.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1724) rmiservice and rmiclient

Posted by "Giuliano Buompastore (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12756580#action_12756580 ] 

Giuliano Buompastore commented on OFBIZ-1724:
---------------------------------------------

Hi Shi, where can i find the wiki?

> rmiservice and rmiclient
> ------------------------
>
>                 Key: OFBIZ-1724
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1724
>             Project: OFBiz
>          Issue Type: Improvement
>    Affects Versions: Release Branch 4.0
>         Environment: FC7 + JDK 1.6 + OFBiz 4.0 + Tomcat 5.5.26
>            Reporter: Shi Yusen
>            Priority: Trivial
>             Fix For: Release Branch 4.0
>
>         Attachments: correct-result.png, rmi-handshake.png, rmiclient.zip, rmiservice.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1724) rmiservice and rmiclient

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12754879#action_12754879 ] 

Jacques Le Roux commented on OFBIZ-1724:
----------------------------------------

Hi Shi,

I found this by chance. I'm not sure we want to commit (I did not look at it yet) but in the case we would is this still applicable ? Also if we don't commit it we may put something in the wiki, it would be more easy to find.

> rmiservice and rmiclient
> ------------------------
>
>                 Key: OFBIZ-1724
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1724
>             Project: OFBiz
>          Issue Type: Improvement
>    Affects Versions: Release Branch 4.0
>         Environment: FC7 + JDK 1.6 + OFBiz 4.0 + Tomcat 5.5.26
>            Reporter: Shi Yusen
>            Priority: Trivial
>             Fix For: Release Branch 4.0
>
>         Attachments: correct-result.png, rmi-handshake.png, rmiclient.zip, rmiservice.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1724) rmiservice and rmiclient

Posted by "Shi Yusen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shi Yusen updated OFBIZ-1724:
-----------------------------

    Attachment: rmi-handshake.png
                correct-result.png

> rmiservice and rmiclient
> ------------------------
>
>                 Key: OFBIZ-1724
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1724
>             Project: OFBiz
>          Issue Type: Improvement
>    Affects Versions: Release Branch 4.0
>         Environment: FC7 + JDK 1.6 + OFBiz 4.0 + Tomcat 5.5.26
>            Reporter: Shi Yusen
>            Priority: Trivial
>             Fix For: Release Branch 4.0
>
>         Attachments: correct-result.png, rmi-handshake.png, rmiclient.zip, rmiservice.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.