Question on RMI in current version 17.12

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Question on RMI in current version 17.12

horst leitenmueller
Hi,

I have a question on accessing the Backend of Ofbiz via RMI there have been a example client which was integrated in a single jar of ofbiz

But I want to integrate it in an application server (at the moment I get an exception of missing file java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory)

It seems that something is trying to do more than I want that it does…

Question 1: Is there / was there a thin client jar file to access it from the outside ?
Question 2: IF Question 1 is not  true how can I extract it on the current project structure ? The classes are splittet over all framework parts and I’m not a gradle specialist to get this flying…

Perhaps somebody can help or explain me..  (btw maven not a problem same with ant)

Br horst




Reply | Threaded
Open this post in threaded view
|

Re: Question on RMI in current version 17.12

Shi Jinghai-3
Hi Horst,

Good question. The original ofbiz-rmi.jar is a thin rmi client, you can use it access ofbiz remotely. It's missing after changing to use gradle, it can be recovered by adding a new task to build the jar separately.

The missing file exception may be related to underlying logging framework of your application server.

You can treat Gradle as an alternative version of maven build tool, same concepts but simple writing.

Kind Regards,

Shi Jinghai


-----邮件原件-----
发件人: horst leitenmueller [mailto:[hidden email]]
发送时间: 2018年10月23日 16:09
收件人: [hidden email]
主题: Question on RMI in current version 17.12

Hi,

I have a question on accessing the Backend of Ofbiz via RMI there have been a example client which was integrated in a single jar of ofbiz

But I want to integrate it in an application server (at the moment I get an exception of missing file java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory)

It seems that something is trying to do more than I want that it does…

Question 1: Is there / was there a thin client jar file to access it from the outside ?
Question 2: IF Question 1 is not  true how can I extract it on the current project structure ? The classes are splittet over all framework parts and I’m not a gradle specialist to get this flying…

Perhaps somebody can help or explain me..  (btw maven not a problem same with ant)

Br horst




Reply | Threaded
Open this post in threaded view
|

Re: Question on RMI in current version 17.12

horst leitenmueller
In reply to this post by horst leitenmueller
SOLVED: my own reply to the Question

!!! NOT POSSIBLE !!! to use RMI inside of an JEE Application Server like Wildfly

Why? its easy the dependency Tree of the classes (especially GenericValue ) is needing ALL classes (including Services / DAO etc..) of the ofbiz server side…
=> you can’t create a small thin client with only containing the RMI part and the transport objects…

Only a ofbiz.jar to ofbiz.jar is possible (or java clients wrapping all the ofbiz.jar but I would not do that)….

Br

On 2018/10/23 08:08:38, horst leitenmueller <[hidden email]> wrote:

> Hi,>
>
> I have a question on accessing the Backend of Ofbiz via RMI there have been a example client which was integrated in a single jar of ofbiz>
>
> But I want to integrate it in an application server (at the moment I get an exception of missing file java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory)>
>
> It seems that something is trying to do more than I want that it does…>
>
> Question 1: Is there / was there a thin client jar file to access it from the outside ?>
> Question 2: IF Question 1 is not  true how can I extract it on the current project structure ? The classes are splittet over all framework parts and I’m not a gradle specialist to get this flying…>
>
> Perhaps somebody can help or explain me..  (btw maven not a problem same with ant) >
>
> Br horst>
>
>
>
>
>  



Reply | Threaded
Open this post in threaded view
|

Re: Question on RMI in current version 17.12

Shi Jinghai-3
In reply to this post by horst leitenmueller
NOT true, as the fields in a GenericValue can fetched by a Map.

-----邮件原件-----
发件人: horst leitenmueller [mailto:[hidden email]]
发送时间: 2018年10月24日 16:49
收件人: [hidden email]
主题: Re: Question on RMI in current version 17.12

SOLVED: my own reply to the Question

!!! NOT POSSIBLE !!! to use RMI inside of an JEE Application Server like Wildfly

Why? its easy the dependency Tree of the classes (especially GenericValue ) is needing ALL classes (including Services / DAO etc..) of the ofbiz server side…
=> you can’t create a small thin client with only containing the RMI part and the transport objects…

Only a ofbiz.jar to ofbiz.jar is possible (or java clients wrapping all the ofbiz.jar but I would not do that)….

Br

On 2018/10/23 08:08:38, horst leitenmueller <[hidden email]> wrote:

> Hi,>
>
> I have a question on accessing the Backend of Ofbiz via RMI there have been a example client which was integrated in a single jar of ofbiz>
>
> But I want to integrate it in an application server (at the moment I get an exception of missing file java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory)>
>
> It seems that something is trying to do more than I want that it does…>
>
> Question 1: Is there / was there a thin client jar file to access it from the outside ?>
> Question 2: IF Question 1 is not  true how can I extract it on the current project structure ? The classes are splittet over all framework parts and I’m not a gradle specialist to get this flying…>
>
> Perhaps somebody can help or explain me..  (btw maven not a problem same with ant) >
>
> Br horst>
>
>
>
>
>  



Reply | Threaded
Open this post in threaded view
|

Re: Question on RMI in current version 17.12

horst leitenmueller
In reply to this post by horst leitenmueller
Hi Shi

Sorry had already prepared my response …

I don’t think so that this is possible anymore the dependency tree is too big all classes are nearly needed the Transfer Objects have logic inside
And from my point of view always a problem..

I will now check if there is a possibility to return the data in json style, I’m not very happy with this but I don’t see any other solution…

Background: The reason why I need this is I want to sync data from odoo ERP to Ofbiz and use there the ECommerce part


br horst

On 2018/10/24 07:55:11, Shi Jinghai <[hidden email]> wrote:

> Hi Horst,>
>
>
>
> Good question. The original ofbiz-rmi.jar is a thin rmi client, you can use it access ofbiz remotely. It's missing after changing to use gradle, it can be recovered by adding a new task to build the jar separately.>
>
>
>
> The missing file exception may be related to underlying logging framework of your application server.>
>
>
>
> You can treat Gradle as an alternative version of maven build tool, same concepts but simple writing.>
>
>
>
> Kind Regards,>
>
>
>
> Shi Jinghai>
>
>
>
>
>
> -----邮件原件----->
>
> 发件人: horst leitenmueller [mailto:[hidden email]] >
>
> 发送时间: 2018年10月23日 16:09>
>
> 收件人: [hidden email]>
>
> 主题: Question on RMI in current version 17.12>
>
>
>
> Hi,>
>
>
>
> I have a question on accessing the Backend of Ofbiz via RMI there have been a example client which was integrated in a single jar of ofbiz>
>
>
>
> But I want to integrate it in an application server (at the moment I get an exception of missing file java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory)>
>
>
>
> It seems that something is trying to do more than I want that it does…>
>
>
>
> Question 1: Is there / was there a thin client jar file to access it from the outside ?>
>
> Question 2: IF Question 1 is not  true how can I extract it on the current project structure ? The classes are splittet over all framework parts and I’m not a gradle specialist to get this flying…>
>
>
>
> Perhaps somebody can help or explain me..  (btw maven not a problem same with ant) >
>
>
>
> Br horst>
>
>
>
>
>
>
>
>
>
>  

------------------------------------------------------
IT4Health.at
Ing. DI Horst Leitenmueller
Sperlstr. 11
4040 Linz

tel.: +43 650 2042702
email: [hidden email]
------------------------------------------------------



Reply | Threaded
Open this post in threaded view
|

Re: Question on RMI in current version 17.12

horst leitenmueller
In reply to this post by horst leitenmueller
hi

Yes and inside the map you have a
"org.apache.ofbiz.entity.util.EntityListIterator".
Where you then need ALL server side classes to get the entries just an example for the service performFindParty

It there a way to JUST get a Map with String, String/Integer/Whatever and NO ofbiz specific Classes ?

Thank in advance

On 2018/10/24 08:52:52, Shi Jinghai <[hidden email]> wrote:

> NOT true, as the fields in a GenericValue can fetched by a Map.>
>
>
>
> -----邮件原件----->
>
> 发件人: horst leitenmueller [mailto:[hidden email]] >
>
> 发送时间: 2018年10月24日 16:49>
>
> 收件人: [hidden email]>
>
> 主题: Re: Question on RMI in current version 17.12>
>
>
>
> SOLVED: my own reply to the Question>
>
>
>
> !!! NOT POSSIBLE !!! to use RMI inside of an JEE Application Server like Wildfly >
>
>
>
> Why? its easy the dependency Tree of the classes (especially GenericValue ) is needing ALL classes (including Services / DAO etc..) of the ofbiz server side…>
>
> => you can’t create a small thin client with only containing the RMI part and the transport objects…>
>
>
>
> Only a ofbiz.jar to ofbiz.jar is possible (or java clients wrapping all the ofbiz.jar but I would not do that)….>
>
>
>
> Br>
>
>
>
> On 2018/10/23 08:08:38, horst leitenmueller <[hidden email]> wrote: >
>
> > Hi,> >
>
> > >
>
> > I have a question on accessing the Backend of Ofbiz via RMI there have been a example client which was integrated in a single jar of ofbiz> >
>
> > >
>
> > But I want to integrate it in an application server (at the moment I get an exception of missing file java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory)> >
>
> > >
>
> > It seems that something is trying to do more than I want that it does…> >
>
> > >
>
> > Question 1: Is there / was there a thin client jar file to access it from the outside ?> >
>
> > Question 2: IF Question 1 is not  true how can I extract it on the current project structure ? The classes are splittet over all framework parts and I’m not a gradle specialist to get this flying…> >
>
> > >
>
> > Perhaps somebody can help or explain me..  (btw maven not a problem same with ant) > >
>
> > >
>
> > Br horst> >
>
> > >
>
> > >
>
> > >
>
> > >
>
> >  >
>
>
>
>
>
>
>
>  

------------------------------------------------------
IT4Health.at
Ing. DI Horst Leitenmueller
Sperlstr. 11
4040 Linz

tel.: +43 650 2042702
email: [hidden email]
------------------------------------------------------



Reply | Threaded
Open this post in threaded view
|

Re: Question on RMI in current version 17.12

Shi Jinghai-3
In reply to this post by horst leitenmueller
If I remembered right, you can return List<GenericEntity> or a single GenericEntity to rmi client, the client can call getAllFields method in GenericEntity to fetch entity data to a Map, and then you can use the data as you wish.

-----邮件原件-----
发件人: horst leitenmueller [mailto:[hidden email]]
发送时间: 2018年10月24日 17:04
收件人: [hidden email]
主题: Re: Question on RMI in current version 17.12

hi

Yes and inside the map you have a
"org.apache.ofbiz.entity.util.EntityListIterator".
Where you then need ALL server side classes to get the entries just an example for the service performFindParty

It there a way to JUST get a Map with String, String/Integer/Whatever and NO ofbiz specific Classes ?

Thank in advance

On 2018/10/24 08:52:52, Shi Jinghai <[hidden email]> wrote:

> NOT true, as the fields in a GenericValue can fetched by a Map.>
>
>
>
> -----邮件原件----->
>
> 发件人: horst leitenmueller [mailto:[hidden email]] >
>
> 发送时间: 2018年10月24日 16:49>
>
> 收件人: [hidden email]>
>
> 主题: Re: Question on RMI in current version 17.12>
>
>
>
> SOLVED: my own reply to the Question>
>
>
>
> !!! NOT POSSIBLE !!! to use RMI inside of an JEE Application Server like Wildfly >
>
>
>
> Why? its easy the dependency Tree of the classes (especially GenericValue ) is needing ALL classes (including Services / DAO etc..) of the ofbiz server side…>
>
> => you can’t create a small thin client with only containing the RMI part and the transport objects…>
>
>
>
> Only a ofbiz.jar to ofbiz.jar is possible (or java clients wrapping all the ofbiz.jar but I would not do that)….>
>
>
>
> Br>
>
>
>
> On 2018/10/23 08:08:38, horst leitenmueller <[hidden email]> wrote: >
>
> > Hi,> >
>
> > >
>
> > I have a question on accessing the Backend of Ofbiz via RMI there have been a example client which was integrated in a single jar of ofbiz> >
>
> > >
>
> > But I want to integrate it in an application server (at the moment I get an exception of missing file java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory)> >
>
> > >
>
> > It seems that something is trying to do more than I want that it does…> >
>
> > >
>
> > Question 1: Is there / was there a thin client jar file to access it from the outside ?> >
>
> > Question 2: IF Question 1 is not  true how can I extract it on the current project structure ? The classes are splittet over all framework parts and I’m not a gradle specialist to get this flying…> >
>
> > >
>
> > Perhaps somebody can help or explain me..  (btw maven not a problem same with ant) > >
>
> > >
>
> > Br horst> >
>
> > >
>
> > >
>
> > >
>
> > >
>
> >  >
>
>
>
>
>
>
>
>  

------------------------------------------------------
IT4Health.at
Ing. DI Horst Leitenmueller
Sperlstr. 11
4040 Linz

tel.: +43 650 2042702
email: [hidden email]
------------------------------------------------------