How to render Chinese characters in OFBiz PDF reports?

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

Re: How to configure OFBiz with Apache Web Server or Application Server

rajsaini
I think site settings in the Content tab are used for e-commerce. For
back office application, url.properties is used. Someone please correct
if I am wrong.

Thanks,

Raj

David Goodenough wrote:

> Is there a guide as to what might be need to be put in the url.properties file
> or what we might need to enter under the Content Tab?
>
> David
>
> On Sunday 19 August 2007, Raj Saini wrote:
>  
>> Hi Mathius,
>>
>> You will need to fine tune your  settings in the url.properties file.
>> For ecommerce, you can do that in the web site under content tab.
>>
>> Thanks,
>>
>> Raj
>>
>> Mathius Allo wrote:
>>    
>>> Hi Raj,
>>>
>>> I have tried to configure it using mod_proxy_ajp. The only changes that I
>>> made is to add the following line into proxy_ajp.conf under
>>> /etc/httpd/conf.d/ (i'm using FC5): LoadModule proxy_ajp_module
>>> modules/mod_proxy_ajp.so
>>>
>>>     ProxyPass / ajp://localhost:8009
>>>
>>> This seems to be working for non-ssl. I can access my module in the
>>> following: http://www.mallo.com/customer/
>>> apache & tomcat access_log indicates that everything is ok.
>>>
>>> However, when trying to access modules that require ssl port ":8443"
>>> appears automatically the URL
>>> (https://www.mallo.com:8443/project/control/main)  and I noticed the
>>> following in the apache access_log: 192.168.1.65 - -
>>> [18/Aug/2007:20:49:13 +0800] "GET
>>> /project/control/main?externalLoginKey=EL994157896198 HTTP/1.1" 302 -
>>> "http://www.mallo.com/customer/control/editCustomer?customerId=10000"
>>> "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070417
>>> Fedora/2.0.0.3-4.fc7 Firefox/2.0.0.3"
>>>
>>> After the above message, accessing non-ssl module does not seems to go
>>> through apache (even though I don't see :8080 in the URL) as I don't see
>>> any entry in the apache access_log.
>>>
>>> Any idea on how to make it work for https?
>>>
>>> Thanks,
>>> Mathius Allo
>>>
>>> Raj Saini <[hidden email]> wrote: Yes, I have configured our Ofbiz +
>>> Apache HTTP 2.2 with mod_ajp_proxy. You will need to enable proxy for
>>> httpd and  mod_proxy_ajp within your virtual hosts. I am doing it Debian
>>> way. For a standard httpd.conf following should work:
>>>
>>> 1. Enable mod_proxy and mod_proxy_ajp modules in the Apache.
>>>
>>> 2. Somewhere in the global part of httpd.conf
>>> --------------------------------------------------
>>>     #turning ProxyRequests on and allowing proxying from all may allow
>>>         #spammers to use your proxy to send email.
>>>
>>>         ProxyRequests Off
>>>
>>>
>>>
>>>                 AddDefaultCharset off
>>>                 Order deny,allow
>>>                 Allow from all
>>>                 #Allow from .example.com
>>>
>>>
>>>
>>>         # Enable/disable the handling of HTTP/1.1 "Via:" headers.
>>>         # ("Full" adds the server version; "Block" removes all outgoing
>>> Via: headers)
>>>         # Set to one of: Off | On | Full | Block
>>>
>>>         ProxyVia On
>>>
>>> 3. Inside your virtual host config
>>> -----------------------------------
>>>     ProxyPreserveHost On
>>>     proxyPass / ajp://localhost:8009/
>>>     RewriteEngine On
>>>     RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
>>>
>>> That is it you need to make it work.
>>>
>>> Thanks,
>>>
>>> Raj
>>>
>>> Jacques Le Roux wrote:
>>>      
>>>> >From this blog I'm not sure it's the good solution yet. Do you have
>>>>        
>>>>> valuable experience with it ?
>>>>>          
>>>> http://getahead.org/blog/joe/2006/02/01/mod_jk_is_dead_long_live_mod_pro
>>>> xy_ajp.html
>>>>
>>>> Jacques
>>>>
>>>> PS : though this links seem good points :
>>>> http://confluence.atlassian.com/display/DOC/Running+Confluence+behind+Ap
>>>> ache#comment-16121884
>>>> http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html
>>>>
>>>> De : "Raj Saini"
>>>>
>>>>        
>>>>> mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is far
>>>>> simpler than mod_jk.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Raj
>>>>>
>>>>> Gautam Deb wrote:
>>>>>          
>>>>>> Yes, it is possible. You can use the *mod_jk* Tomcat-Apache plug-in
>>>>>> that handles the communication between Tomcat and Apache. You can
>>>>>> refer the link
>>>>>> http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
>>>>>>
>>>>>> This way you can route request to the web container.
>>>>>>
>>>>>> Regards,
>>>>>> Gautam Deb
>>>>>>
>>>>>> On 8/12/07, Mathius Allo  wrote:
>>>>>>            
>>>>>>> Hi All,
>>>>>>>
>>>>>>>   Is it possible to have a deployment configuration where Apache web
>>>>>>> server being used to route request to the web container?
>>>>>>>
>>>>>>>   How to deploy an OfBiz application within an Application Server?
>>>>>>>
>>>>>>>   Thanks in advanced.
>>>>>>>   Mathius
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------
>>>>>>> Pinpoint customers who are looking for what you sell.
>>>>>>>              
>>> ---------------------------------
>>> Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail,
>>> news, photos & more.
>>>      
>
>
>
>  

Reply | Threaded
Open this post in threaded view
|

Re: How to configure OFBiz with Apache Web Server or Application Server

rajsaini
In reply to this post by David Goodenough
David,

Apache would get confused and it is how this works. If you want Apache
not to confuse, and want your images to be served without going through
AJP, change your DocumentRoot of virtual host accordingly. For example
instead of using DocumentRoot as /var/www/, point it to the base of
images web application i.e. ${ofbiz_installdir}/framework/images/webapp.
Apache will server images from this folder.

You can not have a ProxyPass mount point as well as a file or folder
with same name in your document root.

Thanks,

Raj

Only way you can get
David Goodenough wrote:

> Did you manage to put it in your FAQ, and is there a URL to that FAQ?
>
> I am having problem in that this Apache Web server is also serving a number
> of other (non Java) things, and when I try to add this ProxyPass it gets
> confused with the /image files, and tries to get them from /var/www/images
> which of course does not work.  I tried moving the ProxyPass stuff to the
> front of the VirtualHost, but that made no difference.
>
> David
>
> On Sunday 12 August 2007, Jacques Le Roux wrote:
>  
>> Thanks a lot Raj,
>>
>> I think I will try it soon and hopefully put your tip in "my" FAQ on
>> Confluence !  It's clearly far easier than mod_jk and moreover if it's
>> faster then it should be the new way of doing that...
>>
>> Jacques
>>
>> De : "Raj Saini" <[hidden email]>
>>
>>    
>>> Yes, I have configured our Ofbiz + Apache HTTP 2.2 with mod_ajp_proxy.
>>> You will need to enable proxy for httpd and  mod_proxy_ajp within your
>>> virtual hosts. I am doing it Debian way. For a standard httpd.conf
>>> following should work:
>>>
>>> 1. Enable mod_proxy and mod_proxy_ajp modules in the Apache.
>>>
>>> 2. Somewhere in the global part of httpd.conf
>>> --------------------------------------------------
>>>     #turning ProxyRequests on and allowing proxying from all may allow
>>>         #spammers to use your proxy to send email.
>>>
>>>         ProxyRequests Off
>>>
>>>         <Proxy *>
>>>                 AddDefaultCharset off
>>>                 Order deny,allow
>>>                 Allow from all
>>>                 #Allow from .example.com
>>>         </Proxy>
>>>
>>>         # Enable/disable the handling of HTTP/1.1 "Via:" headers.
>>>         # ("Full" adds the server version; "Block" removes all outgoing
>>> Via: headers)
>>>         # Set to one of: Off | On | Full | Block
>>>
>>>         ProxyVia On
>>>
>>> 3. Inside your virtual host config
>>> -----------------------------------
>>>     ProxyPreserveHost On
>>>     proxyPass / ajp://localhost:8009/
>>>     RewriteEngine On
>>>     RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
>>>
>>> That is it you need to make it work.
>>>
>>> Thanks,
>>>
>>> Raj
>>>
>>> Jacques Le Roux wrote:
>>>      
>>>> >From this blog I'm not sure it's the good solution yet. Do you have
>>>>        
>>>>> valuable experience with it ?
>>>>>          
>>>> http://getahead.org/blog/joe/2006/02/01/mod_jk_is_dead_long_live_mod_pr
>>>> oxy_ajp.html
>>>>
>>>> Jacques
>>>>
>>>> PS : though this links seem good points :
>>>> http://confluence.atlassian.com/display/DOC/Running+Confluence+behind+A
>>>> pache#comment-16121884
>>>> http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html
>>>>
>>>> De : "Raj Saini" <[hidden email]>
>>>>
>>>>        
>>>>> mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is far
>>>>> simpler than mod_jk.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Raj
>>>>>
>>>>> Gautam Deb wrote:
>>>>>          
>>>>>> Yes, it is possible. You can use the *mod_jk* Tomcat-Apache plug-in
>>>>>> that handles the communication between Tomcat and Apache. You can
>>>>>> refer the link
>>>>>> http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
>>>>>>
>>>>>> This way you can route request to the web container.
>>>>>>
>>>>>> Regards,
>>>>>> Gautam Deb
>>>>>>
>>>>>> On 8/12/07, Mathius Allo <[hidden email]> wrote:
>>>>>>            
>>>>>>> Hi All,
>>>>>>>
>>>>>>>   Is it possible to have a deployment configuration where Apache web
>>>>>>> server being used to route request to the web container?
>>>>>>>
>>>>>>>   How to deploy an OfBiz application within an Application Server?
>>>>>>>
>>>>>>>   Thanks in advanced.
>>>>>>>   Mathius
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------
>>>>>>> Pinpoint customers who are looking for what you sell.
>>>>>>>              
>
>
>
>  

Reply | Threaded
Open this post in threaded view
|

Re: How to configure OFBiz with Apache Web Server or Application Server

Jacques Le Roux
Administrator
In reply to this post by David Goodenough
Not yet, I want to test it before (on Windows and Linux) but there are always more important things to do...

The FAQ URL is http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Cookbook+-+How+to++%28work+in+progress%29

Did you try Raj's tip below ?

Jacques


> Did you manage to put it in your FAQ, and is there a URL to that FAQ?
>
> I am having problem in that this Apache Web server is also serving a number
> of other (non Java) things, and when I try to add this ProxyPass it gets
> confused with the /image files, and tries to get them from /var/www/images
> which of course does not work.  I tried moving the ProxyPass stuff to the
> front of the VirtualHost, but that made no difference.
>
> David
>
> On Sunday 12 August 2007, Jacques Le Roux wrote:
> > Thanks a lot Raj,
> >
> > I think I will try it soon and hopefully put your tip in "my" FAQ on
> > Confluence !  It's clearly far easier than mod_jk and moreover if it's
> > faster then it should be the new way of doing that...
> >
> > Jacques
> >
> > De : "Raj Saini" <[hidden email]>
> >
> > > Yes, I have configured our Ofbiz + Apache HTTP 2.2 with mod_ajp_proxy.
> > > You will need to enable proxy for httpd and  mod_proxy_ajp within your
> > > virtual hosts. I am doing it Debian way. For a standard httpd.conf
> > > following should work:
> > >
> > > 1. Enable mod_proxy and mod_proxy_ajp modules in the Apache.
> > >
> > > 2. Somewhere in the global part of httpd.conf
> > > --------------------------------------------------
> > >     #turning ProxyRequests on and allowing proxying from all may allow
> > >         #spammers to use your proxy to send email.
> > >
> > >         ProxyRequests Off
> > >
> > >         <Proxy *>
> > >                 AddDefaultCharset off
> > >                 Order deny,allow
> > >                 Allow from all
> > >                 #Allow from .example.com
> > >         </Proxy>
> > >
> > >         # Enable/disable the handling of HTTP/1.1 "Via:" headers.
> > >         # ("Full" adds the server version; "Block" removes all outgoing
> > > Via: headers)
> > >         # Set to one of: Off | On | Full | Block
> > >
> > >         ProxyVia On
> > >
> > > 3. Inside your virtual host config
> > > -----------------------------------
> > >     ProxyPreserveHost On
> > >     proxyPass / ajp://localhost:8009/
> > >     RewriteEngine On
> > >     RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
> > >
> > > That is it you need to make it work.
> > >
> > > Thanks,
> > >
> > > Raj
> > >
> > > Jacques Le Roux wrote:
> > > > >From this blog I'm not sure it's the good solution yet. Do you have
> > > > > valuable experience with it ?
> > > >
> > > > http://getahead.org/blog/joe/2006/02/01/mod_jk_is_dead_long_live_mod_pr
> > > >oxy_ajp.html
> > > >
> > > > Jacques
> > > >
> > > > PS : though this links seem good points :
> > > > http://confluence.atlassian.com/display/DOC/Running+Confluence+behind+A
> > > >pache#comment-16121884
> > > > http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html
> > > >
> > > > De : "Raj Saini" <[hidden email]>
> > > >
> > > >> mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is far
> > > >> simpler than mod_jk.
> > > >>
> > > >> Thanks,
> > > >>
> > > >> Raj
> > > >>
> > > >> Gautam Deb wrote:
> > > >>> Yes, it is possible. You can use the *mod_jk* Tomcat-Apache plug-in
> > > >>> that handles the communication between Tomcat and Apache. You can
> > > >>> refer the link
> > > >>> http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
> > > >>>
> > > >>> This way you can route request to the web container.
> > > >>>
> > > >>> Regards,
> > > >>> Gautam Deb
> > > >>>
> > > >>> On 8/12/07, Mathius Allo <[hidden email]> wrote:
> > > >>>> Hi All,
> > > >>>>
> > > >>>>   Is it possible to have a deployment configuration where Apache web
> > > >>>> server being used to route request to the web container?
> > > >>>>
> > > >>>>   How to deploy an OfBiz application within an Application Server?
> > > >>>>
> > > >>>>   Thanks in advanced.
> > > >>>>   Mathius
> > > >>>>
> > > >>>>
> > > >>>> ---------------------------------
> > > >>>> Pinpoint customers who are looking for what you sell.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: How to configure OFBiz with Apache Web Server or Application Server

David Goodenough
In reply to this post by rajsaini
Raj,

Well actually I am trying to STOP it from serving the images locally, but
rather to pass the request on in the same way that it passes on all the
other requests.  My Ofbiz server is on another machine so I want everything
passed on to that machine.

My <Location> tag for ofbiz is <Location /ofbiz/> and all the rest have
their own <Location> tags, and none of them mention ofbiz.  As it happens
all the rest are local apps (apt-cacher, trac etc).  There is also not
a directory called /var/www/ofbiz.

David

On Thursday 27 September 2007, Raj Saini wrote:

> David,
>
> Apache would get confused and it is how this works. If you want Apache
> not to confuse, and want your images to be served without going through
> AJP, change your DocumentRoot of virtual host accordingly. For example
> instead of using DocumentRoot as /var/www/, point it to the base of
> images web application i.e. ${ofbiz_installdir}/framework/images/webapp.
> Apache will server images from this folder.
>
> You can not have a ProxyPass mount point as well as a file or folder
> with same name in your document root.
>
> Thanks,
>
> Raj
>
> Only way you can get
>
> David Goodenough wrote:
> > Did you manage to put it in your FAQ, and is there a URL to that FAQ?
> >
> > I am having problem in that this Apache Web server is also serving a
> > number of other (non Java) things, and when I try to add this ProxyPass
> > it gets confused with the /image files, and tries to get them from
> > /var/www/images which of course does not work.  I tried moving the
> > ProxyPass stuff to the front of the VirtualHost, but that made no
> > difference.
> >
> > David
> >
> > On Sunday 12 August 2007, Jacques Le Roux wrote:
> >> Thanks a lot Raj,
> >>
> >> I think I will try it soon and hopefully put your tip in "my" FAQ on
> >> Confluence !  It's clearly far easier than mod_jk and moreover if it's
> >> faster then it should be the new way of doing that...
> >>
> >> Jacques
> >>
> >> De : "Raj Saini" <[hidden email]>
> >>
> >>> Yes, I have configured our Ofbiz + Apache HTTP 2.2 with mod_ajp_proxy.
> >>> You will need to enable proxy for httpd and  mod_proxy_ajp within your
> >>> virtual hosts. I am doing it Debian way. For a standard httpd.conf
> >>> following should work:
> >>>
> >>> 1. Enable mod_proxy and mod_proxy_ajp modules in the Apache.
> >>>
> >>> 2. Somewhere in the global part of httpd.conf
> >>> --------------------------------------------------
> >>>     #turning ProxyRequests on and allowing proxying from all may allow
> >>>         #spammers to use your proxy to send email.
> >>>
> >>>         ProxyRequests Off
> >>>
> >>>         <Proxy *>
> >>>                 AddDefaultCharset off
> >>>                 Order deny,allow
> >>>                 Allow from all
> >>>                 #Allow from .example.com
> >>>         </Proxy>
> >>>
> >>>         # Enable/disable the handling of HTTP/1.1 "Via:" headers.
> >>>         # ("Full" adds the server version; "Block" removes all outgoing
> >>> Via: headers)
> >>>         # Set to one of: Off | On | Full | Block
> >>>
> >>>         ProxyVia On
> >>>
> >>> 3. Inside your virtual host config
> >>> -----------------------------------
> >>>     ProxyPreserveHost On
> >>>     proxyPass / ajp://localhost:8009/
> >>>     RewriteEngine On
> >>>     RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
> >>>
> >>> That is it you need to make it work.
> >>>
> >>> Thanks,
> >>>
> >>> Raj
> >>>
> >>> Jacques Le Roux wrote:
> >>>> >From this blog I'm not sure it's the good solution yet. Do you have
> >>>>>
> >>>>> valuable experience with it ?
> >>>>
> >>>> http://getahead.org/blog/joe/2006/02/01/mod_jk_is_dead_long_live_mod_p
> >>>>r oxy_ajp.html
> >>>>
> >>>> Jacques
> >>>>
> >>>> PS : though this links seem good points :
> >>>> http://confluence.atlassian.com/display/DOC/Running+Confluence+behind+
> >>>>A pache#comment-16121884
> >>>> http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html
> >>>>
> >>>> De : "Raj Saini" <[hidden email]>
> >>>>
> >>>>> mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is far
> >>>>> simpler than mod_jk.
> >>>>>
> >>>>> Thanks,
> >>>>>
> >>>>> Raj
> >>>>>
> >>>>> Gautam Deb wrote:
> >>>>>> Yes, it is possible. You can use the *mod_jk* Tomcat-Apache plug-in
> >>>>>> that handles the communication between Tomcat and Apache. You can
> >>>>>> refer the link
> >>>>>> http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
> >>>>>>
> >>>>>> This way you can route request to the web container.
> >>>>>>
> >>>>>> Regards,
> >>>>>> Gautam Deb
> >>>>>>
> >>>>>> On 8/12/07, Mathius Allo <[hidden email]> wrote:
> >>>>>>> Hi All,
> >>>>>>>
> >>>>>>>   Is it possible to have a deployment configuration where Apache
> >>>>>>> web server being used to route request to the web container?
> >>>>>>>
> >>>>>>>   How to deploy an OfBiz application within an Application Server?
> >>>>>>>
> >>>>>>>   Thanks in advanced.
> >>>>>>>   Mathius
> >>>>>>>
> >>>>>>>
> >>>>>>> ---------------------------------
> >>>>>>> Pinpoint customers who are looking for what you sell.


Reply | Threaded
Open this post in threaded view
|

Re: How to configure OFBiz with Apache Web Server or Application Server

rajsaini
It is strange. Are you using a main server or virtual host based setup?

Thanks,

Raj
David Goodenough wrote:

> Raj,
>
> Well actually I am trying to STOP it from serving the images locally, but
> rather to pass the request on in the same way that it passes on all the
> other requests.  My Ofbiz server is on another machine so I want everything
> passed on to that machine.
>
> My <Location> tag for ofbiz is <Location /ofbiz/> and all the rest have
> their own <Location> tags, and none of them mention ofbiz.  As it happens
> all the rest are local apps (apt-cacher, trac etc).  There is also not
> a directory called /var/www/ofbiz.
>
> David
>
> On Thursday 27 September 2007, Raj Saini wrote:
>  
>> David,
>>
>> Apache would get confused and it is how this works. If you want Apache
>> not to confuse, and want your images to be served without going through
>> AJP, change your DocumentRoot of virtual host accordingly. For example
>> instead of using DocumentRoot as /var/www/, point it to the base of
>> images web application i.e. ${ofbiz_installdir}/framework/images/webapp.
>> Apache will server images from this folder.
>>
>> You can not have a ProxyPass mount point as well as a file or folder
>> with same name in your document root.
>>
>> Thanks,
>>
>> Raj
>>
>> Only way you can get
>>
>> David Goodenough wrote:
>>    
>>> Did you manage to put it in your FAQ, and is there a URL to that FAQ?
>>>
>>> I am having problem in that this Apache Web server is also serving a
>>> number of other (non Java) things, and when I try to add this ProxyPass
>>> it gets confused with the /image files, and tries to get them from
>>> /var/www/images which of course does not work.  I tried moving the
>>> ProxyPass stuff to the front of the VirtualHost, but that made no
>>> difference.
>>>
>>> David
>>>
>>> On Sunday 12 August 2007, Jacques Le Roux wrote:
>>>      
>>>> Thanks a lot Raj,
>>>>
>>>> I think I will try it soon and hopefully put your tip in "my" FAQ on
>>>> Confluence !  It's clearly far easier than mod_jk and moreover if it's
>>>> faster then it should be the new way of doing that...
>>>>
>>>> Jacques
>>>>
>>>> De : "Raj Saini" <[hidden email]>
>>>>
>>>>        
>>>>> Yes, I have configured our Ofbiz + Apache HTTP 2.2 with mod_ajp_proxy.
>>>>> You will need to enable proxy for httpd and  mod_proxy_ajp within your
>>>>> virtual hosts. I am doing it Debian way. For a standard httpd.conf
>>>>> following should work:
>>>>>
>>>>> 1. Enable mod_proxy and mod_proxy_ajp modules in the Apache.
>>>>>
>>>>> 2. Somewhere in the global part of httpd.conf
>>>>> --------------------------------------------------
>>>>>     #turning ProxyRequests on and allowing proxying from all may allow
>>>>>         #spammers to use your proxy to send email.
>>>>>
>>>>>         ProxyRequests Off
>>>>>
>>>>>         <Proxy *>
>>>>>                 AddDefaultCharset off
>>>>>                 Order deny,allow
>>>>>                 Allow from all
>>>>>                 #Allow from .example.com
>>>>>         </Proxy>
>>>>>
>>>>>         # Enable/disable the handling of HTTP/1.1 "Via:" headers.
>>>>>         # ("Full" adds the server version; "Block" removes all outgoing
>>>>> Via: headers)
>>>>>         # Set to one of: Off | On | Full | Block
>>>>>
>>>>>         ProxyVia On
>>>>>
>>>>> 3. Inside your virtual host config
>>>>> -----------------------------------
>>>>>     ProxyPreserveHost On
>>>>>     proxyPass / ajp://localhost:8009/
>>>>>     RewriteEngine On
>>>>>     RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
>>>>>
>>>>> That is it you need to make it work.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Raj
>>>>>
>>>>> Jacques Le Roux wrote:
>>>>>          
>>>>>> >From this blog I'm not sure it's the good solution yet. Do you have
>>>>>>            
>>>>>>> valuable experience with it ?
>>>>>>>              
>>>>>> http://getahead.org/blog/joe/2006/02/01/mod_jk_is_dead_long_live_mod_p
>>>>>> r oxy_ajp.html
>>>>>>
>>>>>> Jacques
>>>>>>
>>>>>> PS : though this links seem good points :
>>>>>> http://confluence.atlassian.com/display/DOC/Running+Confluence+behind+
>>>>>> A pache#comment-16121884
>>>>>> http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html
>>>>>>
>>>>>> De : "Raj Saini" <[hidden email]>
>>>>>>
>>>>>>            
>>>>>>> mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is far
>>>>>>> simpler than mod_jk.
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Raj
>>>>>>>
>>>>>>> Gautam Deb wrote:
>>>>>>>              
>>>>>>>> Yes, it is possible. You can use the *mod_jk* Tomcat-Apache plug-in
>>>>>>>> that handles the communication between Tomcat and Apache. You can
>>>>>>>> refer the link
>>>>>>>> http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
>>>>>>>>
>>>>>>>> This way you can route request to the web container.
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>> Gautam Deb
>>>>>>>>
>>>>>>>> On 8/12/07, Mathius Allo <[hidden email]> wrote:
>>>>>>>>                
>>>>>>>>> Hi All,
>>>>>>>>>
>>>>>>>>>   Is it possible to have a deployment configuration where Apache
>>>>>>>>> web server being used to route request to the web container?
>>>>>>>>>
>>>>>>>>>   How to deploy an OfBiz application within an Application Server?
>>>>>>>>>
>>>>>>>>>   Thanks in advanced.
>>>>>>>>>   Mathius
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------------------------------
>>>>>>>>> Pinpoint customers who are looking for what you sell.
>>>>>>>>>                  
>
>
>
>  

Reply | Threaded
Open this post in threaded view
|

Re: How to configure OFBiz with Apache Web Server or Application Server

David Goodenough
All the <Location> tags are inside a single <VirtualHost *> tag.  

David

On Thursday 27 September 2007, Raj Saini wrote:

> It is strange. Are you using a main server or virtual host based setup?
>
> Thanks,
>
> Raj
>
> David Goodenough wrote:
> > Raj,
> >
> > Well actually I am trying to STOP it from serving the images locally, but
> > rather to pass the request on in the same way that it passes on all the
> > other requests.  My Ofbiz server is on another machine so I want
> > everything passed on to that machine.
> >
> > My <Location> tag for ofbiz is <Location /ofbiz/> and all the rest have
> > their own <Location> tags, and none of them mention ofbiz.  As it happens
> > all the rest are local apps (apt-cacher, trac etc).  There is also not
> > a directory called /var/www/ofbiz.
> >
> > David
> >
> > On Thursday 27 September 2007, Raj Saini wrote:
> >> David,
> >>
> >> Apache would get confused and it is how this works. If you want Apache
> >> not to confuse, and want your images to be served without going through
> >> AJP, change your DocumentRoot of virtual host accordingly. For example
> >> instead of using DocumentRoot as /var/www/, point it to the base of
> >> images web application i.e. ${ofbiz_installdir}/framework/images/webapp.
> >> Apache will server images from this folder.
> >>
> >> You can not have a ProxyPass mount point as well as a file or folder
> >> with same name in your document root.
> >>
> >> Thanks,
> >>
> >> Raj
> >>
> >> Only way you can get
> >>
> >> David Goodenough wrote:
> >>> Did you manage to put it in your FAQ, and is there a URL to that FAQ?
> >>>
> >>> I am having problem in that this Apache Web server is also serving a
> >>> number of other (non Java) things, and when I try to add this ProxyPass
> >>> it gets confused with the /image files, and tries to get them from
> >>> /var/www/images which of course does not work.  I tried moving the
> >>> ProxyPass stuff to the front of the VirtualHost, but that made no
> >>> difference.
> >>>
> >>> David
> >>>
> >>> On Sunday 12 August 2007, Jacques Le Roux wrote:
> >>>> Thanks a lot Raj,
> >>>>
> >>>> I think I will try it soon and hopefully put your tip in "my" FAQ on
> >>>> Confluence !  It's clearly far easier than mod_jk and moreover if it's
> >>>> faster then it should be the new way of doing that...
> >>>>
> >>>> Jacques
> >>>>
> >>>> De : "Raj Saini" <[hidden email]>
> >>>>
> >>>>> Yes, I have configured our Ofbiz + Apache HTTP 2.2 with
> >>>>> mod_ajp_proxy. You will need to enable proxy for httpd and
> >>>>> mod_proxy_ajp within your virtual hosts. I am doing it Debian way.
> >>>>> For a standard httpd.conf following should work:
> >>>>>
> >>>>> 1. Enable mod_proxy and mod_proxy_ajp modules in the Apache.
> >>>>>
> >>>>> 2. Somewhere in the global part of httpd.conf
> >>>>> --------------------------------------------------
> >>>>>     #turning ProxyRequests on and allowing proxying from all may
> >>>>> allow #spammers to use your proxy to send email.
> >>>>>
> >>>>>         ProxyRequests Off
> >>>>>
> >>>>>         <Proxy *>
> >>>>>                 AddDefaultCharset off
> >>>>>                 Order deny,allow
> >>>>>                 Allow from all
> >>>>>                 #Allow from .example.com
> >>>>>         </Proxy>
> >>>>>
> >>>>>         # Enable/disable the handling of HTTP/1.1 "Via:" headers.
> >>>>>         # ("Full" adds the server version; "Block" removes all
> >>>>> outgoing Via: headers)
> >>>>>         # Set to one of: Off | On | Full | Block
> >>>>>
> >>>>>         ProxyVia On
> >>>>>
> >>>>> 3. Inside your virtual host config
> >>>>> -----------------------------------
> >>>>>     ProxyPreserveHost On
> >>>>>     proxyPass / ajp://localhost:8009/
> >>>>>     RewriteEngine On
> >>>>>     RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
> >>>>>
> >>>>> That is it you need to make it work.
> >>>>>
> >>>>> Thanks,
> >>>>>
> >>>>> Raj
> >>>>>
> >>>>> Jacques Le Roux wrote:
> >>>>>> >From this blog I'm not sure it's the good solution yet. Do you have
> >>>>>>>
> >>>>>>> valuable experience with it ?
> >>>>>>
> >>>>>> http://getahead.org/blog/joe/2006/02/01/mod_jk_is_dead_long_live_mod
> >>>>>>_p r oxy_ajp.html
> >>>>>>
> >>>>>> Jacques
> >>>>>>
> >>>>>> PS : though this links seem good points :
> >>>>>> http://confluence.atlassian.com/display/DOC/Running+Confluence+behin
> >>>>>>d+ A pache#comment-16121884
> >>>>>> http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html
> >>>>>>
> >>>>>> De : "Raj Saini" <[hidden email]>
> >>>>>>
> >>>>>>> mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is
> >>>>>>> far simpler than mod_jk.
> >>>>>>>
> >>>>>>> Thanks,
> >>>>>>>
> >>>>>>> Raj
> >>>>>>>
> >>>>>>> Gautam Deb wrote:
> >>>>>>>> Yes, it is possible. You can use the *mod_jk* Tomcat-Apache
> >>>>>>>> plug-in that handles the communication between Tomcat and Apache.
> >>>>>>>> You can refer the link
> >>>>>>>> http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
> >>>>>>>>
> >>>>>>>> This way you can route request to the web container.
> >>>>>>>>
> >>>>>>>> Regards,
> >>>>>>>> Gautam Deb
> >>>>>>>>
> >>>>>>>> On 8/12/07, Mathius Allo <[hidden email]> wrote:
> >>>>>>>>> Hi All,
> >>>>>>>>>
> >>>>>>>>>   Is it possible to have a deployment configuration where Apache
> >>>>>>>>> web server being used to route request to the web container?
> >>>>>>>>>
> >>>>>>>>>   How to deploy an OfBiz application within an Application
> >>>>>>>>> Server?
> >>>>>>>>>
> >>>>>>>>>   Thanks in advanced.
> >>>>>>>>>   Mathius
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> ---------------------------------
> >>>>>>>>> Pinpoint customers who are looking for what you sell.


Reply | Threaded
Open this post in threaded view
|

Re: How to configure OFBiz with Apache Web Server or Application Server

rajsaini
It looks your virtual host is default virtual host and it is serving all
the resources. Try posting relevant part of your config file.

Raj

David Goodenough wrote:

> All the <Location> tags are inside a single <VirtualHost *> tag.  
>
> David
>
> On Thursday 27 September 2007, Raj Saini wrote:
>  
>> It is strange. Are you using a main server or virtual host based setup?
>>
>> Thanks,
>>
>> Raj
>>
>> David Goodenough wrote:
>>    
>>> Raj,
>>>
>>> Well actually I am trying to STOP it from serving the images locally, but
>>> rather to pass the request on in the same way that it passes on all the
>>> other requests.  My Ofbiz server is on another machine so I want
>>> everything passed on to that machine.
>>>
>>> My <Location> tag for ofbiz is <Location /ofbiz/> and all the rest have
>>> their own <Location> tags, and none of them mention ofbiz.  As it happens
>>> all the rest are local apps (apt-cacher, trac etc).  There is also not
>>> a directory called /var/www/ofbiz.
>>>
>>> David
>>>
>>> On Thursday 27 September 2007, Raj Saini wrote:
>>>      
>>>> David,
>>>>
>>>> Apache would get confused and it is how this works. If you want Apache
>>>> not to confuse, and want your images to be served without going through
>>>> AJP, change your DocumentRoot of virtual host accordingly. For example
>>>> instead of using DocumentRoot as /var/www/, point it to the base of
>>>> images web application i.e. ${ofbiz_installdir}/framework/images/webapp.
>>>> Apache will server images from this folder.
>>>>
>>>> You can not have a ProxyPass mount point as well as a file or folder
>>>> with same name in your document root.
>>>>
>>>> Thanks,
>>>>
>>>> Raj
>>>>
>>>> Only way you can get
>>>>
>>>> David Goodenough wrote:
>>>>        
>>>>> Did you manage to put it in your FAQ, and is there a URL to that FAQ?
>>>>>
>>>>> I am having problem in that this Apache Web server is also serving a
>>>>> number of other (non Java) things, and when I try to add this ProxyPass
>>>>> it gets confused with the /image files, and tries to get them from
>>>>> /var/www/images which of course does not work.  I tried moving the
>>>>> ProxyPass stuff to the front of the VirtualHost, but that made no
>>>>> difference.
>>>>>
>>>>> David
>>>>>
>>>>> On Sunday 12 August 2007, Jacques Le Roux wrote:
>>>>>          
>>>>>> Thanks a lot Raj,
>>>>>>
>>>>>> I think I will try it soon and hopefully put your tip in "my" FAQ on
>>>>>> Confluence !  It's clearly far easier than mod_jk and moreover if it's
>>>>>> faster then it should be the new way of doing that...
>>>>>>
>>>>>> Jacques
>>>>>>
>>>>>> De : "Raj Saini" <[hidden email]>
>>>>>>
>>>>>>            
>>>>>>> Yes, I have configured our Ofbiz + Apache HTTP 2.2 with
>>>>>>> mod_ajp_proxy. You will need to enable proxy for httpd and
>>>>>>> mod_proxy_ajp within your virtual hosts. I am doing it Debian way.
>>>>>>> For a standard httpd.conf following should work:
>>>>>>>
>>>>>>> 1. Enable mod_proxy and mod_proxy_ajp modules in the Apache.
>>>>>>>
>>>>>>> 2. Somewhere in the global part of httpd.conf
>>>>>>> --------------------------------------------------
>>>>>>>     #turning ProxyRequests on and allowing proxying from all may
>>>>>>> allow #spammers to use your proxy to send email.
>>>>>>>
>>>>>>>         ProxyRequests Off
>>>>>>>
>>>>>>>         <Proxy *>
>>>>>>>                 AddDefaultCharset off
>>>>>>>                 Order deny,allow
>>>>>>>                 Allow from all
>>>>>>>                 #Allow from .example.com
>>>>>>>         </Proxy>
>>>>>>>
>>>>>>>         # Enable/disable the handling of HTTP/1.1 "Via:" headers.
>>>>>>>         # ("Full" adds the server version; "Block" removes all
>>>>>>> outgoing Via: headers)
>>>>>>>         # Set to one of: Off | On | Full | Block
>>>>>>>
>>>>>>>         ProxyVia On
>>>>>>>
>>>>>>> 3. Inside your virtual host config
>>>>>>> -----------------------------------
>>>>>>>     ProxyPreserveHost On
>>>>>>>     proxyPass / ajp://localhost:8009/
>>>>>>>     RewriteEngine On
>>>>>>>     RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
>>>>>>>
>>>>>>> That is it you need to make it work.
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Raj
>>>>>>>
>>>>>>> Jacques Le Roux wrote:
>>>>>>>              
>>>>>>>> >From this blog I'm not sure it's the good solution yet. Do you have
>>>>>>>>                
>>>>>>>>> valuable experience with it ?
>>>>>>>>>                  
>>>>>>>> http://getahead.org/blog/joe/2006/02/01/mod_jk_is_dead_long_live_mod
>>>>>>>> _p r oxy_ajp.html
>>>>>>>>
>>>>>>>> Jacques
>>>>>>>>
>>>>>>>> PS : though this links seem good points :
>>>>>>>> http://confluence.atlassian.com/display/DOC/Running+Confluence+behin
>>>>>>>> d+ A pache#comment-16121884
>>>>>>>> http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html
>>>>>>>>
>>>>>>>> De : "Raj Saini" <[hidden email]>
>>>>>>>>
>>>>>>>>                
>>>>>>>>> mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is
>>>>>>>>> far simpler than mod_jk.
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>>
>>>>>>>>> Raj
>>>>>>>>>
>>>>>>>>> Gautam Deb wrote:
>>>>>>>>>                  
>>>>>>>>>> Yes, it is possible. You can use the *mod_jk* Tomcat-Apache
>>>>>>>>>> plug-in that handles the communication between Tomcat and Apache.
>>>>>>>>>> You can refer the link
>>>>>>>>>> http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
>>>>>>>>>>
>>>>>>>>>> This way you can route request to the web container.
>>>>>>>>>>
>>>>>>>>>> Regards,
>>>>>>>>>> Gautam Deb
>>>>>>>>>>
>>>>>>>>>> On 8/12/07, Mathius Allo <[hidden email]> wrote:
>>>>>>>>>>                    
>>>>>>>>>>> Hi All,
>>>>>>>>>>>
>>>>>>>>>>>   Is it possible to have a deployment configuration where Apache
>>>>>>>>>>> web server being used to route request to the web container?
>>>>>>>>>>>
>>>>>>>>>>>   How to deploy an OfBiz application within an Application
>>>>>>>>>>> Server?
>>>>>>>>>>>
>>>>>>>>>>>   Thanks in advanced.
>>>>>>>>>>>   Mathius
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> ---------------------------------
>>>>>>>>>>> Pinpoint customers who are looking for what you sell.
>>>>>>>>>>>                      
>
>
>
>  

Reply | Threaded
Open this post in threaded view
|

Re: How to configure OFBiz with Apache Web Server or Application Server

David Goodenough
Well the virtual host bit of the config file read:-

  GNU nano 2.0.6                      
File: /etc/apache2/sites-enabled/haddenham.dga.co.uk

<VirtualHost *>
        LogLevel debug

        ProxyPreserveHost On
        <Location /ofbiz >
                ProxyPass ajp://10.0.1.2:8009/
                ProxyPassReverse http://haddenham.dga.co.uk/ofbiz
        </Location>

        Alias /nick/ /home/nick/www/
        Alias /nick-webdav/ /home/nick/www/

        <Location /nick-webdav/ >
                Dav On
                AuthType Digest
                AuthName "Nick WebDAV"
                AuthDigestDomain /nick-webdav/
                AuthDigestProvider file
                AuthUserFile /home/nick/htdigest
                Require valid-user
        </Location>
</VirtualHost>

There are some other <Location> tags, but they are not in a
VirtualHost tag.  Perhaps they should be?

David

On Thursday 27 September 2007, Raj Saini wrote:

> It looks your virtual host is default virtual host and it is serving all
> the resources. Try posting relevant part of your config file.
>
> Raj
>
> David Goodenough wrote:
> > All the <Location> tags are inside a single <VirtualHost *> tag.
> >
> > David
> >
> > On Thursday 27 September 2007, Raj Saini wrote:
> >> It is strange. Are you using a main server or virtual host based setup?
> >>
> >> Thanks,
> >>
> >> Raj
> >>
> >> David Goodenough wrote:
> >>> Raj,
> >>>
> >>> Well actually I am trying to STOP it from serving the images locally,
> >>> but rather to pass the request on in the same way that it passes on all
> >>> the other requests.  My Ofbiz server is on another machine so I want
> >>> everything passed on to that machine.
> >>>
> >>> My <Location> tag for ofbiz is <Location /ofbiz/> and all the rest have
> >>> their own <Location> tags, and none of them mention ofbiz.  As it
> >>> happens all the rest are local apps (apt-cacher, trac etc).  There is
> >>> also not a directory called /var/www/ofbiz.
> >>>
> >>> David
> >>>
> >>> On Thursday 27 September 2007, Raj Saini wrote:
> >>>> David,
> >>>>
> >>>> Apache would get confused and it is how this works. If you want Apache
> >>>> not to confuse, and want your images to be served without going
> >>>> through AJP, change your DocumentRoot of virtual host accordingly. For
> >>>> example instead of using DocumentRoot as /var/www/, point it to the
> >>>> base of images web application i.e.
> >>>> ${ofbiz_installdir}/framework/images/webapp. Apache will server images
> >>>> from this folder.
> >>>>
> >>>> You can not have a ProxyPass mount point as well as a file or folder
> >>>> with same name in your document root.
> >>>>
> >>>> Thanks,
> >>>>
> >>>> Raj
> >>>>
> >>>> Only way you can get
> >>>>
> >>>> David Goodenough wrote:
> >>>>> Did you manage to put it in your FAQ, and is there a URL to that FAQ?
> >>>>>
> >>>>> I am having problem in that this Apache Web server is also serving a
> >>>>> number of other (non Java) things, and when I try to add this
> >>>>> ProxyPass it gets confused with the /image files, and tries to get
> >>>>> them from /var/www/images which of course does not work.  I tried
> >>>>> moving the ProxyPass stuff to the front of the VirtualHost, but that
> >>>>> made no difference.
> >>>>>
> >>>>> David
> >>>>>
> >>>>> On Sunday 12 August 2007, Jacques Le Roux wrote:
> >>>>>> Thanks a lot Raj,
> >>>>>>
> >>>>>> I think I will try it soon and hopefully put your tip in "my" FAQ on
> >>>>>> Confluence !  It's clearly far easier than mod_jk and moreover if
> >>>>>> it's faster then it should be the new way of doing that...
> >>>>>>
> >>>>>> Jacques
> >>>>>>
> >>>>>> De : "Raj Saini" <[hidden email]>
> >>>>>>
> >>>>>>> Yes, I have configured our Ofbiz + Apache HTTP 2.2 with
> >>>>>>> mod_ajp_proxy. You will need to enable proxy for httpd and
> >>>>>>> mod_proxy_ajp within your virtual hosts. I am doing it Debian way.
> >>>>>>> For a standard httpd.conf following should work:
> >>>>>>>
> >>>>>>> 1. Enable mod_proxy and mod_proxy_ajp modules in the Apache.
> >>>>>>>
> >>>>>>> 2. Somewhere in the global part of httpd.conf
> >>>>>>> --------------------------------------------------
> >>>>>>>     #turning ProxyRequests on and allowing proxying from all may
> >>>>>>> allow #spammers to use your proxy to send email.
> >>>>>>>
> >>>>>>>         ProxyRequests Off
> >>>>>>>
> >>>>>>>         <Proxy *>
> >>>>>>>                 AddDefaultCharset off
> >>>>>>>                 Order deny,allow
> >>>>>>>                 Allow from all
> >>>>>>>                 #Allow from .example.com
> >>>>>>>         </Proxy>
> >>>>>>>
> >>>>>>>         # Enable/disable the handling of HTTP/1.1 "Via:" headers.
> >>>>>>>         # ("Full" adds the server version; "Block" removes all
> >>>>>>> outgoing Via: headers)
> >>>>>>>         # Set to one of: Off | On | Full | Block
> >>>>>>>
> >>>>>>>         ProxyVia On
> >>>>>>>
> >>>>>>> 3. Inside your virtual host config
> >>>>>>> -----------------------------------
> >>>>>>>     ProxyPreserveHost On
> >>>>>>>     proxyPass / ajp://localhost:8009/
> >>>>>>>     RewriteEngine On
> >>>>>>>     RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
> >>>>>>>
> >>>>>>> That is it you need to make it work.
> >>>>>>>
> >>>>>>> Thanks,
> >>>>>>>
> >>>>>>> Raj
> >>>>>>>
> >>>>>>> Jacques Le Roux wrote:
> >>>>>>>> >From this blog I'm not sure it's the good solution yet. Do you
> >>>>>>>> > have
> >>>>>>>>>
> >>>>>>>>> valuable experience with it ?
> >>>>>>>>
> >>>>>>>> http://getahead.org/blog/joe/2006/02/01/mod_jk_is_dead_long_live_m
> >>>>>>>>od _p r oxy_ajp.html
> >>>>>>>>
> >>>>>>>> Jacques
> >>>>>>>>
> >>>>>>>> PS : though this links seem good points :
> >>>>>>>> http://confluence.atlassian.com/display/DOC/Running+Confluence+beh
> >>>>>>>>in d+ A pache#comment-16121884
> >>>>>>>> http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html
> >>>>>>>>
> >>>>>>>> De : "Raj Saini" <[hidden email]>
> >>>>>>>>
> >>>>>>>>> mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is
> >>>>>>>>> far simpler than mod_jk.
> >>>>>>>>>
> >>>>>>>>> Thanks,
> >>>>>>>>>
> >>>>>>>>> Raj
> >>>>>>>>>
> >>>>>>>>> Gautam Deb wrote:
> >>>>>>>>>> Yes, it is possible. You can use the *mod_jk* Tomcat-Apache
> >>>>>>>>>> plug-in that handles the communication between Tomcat and
> >>>>>>>>>> Apache. You can refer the link
> >>>>>>>>>> http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
> >>>>>>>>>>
> >>>>>>>>>> This way you can route request to the web container.
> >>>>>>>>>>
> >>>>>>>>>> Regards,
> >>>>>>>>>> Gautam Deb
> >>>>>>>>>>
> >>>>>>>>>> On 8/12/07, Mathius Allo <[hidden email]> wrote:
> >>>>>>>>>>> Hi All,
> >>>>>>>>>>>
> >>>>>>>>>>>   Is it possible to have a deployment configuration where
> >>>>>>>>>>> Apache web server being used to route request to the web
> >>>>>>>>>>> container?
> >>>>>>>>>>>
> >>>>>>>>>>>   How to deploy an OfBiz application within an Application
> >>>>>>>>>>> Server?
> >>>>>>>>>>>
> >>>>>>>>>>>   Thanks in advanced.
> >>>>>>>>>>>   Mathius
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> ---------------------------------
> >>>>>>>>>>> Pinpoint customers who are looking for what you sell.


Reply | Threaded
Open this post in threaded view
|

Quantity discount pricing

SkipDever
In reply to this post by David Goodenough
Can someone tell me how to implement quantity price breaks?  I somehow
thought there a "minOrderQuantity" field and "QTY_DISCOUNT_PRICE", and
"QTY_DISCOUNT_PERCENTAGE"  productPriceTypeIds, in ProductPrice, but I can't
seem to find them now.

I am looking in PriceServices.java and there seems to be some support for
quantity breaks using ProductPriceRule, but because
"optimizeForLargeRuleSet" is hardcoded "false" with no way to change it, it
looks to me like it will be impossibly slow because EVERY product for the
current customer has two price breaks (thats a total of 140,000+ price rules
to sort through).

Can someone offer guidance or should I modify ProductPrice to suite my needs
and hope that you guys will roll it back in.

Skip

Reply | Threaded
Open this post in threaded view
|

Re: Quantity discount pricing

Walter Vaughan
skip@theDevers wrote:

> Can someone tell me how to implement quantity price breaks?  I somehow
> thought there a "minOrderQuantity" field and "QTY_DISCOUNT_PRICE", and
> "QTY_DISCOUNT_PERCENTAGE"  productPriceTypeIds, in ProductPrice, but I can't
> seem to find them now.
>
> I am looking in PriceServices.java and there seems to be some support for
> quantity breaks using ProductPriceRule, but because
> "optimizeForLargeRuleSet" is hardcoded "false" with no way to change it, it
> looks to me like it will be impossibly slow because EVERY product for the
> current customer has two price breaks (thats a total of 140,000+ price rules
> to sort through).

I'm guessing Price Rules could work. Are the quantity breaks random, or is
logical? I mean 1-5qty Full Price, 6-9qty 10% off, 10 or more 15% off?
Or is it more insane like productId A is 1-5, productId B is 1-3? Z 1-500?
Even if appears random, is there some sort of pattern from which you could
create groups (Product Classifications)?
Product Classifications can be your friend. We have thousands of Product
Classifications, yet only a handful of price rules.

In case you didn't realize it price rules add together, and you may have to
create offseting rules to get the price where you want it.

> Can someone offer guidance or should I modify ProductPrice to suite my needs
> and hope that you guys will roll it back in.
>
> Skip
>
>
>

Reply | Threaded
Open this post in threaded view
|

RE: Quantity discount pricing

SkipDever
They are not random. Mostly like < 10 = list, 10 - 50 = price y, 51+ = price
z, and then a few odd balls.  However, I am betting that the resulting price
breaks are based on an underlying percentage.   I am importing price1 - 3,
and qty1 - qty3.

List, y and z vary greatly from one product to the next.

Too bad it's not a fixed percentage, that would be pretty easy.


More importantly, I have to import these prices into Ofbiz along with my
inventory import, so it would be helpful to know the entities involved.

I was thinking of adding a fromQty and thruQty to PriceRule.  That would
make it dead simple.  Alternatively, I could add a QuantityBreak entity
similiar to page 88 of the Data Model Resource Book, but it seems sensless
to create a whole new entity when two fields in ProductPrice would do it.

-----Original Message-----
From: Walter Vaughan [mailto:[hidden email]]
Sent: Thursday, September 27, 2007 7:19 PM
To: [hidden email]
Subject: Re: Quantity discount pricing


skip@theDevers wrote:

> Can someone tell me how to implement quantity price breaks?  I somehow
> thought there a "minOrderQuantity" field and "QTY_DISCOUNT_PRICE", and
> "QTY_DISCOUNT_PERCENTAGE"  productPriceTypeIds, in ProductPrice, but I
can't
> seem to find them now.
>
> I am looking in PriceServices.java and there seems to be some support for
> quantity breaks using ProductPriceRule, but because
> "optimizeForLargeRuleSet" is hardcoded "false" with no way to change it,
it
> looks to me like it will be impossibly slow because EVERY product for the
> current customer has two price breaks (thats a total of 140,000+ price
rules
> to sort through).

I'm guessing Price Rules could work. Are the quantity breaks random, or is
logical? I mean 1-5qty Full Price, 6-9qty 10% off, 10 or more 15% off?
Or is it more insane like productId A is 1-5, productId B is 1-3? Z 1-500?
Even if appears random, is there some sort of pattern from which you could
create groups (Product Classifications)?
Product Classifications can be your friend. We have thousands of Product
Classifications, yet only a handful of price rules.

In case you didn't realize it price rules add together, and you may have to
create offseting rules to get the price where you want it.

> Can someone offer guidance or should I modify ProductPrice to suite my
needs
> and hope that you guys will roll it back in.
>
> Skip
>
>
>


Reply | Threaded
Open this post in threaded view
|

Stumped on a complicated question

SkipDever
In reply to this post by Walter Vaughan
I am getting the following error:

java.lang.ClassNotFoundException:
org.ofbiz.service.engine.StandardJavaEngine

On this line 81 of
org.ofbiz.service.engine.GenericEngineFactory.getGenericEngine:

  Class c = loader.loadClass(className);


I am running ofbiz as a standalone app, similiar to java ofbiz.jar -pos

I don't get this problem when I run Ofbiz normally using the same "login"
service.

Somehow, it appears as if ofbiz-service.jar is not on the class path or
cannot be accessed.  I even went so far as to copy it into my lib directory
with my jar file where it is referenced by my ofbiz-component.xml as:

    <classpath type="jar" location="dist/*"/>
    <classpath type="jar" location="dist/lib/*"/>

No joy.  I am referencing lots of other Ofbiz jar files and they all load
just fine, for example ofbiz-base.jar, ofbiz-security.jar, and
ofbiz-party.jar.  For some reason, the class loader will not load the
service engine.  I only get a problem when I try to call a service with
"dispatcher.runSync()".  I have been successfully reading and writing the
the database via GenericDelegator without problem.  Just when I try to run a
service.

This is running under windows, jdk 1.5 and the Ofbiz version of a week ago.

For completeness, here is my containers.xml file:

<ofbiz-containers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/ofbiz-containers.xs
d">
    <!-- load the ofbiz component container (always first) -->
    <container name="component-container"
class="org.ofbiz.base.container.ComponentContainer"/>

    <!-- load the cached classloader container (always second) -->
    <container name="classloader-container"
class="org.ofbiz.base.container.ClassLoaderContainer"/>

    <!-- load the FS Sales Order Entry GUI -->
    <container name="fssoe-container" class="com.fs.FSSoeContainer">
        <property name="startup-directory"
value="/specialpurpose/fs/config/"/>
        <property name="dispatcher-name" value="FSSoeDispatcher"/>
        <property name="delegator-name" value="default"/>
    </container>

</ofbiz-containers>

Anyone have a clue.  I'd hate to do this thing entirely without using the
Ofbiz services.

Skip


Reply | Threaded
Open this post in threaded view
|

Re: Stumped on a complicated question

BJ Freeman
would seem you don't have a classpath to the service engine.

skip@theDevers sent the following on 9/27/2007 10:30 PM:

> I am getting the following error:
>
> java.lang.ClassNotFoundException:
> org.ofbiz.service.engine.StandardJavaEngine
>
> On this line 81 of
> org.ofbiz.service.engine.GenericEngineFactory.getGenericEngine:
>
>   Class c = loader.loadClass(className);
>
>
> I am running ofbiz as a standalone app, similiar to java ofbiz.jar -pos
>
> I don't get this problem when I run Ofbiz normally using the same "login"
> service.
>
> Somehow, it appears as if ofbiz-service.jar is not on the class path or
> cannot be accessed.  I even went so far as to copy it into my lib directory
> with my jar file where it is referenced by my ofbiz-component.xml as:
>
>     <classpath type="jar" location="dist/*"/>
>     <classpath type="jar" location="dist/lib/*"/>
>
> No joy.  I am referencing lots of other Ofbiz jar files and they all load
> just fine, for example ofbiz-base.jar, ofbiz-security.jar, and
> ofbiz-party.jar.  For some reason, the class loader will not load the
> service engine.  I only get a problem when I try to call a service with
> "dispatcher.runSync()".  I have been successfully reading and writing the
> the database via GenericDelegator without problem.  Just when I try to run a
> service.
>
> This is running under windows, jdk 1.5 and the Ofbiz version of a week ago.
>
> For completeness, here is my containers.xml file:
>
> <ofbiz-containers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
> xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/ofbiz-containers.xs
> d">
>     <!-- load the ofbiz component container (always first) -->
>     <container name="component-container"
> class="org.ofbiz.base.container.ComponentContainer"/>
>
>     <!-- load the cached classloader container (always second) -->
>     <container name="classloader-container"
> class="org.ofbiz.base.container.ClassLoaderContainer"/>
>
>     <!-- load the FS Sales Order Entry GUI -->
>     <container name="fssoe-container" class="com.fs.FSSoeContainer">
>         <property name="startup-directory"
> value="/specialpurpose/fs/config/"/>
>         <property name="dispatcher-name" value="FSSoeDispatcher"/>
>         <property name="delegator-name" value="default"/>
>     </container>
>
> </ofbiz-containers>
>
> Anyone have a clue.  I'd hate to do this thing entirely without using the
> Ofbiz services.
>
> Skip
>
>
>
>
>
Reply | Threaded
Open this post in threaded view
|

RE: Stumped on a complicated question

SkipDever
Yep, I gathered that.  Note that the class loader is retrieved with:

 ClassLoader loader = Thread.currentThread().getContextClassLoader();

I am guessing that the GUI thread does not have the application classpath.
The question is, how to give it.  At runtime, I know exactly where all these
jar file are.

Skip

-----Original Message-----
From: BJ Freeman [mailto:[hidden email]]
Sent: Friday, September 28, 2007 1:44 AM
To: [hidden email]
Subject: Re: Stumped on a complicated question


would seem you don't have a classpath to the service engine.

skip@theDevers sent the following on 9/27/2007 10:30 PM:

> I am getting the following error:
>
> java.lang.ClassNotFoundException:
> org.ofbiz.service.engine.StandardJavaEngine
>
> On this line 81 of
> org.ofbiz.service.engine.GenericEngineFactory.getGenericEngine:
>
>   Class c = loader.loadClass(className);
>
>
> I am running ofbiz as a standalone app, similiar to java ofbiz.jar -pos
>
> I don't get this problem when I run Ofbiz normally using the same "login"
> service.
>
> Somehow, it appears as if ofbiz-service.jar is not on the class path or
> cannot be accessed.  I even went so far as to copy it into my lib
directory

> with my jar file where it is referenced by my ofbiz-component.xml as:
>
>     <classpath type="jar" location="dist/*"/>
>     <classpath type="jar" location="dist/lib/*"/>
>
> No joy.  I am referencing lots of other Ofbiz jar files and they all load
> just fine, for example ofbiz-base.jar, ofbiz-security.jar, and
> ofbiz-party.jar.  For some reason, the class loader will not load the
> service engine.  I only get a problem when I try to call a service with
> "dispatcher.runSync()".  I have been successfully reading and writing the
> the database via GenericDelegator without problem.  Just when I try to run
a
> service.
>
> This is running under windows, jdk 1.5 and the Ofbiz version of a week
ago.
>
> For completeness, here is my containers.xml file:
>
> <ofbiz-containers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
>
xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/ofbiz-containers.xs

> d">
>     <!-- load the ofbiz component container (always first) -->
>     <container name="component-container"
> class="org.ofbiz.base.container.ComponentContainer"/>
>
>     <!-- load the cached classloader container (always second) -->
>     <container name="classloader-container"
> class="org.ofbiz.base.container.ClassLoaderContainer"/>
>
>     <!-- load the FS Sales Order Entry GUI -->
>     <container name="fssoe-container" class="com.fs.FSSoeContainer">
>         <property name="startup-directory"
> value="/specialpurpose/fs/config/"/>
>         <property name="dispatcher-name" value="FSSoeDispatcher"/>
>         <property name="delegator-name" value="default"/>
>     </container>
>
> </ofbiz-containers>
>
> Anyone have a clue.  I'd hate to do this thing entirely without using the
> Ofbiz services.
>
> Skip
>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Stumped on a complicated question

BJ Freeman
did you check the log to see of services is getting loaded.
(main) [            UtilXml.java:243:DEBUG] XML Read 0.047s:
file:/C:/projects/java/digiresourcesllc/framework/service/ofbiz-component.xml
(main) [ ComponentContainer.java:207:INFO ] Loading component : [service]


skip@theDevers sent the following on 9/28/2007 6:25 AM:

> Yep, I gathered that.  Note that the class loader is retrieved with:
>
>  ClassLoader loader = Thread.currentThread().getContextClassLoader();
>
> I am guessing that the GUI thread does not have the application classpath.
> The question is, how to give it.  At runtime, I know exactly where all these
> jar file are.
>
> Skip
>
> -----Original Message-----
> From: BJ Freeman [mailto:[hidden email]]
> Sent: Friday, September 28, 2007 1:44 AM
> To: [hidden email]
> Subject: Re: Stumped on a complicated question
>
>
> would seem you don't have a classpath to the service engine.
>
> skip@theDevers sent the following on 9/27/2007 10:30 PM:
>> I am getting the following error:
>>
>> java.lang.ClassNotFoundException:
>> org.ofbiz.service.engine.StandardJavaEngine
>>
>> On this line 81 of
>> org.ofbiz.service.engine.GenericEngineFactory.getGenericEngine:
>>
>>   Class c = loader.loadClass(className);
>>
>>
>> I am running ofbiz as a standalone app, similiar to java ofbiz.jar -pos
>>
>> I don't get this problem when I run Ofbiz normally using the same "login"
>> service.
>>
>> Somehow, it appears as if ofbiz-service.jar is not on the class path or
>> cannot be accessed.  I even went so far as to copy it into my lib
> directory
>> with my jar file where it is referenced by my ofbiz-component.xml as:
>>
>>     <classpath type="jar" location="dist/*"/>
>>     <classpath type="jar" location="dist/lib/*"/>
>>
>> No joy.  I am referencing lots of other Ofbiz jar files and they all load
>> just fine, for example ofbiz-base.jar, ofbiz-security.jar, and
>> ofbiz-party.jar.  For some reason, the class loader will not load the
>> service engine.  I only get a problem when I try to call a service with
>> "dispatcher.runSync()".  I have been successfully reading and writing the
>> the database via GenericDelegator without problem.  Just when I try to run
> a
>> service.
>>
>> This is running under windows, jdk 1.5 and the Ofbiz version of a week
> ago.
>> For completeness, here is my containers.xml file:
>>
>> <ofbiz-containers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>
>>
> xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/ofbiz-containers.xs
>> d">
>>     <!-- load the ofbiz component container (always first) -->
>>     <container name="component-container"
>> class="org.ofbiz.base.container.ComponentContainer"/>
>>
>>     <!-- load the cached classloader container (always second) -->
>>     <container name="classloader-container"
>> class="org.ofbiz.base.container.ClassLoaderContainer"/>
>>
>>     <!-- load the FS Sales Order Entry GUI -->
>>     <container name="fssoe-container" class="com.fs.FSSoeContainer">
>>         <property name="startup-directory"
>> value="/specialpurpose/fs/config/"/>
>>         <property name="dispatcher-name" value="FSSoeDispatcher"/>
>>         <property name="delegator-name" value="default"/>
>>     </container>
>>
>> </ofbiz-containers>
>>
>> Anyone have a clue.  I'd hate to do this thing entirely without using the
>> Ofbiz services.
>>
>> Skip
>>
>>
>>
>>
>>
>
>
>
>
Reply | Threaded
Open this post in threaded view
|

RE: Stumped on a complicated question

SkipDever
BJ

I'll check this, but I think I have figured out a way.  The classloader of
the thread that instantiates my container has the necessary url's.  However,
because this is a java -jar startup, classpath is ignored by the default
classloader.

So, (I think), all I gotta do is call ClassLoader.getURLs() from the Ofbiz
thread, save them away, then call addURL(URL url) on the gui thread to add
them in.  I know addURL(URL url) is protected, but I am pretty sure I know
how to get around that.  Unfortunately, I am at my main job now and cant try
it out.  Can't wait to get home to give it a go.

Skip

-----Original Message-----
From: BJ Freeman [mailto:[hidden email]]
Sent: Friday, September 28, 2007 8:22 AM
To: [hidden email]
Subject: Re: Stumped on a complicated question


did you check the log to see of services is getting loaded.
(main) [            UtilXml.java:243:DEBUG] XML Read 0.047s:
file:/C:/projects/java/digiresourcesllc/framework/service/ofbiz-component.xm
l
(main) [ ComponentContainer.java:207:INFO ] Loading component : [service]


skip@theDevers sent the following on 9/28/2007 6:25 AM:
> Yep, I gathered that.  Note that the class loader is retrieved with:
>
>  ClassLoader loader = Thread.currentThread().getContextClassLoader();
>
> I am guessing that the GUI thread does not have the application classpath.
> The question is, how to give it.  At runtime, I know exactly where all
these

> jar file are.
>
> Skip
>
> -----Original Message-----
> From: BJ Freeman [mailto:[hidden email]]
> Sent: Friday, September 28, 2007 1:44 AM
> To: [hidden email]
> Subject: Re: Stumped on a complicated question
>
>
> would seem you don't have a classpath to the service engine.
>
> skip@theDevers sent the following on 9/27/2007 10:30 PM:
>> I am getting the following error:
>>
>> java.lang.ClassNotFoundException:
>> org.ofbiz.service.engine.StandardJavaEngine
>>
>> On this line 81 of
>> org.ofbiz.service.engine.GenericEngineFactory.getGenericEngine:
>>
>>   Class c = loader.loadClass(className);
>>
>>
>> I am running ofbiz as a standalone app, similiar to java ofbiz.jar -pos
>>
>> I don't get this problem when I run Ofbiz normally using the same "login"
>> service.
>>
>> Somehow, it appears as if ofbiz-service.jar is not on the class path or
>> cannot be accessed.  I even went so far as to copy it into my lib
> directory
>> with my jar file where it is referenced by my ofbiz-component.xml as:
>>
>>     <classpath type="jar" location="dist/*"/>
>>     <classpath type="jar" location="dist/lib/*"/>
>>
>> No joy.  I am referencing lots of other Ofbiz jar files and they all load
>> just fine, for example ofbiz-base.jar, ofbiz-security.jar, and
>> ofbiz-party.jar.  For some reason, the class loader will not load the
>> service engine.  I only get a problem when I try to call a service with
>> "dispatcher.runSync()".  I have been successfully reading and writing the
>> the database via GenericDelegator without problem.  Just when I try to
run

> a
>> service.
>>
>> This is running under windows, jdk 1.5 and the Ofbiz version of a week
> ago.
>> For completeness, here is my containers.xml file:
>>
>> <ofbiz-containers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>
>>
>
xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/ofbiz-containers.xs

>> d">
>>     <!-- load the ofbiz component container (always first) -->
>>     <container name="component-container"
>> class="org.ofbiz.base.container.ComponentContainer"/>
>>
>>     <!-- load the cached classloader container (always second) -->
>>     <container name="classloader-container"
>> class="org.ofbiz.base.container.ClassLoaderContainer"/>
>>
>>     <!-- load the FS Sales Order Entry GUI -->
>>     <container name="fssoe-container" class="com.fs.FSSoeContainer">
>>         <property name="startup-directory"
>> value="/specialpurpose/fs/config/"/>
>>         <property name="dispatcher-name" value="FSSoeDispatcher"/>
>>         <property name="delegator-name" value="default"/>
>>     </container>
>>
>> </ofbiz-containers>
>>
>> Anyone have a clue.  I'd hate to do this thing entirely without using the
>> Ofbiz services.
>>
>> Skip
>>
>>
>>
>>
>>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Stumped on a complicated question

BJ Freeman
Oh your doing custom stuff.
can't help there.

Skip sent the following on 9/28/2007 9:15 AM:

> BJ
>
> I'll check this, but I think I have figured out a way.  The classloader of
> the thread that instantiates my container has the necessary url's.  However,
> because this is a java -jar startup, classpath is ignored by the default
> classloader.
>
> So, (I think), all I gotta do is call ClassLoader.getURLs() from the Ofbiz
> thread, save them away, then call addURL(URL url) on the gui thread to add
> them in.  I know addURL(URL url) is protected, but I am pretty sure I know
> how to get around that.  Unfortunately, I am at my main job now and cant try
> it out.  Can't wait to get home to give it a go.
>
> Skip
>
> -----Original Message-----
> From: BJ Freeman [mailto:[hidden email]]
> Sent: Friday, September 28, 2007 8:22 AM
> To: [hidden email]
> Subject: Re: Stumped on a complicated question
>
>
> did you check the log to see of services is getting loaded.
> (main) [            UtilXml.java:243:DEBUG] XML Read 0.047s:
> file:/C:/projects/java/digiresourcesllc/framework/service/ofbiz-component.xm
> l
> (main) [ ComponentContainer.java:207:INFO ] Loading component : [service]
>
>
> skip@theDevers sent the following on 9/28/2007 6:25 AM:
>> Yep, I gathered that.  Note that the class loader is retrieved with:
>>
>>  ClassLoader loader = Thread.currentThread().getContextClassLoader();
>>
>> I am guessing that the GUI thread does not have the application classpath.
>> The question is, how to give it.  At runtime, I know exactly where all
> these
>> jar file are.
>>
>> Skip
>>
>> -----Original Message-----
>> From: BJ Freeman [mailto:[hidden email]]
>> Sent: Friday, September 28, 2007 1:44 AM
>> To: [hidden email]
>> Subject: Re: Stumped on a complicated question
>>
>>
>> would seem you don't have a classpath to the service engine.
>>
>> skip@theDevers sent the following on 9/27/2007 10:30 PM:
>>> I am getting the following error:
>>>
>>> java.lang.ClassNotFoundException:
>>> org.ofbiz.service.engine.StandardJavaEngine
>>>
>>> On this line 81 of
>>> org.ofbiz.service.engine.GenericEngineFactory.getGenericEngine:
>>>
>>>   Class c = loader.loadClass(className);
>>>
>>>
>>> I am running ofbiz as a standalone app, similiar to java ofbiz.jar -pos
>>>
>>> I don't get this problem when I run Ofbiz normally using the same "login"
>>> service.
>>>
>>> Somehow, it appears as if ofbiz-service.jar is not on the class path or
>>> cannot be accessed.  I even went so far as to copy it into my lib
>> directory
>>> with my jar file where it is referenced by my ofbiz-component.xml as:
>>>
>>>     <classpath type="jar" location="dist/*"/>
>>>     <classpath type="jar" location="dist/lib/*"/>
>>>
>>> No joy.  I am referencing lots of other Ofbiz jar files and they all load
>>> just fine, for example ofbiz-base.jar, ofbiz-security.jar, and
>>> ofbiz-party.jar.  For some reason, the class loader will not load the
>>> service engine.  I only get a problem when I try to call a service with
>>> "dispatcher.runSync()".  I have been successfully reading and writing the
>>> the database via GenericDelegator without problem.  Just when I try to
> run
>> a
>>> service.
>>>
>>> This is running under windows, jdk 1.5 and the Ofbiz version of a week
>> ago.
>>> For completeness, here is my containers.xml file:
>>>
>>> <ofbiz-containers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>
>>>
> xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/ofbiz-containers.xs
>>> d">
>>>     <!-- load the ofbiz component container (always first) -->
>>>     <container name="component-container"
>>> class="org.ofbiz.base.container.ComponentContainer"/>
>>>
>>>     <!-- load the cached classloader container (always second) -->
>>>     <container name="classloader-container"
>>> class="org.ofbiz.base.container.ClassLoaderContainer"/>
>>>
>>>     <!-- load the FS Sales Order Entry GUI -->
>>>     <container name="fssoe-container" class="com.fs.FSSoeContainer">
>>>         <property name="startup-directory"
>>> value="/specialpurpose/fs/config/"/>
>>>         <property name="dispatcher-name" value="FSSoeDispatcher"/>
>>>         <property name="delegator-name" value="default"/>
>>>     </container>
>>>
>>> </ofbiz-containers>
>>>
>>> Anyone have a clue.  I'd hate to do this thing entirely without using the
>>> Ofbiz services.
>>>
>>> Skip
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>
>
>
>
Reply | Threaded
Open this post in threaded view
|

RE: Stumped on a complicated question

SkipDever
In reply to this post by BJ Freeman
For those of you who are interested in this low level stuff, here is a
solution to the classpath issue.  If anyone wants ClassPathUpdate class,
just shoot me an email:

public class main
{
        public main(String[] args)
        {

                ClassLoader loader = ClassLoader.getSystemClassLoader();
                if(loader instanceof URLClassLoader)
                {
                        //For convenience so we don't have to cast everything
                        URLClassLoader urlLoader = (URLClassLoader)loader;

                        //Get the existing jars in the class path and show them
                        URL [] urls = urlLoader.getURLs();
                        showUrls(urls, "Before");

                        System.out.println("Trying to add url
C:\\jdk1.5\\jre\\lib\\ext.sav\\servlet.jar");
                        try
                        {
                                //Add a new one
                                ClassPathUpdater.addFile("C:\\jdk1.5\\jre\\lib\\ext.sav\\servlet.jar",
urlLoader);
                                System.out.println("!!!!!Success");

                                //Show the results after
                                urls = urlLoader.getURLs();
                                showUrls(urls, "\nAfter");
                        }
                        catch(Exception e)
                        {
                                e.printStackTrace();
                        }

                }
                else
                {
                        System.out.println(loader.getClass().getName() + " is not a
URLClassLoader");
                }
        }
        ....


And here is the results of the run,  Note that the added file "servlet.jar"
is now in the classpath in the "After" block:

...test>java -cp test.jar main
Before, Got 1 URLs = :
URL[0] = file:/D:/JavaProjects/ClassLoader/test/test.jar

Trying to add url C:\jdk1.5\jre\lib\ext.sav\servlet.jar
!!!!!Success

After, Got 2 URLs = :
URL[0] = file:/D:/JavaProjects/ClassLoader/test/test.jar
URL[1] = file:/C:/jdk1.5/jre/lib/ext.sav/servlet.jar





> skip@theDevers sent the following on 9/27/2007 10:30 PM:
>> I am getting the following error:
>>
>> java.lang.ClassNotFoundException:
>> org.ofbiz.service.engine.StandardJavaEngine
>>
>> On this line 81 of
>> org.ofbiz.service.engine.GenericEngineFactory.getGenericEngine:
>>
>>   Class c = loader.loadClass(className);
>>
>>
>> I am running ofbiz as a standalone app, similiar to java ofbiz.jar -pos
>>
>> I don't get this problem when I run Ofbiz normally using the same "login"
>> service.
>>
>> Somehow, it appears as if ofbiz-service.jar is not on the class path or
>> cannot be accessed.  I even went so far as to copy it into my lib
> directory
>> with my jar file where it is referenced by my ofbiz-component.xml as:
>>
>>     <classpath type="jar" location="dist/*"/>
>>     <classpath type="jar" location="dist/lib/*"/>
>>
>> No joy.  I am referencing lots of other Ofbiz jar files and they all load
>> just fine, for example ofbiz-base.jar, ofbiz-security.jar, and
>> ofbiz-party.jar.  For some reason, the class loader will not load the
>> service engine.  I only get a problem when I try to call a service with
>> "dispatcher.runSync()".  I have been successfully reading and writing the
>> the database via GenericDelegator without problem.  Just when I try to
run

> a
>> service.
>>
>> This is running under windows, jdk 1.5 and the Ofbiz version of a week
> ago.
>> For completeness, here is my containers.xml file:
>>
>> <ofbiz-containers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>
>>
>
xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/ofbiz-containers.xs

>> d">
>>     <!-- load the ofbiz component container (always first) -->
>>     <container name="component-container"
>> class="org.ofbiz.base.container.ComponentContainer"/>
>>
>>     <!-- load the cached classloader container (always second) -->
>>     <container name="classloader-container"
>> class="org.ofbiz.base.container.ClassLoaderContainer"/>
>>
>>     <!-- load the FS Sales Order Entry GUI -->
>>     <container name="fssoe-container" class="com.fs.FSSoeContainer">
>>         <property name="startup-directory"
>> value="/specialpurpose/fs/config/"/>
>>         <property name="dispatcher-name" value="FSSoeDispatcher"/>
>>         <property name="delegator-name" value="default"/>
>>     </container>
>>
>> </ofbiz-containers>
>>
>> Anyone have a clue.  I'd hate to do this thing entirely without using the
>> Ofbiz services.
>>
>> Skip
>>
>>
>>
>>
>>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: How to configure OFBiz with Apache Web Server or Application Server

Jacques Le Roux
Administrator
In reply to this post by Jacques Le Roux
For those interested, here is the tip
http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-HTTPD

Jacques

From: "Jacques Le Roux" <[hidden email]>
Sent: Thursday, September 27, 2007 7:20 PM

> Not yet, I want to test it before (on Windows and Linux) but there are always more important things to do...
>
> The FAQ URL is http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Cookbook+-+How+to++%28work+in+progress%29
>
> Did you try Raj's tip below ?
>
> Jacques
>
>
>> Did you manage to put it in your FAQ, and is there a URL to that FAQ?
>>
>> I am having problem in that this Apache Web server is also serving a number
>> of other (non Java) things, and when I try to add this ProxyPass it gets
>> confused with the /image files, and tries to get them from /var/www/images
>> which of course does not work.  I tried moving the ProxyPass stuff to the
>> front of the VirtualHost, but that made no difference.
>>
>> David
>>
>> On Sunday 12 August 2007, Jacques Le Roux wrote:
>> > Thanks a lot Raj,
>> >
>> > I think I will try it soon and hopefully put your tip in "my" FAQ on
>> > Confluence !  It's clearly far easier than mod_jk and moreover if it's
>> > faster then it should be the new way of doing that...
>> >
>> > Jacques
>> >
>> > De : "Raj Saini" <[hidden email]>
>> >
>> > > Yes, I have configured our Ofbiz + Apache HTTP 2.2 with mod_ajp_proxy.
>> > > You will need to enable proxy for httpd and  mod_proxy_ajp within your
>> > > virtual hosts. I am doing it Debian way. For a standard httpd.conf
>> > > following should work:
>> > >
>> > > 1. Enable mod_proxy and mod_proxy_ajp modules in the Apache.
>> > >
>> > > 2. Somewhere in the global part of httpd.conf
>> > > --------------------------------------------------
>> > >     #turning ProxyRequests on and allowing proxying from all may allow
>> > >         #spammers to use your proxy to send email.
>> > >
>> > >         ProxyRequests Off
>> > >
>> > >         <Proxy *>
>> > >                 AddDefaultCharset off
>> > >                 Order deny,allow
>> > >                 Allow from all
>> > >                 #Allow from .example.com
>> > >         </Proxy>
>> > >
>> > >         # Enable/disable the handling of HTTP/1.1 "Via:" headers.
>> > >         # ("Full" adds the server version; "Block" removes all outgoing
>> > > Via: headers)
>> > >         # Set to one of: Off | On | Full | Block
>> > >
>> > >         ProxyVia On
>> > >
>> > > 3. Inside your virtual host config
>> > > -----------------------------------
>> > >     ProxyPreserveHost On
>> > >     proxyPass / ajp://localhost:8009/
>> > >     RewriteEngine On
>> > >     RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
>> > >
>> > > That is it you need to make it work.
>> > >
>> > > Thanks,
>> > >
>> > > Raj
>> > >
>> > > Jacques Le Roux wrote:
>> > > > >From this blog I'm not sure it's the good solution yet. Do you have
>> > > > > valuable experience with it ?
>> > > >
>> > > > http://getahead.org/blog/joe/2006/02/01/mod_jk_is_dead_long_live_mod_pr
>> > > >oxy_ajp.html
>> > > >
>> > > > Jacques
>> > > >
>> > > > PS : though this links seem good points :
>> > > > http://confluence.atlassian.com/display/DOC/Running+Confluence+behind+A
>> > > >pache#comment-16121884
>> > > > http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html
>> > > >
>> > > > De : "Raj Saini" <[hidden email]>
>> > > >
>> > > >> mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is far
>> > > >> simpler than mod_jk.
>> > > >>
>> > > >> Thanks,
>> > > >>
>> > > >> Raj
>> > > >>
>> > > >> Gautam Deb wrote:
>> > > >>> Yes, it is possible. You can use the *mod_jk* Tomcat-Apache plug-in
>> > > >>> that handles the communication between Tomcat and Apache. You can
>> > > >>> refer the link
>> > > >>> http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
>> > > >>>
>> > > >>> This way you can route request to the web container.
>> > > >>>
>> > > >>> Regards,
>> > > >>> Gautam Deb
>> > > >>>
>> > > >>> On 8/12/07, Mathius Allo <[hidden email]> wrote:
>> > > >>>> Hi All,
>> > > >>>>
>> > > >>>>   Is it possible to have a deployment configuration where Apache web
>> > > >>>> server being used to route request to the web container?
>> > > >>>>
>> > > >>>>   How to deploy an OfBiz application within an Application Server?
>> > > >>>>
>> > > >>>>   Thanks in advanced.
>> > > >>>>   Mathius
>> > > >>>>
>> > > >>>>
>> > > >>>> ---------------------------------
>> > > >>>> Pinpoint customers who are looking for what you sell.
>>
>>
>
12