Re: sendMail service over online MS Office365

2014-09-26 Thread Brett Palmer
Thanks for the reply.  The settings in the thread are what I have now.
These worked well with a gmail account but I haven't been able to get
similar settings to work with MicroSoft's office365 product.


Brett

On Fri, Sep 26, 2014 at 3:19 PM, Mike Z  wrote:

> Maybe some clues?
>
> http://ofbiz.135035.n4.nabble.com/how-to-configure-SMTP-td4628571.html
>
>
> ------
> *From:* "Brett Palmer" 
> *To:* "user@ofbiz.apache.org" 
> *Sent:* September 26, 2014 12:12 PM
> *Subject:* sendMail service over online MS Office365
>
> Ofbiz Users,
>
>
> Our office recently moved from gmail to the online MS Office 365.  I'm
> trying to configure the ofbiz sendMail service to use the SMTP relay to
> route through smtp.office365.com.  I've made the changes in the
> general.properties file but I'm still getting a "client was not
> authenticated" error.
>
> Has anyone else configured ofbiz to work with office365?
>
> Here are my configuration settings:
>
> mail.smtp.relay.host=smtp.office365.com
>
> mail.smtp.port=587
>
> mail.smtp.starttls.enable=true
>
> mail.smtp.socketFactory.fallback=true
>
>
> Any information on this would be appreciated.
>
>
> Brett
>


sendMail service over online MS Office365

2014-09-26 Thread Brett Palmer
Ofbiz Users,


Our office recently moved from gmail to the online MS Office 365.  I'm
trying to configure the ofbiz sendMail service to use the SMTP relay to
route through smtp.office365.com.  I've made the changes in the
general.properties file but I'm still getting a "client was not
authenticated" error.

Has anyone else configured ofbiz to work with office365?

Here are my configuration settings:

mail.smtp.relay.host=smtp.office365.com

mail.smtp.port=587

mail.smtp.starttls.enable=true

mail.smtp.socketFactory.fallback=true


Any information on this would be appreciated.


Brett


Re: Should we use some lock when update qoh of InventoryItem

2014-08-06 Thread Brett Palmer
Yes, the select for update approach does have a potential for locked
conditions.  We used it rarely and only in those situations where we had to
guarantee there was one and only one record.

Brett


On Wed, Aug 6, 2014 at 9:31 AM, Adrian Crum <
adrian.c...@sandglass-software.com> wrote:

> What concerns me about that approach is liveness. The approach I had in
> mind was (pseudo code):
>
> while updating
>   do calculations
>   update entity value
>   was original value updated?
>   if yes, exit while
> continue while
>
>
>
> Adrian Crum
> Sandglass Software
> www.sandglass-software.com
>
> On 8/6/2014 3:44 PM, Brett Palmer wrote:
>
>> We have run into this problem in the past with the inventory and other
>> entities when running multiple application servers under high load.  We
>> worked around this issue by creating a custom class that gets the
>> Connection from the entity engine.  Then we built a custom JDBC query to
>> do
>> a SELECT for UPDATE that guarantees no other process can update the record
>> until the transaction is committed.
>>
>> I'm not sure this is the recommended way to do this in ofbiz but it worked
>> for us in isolated situations.
>>
>>
>> Brett
>>
>>
>> On Wed, Aug 6, 2014 at 12:31 AM, Yaocl  wrote:
>>
>>  I can only consider a solution use SELECT FOR UPDATE,  lock the
>>> inventory item then SELECT ... sum(...) FROM inventory_item_detail
>>> GROUP BY , then update the inventory item. But it seems
>>> EntityEngine not support FOR UPDATE.
>>> --
>>> YaoCL
>>>
>>> On Wed, Aug 6, 2014 at 1:41 PM, Adrian Crum
>>>  wrote:
>>>
>>>> This has been discussed on the dev mailing list, and there are differing
>>>> opinions. I agree this is a bug and should be fixed, but others believe
>>>>
>>> it
>>>
>>>> is highly unlikely two people will be modifying the same invoice at the
>>>>
>>> same
>>>
>>>> time - so it is not a problem.
>>>>
>>>> Adrian Crum
>>>> Sandglass Software
>>>> www.sandglass-software.com
>>>>
>>>>
>>>> On 8/6/2014 3:01 AM, YaoCL wrote:
>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>> When create a new InventoryItemDetail the InventoryItem will be updated
>>>>>
>>>> by
>>>
>>>> eeca. But If two threads create InventoryItemDetails simultaneously.
>>>>>
>>>> Because
>>>
>>>> we use ReadCommitted Isolation level, Neither will see
>>>>>
>>>> InventoryItemDetails
>>>
>>>> created by other threads before transaction commit.
>>>>> updateInventoryItemFromDetail service will get incorrect qoh, and
>>>>> InventoryItem will be updated. Two threads will all be committed
>>>>> successfully.
>>>>>
>>>>> I can confirm the behavior by set a breakpoint in
>>>>> org.ofbiz.minilang.method.entityops.StoreValue.exec(MethodContext) to
>>>>> emulate above process. The result can be checked by this SQL.
>>>>>
>>>>> select * from inventory_item t1 left join (
>>>>> select inventory_item_id, sum(quantity_on_hand_diff) as qoh,
>>>>> sum(available_to_promise_diff) as atp from inventory_item_detail
>>>>> group by inventory_item_id) t2 on t1.inventory_item_id =
>>>>> t2.inventory_item_id
>>>>> where t1.quantity_on_hand_total <> t2.qoh;
>>>>>
>>>>> —
>>>>> YaoCL
>>>>>
>>>>>
>>>>
>>>
>>


Re: Should we use some lock when update qoh of InventoryItem

2014-08-06 Thread Brett Palmer
We have run into this problem in the past with the inventory and other
entities when running multiple application servers under high load.  We
worked around this issue by creating a custom class that gets the
Connection from the entity engine.  Then we built a custom JDBC query to do
a SELECT for UPDATE that guarantees no other process can update the record
until the transaction is committed.

I'm not sure this is the recommended way to do this in ofbiz but it worked
for us in isolated situations.


Brett


On Wed, Aug 6, 2014 at 12:31 AM, Yaocl  wrote:

> I can only consider a solution use SELECT FOR UPDATE,  lock the
> inventory item then SELECT ... sum(...) FROM inventory_item_detail
> GROUP BY , then update the inventory item. But it seems
> EntityEngine not support FOR UPDATE.
> --
> YaoCL
>
> On Wed, Aug 6, 2014 at 1:41 PM, Adrian Crum
>  wrote:
> > This has been discussed on the dev mailing list, and there are differing
> > opinions. I agree this is a bug and should be fixed, but others believe
> it
> > is highly unlikely two people will be modifying the same invoice at the
> same
> > time - so it is not a problem.
> >
> > Adrian Crum
> > Sandglass Software
> > www.sandglass-software.com
> >
> >
> > On 8/6/2014 3:01 AM, YaoCL wrote:
> >>
> >> Hi,
> >>
> >> When create a new InventoryItemDetail the InventoryItem will be updated
> by
> >> eeca. But If two threads create InventoryItemDetails simultaneously.
> Because
> >> we use ReadCommitted Isolation level, Neither will see
> InventoryItemDetails
> >> created by other threads before transaction commit.
> >> updateInventoryItemFromDetail service will get incorrect qoh, and
> >> InventoryItem will be updated. Two threads will all be committed
> >> successfully.
> >>
> >> I can confirm the behavior by set a breakpoint in
> >> org.ofbiz.minilang.method.entityops.StoreValue.exec(MethodContext) to
> >> emulate above process. The result can be checked by this SQL.
> >>
> >> select * from inventory_item t1 left join (
> >> select inventory_item_id, sum(quantity_on_hand_diff) as qoh,
> >> sum(available_to_promise_diff) as atp from inventory_item_detail
> >> group by inventory_item_id) t2 on t1.inventory_item_id =
> >> t2.inventory_item_id
> >> where t1.quantity_on_hand_total <> t2.qoh;
> >>
> >> —
> >> YaoCL
> >>
> >
>


Re: Correct use of the "clustered" property in general.properties files

2014-04-05 Thread Brett Palmer
Jacques,

Thanks for the quick reply.  We also don't use clustering but we do run
multiple application servers to a single database (e.g.1 to 4).

Am I correct from your response that setting the "clustered" flag to "Y"
will work with multiple application servers.  We are running into
sequenceId collisions during load testing without this flag set.  Specially
we need the following conditional to be true so multiple application
servers don't update the sequence value concurrently:


* if (clustered) {*

* sql = "SELECT " + SequenceUtil.this.idColName + " FROM " +
SequenceUtil.this.tableName + " WHERE " + SequenceUtil.this.nameColName +
"='" + this.seqName + "'" + " FOR UPDATE"; *



} else {

sql = "SELECT " + SequenceUtil.this.idColName + " FROM " +
SequenceUtil.this.tableName + " WHERE " + SequenceUtil.this.nameColName +
"='" + this.seqName + "'";

}


Thanks,



Brett




On Fri, Apr 4, 2014 at 1:38 PM, Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:

>
> Le 04/04/2014 18:47, Brett Palmer a écrit :
>
>> Ofbiz Users,
>>
>> We upgraded our version of OFBiz a few months ago and are running through
>> some performance tests.  We are seeing errors in the
>> SequenceUtil.getNextSeqId() method when we run load tests with multiple
>> application servers.  Note: We normally run multiple instances of OFBiz
>> against the same database in production, but that version of OFBiz is a
>> couple years old.
>>
>> In reviewing the code we are seeing a property called "clustered" that
>> looks like a possible solution for us.  In the SequenceUtil.getNextSeqId()
>> method it uses a "SELECT ... FOR UPDATE" statement to prevent other
>> processes
>>
>> from modifying the record until the transaction is complete.  We have set
>> this property to 'Y' and it has resolved our error, but we want to make
>> sure we are using the "clustered: property correctly.
>>
>>
>> Here are my questions:
>>
>> 1. In general.properties the property is called "cluster" and its set to
>> "N".  I can't see any reference to a property "cluster" only to the
>> property "clustered".  I'm assuming this is a typo in the
>> general.properties file.  Is that correct?
>>
>
> Yes indeed, that's a typo I introduced. I never noticed it, because I
> always used a DCC https://cwiki.apache.org/confluence/display/OFBIZ/
> Distributed+Entity+Cache+Clear+%28DCC%29+Mechanism in a clustered env.
> More is explained at https://issues.apache.org/jira/browse/OFBIZ-2353?
> focusedCommentId=13044590
>
> Thanks for the typo report. I will fix it. being unnoticed for 3 years, it
> seems it's no much used or people follow the DCC way.
>
>
>  2.  Does the "clustered" property simply mean that multiple OFBiz
>> application servers are running or does it mean that we need to configure
>> our catalina container as a true cluster?  For example, in the
>> framework/catalina/ofbiz-component.xml file there is a configuration to
>> run
>> tomcat in a true container cluster.
>>
>
> I personnaly decided to not change things there (ie to keep the default
> Tomcat session manager) and to rather use sticky sessions.
> More about that at http://markmail.org/message/kr72apsujnz4gmqa
>
> HTH
>
> Jacques
>
>
>  Thanks in advance for your help on these questions.
>>
>>
>>
>> Brett
>>
>>
> --
>


Correct use of the "clustered" property in general.properties files

2014-04-04 Thread Brett Palmer
Ofbiz Users,

We upgraded our version of OFBiz a few months ago and are running through
some performance tests.  We are seeing errors in the
SequenceUtil.getNextSeqId() method when we run load tests with multiple
application servers.  Note: We normally run multiple instances of OFBiz
against the same database in production, but that version of OFBiz is a
couple years old.

In reviewing the code we are seeing a property called "clustered" that
looks like a possible solution for us.  In the SequenceUtil.getNextSeqId()
method it uses a "SELECT ... FOR UPDATE" statement to prevent other processes
from modifying the record until the transaction is complete.  We have set
this property to 'Y' and it has resolved our error, but we want to make
sure we are using the "clustered: property correctly.


Here are my questions:

1. In general.properties the property is called "cluster" and its set to
"N".  I can't see any reference to a property "cluster" only to the
property "clustered".  I'm assuming this is a typo in the
general.properties file.  Is that correct?

2.  Does the "clustered" property simply mean that multiple OFBiz
application servers are running or does it mean that we need to configure
our catalina container as a true cluster?  For example, in the
framework/catalina/ofbiz-component.xml file there is a configuration to run
tomcat in a true container cluster.

Thanks in advance for your help on these questions.



Brett


Re: Problems with jackrabbit configuration and remote MySql database

2012-10-08 Thread Brett Palmer
I found the error.  I was using a previous copy of ofbiz from another
environment.  The configuration is copied at run time to runtime/data/jcr
directory.  It was picking up an old configuration.  I had run clean but
this was not clearing out these directories.

I deleted the data/jcr directory and restarted the server and everything
came up all right after that.


Brett

On Mon, Oct 8, 2012 at 10:43 AM, Brett Palmer wrote:

> I'm trying to configure jackrabbit to work with a remote mysql database.
>  I have changed JackRabbit to work with MySql instead of the default derby
> by adding a Versioning and Workspace configuration for mysql.  This same
> configuration works on a local mysql database (ofbiz and mysql on same
> machine), but now when I try to access the remote database I get a
> connection failure.
>
> The same mysql configuration is working for ofbiz because I can correctly
> create the database tables and seed them with the following ant builds:
>
> ant run-install
> ant run-install-seed
>
> But using the same MySql configuration attributes for host, user, and
> password I get the the following error:
>
>
> 20411 [main] ERROR org.apache.jackrabbit.core.RepositoryImpl - Failed to
> initialize workspace 'default'
> javax.jcr.RepositoryException: Cannot instantiate persistence manager
> org.apache.jackrabbit.core.persistence.pool.MySqlPersistenceManager
> at
> org.apache.jackrabbit.core.RepositoryImpl.createPersistenceManager(RepositoryImpl.java:1346)
>  at
> org.apache.jackrabbit.core.RepositoryImpl.access$300(RepositoryImpl.java:124)
> at
> org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.doInitialize(RepositoryImpl.java:2011)
>  at
> org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.initialize(RepositoryImpl.java:1994)
> at
> org.apache.jackrabbit.core.RepositoryImpl.initStartupWorkspaces(RepositoryImpl.java:510)
>  at
> org.apache.jackrabbit.core.RepositoryImpl.(RepositoryImpl.java:318)
>
>
>
> I'm not using the standard 'ofbiz' database name.  Would that be a
> possible problem?  Are there other configuration files I am missing to
> setup jackrabbit?  I've only edited the
> ofbiz/framework/jcr/config/jackrabbit.xml file for this mysql change.
>
> Thanks in advance for your help.
>
>
> Brett
>
>
> On Mon, Feb 20, 2012 at 2:34 AM,  wrote:
>
>> Hi Brett,
>>
>> let me guess, you have changed the Database to not use derby, right?
>> There was already a short discussion concerning this one here on the list.
>> The solution is rather simple, in that you need to change the
>> jackrabbit.xml file in framework\jcr\config\ to use your database. E.g.:
>>
>> 
>>   
>>   http://10.202.10.80:5432/ofbizcms>" />
>>   
>>   
>>   
>>   
>>   
>> 
>>
>> Adopt this for both, the Versioning (Tag: ) as well as for
>> the Workspace (Tag: ).
>>
>> Hope this helps.
>>
>> R,
>>
>> Markus
>>
>>
>>
>> On Mon, 20 Feb 2012 01:16:49 -0700, Brett Palmer wrote:
>>
>>> This is probably an easy question, but its been a while since we updated
>>> our ofbiz version.  We are trying to update to the latest version from
>>> the
>>> trunk to determine what changes we need to make to our code.
>>>
>>> When I start ofbiz after setting up the database and build, I get a JCR
>>> LoginException and then ofbiz shuts down.
>>>
>>> Is JackRabbit now required to run ofbiz?  If so are there some other
>>> setup
>>> steps that I need to perform?
>>>
>>> Thanks in advance for your help.
>>>
>>>
>>> Brett
>>>
>>>
>>> Here is the stack trace:
>>>
>>>
>>>  dispatcher [auth-dispatcher] (main)^M
>>> 2012-02-20 00:57:42,294 (main) [ JCRFactoryImpl.java:159:ERROR] ^M
>>>  exception report
>>> --**
>>> Exception: javax.jcr.LoginException
>>> Message: LoginModule could not perform authentication: null
>>>  cause
>>> --**--**
>>> -
>>> Exception: javax.security.auth.login.**LoginException
>>> Message: LoginModule could not perform authentication: null
>>>  cause
>>> --**--**
>>> -
>>> Exception: java.lang.NullPointerException
>>> Message: null
>>>  stack trace
>

Problems with jackrabbit configuration and remote MySql database

2012-10-08 Thread Brett Palmer
I'm trying to configure jackrabbit to work with a remote mysql database.  I
have changed JackRabbit to work with MySql instead of the default derby by
adding a Versioning and Workspace configuration for mysql.  This same
configuration works on a local mysql database (ofbiz and mysql on same
machine), but now when I try to access the remote database I get a
connection failure.

The same mysql configuration is working for ofbiz because I can correctly
create the database tables and seed them with the following ant builds:

ant run-install
ant run-install-seed

But using the same MySql configuration attributes for host, user, and
password I get the the following error:


20411 [main] ERROR org.apache.jackrabbit.core.RepositoryImpl - Failed to
initialize workspace 'default'
javax.jcr.RepositoryException: Cannot instantiate persistence manager
org.apache.jackrabbit.core.persistence.pool.MySqlPersistenceManager
at
org.apache.jackrabbit.core.RepositoryImpl.createPersistenceManager(RepositoryImpl.java:1346)
at
org.apache.jackrabbit.core.RepositoryImpl.access$300(RepositoryImpl.java:124)
at
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.doInitialize(RepositoryImpl.java:2011)
at
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.initialize(RepositoryImpl.java:1994)
at
org.apache.jackrabbit.core.RepositoryImpl.initStartupWorkspaces(RepositoryImpl.java:510)
at org.apache.jackrabbit.core.RepositoryImpl.(RepositoryImpl.java:318)



I'm not using the standard 'ofbiz' database name.  Would that be a possible
problem?  Are there other configuration files I am missing to setup
jackrabbit?  I've only edited the ofbiz/framework/jcr/config/jackrabbit.xml
file for this mysql change.

Thanks in advance for your help.


Brett


On Mon, Feb 20, 2012 at 2:34 AM,  wrote:

> Hi Brett,
>
> let me guess, you have changed the Database to not use derby, right? There
> was already a short discussion concerning this one here on the list. The
> solution is rather simple, in that you need to change the jackrabbit.xml
> file in framework\jcr\config\ to use your database. E.g.:
>
> 
>   
>   http://10.202.10.80:5432/ofbizcms>" />
>   
>   
>   
>   
>   
> 
>
> Adopt this for both, the Versioning (Tag: ) as well as for the
> Workspace (Tag: ).
>
> Hope this helps.
>
> R,
>
> Markus
>
>
>
> On Mon, 20 Feb 2012 01:16:49 -0700, Brett Palmer wrote:
>
>> This is probably an easy question, but its been a while since we updated
>> our ofbiz version.  We are trying to update to the latest version from the
>> trunk to determine what changes we need to make to our code.
>>
>> When I start ofbiz after setting up the database and build, I get a JCR
>> LoginException and then ofbiz shuts down.
>>
>> Is JackRabbit now required to run ofbiz?  If so are there some other setup
>> steps that I need to perform?
>>
>> Thanks in advance for your help.
>>
>>
>> Brett
>>
>>
>> Here is the stack trace:
>>
>>
>>  dispatcher [auth-dispatcher] (main)^M
>> 2012-02-20 00:57:42,294 (main) [ JCRFactoryImpl.java:159:ERROR] ^M
>>  exception report
>> --**
>> Exception: javax.jcr.LoginException
>> Message: LoginModule could not perform authentication: null
>>  cause
>> --**--**-
>> Exception: javax.security.auth.login.**LoginException
>> Message: LoginModule could not perform authentication: null
>>  cause
>> --**--**-
>> Exception: java.lang.NullPointerException
>> Message: null
>>  stack trace
>> --**--**---
>> java.lang.NullPointerException
>>
>> org.ofbiz.jcr.loader.**OFBizLoginModule.login(**
>> OFBizLoginModule.java:114)
>>
>> org.apache.jackrabbit.core.**security.authentication.**
>> LocalAuthContext.login(LocalA
>> uthContext.java:86)
>>
>> org.apache.jackrabbit.core.**RepositoryImpl.login(**
>> RepositoryImpl.java:1458)
>>
>> org.apache.jackrabbit.core.**TransientRepository.login(**
>> TransientRepository.java:38
>> 1)
>>
>> org.apache.jackrabbit.commons.**AbstractRepository.login(**
>> AbstractRepository.java:1
>> 23)
>>
>> org.ofbiz.jcr.loader.**jackrabbit.JCRFactoryImpl.**
>> createSession(JCRFactoryImpl.**java
>> :146)
>>
>> org.ofbiz.jcr.loader.**jackrabbit.JCRFactoryImpl.**
>> start(JCRFactoryImpl.java:100)
>> org.ofbi

Re: Ofbiz with MySQL or PostgreSQL

2012-06-23 Thread Brett Palmer
In the framework/webapp/config/ directory there is a serverstats.properties
file that you can turn off and on stats.

For example:

stats.persist.REQUEST.hit=false
stats.persist.EVENT.hit=false
stats.persist.VIEW.hit=false
stats.persist.ENTITY.hit=false
stats.persist.SERVICE.hit=false

The above properties will turn off persisting the stats for ofbiz which is
where you get constraint errors in mysql because the server stats use a
timestamp as a primary key.


Brett


On Sat, Jun 23, 2012 at 9:07 PM, 李明洋  wrote:

> ho
>
> how to disable server hit?
> 在 2012-6-24 上午10:10,"Brett Palmer" 写道:
>
> > The only place I have found this to be a problem is in the server hit
> > entity.  The server hit functionality is configurable.  We disable that
> > functionality.  We write custom applications using the ofbiz framework
> and
> > don't do a lot of ecommerce  apps so its not a problem for us.
> >
> > Brett
> > On Jun 22, 2012 11:48 PM, "Sanjeev Gupta" 
> wrote:
> >
> > > Thanks Bertt
> > > How do you manage with the timestamp problem mentioned by Ruth.
> > >
> > > SkipDever
> > > Is replication native in 9.1 or though add-on components ?
> > >
> > > -
> > > Rgds
> > > Sanjeev
> > > www.sanjeevg.com
> > > @sanjeevgcom
> > > --
> > > View this message in context:
> > >
> >
> http://ofbiz.135035.n4.nabble.com/Ofbiz-with-MySQL-or-PostgreSQL-tp4633893p4633954.html
> > > Sent from the OFBiz - User mailing list archive at Nabble.com.
> > >
> >
>


RE: Ofbiz with MySQL or PostgreSQL

2012-06-23 Thread Brett Palmer
The only place I have found this to be a problem is in the server hit
entity.  The server hit functionality is configurable.  We disable that
functionality.  We write custom applications using the ofbiz framework and
don't do a lot of ecommerce  apps so its not a problem for us.

Brett
On Jun 22, 2012 11:48 PM, "Sanjeev Gupta"  wrote:

> Thanks Bertt
> How do you manage with the timestamp problem mentioned by Ruth.
>
> SkipDever
> Is replication native in 9.1 or though add-on components ?
>
> -
> Rgds
> Sanjeev
> www.sanjeevg.com
> @sanjeevgcom
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/Ofbiz-with-MySQL-or-PostgreSQL-tp4633893p4633954.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>


Re: Ofbiz with MySQL or PostgreSQL

2012-06-21 Thread Brett Palmer
Sanjeev,

We've used MySQL for several years now.  I think most ofbiz user prefer
Postgres.  We like Postgres but the one feature that keeps us with MySQL is
its replication feature.  Replication in MySQL is very good and easy
to administer.  We use them for running reports which helps us scale our
solution.  We have a data warehouse with a fact table of over 30+ million
rows and mysql does a good job with it.


Brett

On Thu, Jun 21, 2012 at 8:47 PM, Sanjeev Gupta wrote:

> Thanks Ruth.
> I've also been told that the demo data upload in Postgres takes half as
> time
> as MySQL - so I'm guessing that the production env performance should also
> be better with Postgres.
>
> -
> Rgds
> Sanjeev
> www.sanjeevg.com
> @sanjeevgcom
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/Ofbiz-with-MySQL-or-PostgreSQL-tp4633893p4633907.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>


Re: Running multiple instances of OFBiz to the same database

2012-03-21 Thread Brett Palmer
Mike,

I posted a similar question a while ago on this topic.  The subject
was "How to assign JobSandbox jobs to specific application server?"

In the posting I asked if different app servers could be configured to
run against different job pools in the service engine.

Here is a copy of what I posted.

"For Example we could configure our service engine to have a worker1
pool for app server 1 and worker2 pool for app server 2:








"

I believe the service engine still works the same way.  You can also
have multiple app servers hitting the same jobPool in the jobSandbox.
The only time I have run into problems with multiple servers is when
the jobSandbox has a lot of records 50k+ and the different app servers
start to see locks on the JobSandbox table.


Brett

On Wed, Mar 21, 2012 at 12:02 AM, Mike  wrote:
>
> Playing around with running multiple instances of OFBiz in it's own VM, in
> a cloud environment, to the same DB.
>
> I ran across this on the OpenTaps docs:
>
> Service engine job pool:
> Modify the file framework/service/config/serviceengine.xml for each of your
> instances and edit the thread-pool's send-to-pool and run-from-pool to be
> different for each instance. For example:
>
>  . . .  name="opentaps1"/>
>
> What is the purpose of this?  Is this so that jobs originated on each
> instance are tracked separately on the DB?  Is there anything else that
> needs to be tweaked config-wise so the multiple instances don't collide?


Re: Who is using the seleniumxml and why?

2012-02-29 Thread Brett Palmer
Jacopo,

Your recommendation sounds good.  Selenium has been moving away from their
Selenium RC technology which is the foundation for SeleniumXML.  Instead
they are moving to their new Selenium Web Driver which works a lot like
SeleniumXML.

Unless ofbiz users are actively developing SeleniumXml scripts it may be
easier to deprecate the SeleniumXml code and have users contribute their
native Selenium tests as you describe.

As one of the original creators of the SeleniumXml code, I feel a little
bad that I haven't helped a lot to maintain and improve this framework.
 Unfortunately, my time has been in created AJAX Dojo applications with
ofbiz and Selenium still doesn't have a very good solution for AJAX
applications.

We have been using Dojo's DOH testing framework for our screens as it
allows it to tie into the AJAX features of the screens.

I would be interested in hearing what other developers are using for
functional testing their web applications.



Brett



On Thu, Feb 23, 2012 at 9:05 AM, Jacopo Cappellato <
jacopo.cappell...@hotwaxmedia.com> wrote:

> Good day everyone,
>
> I would love to know from the persons that are using the seleniumxml
> integration available in framework/testools their opinion about this tools;
> specifically I am interested to know:
>
> 1) how you use it (settings, platform, browser) and if it is functional
> and useful
> 2) the advantages you see in using this OFBiz specific integration rather
> than using the standard Selenium tools
> ** do you find it easier to setup this component rather than the standard
> Selenium?
> ** is it easier to write tests in the custom xml syntax provided by
> seleniumxml? or do you rather create them (as suggested by the
> documentation in framework/testools) using one of the standard browser
> plugins available for Selenium and then convert to xml using the custom
> script in OFBiz?
> 3) are you willing to contribute the tests you are using? are they generic
> enough to be contributed back to the project?
>
> I am asking #1 and #2 because I feel that we could replace all the custom
> code we have for seleniumxml (and required jar files) with a good document
> that explains how to setup Selenium (no special integration is actually
> required for ofbiz) and then, instead of writing/maintaining test scripts
> in this custom xml formal, we could simply accept and commit standard
> selenium test scripts (in my opinion users will be facilitated to
> contribute them without the need to learn a new syntax); we could also
> provide an ant script to run all of them. In this way we could also use a
> more recent version of Selenium (web driver).
>
> Thanks for your time,
>
> Jacopo
>
>


Re: ofbiz not running from recent update in trunk

2012-02-20 Thread Brett Palmer
Markus,

Thanks for the quick reply.  That what was the problem.  We use a mysql
database with ofbiz.


Brett

On Mon, Feb 20, 2012 at 2:34 AM,  wrote:

> Hi Brett,
>
> let me guess, you have changed the Database to not use derby, right? There
> was already a short discussion concerning this one here on the list. The
> solution is rather simple, in that you need to change the jackrabbit.xml
> file in framework\jcr\config\ to use your database. E.g.:
>
>
>  
>  http://10.202.10.80:5432/ofbizcms>" />
>  
>  
>  
>  
>  
>
>
> Adopt this for both, the Versioning (Tag: ) as well as for the
> Workspace (Tag: ).
>
> Hope this helps.
>
> R,
>
> Markus
>
>
>
> On Mon, 20 Feb 2012 01:16:49 -0700, Brett Palmer wrote:
>
>> This is probably an easy question, but its been a while since we updated
>> our ofbiz version.  We are trying to update to the latest version from the
>> trunk to determine what changes we need to make to our code.
>>
>> When I start ofbiz after setting up the database and build, I get a JCR
>> LoginException and then ofbiz shuts down.
>>
>> Is JackRabbit now required to run ofbiz?  If so are there some other setup
>> steps that I need to perform?
>>
>> Thanks in advance for your help.
>>
>>
>> Brett
>>
>>
>> Here is the stack trace:
>>
>>
>>  dispatcher [auth-dispatcher] (main)^M
>> 2012-02-20 00:57:42,294 (main) [ JCRFactoryImpl.java:159:ERROR] ^M
>>  exception report
>> --**
>> Exception: javax.jcr.LoginException
>> Message: LoginModule could not perform authentication: null
>>  cause
>> --**--**-
>> Exception: javax.security.auth.login.**LoginException
>> Message: LoginModule could not perform authentication: null
>>  cause
>> --**--**-
>> Exception: java.lang.NullPointerException
>> Message: null
>>  stack trace
>> --**--**---
>> java.lang.NullPointerException
>>
>> org.ofbiz.jcr.loader.**OFBizLoginModule.login(**
>> OFBizLoginModule.java:114)
>>
>> org.apache.jackrabbit.core.**security.authentication.**
>> LocalAuthContext.login(LocalA
>> uthContext.java:86)
>>
>> org.apache.jackrabbit.core.**RepositoryImpl.login(**
>> RepositoryImpl.java:1458)
>>
>> org.apache.jackrabbit.core.**TransientRepository.login(**
>> TransientRepository.java:38
>> 1)
>>
>> org.apache.jackrabbit.commons.**AbstractRepository.login(**
>> AbstractRepository.java:1
>> 23)
>>
>> org.ofbiz.jcr.loader.**jackrabbit.JCRFactoryImpl.**
>> createSession(JCRFactoryImpl.**java
>> :146)
>>
>> org.ofbiz.jcr.loader.**jackrabbit.JCRFactoryImpl.**
>> start(JCRFactoryImpl.java:100)
>> org.ofbiz.jcr.loader.**JCRContainer.start(**JCRContainer.java:129)
>>
>> org.ofbiz.base.container.**ContainerLoader.start(**
>> ContainerLoader.java:230)
>> org.ofbiz.base.start.Start.**startStartLoaders(Start.java:**310)
>> org.ofbiz.base.start.Start.**start(Start.java:289)
>> org.ofbiz.base.start.Start.**main(Start.java:119)
>>
>> --**--**
>> 
>> ^M
>> 2012-02-20 00:57:42,357 (Thread-0) [ContainerLoader.java:246:INFO ]
>> Shutting
>>  down containers^M
>> 2012-02-20 00:57:42,357 (Thread-0) [  ServiceDispatcher.java:191:**INFO ]
>> De-Regis
>>
>


ofbiz not running from recent update in trunk

2012-02-20 Thread Brett Palmer
This is probably an easy question, but its been a while since we updated
our ofbiz version.  We are trying to update to the latest version from the
trunk to determine what changes we need to make to our code.

When I start ofbiz after setting up the database and build, I get a JCR
LoginException and then ofbiz shuts down.

Is JackRabbit now required to run ofbiz?  If so are there some other setup
steps that I need to perform?

Thanks in advance for your help.


Brett


Here is the stack trace:


 dispatcher [auth-dispatcher] (main)^M
2012-02-20 00:57:42,294 (main) [ JCRFactoryImpl.java:159:ERROR] ^M
 exception report
--
Exception: javax.jcr.LoginException
Message: LoginModule could not perform authentication: null
 cause
-
Exception: javax.security.auth.login.LoginException
Message: LoginModule could not perform authentication: null
 cause
-
Exception: java.lang.NullPointerException
Message: null
 stack trace
---
java.lang.NullPointerException
org.ofbiz.jcr.loader.OFBizLoginModule.login(OFBizLoginModule.java:114)
org.apache.jackrabbit.core.security.authentication.LocalAuthContext.login(LocalA
uthContext.java:86)
org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1458)
org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:38
1)
org.apache.jackrabbit.commons.AbstractRepository.login(AbstractRepository.java:1
23)
org.ofbiz.jcr.loader.jackrabbit.JCRFactoryImpl.createSession(JCRFactoryImpl.java
:146)
org.ofbiz.jcr.loader.jackrabbit.JCRFactoryImpl.start(JCRFactoryImpl.java:100)
org.ofbiz.jcr.loader.JCRContainer.start(JCRContainer.java:129)
org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:230)
org.ofbiz.base.start.Start.startStartLoaders(Start.java:310)
org.ofbiz.base.start.Start.start(Start.java:289)
org.ofbiz.base.start.Start.main(Start.java:119)

^M
2012-02-20 00:57:42,357 (Thread-0) [ContainerLoader.java:246:INFO ]
Shutting
 down containers^M
2012-02-20 00:57:42,357 (Thread-0) [  ServiceDispatcher.java:191:INFO ]
De-Regis


Re: JobManager failing to schedule jobs

2011-07-14 Thread Brett Palmer
7/2011, at 1:02 PM, Josh Jacobson wrote:
> >>>>>>
> >>>>>>> Scott,
> >>>>>>>
> >>>>>>> Thanks! That is very precise advise. Do you have a suggestion on
> >>>>>>> interval time? 60 seconds? 120?
> >>>>>>>
> >>>>>>> Thanks,
> >>>>>>>
> >>>>>>> On Wed, Jul 13, 2011 at 5:34 PM, Scott Gray <
> scott.g...@hotwaxmedia.com> wrote:
> >>>>>>>> That configuration is for the frequency of job polls.  There isn't
> any ability to specify the transaction timeout via configuration so you'll
> need to modify the code directly:
> >>>>>>>> JobManager.java (line 148):
> >>>>>>>> beganTransaction = TransactionUtil.begin();
> >>>>>>>> needs to be changed to use TransactionUtil.begin(int)
> >>>>>>>>
> >>>>>>>> Regards
> >>>>>>>> Scott
> >>>>>>>>
> >>>>>>>> HotWax Media
> >>>>>>>> http://www.hotwaxmedia.com
> >>>>>>>>
> >>>>>>>> On 14/07/2011, at 12:23 PM, Josh Jacobson wrote:
> >>>>>>>>
> >>>>>>>>> Brett,
> >>>>>>>>>
> >>>>>>>>> Before I start trying to run the jobs manually, I want to give
> your
> >>>>>>>>> suggestion a try. I think I know where to configure the job
> polling
> >>>>>>>>> transaction time (I believe it's the poll-db-millis="2" value
> on
> >>>>>>>>> the framework/service/config/serviceengine.xml.
> >>>>>>>>>
> >>>>>>>>> However, I still don't know what to increase it to. I understand
> that
> >>>>>>>>> we wouldn't want to make it bigger than the default polling
> interval.
> >>>>>>>>> Do you know what the default interval between polling is?
> >>>>>>>>>
> >>>>>>>>> Thanks,
> >>>>>>>>>
> >>>>>>>>> On Wed, Jul 13, 2011 at 12:31 PM, Brett Palmer <
> brettgpal...@gmail.com> wrote:
> >>>>>>>>>> I meant removing finished jobs.  If you have thousands of
> pending jobs then
> >>>>>>>>>> you will have the same problem I mentioned in my first email.
>  One
> >>>>>>>>>> resolution will be to increase the job poller transaction time.
>  In the
> >>>>>>>>>> ofbiz version I was using there was not a way to configure the
> poller
> >>>>>>>>>> transaction time.  It just used the default time.  I had to
> create a patch
> >>>>>>>>>> to allow this to happen.
> >>>>>>>>>>
> >>>>>>>>>> In the patch you had to be careful to not increase the
> transaction time
> >>>>>>>>>> greater than the frequency of the job poller.  Otherwise you get
> into a lock
> >>>>>>>>>> situation where one job poller is still running within a
> transaction and
> >>>>>>>>>> another poller starts.  This didn't create a huge problem but
> the second job
> >>>>>>>>>> poller would usually lock and then time out.
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> Brett
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> On Wed, Jul 13, 2011 at 1:15 PM, Josh Jacobson <
> josh.s.jacob...@gmail.com>wrote:
> >>>>>>>>>>
> >>>>>>>>>>> Brett,
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>
> >>
> >
>


Re: JobManager failing to schedule jobs

2011-07-13 Thread Brett Palmer
Josh,

I'm attaching the patch I used to work around this issue.  This is based on
an older version of ofbiz so I would compare your current files carefully.

The following files were patched:

service-config.xsd
serviceengine.xml


JobManager.java
JobPoller.java


The patch allowed for a new configuration option

 poll-transaction-timeout="300"

I'm pretty sure that I was using 300 seconds for the
poll-transaction-timeout.  I believe the default is 60 or 120 seconds.

I originally created a JIRA issue 3855 for this problem.

https://issues.apache.org/jira/browse/OFBIZ-3855


If you set the transaction time out too high when the poller wakes up to
process new requests it will timeout because the first poller has a lock on
the table (or ofbiz semaphore method).


Here are a couple of other options you could try since the number of pending
jobs is so high.

1. Create a temporary status for the jobSandbox statusId and assign a large
set of pending transactions to this status.  Then only process a few 1000 at
a time.  Then you can incrementally change these back to pending so the
service engine can process them in reasonable batches.  I haven't tried this
option but it would allow you to work with the service engine without
modifying any code.


2.  Start up several more instances of ofbiz all pointing to the same
database.  Each will start service process to process more requests in
parallel.  This probably won't work with out the patch I've attached as each
service process would still time out and not allow other processes to start.



Good luck,



Brett




On Wed, Jul 13, 2011 at 8:10 PM, Josh Jacobson wrote:

> Thanks again. I actually meant a suggestion for the transaction
> timeout. In any case I am grateful for your explanation.
>
>
> On Wednesday, July 13, 2011, Scott Gray 
> wrote:
> > As best I can tell there shouldn't be any need to increase the interval
> between polls since the interval timer doesn't actually start until the
> previous poll has completed (see JobPoller.run()) so I can't see how a small
> interval would cause any backlog problems.
> >
> > I'm guessing if there is any lock contention then it's probably caused by
> the executing jobs trying to update their respective rows while the poller
> is holding a table lock.  So from that point of view I guess increasing the
> interval could reduce the amount of contention between the executing jobs
> and the next poll.
> >
> > Regards
> > Scott
> >
> > On 14/07/2011, at 1:02 PM, Josh Jacobson wrote:
> >
> >> Scott,
> >>
> >> Thanks! That is very precise advise. Do you have a suggestion on
> >> interval time? 60 seconds? 120?
> >>
> >> Thanks,
> >>
> >> On Wed, Jul 13, 2011 at 5:34 PM, Scott Gray 
> wrote:
> >>> That configuration is for the frequency of job polls.  There isn't any
> ability to specify the transaction timeout via configuration so you'll need
> to modify the code directly:
> >>> JobManager.java (line 148):
> >>> beganTransaction = TransactionUtil.begin();
> >>> needs to be changed to use TransactionUtil.begin(int)
> >>>
> >>> Regards
> >>> Scott
> >>>
> >>> HotWax Media
> >>> http://www.hotwaxmedia.com
> >>>
> >>> On 14/07/2011, at 12:23 PM, Josh Jacobson wrote:
> >>>
> >>>> Brett,
> >>>>
> >>>> Before I start trying to run the jobs manually, I want to give your
> >>>> suggestion a try. I think I know where to configure the job polling
> >>>> transaction time (I believe it's the poll-db-millis="2" value on
> >>>> the framework/service/config/serviceengine.xml.
> >>>>
> >>>> However, I still don't know what to increase it to. I understand that
> >>>> we wouldn't want to make it bigger than the default polling interval.
> >>>> Do you know what the default interval between polling is?
> >>>>
> >>>> Thanks,
> >>>>
> >>>> On Wed, Jul 13, 2011 at 12:31 PM, Brett Palmer <
> brettgpal...@gmail.com> wrote:
> >>>>> I meant removing finished jobs.  If you have thousands of pending
> jobs then
> >>>>> you will have the same problem I mentioned in my first email.  One
> >>>>> resolution will be to increase the job poller transaction time.  In
> the
> >>>>> ofbiz version I was using there was not a way to configure the poller
> >>>>> transaction time.  It just used the default time.  I had to create a
>

Re: JobManager failing to schedule jobs

2011-07-13 Thread Brett Palmer
I meant removing finished jobs.  If you have thousands of pending jobs then
you will have the same problem I mentioned in my first email.  One
resolution will be to increase the job poller transaction time.  In the
ofbiz version I was using there was not a way to configure the poller
transaction time.  It just used the default time.  I had to create a patch
to allow this to happen.

In the patch you had to be careful to not increase the transaction time
greater than the frequency of the job poller.  Otherwise you get into a lock
situation where one job poller is still running within a transaction and
another poller starts.  This didn't create a huge problem but the second job
poller would usually lock and then time out.



Brett



On Wed, Jul 13, 2011 at 1:15 PM, Josh Jacobson wrote:

> Brett,
>
> Can you please explain what you mean by archiving the current JobSandbox
> first?
> Do you mean somehow removing the current pending jobs, applying you
> patch and the copying them back again?
>
> Thanks,
>
>
> On Wed, Jul 13, 2011 at 12:08 PM, Brett Palmer 
> wrote:
> > Josh,
> >
> > I've also seen this problem if the JobSandbox table has too many rows to
> > process.  I ran into a similar problem when I tried to run 10,000 Async
> > batch processes.  The time it took for the JobPoller to process all the
> > records was too long and the transaction would time out.
> >
> > I had a patch to change the transaction timeout for the JobPoller
> > specifically as it wasn't available in ofbiz at the time, but I don't
> think
> > I ever submitted it.  I could look for this patch if anyone is interested
> > but it may already be implemented in the framework.
> >
> > I would try archiving jobs from the JobSandbox first.
> >
> >
> > Brett
> >
> > On Wed, Jul 13, 2011 at 12:48 PM, Josh Jacobson
> > wrote:
> >
> >> Hello Everyone,
> >>
> >> I have an ofbiz instance in production where none of the jobs are
> >> being performed. I have about 160K jobs in pending status, but they
> >> are never being schedule.
> >> I can see the following in the log:
> >>
> >> 2011-07-13 13:32:01,959 (org.ofbiz.service.job.JobPoller@2599930b) [
> >> JobManager.java:201:ERROR]  exception report
> >> -- Transaction
> >> error trying to commit when polling and updating the JobSandbox:
> >> org.ofbiz.entity.transaction.GenericTransactionException: Roll back
> >> error (with no rollbackOnly cause found), could not commit
> >> transaction, was rolled back instead:
> >> javax.transaction.RollbackException: Transaction timeout (Transaction
> >> timeout) Exception:
> >> org.ofbiz.entity.transaction.GenericTransactionException Message: Roll
> >> back error (with no rollbackOnly cause found), could not commit
> >> transaction, was rolled back instead:
> >> javax.transaction.RollbackException: Transaction timeout (Transaction
> >> timeout)  cause
> >> -
> >> Exception: javax.transaction.RollbackException Message: Transaction
> >> timeout  stack trace
> >> ---
> >> javax.transaction.RollbackException: Transaction timeout
> >>
> >>
> org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:269)
> >>
> >>
> org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:245)
> >>
> >>
> org.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:259)
> >>
> >>
> org.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:245)
> >> org.ofbiz.service.job.JobManager.poll(JobManager.java:197)
> >> org.ofbiz.service.job.JobPoller.run(JobPoller.java:90)
> >> java.lang.Thread.run(Thread.java:619)
> >>
> >>
> 
> >>
> >> I believe that the JobManager is not being able to handle all those
> >> jobs to schedule them, so nothing is being scheduled, which of course
> >> make the job list longer.
> >>
> >> Can anyone think of how to make the jobs run?
> >>
> >> All help much appreciated,
> >>
> >> --
> >> Josh.
> >>
> >
>


Re: JobManager failing to schedule jobs

2011-07-13 Thread Brett Palmer
Josh,

I've also seen this problem if the JobSandbox table has too many rows to
process.  I ran into a similar problem when I tried to run 10,000 Async
batch processes.  The time it took for the JobPoller to process all the
records was too long and the transaction would time out.

I had a patch to change the transaction timeout for the JobPoller
specifically as it wasn't available in ofbiz at the time, but I don't think
I ever submitted it.  I could look for this patch if anyone is interested
but it may already be implemented in the framework.

I would try archiving jobs from the JobSandbox first.


Brett

On Wed, Jul 13, 2011 at 12:48 PM, Josh Jacobson
wrote:

> Hello Everyone,
>
> I have an ofbiz instance in production where none of the jobs are
> being performed. I have about 160K jobs in pending status, but they
> are never being schedule.
> I can see the following in the log:
>
> 2011-07-13 13:32:01,959 (org.ofbiz.service.job.JobPoller@2599930b) [
> JobManager.java:201:ERROR]  exception report
> -- Transaction
> error trying to commit when polling and updating the JobSandbox:
> org.ofbiz.entity.transaction.GenericTransactionException: Roll back
> error (with no rollbackOnly cause found), could not commit
> transaction, was rolled back instead:
> javax.transaction.RollbackException: Transaction timeout (Transaction
> timeout) Exception:
> org.ofbiz.entity.transaction.GenericTransactionException Message: Roll
> back error (with no rollbackOnly cause found), could not commit
> transaction, was rolled back instead:
> javax.transaction.RollbackException: Transaction timeout (Transaction
> timeout)  cause
> -
> Exception: javax.transaction.RollbackException Message: Transaction
> timeout  stack trace
> ---
> javax.transaction.RollbackException: Transaction timeout
>
> org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:269)
>
> org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:245)
>
> org.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:259)
>
> org.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:245)
> org.ofbiz.service.job.JobManager.poll(JobManager.java:197)
> org.ofbiz.service.job.JobPoller.run(JobPoller.java:90)
> java.lang.Thread.run(Thread.java:619)
>
> 
>
> I believe that the JobManager is not being able to handle all those
> jobs to schedule them, so nothing is being scheduled, which of course
> make the job list longer.
>
> Can anyone think of how to make the jobs run?
>
> All help much appreciated,
>
> --
> Josh.
>


Restarting an ofbiz service

2011-06-02 Thread Brett Palmer
I recently had to stop a service running in production.  I changed the
status_id in the JOB_SANDBOX from SERVICE_PENDING and SERVICE_RUNNING to
SERVICE_FINISHED.  This stopped the service from running but now I want the
service to start again.

I've tried changing the last SERVICE_FINISHED job to SERVICE_PENDING for
this particular job but the service engine isn't picking it up.

Does anyone have a suggestion on how I can get this running again?


Thanks,


Brett


Re: Unable to acquire a new connection from the pool

2010-11-18 Thread Brett Palmer
We are seeing errors about unable to acquire a new connection pool from
MySQL.  The entityengine.xml pool-minsize and pool-maxsize are set
correctly.  We have a pool-maxsize of 250 which we never reacher.

I think the problem may be an idle connection problem where the DB host
system cuts the database connection from the application server because it
is idle.  This thread talks about setting the "idle connect" for MySQL but
doesn't give any specifics.  I don't see any parameter in the JDBC setting
for an idle connection value.  Is this a server configuration.

The following is the stack trace that we are seeing.  We've been running
this server for over a year now and just started getting these error.  Any
suggestions on the topic is appreciated.


Brett

/**/

Nov 17 01:13:21 app01 logger: Exception: java.sql.SQLException
Nov 17 01:13:21 app01 logger: Message: Unable to acquire a new connection
from the pool
Nov 17 01:13:21 app01 logger:  cause
-
Nov 17 01:13:21 app01 logger: Exception:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException
Nov 17 01:13:21 app01 logger: Message: Could not create connection to
database server. Attempted reconnect 3 times. Giving up.
Nov 17 01:13:21 app01 logger:  cause
-
Nov 17 01:13:21 app01 logger: Exception: java.net.ConnectException
Nov 17 01:13:21 app01 logger: Message: Connection refused
Nov 17 01:13:21 app01 logger:  stack trace
---
Nov 17 01:13:21 app01 logger: java.net.ConnectException: Connection refused
Nov 17 01:13:21 app01 logger: java.net.PlainSocketImpl.socketConnect(Native
Method)
Nov 17 01:13:21 app01 logger:
java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
Nov 17 01:13:21 app01 logger:
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
Nov 17 01:13:21 app01 logger:
java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
Nov 17 01:13:21 app01 logger:
java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)


On Wed, Jan 13, 2010 at 9:14 AM, Kumaraswamy nandipati <
kumarasw...@ecomzera.com> wrote:

> Hi Juan Pablo,
>
> I am having the same problem in my ofbiz instance till earlier of December,
> 2009. In my case I am using MySQL as database. After a long research on the
> database, we identified that *idle connection time outs* are happening with
> MySQL.
>
> If you are using MySQL as database, after changing configuration settings
> for idle connection in mysql, we haven't face this problem from then.
>
>
>
> On Wed, Jan 13, 2010 at 12:35 PM, Jacques Le Roux <
> jacques.le.r...@les7arts.com> wrote:
>
> > From: "rohit" 
> >
> >  Hi,
> >>
> >> Please also check the jobsandbox database for any service not properly
> >> terminated, for eg. they are still in the running status.
> >>
> >> i had a lot of problem with us service not ending properly. even with
> the
> >> latest code running i have to manually delete some running process on
> the
> >> database. Each running process seems to block 1 - 2 pool connection and
> >> hence the error. currently for eg. the sendorderconfirmation email gets
> >> stuck as a running process for a long time.
> >>
> >
> > A Jira issue is pending for that
> > https://issues.apache.org/jira/browse/OFBIZ-2974
> >
> > Jacques
> >
> >
> >  Hope it help.
> >>
> >> Rohit
> >>
> >>
> >> Juan Pablo wrote:
> >>
> >>>
> >>> Hi Community.
> >>>
> >>> Today I had a lot of error messages when I execute some operations:
> >>> Update
> >>> Product, Facility Receipt, etc.
> >>>
> >>> This is one of the error messages:
> >>>
> >>> --
> >>>
> >>> Error en la llamada el evento:
> >>> org.ofbiz.webapp.event.EventHandlerException:
> >>> Service invocation error (Could not commit transaction for service
> >>> [updateProduct] call: Roll back error, could not commit transaction,
> was
> >>> rolled back instead because of: Failure in findByCondition operation
> for
> >>> entity [ProductDimension]: org.ofbiz.entity.GenericDataSourceException:
> >>> Unable to esablish a connection with the database. (Unable to acquire a
> >>> new
> >>> connection from the pool). Rolling back
> >>> transaction.org.ofbiz.entity.GenericDataSourceException: Unable to
> >>> esablish
> >>> a connection with the database. (Unable to acquire a new connection
> from
> >>> the
> >>> pool) (Unable to esablish a connection with the database. (Unable to
> >>> acquire
> >>> a new connection from the pool)))
> >>>
> >>> --
> >>> I understand that the main erro is "Unable to acquire a new connection
> >>> from
> >>> the pool" but I don´t understand how I can resolve.
> >>>
> >>> I use a local installation with a unique user!
> >>>
> >>> Thaks.
> >>>
> >>> --
> >>> Juan Pablo
> >>>
> >>>
> >>>
> >> --
> >> View this message in context:
> >>
> http://n4.nabble.com/Unable-to-acquire-a-new-connection-from-th

Re: using json

2010-09-19 Thread Brett Palmer
Chris,

We use the DojoJSONServiceEventHandler  in our controller.xml file to make
service request via an AJAX client.  The client specifies the service name
and appropriate parameters.  Then the handler returns a json string back to
the client.  We've like using json for many things as it is lighter than RMI
and easy to parse.

Sample controller elements:



.

 






Brett


On Sat, Sep 18, 2010 at 11:24 AM, chris snow  wrote:

> Hi BJ, thanks for the response.  Unfortunately, an iframe won't do - I
> need to have a json client running on a remote server.
>
> On Sat, Sep 18, 2010 at 6:16 PM, BJ Freeman  wrote:
> > how about an Iframe from the website to the login you want to use.
> > I use this a lot for backend Customer login for my portal, on clients
> > websites that ofbiz is the back end but not the ecommerce provider.
> >
> > chris snow sent the following on 9/18/2010 9:32 AM:
> >>
> >> Are there any instructions for connecting to ofbiz using
> >> javascript+json from an external web application.  I would like to
> >> make a call to a service/controller that requires authentication.
> >>
> >> Many thanks,
> >>
> >> Chris
> >>
> >
> >
>


Re: Optimistic locking based on timestamps

2010-08-13 Thread Brett Palmer
James,

We have run into this same problem on MySQL and ofbiz.  We worked around the
problem by creating a custom method that got a direction connection from the
transaction manager.  Then we wrote a custom SELECT for UPDATE on that
connection.  We needed this functionality because we had multiple
application servers hitting the same database and ran into concurrency
problems without it.

I would like to see the optimistic locking feature enhanced in ofbiz.  Maybe
we could move away from timestamps and use an increasing unique ID as a
replacement.  This is definitely a problem with MySQL.  We may move away
from MySQL if we can find a good replication solution from Postgres.


Brett

On Thu, Aug 12, 2010 at 2:15 PM, James McGill <
james.mcg...@ableengineering.com> wrote:

> We are having problems with the optimistic locking.   With "enable-lock"
> set
> on an Entity, updates in GenericDAO use a timestamp to do locking.
> There are a number of issues with this.  The biggest one is that it's not a
> synchronized operation, so there's potential for a race condition within
> customUpdate, which we are actually seeing in production.
> I added code to introduce the "FOR UPDATE" expression when reading the
> timestamp.  This brings up another issue, that the timestamp field in MySQL
> has resolution only to the second.  So even if you don't have contention on
> the optimistic lock SELECT, you still have to be lucky that your
> transactions are more than one second apart.
>
> I realize this is a fairly difficult problem to address, in general, and
> that "fixing" many concurrency issues leads to risks of deadlock.  But we
> are seeing errors in data where the "last update wins."
>
> Has anyone else had concurrency problems when multiple threads are updating
> entities?  Are there any locking provisions in the Delegator that would
> allow us to prevent this kind of problem?
>
> --
> James McGill
> Phoenix AZ
>


Re: Optimistic locking based on timestamps

2010-08-13 Thread Brett Palmer
David,

I like postgres for the reason you have mentioned.

The number one reason we use MySQL in some of our deployments is because its
replication solution is very good.  You can replicate your data from the
database very quickly.  We do this for database backups in production as
well as creating reporting servers.

I have not been able to find a good replication solution for postgres.  Its
been a while since I looked but the last time I investigated replication I
couldn't find any.


Brett





On Thu, Aug 12, 2010 at 4:19 PM, David E Jones  wrote:

>
> On Aug 12, 2010, at 3:21 PM, James McGill wrote:
>
> > On Thu, Aug 12, 2010 at 1:52 PM, Jacques Le Roux <
> > jacques.le.r...@les7arts.com> wrote:
> >
> >> This is why I prefer to use PostGres but that's another story and of
> course
> >> the same problem could occur at the ms level, 1000 time less though...
> >>
> >> Jacques
> >>
> >
> >
> > I was hoping you would post to tell me I was wrong, and  point out the
> > locking semantics in the delegator that the application can use.
> >
> > My current plan is to extend the delegator and minilang so that "findOne"
> > and  can have a "for update" parameter, so that at least the
> > application can decide to do a select for update, to introduce some
> locking
> > to avoid concurrency bugs.
> >
> > Right now, it's fairly common to for us to issue inventory items until
> the
> > quantity goes below zero, because there's no way to regulate concurrency
> > between two threads that want to issue.   There are many parts of the
> system
> > where this might not be such a problem, but on InventoryItem it's a
> > potential nightmare.
> >
> > What do you think about my idea of giving the delegator a "select for
> > update"  option?
>
> Adding a for-update option is a good idea, and is something I have
> incorporated into the Moqui design.
>
> As Jacques mentioned chances are you'll still have a better experience with
> Postgres when it comes to concurrency issues, in the way they manage
> transactions and locking in addition to the timestamp resolution issue.
>
> I honestly don't know why so many people like MySQL compared to Postgres,
> but I know that many people do.  Maybe it's the greater marketing budget of
> corporate-driven MySQL versus the more community-driven Postgres. It's also
> a shame that when SAP DB was scavenged for useful things to go into MySQL
> that it wasn't done the other way around, ie take useful things from MySQL
> and put them into SAP DB. Of course, I haven't looked into the state of
> either code base before this was done, but I do know which organization
> acquired the other and that probably drove the direction for the software
> (it's bad marketing to come out and say you're tossing most of your main
> software stack to go forward with another).
>
> I could certainly be wrong, and if any MySQL fans out there want to help me
> understand why maybe it will even make it through my shield of bias.
>
> -David
>
>


Re: Using Drools to Help with Rules

2010-07-28 Thread Brett Palmer
I'm working on a non-ofbiz project right now where they are considering
replacing the commercial rules engine solution with something like drools.
Drools looks like a solid rules engine.  They have their own domain specific
language (DSL) which makes the rules easy to develop and follow.  The also
handled nested rules very effectively.

I like ECA and SECA as well but I have used them more like database triggers
and not a method for implementing complicated rules and workflow, but I
could be wrong on this subject.

Drools appears to be licensed appropriately for ofbiz.  I would be in favor
of drools rules engine integration implementation.


Brett

On Wed, Jul 28, 2010 at 9:47 PM, BJ Freeman  wrote:

> ofbiz has, though not implemented well, a rules engine as well as a
> workeffort and event(ECA, SECA, controller events) Model. the Project
> management also lends itself to rules.
>
> I would suggest we work out a model rules engine that works around the way
> ofbiz works. That was the short comings of the other rules engines was the
> integration into the ofbiz model.
>
>
> Maybe doing a review of rule engines in ofbiz now and why they did not get
> implemented would be a good exercise.
>
> My efforts have been how to have a ui that a business person would
> understand, and generate ECA and SECA to accomplish Thier logic. The top
> level of this would be when they generate a business plan, it sets up the
> rules on how the business flow is done. This actually is base on compiler
> theory and some program that create web code for a particular type of web.
>  I estimated to be about 1.5 man year.
>
>
>
> Sam Hamilton sent the following on 7/28/2010 8:12 PM:
>
>  Hi Guys,
>>
>> I have been thinking about problems we are soon going to start facing in
>> marketing our OFBiz website and some of them can be solved using a rules
>> engine, this then spilled over into other departments once I had read
>> through the Drools website and saw how powerful it could be once implemented
>> inside OFBiz.
>>
>> I was thinking Drools http://jboss.org/drools/ as its ASL2 so we can have
>> in trunk http://jboss.org/drools/downloads.html and also because of the
>> GUI which could be plugged into OFBiz where ever we need rules - a few cool
>> examples are here
>> http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-introduction/html/ch02.html#d0e166and
>>  for the developers or data mining people using Birt etc they can use
>> Eclipse.
>>
>> The uses I can think of right now are:
>> 1. Sending emails to customers - similar to auto responders or triggered
>> emails .
>> 2. Stock reordering - allowing different stock to be treated differently
>> depending on for example how fast its selling or out of which warehouse the
>> most is shipped.
>> 3. Inserting marketing material into parcels - picking different customer
>> segments and targeting them differently.
>> 4. Shipping carrier upgrades / changes depending on either destination or
>> price - like zappos do when they secretly upgrade customers to over night
>> delivery.
>> 5. Refunds to customers if something goes wrong (could automate some of
>> the process) and then if its outside the rules it move to a human for
>> review.
>>
>> The real aim is that I want to move the process of rule changing out of
>> the programers hands and put them into technical business people so that we
>> can make fast changes to the business all done by the business users.
>>
>> What does everyone else think?
>>
>>
>> Cheers
>> Sam
>>
>>
>>


Re: Multiple instances and the JobSandbox

2010-07-22 Thread Brett Palmer
Scott,

Thanks for this information.  I think the instanceId solves the problem for
the Service engine and the JobSandbox table.

Do you know if OFBiz has a similar solution for other tables that might have
problems with concurrency?  We ran into some problems with the order and
inventory tables when we ran with multiple application servers.  The problem
was that ofbiz doesn't appear to support a "select for update" type of
query.  This makes it difficult to guarantee that when one application
server reads a record (e.g. an inventory record) and then updates it that
another application server doesn't read the same record and update it as
well.  We had to work around this issue by writing custom SQL to do the
"select for update" call.

Are there any plans to implement this type of feature in the entity engine?
 Another approach I have seen implemented called "optimistic locking".  This
is where the entity engine checks the timestamps on updates to make sure the
timestamp has not been modified since the record was first read.  This type
of feature is needed any many ERP like applications.  Is there a way in
ofbiz to do this now.

Thanks,


Brett



On Tue, Jul 20, 2010 at 6:55 PM, Scott Gray wrote:

> Give each instance it's own instanceId in general.properties and everything
> should be fine.  The JobManager periodically polls looking for jobs that
> aren't assigned, queued or cancelled and then assigns them to its instance
> using the instanceId and queues them.
>
> It would probably take me as long to explain fully as it would for you to
> just go to the JobManager.poll() method and have a look at it :-)
>
> Regards
> Scott
>
> HotWax Media
> http://www.hotwaxmedia.com
>
> On 21/07/2010, at 12:27 PM, Craig Ambrose wrote:
>
> > I have a multiple instance deployment backed by a single database. I have
> a user-triggered event that creates a JobSandbox entry that is to execute a
> week in the future. Is it (reasonably) guaranteed that the job will only be
> executed by a single instance? It would be bad for our customers if the job
> is executed by more than one of the instances.
> >
> > Can anyone shed some light on what mechanism is responsible for ensuring
> that only one runtime instance will execute a certain job?
> >
> > Thanks
> >
> > -craig
> >
>
>


Re: Service engine timeouts

2010-07-10 Thread Brett Palmer
Okay, I opened JIRA ticket OFBIZ-3855 for this issue.  I have tested the
patch in our version of ofbiz.  I will check it with the current version of
ofbiz and attach the patch to the JIRA ticket.

The files affected by this patch will be the following:

- serviceengine.xml
-- Added new attribute:  poll-transaction-timeout="120"  to the thread-pool
element

- service-config.xsd   -- to allow the new attribute in the
serviceengine.xml

And the following source files:

- JobManager.java
- JobPoller.java

Thanks,


Brett

On Thu, Jul 1, 2010 at 3:03 AM, David E Jones  wrote:

>
> That sounds like the way to go Scott.
>
> -David
>
>
> On Jul 1, 2010, at 3:01 AM, Scott Gray wrote:
>
> > Hi Brett,
> >
> > The JobManager probably wasn't intended (or at least initially written)
> to handle that many pending jobs, as a work around you could just add a
> timeout value to the TransactionUtil.begin() call in poll() and see if that
> does the trick.  We could always look at making this configurable if you
> wanted to provide a patch for such a thing.
> >
> > Regards
> > Scott
> >
> > HotWax Media
> > http://www.hotwaxmedia.com
> >
> > On 29/06/2010, at 2:28 AM, Brett Palmer wrote:
> >
> >> Rishi,
> >>
> >> Thanks for the quick response.
> >>
> >> The transaction timeout is not with my defined service.  The problem
> occurs
> >> in the JobManager.poll() method of the service engine. The JobManager is
> >> going through all the currently pending jobs and changing them to
> running
> >> but it timesout before it can finish.
> >>
> >> I can't see a way without modifying the JobManager code to change this
> >> transaction time in the "poll" method.  I don't think my service
> definition
> >> transaction time modifies the transaction time in the JobManager.
> >>
> >> Let me know if I am missing something here.
> >>
> >>
> >> Brett
> >>
> >> On Mon, Jun 28, 2010 at 2:10 AM, Rishi Solanki  >wrote:
> >>
> >>> To increase the transaction time out use  transaction-timeout="{value}"
> >>> where value is any valid number.
> >>> Note that this needs to be done in your service definition.
> >>>
> >>> Rishi Solanki
> >>> Manager, Enterprise Software Development
> >>> HotWax Media Pvt. Ltd.
> >>> Direct: +91-9893287847
> >>> http://www.hotwaxmedia.com
> >>>
> >>>
> >>> On Sun, Jun 27, 2010 at 2:17 AM, Brett Palmer  >>>> wrote:
> >>>
> >>>> We are running into a problem with the service engine when trying to
> run
> >>> an
> >>>> archiving batch service.  Here is how the service runs.
> >>>>
> >>>> 1. We run a service that collects a bunch of records for data
> >>> warehousing.
> >>>>
> >>>> 2. The data warehouse service calls an async service call to process
> each
> >>>> individual record.
> >>>>
> >>>> 3. The service engine them starts working on each individual record.
> >>>>
> >>>> We like the above process because it allows us to multi-process the
> large
> >>>> batch job.
> >>>>
> >>>> Here is the problem:
> >>>>
> >>>> There are over 10K records that are submitted as async service calls
> in
> >>>> step
> >>>> 2 above.  I'm seeing a transaction time out when the service engine
> tries
> >>>> to
> >>>> process all of these records as it calls an "UPDATE JOB_SANDBOX for
> >>>> job_id=XXX".  I believe it is trying to update all 10k of these jobs
> >>>> individually in a single transaction and times out.  The jobs are then
> >>> left
> >>>> in a pending status and never changed but the service engine keeps
> timing
> >>>> out.
> >>>>
> >>>> Here are my questions:
> >>>>
> >>>> 1. Is there a way to increase the transaction time out for the service
> >>>> engine to update these jobs in the JobSandbox so the service engine
> >>> threads
> >>>> can then process them?
> >>>>
> >>>> or
> >>>>
> >>>> 2.  Is there another way to break these jobs up so the service engine
> >>>> doesn't have to process 10k jobs in a single transaction.
> >>>>
> >>>>
> >>>> Note: the above process works very well when the number of records to
> >>>> process are around 1K.
> >>>>
> >>>>
> >>>>
> >>>> Brett
> >>>>
> >>>
> >
>
>


Re: Service engine timeouts

2010-06-28 Thread Brett Palmer
Rishi,

Thanks for the quick response.

The transaction timeout is not with my defined service.  The problem occurs
in the JobManager.poll() method of the service engine. The JobManager is
going through all the currently pending jobs and changing them to running
but it timesout before it can finish.

I can't see a way without modifying the JobManager code to change this
transaction time in the "poll" method.  I don't think my service definition
transaction time modifies the transaction time in the JobManager.

Let me know if I am missing something here.


Brett

On Mon, Jun 28, 2010 at 2:10 AM, Rishi Solanki wrote:

> To increase the transaction time out use  transaction-timeout="{value}"
> where value is any valid number.
> Note that this needs to be done in your service definition.
>
> Rishi Solanki
> Manager, Enterprise Software Development
> HotWax Media Pvt. Ltd.
> Direct: +91-9893287847
> http://www.hotwaxmedia.com
>
>
> On Sun, Jun 27, 2010 at 2:17 AM, Brett Palmer  >wrote:
>
> > We are running into a problem with the service engine when trying to run
> an
> > archiving batch service.  Here is how the service runs.
> >
> > 1. We run a service that collects a bunch of records for data
> warehousing.
> >
> > 2. The data warehouse service calls an async service call to process each
> > individual record.
> >
> > 3. The service engine them starts working on each individual record.
> >
> > We like the above process because it allows us to multi-process the large
> > batch job.
> >
> > Here is the problem:
> >
> > There are over 10K records that are submitted as async service calls in
> > step
> > 2 above.  I'm seeing a transaction time out when the service engine tries
> > to
> > process all of these records as it calls an "UPDATE JOB_SANDBOX for
> > job_id=XXX".  I believe it is trying to update all 10k of these jobs
> > individually in a single transaction and times out.  The jobs are then
> left
> > in a pending status and never changed but the service engine keeps timing
> > out.
> >
> > Here are my questions:
> >
> > 1. Is there a way to increase the transaction time out for the service
> > engine to update these jobs in the JobSandbox so the service engine
> threads
> > can then process them?
> >
> > or
> >
> > 2.  Is there another way to break these jobs up so the service engine
> > doesn't have to process 10k jobs in a single transaction.
> >
> >
> > Note: the above process works very well when the number of records to
> > process are around 1K.
> >
> >
> >
> > Brett
> >
>


Service engine timeouts

2010-06-26 Thread Brett Palmer
We are running into a problem with the service engine when trying to run an
archiving batch service.  Here is how the service runs.

1. We run a service that collects a bunch of records for data warehousing.

2. The data warehouse service calls an async service call to process each
individual record.

3. The service engine them starts working on each individual record.

We like the above process because it allows us to multi-process the large
batch job.

Here is the problem:

There are over 10K records that are submitted as async service calls in step
2 above.  I'm seeing a transaction time out when the service engine tries to
process all of these records as it calls an "UPDATE JOB_SANDBOX for
job_id=XXX".  I believe it is trying to update all 10k of these jobs
individually in a single transaction and times out.  The jobs are then left
in a pending status and never changed but the service engine keeps timing
out.

Here are my questions:

1. Is there a way to increase the transaction time out for the service
engine to update these jobs in the JobSandbox so the service engine threads
can then process them?

or

2.  Is there another way to break these jobs up so the service engine
doesn't have to process 10k jobs in a single transaction.


Note: the above process works very well when the number of records to
process are around 1K.



Brett


Re: Using custom delegator in simple method

2010-04-15 Thread Brett Palmer
Thanks both of the suggested solutions will work for me.  I think I'll try
the shorter "call-class-method" for now.


Brett

On Wed, Apr 14, 2010 at 10:35 PM, Scott Gray wrote:

> You might be better off doing a call-class-method for
> DelegatorFactory.getDelegator(String)
>
> Regards
> Scott
>
> On 15/04/2010, at 4:30 PM, Rishi Solanki wrote:
>
> > Bret,
> > For this you can get the delegator objects as follows in simple method;
> >  > field="delegator1">
> >  > field="delegator1">
> > Need to pass the parameters constructor needs. This tag automatically
> call
> > the constructor of the class specified in the class-name attribute.
> >
> > One more pointer is use  tag in simple method and in value tag
> you
> > can do all java code use ${groovy: 'post your code here'}
> > HTH!
> >
> > Rishi Solanki
> > Manager, Enterprise Software Developer
> > HotWax Media Pvt. Ltd.
> > Direct: +91-9893287847
> > http://www.hotwaxmedia.com
> >
> >
> > On Wed, Apr 14, 2010 at 3:14 AM, Brett Palmer  >wrote:
> >
> >> Does anyone know if it's possible to specify the entity delegator you
> want
> >> to use in a simple method instead of using the "default" delegator?
> >>
> >> I know you can do it from a Java service but I would like to do it from
> a
> >> simple method if possible.
> >>
> >> We have an ofbiz application that uses two delegators.  The first
> delegator
> >> is the default one and points to a local ofbiz database.  The second
> >> delegator is use to access a remote ofbiz database.  Simple methods
> would
> >> be
> >> very convenient for us passing data between the two databases.
> >>
> >>
> >> Thanks,
> >>
> >>
> >> Brett
> >>
>
>


Using custom delegator in simple method

2010-04-13 Thread Brett Palmer
Does anyone know if it's possible to specify the entity delegator you want
to use in a simple method instead of using the "default" delegator?

I know you can do it from a Java service but I would like to do it from a
simple method if possible.

We have an ofbiz application that uses two delegators.  The first delegator
is the default one and points to a local ofbiz database.  The second
delegator is use to access a remote ofbiz database.  Simple methods would be
very convenient for us passing data between the two databases.


Thanks,


Brett


Re: Profiling using OFBiz

2010-03-17 Thread Brett Palmer
Neha,

I posted this message a few months ago about some profiling probes we wrote
to measure method times.  They work pretty well and allow you specify what
you want to profile (e.g. com.mycode.* or org.ofbiz.entity, etc).

I've been meaning to contribute these tools back with instructions on how to
use them.  I'll open a JIRA issue when I can get this complete.

Brett

/*/

We have been experimenting with the TPTP tools from eclipse to find
performance bottlenecks.  The tool let's you create your own custom probes
that can be inserted at run time into your deployed application.  The nice
thing about these custom probes are they don't create a large footprint like
so many other profiling tools.

http://www.eclipse.org/tptp/

Here are some other links you may find helpful:


Brett


Articles on Eclipse Test and Performance Tools Platform

http://www.eclipse.org/tptp/

http://www.vogella.de/articles/EclipseTPTP/article.html

http://docs.hp.com/en/JAVAPERFTUNE/

Good article for WebSphere/ZOS with Sample probe code
- http://www.redbooks.ibm.com/abstracts/sg247177.html?Open

http://www.ddj.com/article/printableArticle.jhtml?articleID=184406433&dept_url=/java/

http://docs.hp.com/en/JAVAPERFTUNE/bytecode.pdf

On Fri, Mar 12, 2010 at 7:10 AM, Neha Mehta wrote:

> Hi,
>
>
>
>  I need to check memory leaks, memory profiling and cpu profiling with
> OFBiz.
>
>  Can anyone suggest me the best tool for  OFBiz profiling…
>
>
>
>  Can I create core dumps and find cpu usage by OFBiz??
>
>
>
> **
>
> *Thanks & Regards,*
>
> *Neha Mehta*
>
> *[image: cid:image002.jpg@01CA7F33.59E3EE50]*
>
>
>
> --
> This Email may contain confidential or privileged information for the
> intended recipient (s) If you are not the intended recipient, please do not
> use or disseminate the information, notify the sender and delete it from
> your system.
>
> __
>


Re: Avoiding the "Got a insecure (non-https) form POST" warning when running non-secure between Apache and Tomcat

2010-03-04 Thread Brett Palmer
Thanks that was a helpful link.

We are still trying to determine what performs better, mod_jk or mod_proxy.
 We thought we found some bottlenecks under heavy loads with mod_Jk but we
never confirmed that.  I'll update the group on our findings as we discover
them.



Brett

On Thu, Mar 4, 2010 at 1:35 PM, Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:

> Also you might be interested by mod_proxy_ajp, a simple setting here
>
> http://cwiki.apache.org/confluence/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-HTTPD
>
> Jacques
>
> From: "Adrian Crum" 
>
>  Scott Gray wrote:
>>
>>> I don't have a recommendation as such, it was just a thought to get you
>>> to the quickest possible solution.
>>>
>>> The options as I see it are:
>>> 1. Switch back to using https
>>> 2. Submit patches so that these warnings/error aren't logged for every
>>> request, perhaps just at startup or perhaps have another configuration to
>>> disable the warnings
>>>
>>> It wasn't clear to me how you are ensuring the same level of security
>>> that OFBiz provides OOTB but I would recommend that maintaining it should be
>>> your highest priority.
>>>
>>
>> I agree with this. Don't assume the network behind the firewall is safe.
>> Enable security wherever and whenever possible.
>>
>>
>
>


Re: Avoiding the "Got a insecure (non-https) form POST" warning when running non-secure between Apache and Tomcat

2010-03-04 Thread Brett Palmer
Scott,

We don't really have a good reason for turning it off.  Here were some of
the reasons:

- The initial thought was secure connections between web and application
servers was not necessary as these are behind the firewall.
- We also thought we might be improving performance by not encrypting
requests between servers, but we never verified these benefits.
- We also use mod_jk and it communicates insecurely using is own AJP
protocol.

Is your recommendation to turn on security and have mod_proxy communicate
directly to port 8443?


Brett



On Thu, Mar 4, 2010 at 11:00 AM, Scott Gray wrote:

> On 4/03/2010, at 10:50 AM, Brett Palmer wrote:
>
> > We use Apache web servers to communicate with our OFBiz servers using a
> > combination of mod_jk and mod_proxy.  For our mod_proxy configuration, we
> > forward secure requests (https) from Apache to a non-secure port (8080)
> on
> > Tomcat/OFBiz.
> >
>
>
> Hi Brett
>
> Why do you transfer from https to http?  If you stopped doing that wouldn't
> all your problems go away?
>
> Regards
> Scott


Avoiding the "Got a insecure (non-https) form POST" warning when running non-secure between Apache and Tomcat

2010-03-04 Thread Brett Palmer
We use Apache web servers to communicate with our OFBiz servers using a
combination of mod_jk and mod_proxy.  For our mod_proxy configuration, we
forward secure requests (https) from Apache to a non-secure port (8080) on
Tomcat/OFBiz.

Our application is an AJAX/Dojo application that posts normal HTTP requests
to the web server, but when we do this we frequently get the following
messages:

2010-03-01 13:32:18,890 (http-0.0.0.0-8080-6) [
RequestHandler.java:186:ERROR] Got a insecure (non-https) form POST to a
secure (http) request [jsonservice], returning error
2010-03-01 13:32:18,906 (http-0.0.0.0-8080-6) [
RequestHandler.java:204:WARN ] HTTPS is disabled for this site, so we can't
tell if this was encrypted or not which means if a form was POSTed and it
was not over HTTPS we don't know, but it would be vulnerable to an XSRF and
other attacks: Not accepting insecure form data posted to a secure request

I understand the reason for the error message and the potential security
problems if our Tomcat/OFBiz application server was the front-facing server,
but in our environment the Tomcat/OFBiz servers are only accessible via
Apache.  The request from the user is secure.

I don't believe the error causes any problems for us (transaction roll
backs, etc), but we would like to eliminate all false error messages in our
logs so we can focus on more critical ones.

What is the recommendation from the community for avoiding these types of
messages when using Apache to Tomcat configuration?  Are others working
around these issues when they use Apache mod_proxy?




Brett


Re: debugging Groovy files in Eclipse

2010-02-10 Thread Brett Palmer
Kojo,

Does the Groovy plugin slowdown your eclipse environment?  I tried it a
while ago but it was continually rebuilding the projects and making eclipse
run slowly.  I finally had to uninstall the plugin.  Have the improved the
plugin with these newer releases?


Brett

On Wed, Feb 10, 2010 at 6:00 AM,  wrote:

> Hello Mike,
> I am running Eclipse 3.5.1 with Groovy plugin version 1.5.6 without any
> problem. It is important to also make sure that you are running Eclispe in
> debugging mode. Are you able to set breakpoints in Java source files?
>
> Regards,
> Kojo Gambrah
>
>
> Mike Voytovich wrote:
>
>> Hi,
>>
>> I'm trying to step through some OFBiz Groovy source files, and I'm unable
>> to set breakpoints.  When I right click in the gutter, "(Groovy) Toggle
>> Breakpoint" is an option, but it can never actually set a breakpoint.
>>
>> I'm running Eclipse 3.5.1, and the Groovy-Eclipse plugin from Codehaus,
>> version 2.0.0.
>>
>> I'm building from the command-line, and can connect to the OFBiz remote VM
>> and step through Java source just fine.
>>
>> Does anyone know of any tricks required to get Groovy debugging working
>> with OFBiz?
>>
>> Thanks in advance,
>> -mike
>>
>>
>>
>
>


Re: Any chance for an upgrade? - help please

2010-01-29 Thread Brett Palmer
Florin,

Have you tried using Apache's mod_proxy instead of mod_jk?

I'm not surprised that you get faster responses directly from Apache but 2-3
req/sec doesn't sound good for Tomcat either.

I'll try this same tool in our configuration and see what we get.

For us we configure mod_jk to communicate through the ofbiz AJP port.

We have also used mod_proxy which doesn't use AJP and goes directly to
Tomcat's http port (8080).

I'll run your recommended tool to see what gets better performance.



Brett

On Fri, Jan 29, 2010 at 6:07 AM, Florin Popa  wrote:

> Hi,
>
> It seems I was on a false track... the tests hits directly against ofbiz
> (without Apache in front) did not work properly.. now they do and I only get
> max 2-3 req.sec...
>
> What could be wrong configured?
>
> I tried similar hits against one simple tomcat and on 30 secs I reach 5
> req/sec.
>
> I only touched this:
>
> purge-job-days="4"
>failed-retry-min="3"
>ttl="18"
>wait-millis="750"
>jobs="500"
>min-threads="50"
>max-threads="500"
>poll-enabled="true"
>poll-db-millis="2">
>   
>   
>
>
> What else needs to be configured for production load usage to reach more
> requests per second?
>
> The cache is also properly confgured
>
>
> thanks,
> Florin
>
>  Florin,
>>
>> I'm not sure what you mean when you say "apache talke with ofbiz instances
>> via AJP rather than mod_jk".  I thought mod_jk used AJP.
>>
>> I would be interested if you find that AJP is a bottleneck.  We use a
>> configuration with Apache on the front end and ofbiz on behind it.  We use
>> mod_jk because it has a nice load balancer feature.  We have also used
>> mod_proxy which doesn't use AJP but we haven't done any performance
>> testing
>> to compare the differences between the two.
>>
>> Brett
>>
>> On Thu, Jan 28, 2010 at 11:58 AM, Florin Popa > >wrote:
>>
>>
>>
>>> I'll take a look ar Grinder, seems promising, thanks again.
>>>
>>> Of course life is never easy :) now I have another problem... the network
>>> admin configured 2 ofbiz instances having an apache in front of them as
>>> balancer.. but apache "talks" with ofbiz instances via AJP rather than
>>> mod_jk ..which seems to be a bottleneck..
>>> Have you experienced that kind of things?
>>>
>>> best regards,
>>> Florin Popa
>>>
>>>
>>>
>>>  The Grinder is a nice tool for such things (and has a nice recording
>>>
>>>
 proxy).

 BTW, make sure to set your HTTP and thread pool sizes adequately for the
 load you are planning on.

 -David


 On Jan 28, 2010, at 11:30 AM, Florin Popa wrote:





> Thanks everyone for the help!
>
> Today we succeeded port to geronimo transaction 2.1 as well as the
> switch
> from minerva to DBCP connection pool. It seems much better but I am not
> fully content :)
> Maybe because the automated testing tool I am using can not really hit
> hard enough..
>
> Any recommendation for such tools?
>
>
> Of course upgrade to latest version was scheduled too but this would
> take
> longer..
>
> Best regards,
> Florin
>
>
>
>
>> You're using a quite old version of OFBiz with the Minerva connection
>> pool (I can tell from the stack trace you sent earlier). The Minerva
>> connection pool has some issues with resetting connections when there
>> are
>> errors, especially if there is any code that doesn't manage errors
>> well, but
>> also if there are network layer issues or other sorts of things... it
>> just
>> doesn't recover at all.
>>
>> You could try making changes to use the Apache DBCP connection pool
>> that
>> we use now in OFBiz. To do so requires some low-level coding. You can
>> look
>> at the current code base for hints, but there is still some work.
>>
>> There are no known workarounds to this issue for really high volume
>> sites, and for low-medium volume sites the workaround was to restart
>> the app
>> server(s) every day.
>>
>> -David
>>
>>
>> On Jan 27, 2010, at 3:01 PM, Florin Popa wrote:
>>
>>
>>
>>
>>
>>> I was just asking myself if someone encountered before such problems
>>> on
>>> older revisions..
>>>
>>> Would be Geronimo ok to be used or shall I try something else?
>>>
>>> regards,
>>> Florin
>>>
>>>
>>>
>>>
 I'm sorry the potential for problems with this approach is just too
 large for me to be able to help you through it.

 Regards
 Scott

 HotWax Media
 http://www.hotwaxmedia.com

 On 27/01/2010, at 1:53 PM, Florin Popa wrote:





> The 

Re: Any chance for an upgrade? - help please

2010-01-29 Thread Brett Palmer
Florin,

I'm not sure what you mean when you say "apache talke with ofbiz instances
via AJP rather than mod_jk".  I thought mod_jk used AJP.

I would be interested if you find that AJP is a bottleneck.  We use a
configuration with Apache on the front end and ofbiz on behind it.  We use
mod_jk because it has a nice load balancer feature.  We have also used
mod_proxy which doesn't use AJP but we haven't done any performance testing
to compare the differences between the two.

Brett

On Thu, Jan 28, 2010 at 11:58 AM, Florin Popa wrote:

> I'll take a look ar Grinder, seems promising, thanks again.
>
> Of course life is never easy :) now I have another problem... the network
> admin configured 2 ofbiz instances having an apache in front of them as
> balancer.. but apache "talks" with ofbiz instances via AJP rather than
> mod_jk ..which seems to be a bottleneck..
> Have you experienced that kind of things?
>
> best regards,
> Florin Popa
>
>
>
>  The Grinder is a nice tool for such things (and has a nice recording
>> proxy).
>>
>> BTW, make sure to set your HTTP and thread pool sizes adequately for the
>> load you are planning on.
>>
>> -David
>>
>>
>> On Jan 28, 2010, at 11:30 AM, Florin Popa wrote:
>>
>>
>>
>>> Thanks everyone for the help!
>>>
>>> Today we succeeded port to geronimo transaction 2.1 as well as the switch
>>> from minerva to DBCP connection pool. It seems much better but I am not
>>> fully content :)
>>> Maybe because the automated testing tool I am using can not really hit
>>> hard enough..
>>>
>>> Any recommendation for such tools?
>>>
>>>
>>> Of course upgrade to latest version was scheduled too but this would take
>>> longer..
>>>
>>> Best regards,
>>> Florin
>>>
>>>
 You're using a quite old version of OFBiz with the Minerva connection
 pool (I can tell from the stack trace you sent earlier). The Minerva
 connection pool has some issues with resetting connections when there are
 errors, especially if there is any code that doesn't manage errors well, 
 but
 also if there are network layer issues or other sorts of things... it just
 doesn't recover at all.

 You could try making changes to use the Apache DBCP connection pool that
 we use now in OFBiz. To do so requires some low-level coding. You can look
 at the current code base for hints, but there is still some work.

 There are no known workarounds to this issue for really high volume
 sites, and for low-medium volume sites the workaround was to restart the 
 app
 server(s) every day.

 -David


 On Jan 27, 2010, at 3:01 PM, Florin Popa wrote:



> I was just asking myself if someone encountered before such problems on
> older revisions..
>
> Would be Geronimo ok to be used or shall I try something else?
>
> regards,
> Florin
>
>
>> I'm sorry the potential for problems with this approach is just too
>> large for me to be able to help you through it.
>>
>> Regards
>> Scott
>>
>> HotWax Media
>> http://www.hotwaxmedia.com
>>
>> On 27/01/2010, at 1:53 PM, Florin Popa wrote:
>>
>>
>>
>>> The attempt to update Ofbiz to recent revision is for the moment
>>> (time limits) not possible.. there are so many differences... I am even 
>>> not
>>> sure if bsh could work further instead of the newly groovy ?! also 
>>> the
>>> entity layer handling.. etc
>>>
>>> So what I tried was to back port the transaction management - latest
>>> attempt is attached
>>>
>>
>>
>

>>>
>>
>>
>>
>
>


Re: How to create a new entity

2009-12-30 Thread Brett Palmer
There are two steps to definining a new entity.

1. First add the entity definition to your entitymodel.xml file which looks
you have.

2. Then add the entity to the group file which is usually called
entitygroup.xml



If you don't have the entity added to the entitygroup.xml file it won't be
created when the server starts up.

I noticed you named your entity trackUserSource.  The standard naming
convention is to start with upper case name for the entity (e.g.
TrackUserSource).


Hope that helps.


Brett
On Tue, Dec 29, 2009 at 10:19 PM, Hemanth Kumar Kanamarlapudi <
hemanth_kanamarlap...@mindtree.com> wrote:

> Hi All,
>
> I have added a new entity definition in an existing entitymodel.xml which
> is already loaded through ofbiz-component.xml
>
>
> title="Track User Source Entity" >
>
>
>
>
>
>
>
> 
>
> But I am not able to create this object when I restart ofbiz.
>
> Your quick help is appreciated.
>
> Thanks & Regards
> Hemanth
>
>
>
> 
> http://www.mindtree.com/email/disclaimer.html
>


Re: Method to tie into the ofbiz shutdown process

2009-12-22 Thread Brett Palmer
David,

Thanks for the information.  A simple container would fit our needs.

Thanks,


Brett

On Tue, Dec 22, 2009 at 10:02 AM, David E Jones  wrote:

>
> Any container defined in the ofbiz-containers.xml file (or other containers
> file, depending on your configuration) can have a tear down method.
> Basically the containers are started up in the order they appear in the
> *containers.xml file, and then the tear down or cleanup is done in reverse
> order when the app server shuts down.
>
> There are many other ways to do this, but this is the lowest-level or most
> basic way.
>
> -David
>
>
> On Dec 22, 2009, at 10:12 AM, Brett Palmer wrote:
>
> > We need to perform a clean up operation for some custom caching we are
> doing
> > with our ofbiz servers.  Is there a convenient way to tie into the ofbiz
> > shutdown process for this type of cleanup?
> >
> > Another approach would be for us to write a custom servlet and implement
> the
> > "init" and "destroy" methods to seed the cache and then clean it up when
> the
> > server shuts down.  We would then include this servlet in the ofbiz
> web.xml
> > file.
> >
> > If there is an easier method to do this please share.
> >
> > Thanks,
> >
> >
> > Brett
>
>


Method to tie into the ofbiz shutdown process

2009-12-22 Thread Brett Palmer
We need to perform a clean up operation for some custom caching we are doing
with our ofbiz servers.  Is there a convenient way to tie into the ofbiz
shutdown process for this type of cleanup?

Another approach would be for us to write a custom servlet and implement the
"init" and "destroy" methods to seed the cache and then clean it up when the
server shuts down.  We would then include this servlet in the ofbiz web.xml
file.

If there is an easier method to do this please share.

Thanks,


Brett


Re: How to assign JobSandbox jobs to specific application server?

2009-12-22 Thread Brett Palmer
I discovered some posting on this subject where users were setting up
different service "ThreadPools" to handle specific requests.  Is this still
the preferred approach to assigning jobs to specific application servers?

For Example we could configure our service engine to have a worker1 pool for
app server 1 and worker2 pool for app server 2:










Brett

On Tue, Dec 22, 2009 at 7:30 AM, Brett Palmer wrote:

> We run multiple ofbiz application servers against the same ofbiz database.
>  We would like to have specific application servers execute scheduled batch
> services through the JobSandbox.  For example, server 1 executes service 1,
> server 2 executes service 2, etc.
>
> The default behavior is that each application server polls the JobSandbox
> for jobs that need to be serviced and the assignment of the job is
> completely random.
>
> Is there a way to assign jobs to servers and if so what is the recommended
> approach?
>
>
> Brett
>


How to assign JobSandbox jobs to specific application server?

2009-12-22 Thread Brett Palmer
We run multiple ofbiz application servers against the same ofbiz database.
 We would like to have specific application servers execute scheduled batch
services through the JobSandbox.  For example, server 1 executes service 1,
server 2 executes service 2, etc.

The default behavior is that each application server polls the JobSandbox
for jobs that need to be serviced and the assignment of the job is
completely random.

Is there a way to assign jobs to servers and if so what is the recommended
approach?


Brett


Re: How to change default entity sequencer increment of 10

2009-12-12 Thread Brett Palmer
David,

We are at revision 806775 of the trunk.

We mostly use the sequencer through simple methods using the " wrote:

>
> This is currently configured per entity. On the entity definition there is
> a sequence-bank-size attribute you can use to increase this to 100 or
> whatever.
>
> BTW, which version of OFBiz are you using? Getting sequence IDs should be
> in a separate transaction from your main transaction, but of course even
> with a tiny transaction like that conflicts could occur.
>
> -David
>
>
> On Dec 12, 2009, at 11:26 AM, Brett Palmer wrote:
>
> > We are running a mysql 5.x database with 4 applications servers on the
> same
> > db.  We use the GenericDelegator.getNextSeqId() a lot in our code and
> simple
> > methods.  The default is for the sequencer to increment by 10 but under
> > heavy loads we are seeing the SequenceValueItem table get really hot with
> > updates that lock.
> >
> > We would like to avoid the frequency of locks on this table by increasing
> > the increment from 10 to 100 or bigger.
> >
> > Is this done in a configuration file?  I see a method
> > GenericDelegator.getNextSeqId(seqName, staggerMax) that would probably
> work
> > but is this also available in a simple method.
> >
> > Thanks,
> >
> >
> > Brett
>
>


How to change default entity sequencer increment of 10

2009-12-12 Thread Brett Palmer
We are running a mysql 5.x database with 4 applications servers on the same
db.  We use the GenericDelegator.getNextSeqId() a lot in our code and simple
methods.  The default is for the sequencer to increment by 10 but under
heavy loads we are seeing the SequenceValueItem table get really hot with
updates that lock.

We would like to avoid the frequency of locks on this table by increasing
the increment from 10 to 100 or bigger.

Is this done in a configuration file?  I see a method
 GenericDelegator.getNextSeqId(seqName, staggerMax) that would probably work
but is this also available in a simple method.

Thanks,


Brett


ApacheCon 2009 Round Table User Feedback

2009-11-10 Thread Brett Palmer
Here are the notes that I took during the ApacheCon 2009 User Round Table.
The conference was a success but I believe was less attended than normal.
I've been to about 6 ofbiz conferences and this one was the least attended
by ofbiz users than others.  I attribute this to the current economic
situation rather than anything else.

 Interestingly, a lot of the comments during the round table were similar to
ones that we have had in the past. The project continues to make progress
but from outsiders it is difficult to measure as some of the new features
takes months to see in the end product.

 There were six people in attendance at the round table. A few had to leave
early to catch planes in the afternoon.  Of those that attended the round
table two were speakers (myself and Ruth). Three of the attendees were
service providers trying to better understand the direction of ofbiz and one
was a new user that was active in other Apache projects and wanted to know
more about ofbiz.


Here are the key comments:

 * Everyone was very interested in the new project that Dave introduced a
couple of weeks ago about a specialized application for small business. They
wanted to know a lot more about this project and what it would include.
There was a lot of excitement about the proposal.  I didn't have a lot of
details to share so I told them to watch the mailing list for more details
on the subject.

 * Most common complaint. The UI for the out of the box ecommerce
application. The general feedback was that from a technical perspective
people like ofbiz but it was difficult to convince key business people that
ofbiz was right for their organization because of the lacking "sizzle" in
the default application.   Non-technical people have a hard time determining
how difficult it is to customize the UI and in a quick review will opt for a
better looking application because that is all they can really evaluate.
The general thought was that the lack of a very nice front end was slowing
the adoption for ofbiz

 * Another suggestion was around content management. The ofbiz CMS is not
fully complete with a UI and business logic. The question was asked if it
was possible to plugin other CSM packages the the Java Content Repository
(JCR).

 * There were some comments on OpenTaps and what it means to OFBiz. This is
always an interesting discussion and I tried to explain the licensing
problems with using OpenTaps. The one benefit people had about using
OpenTaps is that it has a full CRM application that people can use from the
start.  OfBiz is more general and requires more customization.

 * SugarCRM and other similar applications are examples of very large user
communities because the application is a complete solution.  It is difficult
to convince people to use ofbiz because there are pieces that are not
complete and require customization.  The ability to customize is a benefit
for some users but a drawback for others and is a hindrance to wide spread
adoption.

 * Is it possible to break up the components more into separate installable
modules. For example, framework versus applications.  We discussed how this
is currently done but the feedback was to make it easier for people to pick
and choose what components to install.

 * Any plans to integrate a complete rules engine into ofbiz

 * Version control for release branches. Are they plans to do more frequent
releases?  The current download of the nightly build is misleading as user
think it is a stable release build but it is really just the nightly build
from the trunk.

 * It was stated that OFBiz is a unique apache project as it is focused on
business solutions where as most apache projects focus on a single technical
problem.  How that technology is used in an application is generally
irrelevant.  OFBiz is different in that it tries to provide a complete
solution for businesses and users. The feedback was that in the future it
would be nice to attract more end users to the ofbiz apache conference
rather than technical people that implement the solution. This was agreed
that if there were more complete applications that the user community would
grow and all people in the community would benefit.

 * Another strategy for OFBiz would be to define business best practices and
then implement those processes into the applications. This is a difficult
task as all businesses are unique but just as ofbiz adopted a common data
model there most be common business practices that would benefit all
businesses.

 * Improving the integration of the seleniumXml test framework with the
existing ofbiz test framework. Also more examples of tests using the OOTB
ofbiz applications would be desired.

The above comments are notes that I took during the round table discussion.
They are not my own personal opinions but of those of the group.  Please
feel free to comment on these ideas for the benefit of the community.

Overall, the people attending the conference commented that they would like
OFBiz to 

Re: ApacheCon 2009

2009-11-05 Thread Brett Palmer
David, sorry to hear that you're not coming.  I arrived yesterday but I've
been busy putting out production fires today.  I should be ready for my
presentation tomorrow.


Brett

On Thu, Nov 5, 2009 at 1:27 PM, David E Jones  wrote:

>
> It's great that there are a few OFBiz people there!
>
> I was planning on coming in this evening, but I've run into a snag... and
> it's bad enough that I don't think I'm going to make it for tomorrow.
>
> Is anyone interested in speaking in the morning in my time slot?
>
> Also, would someone be willing to lead the roundtable in my place? The idea
> was fairly informal anyway, so anyone who is comfortable with starting the
> sessions and having a few questions/topics prepared to keep the conversation
> going is welcome to do so. For this session there have been some great
> topics to discuss that have come up on the mailing lists recently, like
> making things easier OOTB for end-users and areas/efforts to focus on in the
> near future, plus of course the always popular guessing what will be
> contributed next based on what different people need and/or want to build.
>
> -David
>
>
>
> On Nov 4, 2009, at 4:16 PM, Tim Ruppert wrote:
>
>  I had a Bruno Souza sighting today - looking forward to seeing more of you
>> here when you arrive.  Ruth, David, I'm sure you are coming since you're
>> speaking - when will you arrive?
>>
>> Cheers,
>> Ruppert
>> --
>> Tim Ruppert
>> HotWax Media
>> http://www.hotwaxmedia.com
>>
>> o:801.649.6594
>> f:801.649.6595
>>
>> On Nov 4, 2009, at 8:47 AM, Tim Ruppert wrote:
>>
>>  If there's anyone here in Oakland for ApacheCon US 2009, please stop by
>>> the HotWax Media booth.  Last year was so swamped OFBiz people - it was a
>>> bit of a bummer not to see all of those familiar faces at the committers get
>>> together last night.
>>>
>>> Cheers,
>>> Ruppert
>>> --
>>> Tim Ruppert
>>> HotWax Media
>>> http://www.hotwaxmedia.com
>>>
>>> o:801.649.6594
>>> f:801.649.6595
>>>
>>>
>>
>


Re: deploying ofbiz in amazon EC2

2009-10-05 Thread Brett Palmer
What are the issues you've had with EC2?  We've been using it for several
months now and haven't found a problem.  Curious what others are finding for
f others are using it.

Thread specific:  we are using the OOTB ofbiz embedded tomcat and use svn to
distribute code to our EC2 servers.  I can't see a good enough reason to try
and use a WAR file with Tocmat when ofbiz integrates with it very well.


Brett

On Mon, Oct 5, 2009 at 12:05 PM, Tim Ruppert wrote:

> There are relatively big issues with EC2 - I'd probably look to a better
> run Cloud - something like what Contegix, who specializes in OFBiz
> installations, provides:
>
> http://www.contegix.com/solutions/cloud-hosting.php
>
> Cheers,
> Ruppert
>
>
> On Oct 5, 2009, at 10:59 AM, Jacques Le Roux wrote:
>
>  You may try this,
>> http://docs.ofbiz.org/display/OFBTECH/Run+OFBiz+under+outside+Application+Servers
>>
>> No guarantee for the Tomcat page ... (seems to be some problems nowadays)
>>
>> Jacques
>>
>> From: "Deyan Tsvetanov" 
>>
>>> No, it is not possible :)
>>>
>>> Tomcat runs as a container inside ofbiz. You can disable it if you want
>>> to, or replace it by jetty. But you can not run ofbiz into tomcat. Imho:)
>>>
>>> -- deyan
>>>
>>> -Original Message-
>>> From: Chris Snow 
>>> Sent: 05 Октомври 2009 г. 18:59
>>> To: user@ofbiz.apache.org
>>> Subject: deploying ofbiz in amazon EC2
>>>
>>> I'm currently looking into setting up ofbiz in an amazon EC2 instance.
>>>
>>> I'm still at early prototyping stage, but I think it would make sense to
>>> be able to build ofbiz offline and then deploy it to tomcat as a single
>>> war file.
>>>
>>> Is it possible to compile ofbiz to a single war file for tomcat?  If not
>>> I
>>> can investigate deploying to glassfish as a single war.
>>>
>>> Many thanks in advance,
>>>
>>> Chris
>>>
>>>
>>>
>>>
>>
>>
>


Re: JobPoller causing high cpu utilization.

2009-09-23 Thread Brett Palmer
I think Ofbiz 3.0 is pretty old so its going to be hard for the
community to help with this issue.

Here are a few suggestions:

- are you archiving the job_sandbox table?  This table can get very
large if you don't
- make sure you have services set to fail after a certain amount of
retries.  I have had bad services that just keep trying when the retry
is set to -1
- make sure you don't have table scans on that table

And finally

- update your ofbiz version to a more recent version


Brett

On 9/23/09, Vikas Jadhav  wrote:
> Hi,
>
> We are using OFBiz 3.0 and have some scheduled jobs in OFBiz.
>
> We are having multiple instances of OFBiz pointing to the same database and
> are having same pool ids or pool name in serviceengine.xml. Its been
> observed that ofbiz process is utilizing 100% CPU usage and causing high CPU
> utilization.
>
> From investigations, we find that JobPoller's run(), next() and JobManager's
> poll methods are taking too much time.
>
> Can any one help on this to sort it out.
>
> Thanks,
> Vikas
>

-- 
Sent from my mobile device


Re: Load Balancing in OFbiz

2009-09-22 Thread Brett Palmer
and Yes, you need to replicate the same code on all the different machines.
 We have used subversion to do this as you only need to update each server
to the version you want to run.  Then manually modify some config files such
as the jvm path that I indicated earlier and your up and running.


Brett

On Tue, Sep 22, 2009 at 11:30 PM, Brett Palmer wrote:

> 1.  We run one instance of ofbiz on a separate server but this is because
> we are running a single application and want to scale by adding more
> machines.
>
> 2.  It is easier to use the embedded ofbiz version rather than a standalone
> tomcat with ofbiz placed as a standard WAR file.  From the Apache Web server
> perspective there isn't any difference.  It is talking AJP protocol and
> can't tell if it is an embedded version of tomcat or standalone.
>
> 3.  I'm not sure the reason some are running several version of ofbiz on
> the same machine.  My guess is they have different customers or application
> and don't need the extra hardware to service these applications.  We
> multiple instances of ofbiz on the same machine but this is so we can have a
> dev, testing, and production version running on the same machine.
>
> For maximum scalability you would put 1 instance of ofbiz on a single
> machine and load balance between these machines.  We are using Amazon's EC2
> servers so it is easy for us to shutdown to a single server at night and
> then start up several server during the days when the application is busy.
>
>
> Brett
>
> On Tue, Sep 22, 2009 at 10:45 PM,  wrote:
>
>> Hi Brett,
>>
>> Thanx for your generosity.
>> I have to load balance OFBiz on multiple servers. For this do i need to
>> have replica of my OFBiz code running on multiple servers and run embedded
>> OFBiz tomcat on all these servers??? Or do i need to have multiple tomcat
>> instances on a single server?? ALso please let me know, is it better to
>> use embedded tomcat or external tomcat for load balancing ??
>>
>> All the forums that i have read talk about running multiple tomcat
>> instances on same server.. I do not understand the reason behind this..
>> Kindly help me out.
>>
>>
>>
>> Thanks & Regards,
>> Neha Mehta
>>
>>
>> __
>
>
>


Re: Load Balancing in OFbiz

2009-09-22 Thread Brett Palmer
1.  We run one instance of ofbiz on a separate server but this is because we
are running a single application and want to scale by adding more machines.

2.  It is easier to use the embedded ofbiz version rather than a standalone
tomcat with ofbiz placed as a standard WAR file.  From the Apache Web server
perspective there isn't any difference.  It is talking AJP protocol and
can't tell if it is an embedded version of tomcat or standalone.

3.  I'm not sure the reason some are running several version of ofbiz on the
same machine.  My guess is they have different customers or application and
don't need the extra hardware to service these applications.  We multiple
instances of ofbiz on the same machine but this is so we can have a dev,
testing, and production version running on the same machine.

For maximum scalability you would put 1 instance of ofbiz on a single
machine and load balance between these machines.  We are using Amazon's EC2
servers so it is easy for us to shutdown to a single server at night and
then start up several server during the days when the application is busy.


Brett

On Tue, Sep 22, 2009 at 10:45 PM,  wrote:

> Hi Brett,
>
> Thanx for your generosity.
> I have to load balance OFBiz on multiple servers. For this do i need to
> have replica of my OFBiz code running on multiple servers and run embedded
> OFBiz tomcat on all these servers??? Or do i need to have multiple tomcat
> instances on a single server?? ALso please let me know, is it better to
> use embedded tomcat or external tomcat for load balancing ??
>
> All the forums that i have read talk about running multiple tomcat
> instances on same server.. I do not understand the reason behind this..
> Kindly help me out.
>
>
>
> Thanks & Regards,
> Neha Mehta
>
>
> __


Re: Delivering .swf files via the serveObjectData object

2009-09-22 Thread Brett Palmer
Al,

The only thing I see that stands out is the "chartset" setting for the
non-working CMS url.

charset=UTF-8

Maybe setting the chartset the flashplayer assumes it is text and not binary
file.


Brett

On Tue, Sep 22, 2009 at 11:01 PM, Al Byers wrote:

> These are the headers when coming for this non-working url:
> https://localhost:8443/eng/control/stream?contentId=247658
>
> ServerApache-Coyote/1.1
> ExpiresWed, 23 Sep 2009 04:34:06 GMT
> Last-ModifiedWed, 23 Sep 2009 04:34:06 GMT
> Cache-Controlno-store, no-cache, must-revalidate, post-check=0,
> pre-check=0, false
> Pragmano-cache
> Content-Dispositionattachment;filename=q32_engine.swf
> Content-Typeapplication/x-shockwave-flash;charset=UTF-8
> Content-Length309183
> DateWed, 23 Sep 2009 04:34:06 GMT
> Request Headers
> Hostlocalhost:8443
> User-AgentMozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US;
> rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3
> Accepttext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
> Accept-Languageen-us,en;q=0.5
> Accept-Encodinggzip,deflate
> Accept-CharsetISO-8859-1,utf-8;q=0.7,*;q=0.7
> Keep-Alive300
> Connectionkeep-alive
> Refererhttps://localhost:8443/eng/control/AuthorTool
>
> CookieSaveStateCookie=undefined%2Cassess%2Croot%2COPTION_LABELING%2COPTION_GROUP%2COPTION_MATCH%2COPTION_ANY%2COPTION_ONE%2Cnull%2C%2C1%2C2%2C3%2C4%2C7%2C5%2C6%2C99;
> JSESSIONID=30505A4145DF6140132481E34E6F3364.jvm1;
> pe.autoUserLoginId=admin; webtools.autoUserLoginId=admin;
> eng.autoUserLoginId=admin; OFBiz.Visitor=10001
>
> These are the headers for the working url:
> http://localhost:8080/eng/images/q32_engine.swf
>
> ServerApache-Coyote/1.1
> EtagW/"309183-1253597059000"
> Last-ModifiedTue, 22 Sep 2009 05:24:19 GMT
> Content-Typeapplication/x-shockwave-flash
> Content-Length309183
> DateWed, 23 Sep 2009 04:38:14 GMT
> Request Headers
> Hostlocalhost:8080
> User-AgentMozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US;
> rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3
> Accepttext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
> Accept-Languageen-us,en;q=0.5
> Accept-Encodinggzip,deflate
> Accept-CharsetISO-8859-1,utf-8;q=0.7,*;q=0.7
> Keep-Alive300
> Connectionkeep-alive
> CookieJSESSIONID=30505A4145DF6140132481E34E6F3364.jvm1;
> pe.autoUserLoginId=admin; webtools.autoUserLoginId=admin;
> eng.autoUserLoginId=admin; OFBiz.Visitor=10001
>
> Does anybody see anything?
>
> -Al
>
> On Tue, Sep 22, 2009 at 9:26 PM, Al Byers 
> wrote:
> >
> > Has anyone delivered a Flash movie using the streaming capability of the
> content management system? I am looking at it in the debugger and it seems
> to be delivering content, but I am wondering if there are headers or
> something that needs to be done to get a movie to display? Instead of
> displaying the movie in the browser, it pops ups the download window and
> asks how to display it.
> >
> > -Al
>


Re: Load Balancing in OFbiz

2009-09-22 Thread Brett Palmer
Neha,

Here is a configuration we use to do load balancing in ofbiz.  Others may do
something else.

1. One machine is running an Apache Web server with mod_jk setup to
communicate with different instances of ofbiz.  The mod_jk is setup to load
balance between the different ofbiz instances.  Here is a document that
helps you get setup:

http://tomcat.apache.org/connectors-doc/generic_howto/loadbalancers.html


2. Then we start multiple boxes running ofbiz server - all pointing to the
same database.  The servers are setup to communicate using mod_jk's AJP
protocol.   You need to set the "jvm-route" in the
framework/base/config/ofbiz-containers.xml file to insure the load balancer
maintains sessions between requests.  Here is a snippet of that
configuration file.













**

.


3. One large box is running our database server.


We've been please with how well the Apache load balancing module works with
ofbiz.


Brett

On Tue, Sep 22, 2009 at 2:42 AM,  wrote:

> Hi,
>
> I want to load balance OFBiz requests using multiple servers(server
> cluster). Do i need to use multiple tomcat instances for that?? Is there
> any other efficient way to go for the same..
>
> I need to set up session replication using embedded tomcat but i am not
> able to get any concrete steps to go ahead. Do i need multiple tomcat
> instances running on different servers respective to same OFBiz code base
> ?? or different OFBiz deployed on different application servers?
>
>
> Thanks & Regards,
> Neha Mehta
>
>
> __


Re: Thesis Idea

2009-08-25 Thread Brett Palmer
Naing,

There are lots are areas in OFBiz that could be used for a Master's thesis.
I would recommend you first work with one of your professors to see if they
can help you define a thesis around OFBiz.  You need that sponsorship to
complete the work and they can help you decide what would be appropriate.


Brett

On Tue, Aug 25, 2009 at 8:19 AM, thet naing wrote:

> Hi all,
>
> Can anyone give me an idea about my Master Thesis project based on the
> OfBiz. I have more than a year experience on working with OfBiz for my
> company (doing bits and pieces of  fixing bugs and creating new modules
> like
> reporting and so on. If anyone have any idea, I am really appreciated all
> the inputs.Thank you very much.
>
> Kind regards,
> Naing
>


Setup Tomcat for JMX monitoring with Hyperic

2009-07-30 Thread Brett Palmer
I'm trying to use Hyperic to monitor multiple ofbiz instances.

http://sourceforge.net/projects/hyperic-hq/


It requires Tomcat to be setup with JMX enabled.  I'm not seeing JMX
settings with the ofbiz embedded tomcat configuration.  Has anyone else
setup hyperic or JMX with ofbiz?

Thanks,


Brett


Re: Missing webslinger jar in ofbiz build path

2009-06-15 Thread Brett Palmer
I've seen it and fixed it manually.  It would be nice if this could be
committed.

Brett

On 6/15/09, Evan Fowler  wrote:
> Hi All,
>
> Doing a recent project update to ofbiz in Eclipse, I've come across an
> error in the build path that states:
>
> Project 'ofbiz' is missing required library: 'framework/webslinger/lib/
> webslinger-base-invoker-20090610-bdb0eb5173b8.jar'
>
> Has anyone seen this? It seems to me like a recent commit for this
> framework folder (webslinger) is missing this jar file. Maybe it was
> just forgotten in the last commit, but the project cannot be built
> without it.
>
> Thanks!
>
>
>
> Evan Fowler
> Web Developer
>
> Direct Phone: (425) 346-8022
> Toll Free: 800-537-8816
> Fax: 425-771-7166
>
> www.mavericklabel.com
> 120 West Dayton Street
> Edmonds, WA 98020-4180
>
>

-- 
Sent from my mobile device


Re: Jython error

2009-06-01 Thread Brett Palmer
I think there were some early implementations in the test framework to
support jython but there were never fully completed.  This wouldn't be
very difficult to complete though.  I wrote an custom jython web event
handler for ofbiz for creating easy test scripts for our application.
The same could be done for the service engine.

In my organization, we moved away from Jython and adopted Groovy when
ofbiz moved that direction.  If you would like some sample code for
jython integration let me know.


Brett



On Sun, May 31, 2009 at 11:48 PM, Anshuman Manur
 wrote:
> Not supported? I don't understand - in the Best Practices
> Guide,
> the logic layer section contains the following lines:
> *
> Always implement your service using the easiest and most appropriate
> language or tool. You can implement services with many different languages
> including Java, Groovy, Beanshell or any BSF compliant scripting language
> (Jython, Jacl, JavaScript, etc), OFBiz Workflow Engine processes, OFBiz
> MiniLang simple-methods, and various others.*
>
> And, the serviceengine.xml file in framework/config/ contains the following
> entry:
>
> **
>
> Could someone please tell me if Jython is supported, because I feel it is
> and I'd be happy to create a Jira otherwise.
>
> Anshuman Manur
>
> On Sun, May 31, 2009 at 10:58 PM, BJ Freeman  wrote:
>
>> Unless I missed something jpython is not supported
>> also
>> only valid engines are java and simple
>> feel free to make a jira
>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices
>>
>> Anshuman Manur sent the following on 5/31/2009 9:44 AM:
>> > Dear all,
>> >
>> > I'm trying to run a jython service, but I'm getting the following error:
>> >
>> > Problems loading org.apache.bsf.BSFEngine: jpython (unable to load
>> language:
>> > jpython))
>> >
>> > I spent about an hour tracing the error through the code, but that was of
>> no
>> > avail. Seems to me that the trouble is with BSF loading the JPython
>> classes,
>> > but this is just a guess. Any help would be much appreciated.
>> >
>> > The service definition looks like this:
>> > > > location="component://order/script/org/ofbiz/order/test/Test.py">
>> >     testing the service engine
>> >     
>> > 
>> >
>> > and I call the service with this:
>> > result = dispatcher.runSync("testPython", null)
>> >
>> > Thanks and Regards,
>> > Anshuman Manur
>> >
>>
>> --
>> BJ Freeman
>> http://www.businessesnetwork.com/automation
>> http://bjfreeman.elance.com
>>
>> http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro
>> Systems Integrator.
>>
>>
>


How to implement dynamic response view (e.g. logout)

2009-05-04 Thread Brett Palmer
We need to change the behavior of the “logout” feature in one of our
custom ofbiz applications.  We want the response view to depend on
specific session information about the user.  For example, the user's
role or other security rights the user may have.

Here is one way to do it but I wanted to know if there was a preferred
method for this type of feature.


  
  
  
  
  
  


In the custom_logout_event, the code would check session variable
information for the user, call the standard ofbiz logout, and then
output a response like “option1, option2, option3, or error” depending
on the session information.  The controller would then display the
correct response view defined in the controller.xml file.

Your feedback on this solution is appreciated.



Brett


Re: best web framework

2009-04-15 Thread Brett Palmer
Another alternative to RMI is JSON.

We use the JSON library that comes with ofbiz to make ofbiz service
calls.  The library converts the results from the service to a json
string.  This can be easily parsed by an AJax client or java client.

Rmi is ok but a little heavy for our needs.  There were also
serialization problems when using eclipse for debugging and ant for
builds.


Brett

On 4/15/09, David E Jones  wrote:
>
> If you can share your experiences with that it would be great!
>
> Whatever the case, I hope your use of OFBiz is working well for you,
> and feedback (or contribution... ;) ) of things to improve in the
> project to make how you are using it easier is always welcome.
>
> -David
>
>
> On Apr 15, 2009, at 1:44 PM, Cimballi wrote:
>
>> Ok, thanks for your comments.
>>
>> As I said before, here we are developing a site this way (using
>> RMI), so
>> when it will be ready, I will post a feedback on the list.
>>
>> Cimballi
>>
>>
>> On Wed, Apr 15, 2009 at 2:32 PM, David E Jones
>> wrote:
>>
>>>
>>> That sounds like a different scenario. Naturally if you change the
>>> requirements the solution should be different!
>>>
>>> In that case you'd have the front-end running on the client talking
>>> to the
>>> ecommerce webapp server, which would probably be best just talking
>>> to the
>>> database.
>>>
>>> That's different from have the main HTML generation using mostly
>>> OOTB stuff
>>> talking via RMI to yet another app server that then talks to the
>>> database.
>>>
>>> On a side note, I'd recommend being careful introducing too many
>>> technologies! From experience people often don't know them as well
>>> as they
>>> say thy do and that's the main reason for choosing them. The net
>>> result is
>>> that you can't reuse existing artifacts and have to write lots more
>>> from
>>> scratch, and in addition you'll still have some UI using the
>>> standard OFBiz
>>> tools and it means people maintaining it going forward will have to
>>> know or
>>> learn about a larger set of tools.
>>>
>>> -David
>>>
>>>
>>>
>>> On Apr 15, 2009, at 1:20 PM, Cimballi wrote:
>>>
>>> Hi David !

 I would not be so "stubborn" and there can be several reasons why
 to not
 use
 OFBiz on the client side.

 Imagine you want to provide a "web2.0" flashy site to the
 customer, and
 you
 have a killer PHP or JSP developer in your team who can do all the
 UI
 stuff.
 Then, it can be interesting to let him doing his job and then call
 OFBiz
 services via RMI or WS. I would not ask to the UI developer to
 learn OFBiz
 way to develop UIs, and, even more, OFBiz offers the possibility
 to call
 its
 services remotly.

 In a project, there are technical reasons, business reasons, and
 human
 reasons. The best solution is the best mix of these 3.

 Don't you think it can be a good alternative ?

 Cimballi


 On Wed, Apr 15, 2009 at 1:57 PM, David E Jones
 wrote:


> Depending on what the more specific requirements are the usual
> (and by
> FAR
> the easiest) way to do this is to use the same software on the
> ecommerce
> and
> back-end servers, but have configuration differences so that only
> the
> ecommerce webapp is available on ecommerce sever (ie turn off the
> other
> webapps), and only the non-ecommerce applications are enabled on
> the
> back-end servers (unless you want to use them for ecommerce
> staging as
> well,
> then you can certainly leave that on, but that server is
> generally ONLY
> accessible internally of course).
>
> In this scenario all app servers are communicating with the
> database
> server
> and coordinate that way. There is no need for communication
> between the
> servers except for the Entity Engine distributed cache clearing.
>
> If you use a pattern of a webapp server that talks to an app
> server that
> talks to a database you have an extra level of remote
> communications and
> that will significantly slow down your response times... as well
> as add
> the
> need for LOTS of coding! There is only one reason I know of for
> doing
> such
> things: a very stubborn person with his hands on the purse strings.
> That's
> it, there is NO good technical or business reason for such
> things. Some
> claim greater scalability, but real-world testing proves otherwise.
>
> -David
>
>
>
> On Apr 15, 2009, at 11:14 AM, Vince Clark wrote:
>
> Our client has a requirement to deploy their ecommerce storefront
> on a
>
>> physically separate server from the back office apps. We have been
>> experimenting with other frameworks and integrating via web
>> services for
>> some time, and this requirement pushes up the urgency.
>>
>> Options we are considering:
>>

Re: About OFBiz and RMI

2009-03-28 Thread Brett Palmer
This is one of the problems of using RMI.  Complex objects such as
GenericValues are available but entity methods on that object won't
work as they require the entity engine.

A workaround is to define facade services that return simple pojos.
Then rmi works pretty well.


Brett

On 3/28/09, Cimballi  wrote:
> Hi,
>
> I'm trying to use OFBiz and RMI. I configured it using the SUN RMI
> implementation to not have to deal with certificates stuff.
>
> My connection is working but I have a problem when I retrieve data.
> I'm using the performFindList method, and the problem is, when I iterate
> over the returned objects and I call a getXxx method, I have this stack
> trace :
> java.lang.IllegalStateException: [GenericEntity.getDelegator] could not find
> delegator with name default
> ...
>
> The thing that looks strange to me is that, as returned entities are of type
> GenericEntity, it needs all the framework environment to use them.
> If there something I do wrong in my RMI call, or is there a way to get
> simple beans as return entities, to not have to deal with the framework
> stuff ?
>
> For the same reason I have to embed ofbiz-base.jar, ofbiz-entity.jar and
> ofbiz-service.jar in my client.
>
> Thanks,
>
> Cimballi
>

-- 
Sent from my mobile device


Re: security error

2009-01-14 Thread Brett Palmer
You need to login as a user that as those permission.  For example user, admin.

Brett

On 1/14/09, Deepika Deepika  wrote:
> Hi
> Iam trying to create a new DataSource or DataSourceType in Marketing
> application.
> But i get a security error saying 'To run createDataSource you must have the
> one of the following permissions: COMMON_CREATE, COMMON_ADMIN'
> Could someone please say what  the reason might be.. that iam unable to
> create it.
>
> Thanks
>

-- 
Sent from my mobile device


Re: Ofbiz Training in India

2009-01-07 Thread Brett Palmer
If you live in Mumbai, Amicon Technologies from Amit Shinde could help with
ofbiz training.  I've worked with his group before.  They are very familiar
with ofbiz.

Brett

On Wed, Jan 7, 2009 at 7:22 AM, kaychaks  wrote:

> Hi,
>
> My company wants to send me to a training in OfBiz. I searched in the
> internet about the same but could not locate anything. If any one here
> knows
> of any training on OfBiz in India (anywhere), please share the details.
>
> Regards,
> Kaushik
>


Re: Perfromance meter tool

2008-12-23 Thread Brett Palmer
We have been experimenting with the TPTP tools from eclipse to find
performance bottlenecks.  The tool let's you create your own custom probes
that can be inserted at run time into your deployed application.  The nice
thing about these custom probes are they don't create a large footprint like
so many other profiling tools.

http://www.eclipse.org/tptp/

Here are some other links you may find helpful:


Brett


Articles on Eclipse Test and Performance Tools Platform

http://www.eclipse.org/tptp/

http://www.vogella.de/articles/EclipseTPTP/article.html

http://docs.hp.com/en/JAVAPERFTUNE/

Good article for WebSphere/ZOS with Sample probe code
- http://www.redbooks.ibm.com/abstracts/sg247177.html?Open

http://www.ddj.com/article/printableArticle.jhtml?articleID=184406433&dept_url=/java/

http://docs.hp.com/en/JAVAPERFTUNE/bytecode.pdf




On Tue, Dec 23, 2008 at 8:17 AM, masionas  wrote:

>
> Hi Guys,
>
> I have bottlenecks in some places ( for example Commit Sales Order) takes
> 10+ seconds sometimes. So I would like someone advice a decent tool to find
> out which piece of code has problem. Does Ofbiz has its own such kind of
> tool or is there anything good external which would work with Ofbiz
> smoothly? I would appreciate any help on this. Thanks.
> --
> View this message in context:
> http://www.nabble.com/Perfromance-meter-tool-tp21146151p21146151.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>


Re: Interesting test results

2008-05-08 Thread Brett Palmer
I have noticed similar response times when doing a build run-install with
Derby and Postgres.  I would be interested in seeing the performance
difference with Postgres vs. MySQL.

In the past MySQL was faster but we didn't use it because of the poor
transaction support in MySQL.


Brett

On Thu, May 8, 2008 at 3:55 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

> I was doing some testing last night and discovered that the combination of
> Ofbiz and Derby vs Ofbiz and Postgres was pretty amazing.
>
> Ofbiz using Postgres on a Windows box was about 6 to 10 times faster than
> when using Derby.  The 10 was observed when watching the progress over 10 1
> minute intervals.  The six is an extrapolation of estimates.
>
> This test was importing some data and 22 entities were written using 4
> services as well as some direct writes.  The results were not so great when
> just using direct writes using the delegator.
>
> Thought others might be interested.
> No virus found in this outgoing message.
> Checked by AVG.
> Version: 7.5.524 / Virus Database: 269.23.9/1420 - Release Date: 5/7/2008
> 2:12 PM
>
>


Re: Service cannot be called

2007-11-21 Thread Brett Palmer
First of all I'm not sure the JXComponentLoader even works anymore.  I
wrote it to load the service and entity engine for local development
testing.  AFAIK it has not been maintained.

You could try setting an ofbiz.home environment variable for the junit
test you run in eclipse (I.e -Dofbiz.home=your path).

You can also run a unit test from the build.  There are some examples
in the code base for that.

You can also run your service from webtools to test it.


Brett

On 11/20/07, Sujit Joshi <[EMAIL PROTECTED]> wrote:
>
> Hello ,
> I am ofbiz newbie. My first assignment says to write a servicedef.xml to
> invoke a serivce (method in Java).
> This is my servicedef.xml file :
> 
>
>
>   
> GreetUsers services
>
>
> Display the name of the user.
>
>
>
>
>
>
> I need to invoke this service by  a JUnit testcase. So here goes my
> GreetTest.java
>
> package in2m;
>
> import java.util.HashMap;
> import java.util.Map;
>
> import junit.framework.Test;
> import junit.framework.TestCase;
> import junit.framework.TestSuite;
>
> import org.ofbiz.base.util.Debug;
> import org.ofbiz.entity.GenericDelegator;
> import org.ofbiz.jxtest.JXComponentLoader;
> import org.ofbiz.service.GenericDispatcher;
> import org.ofbiz.service.LocalDispatcher;
>
>
>
>
>
> public class GreetTest extends TestCase {
>
>   public static final String module= GreetTest.class.getName();
>private Map obj = null;
>private GenericDelegator delegator;
>private LocalDispatcher dispatcher;
>   
>public GreetTest(String name) {
>super(name);
>delegator = GenericDelegator.getGenericDelegator("default");
>dispatcher = new GenericDispatcher("default",delegator);
>}
>
>   /**
>* @see TestCase#setUp()
>*/
>   protected void setUp()
>   {
>   try {
>   JXComponentLoader.loadComponents("default");
>   } catch (Exception e) { 
>   e.printStackTrace();
>   }
>
>   Debug.logInfo("Getting default delegator", module); 
> 
>   setupEntityDelegator();
>   setupServiceDispatcher();
>   }
>   
>   private void setupServiceDispatcher() {
>   if(this.dispatcher == null){
>   dispatcher = new GenericDispatcher("default", 
> this.delegator);
>   assertNotNull("Error creating dispatcher",this.dispatcher);
>   }
> }
>
>   private void setupEntityDelegator()
>   {
>   try {
>   if(this.delegator == null ) {
>   this.delegator = 
> GenericDelegator.getGenericDelegator("default");
>   assertNotNull(this.delegator);
>   }
>   } catch(Exception e) {
>   Debug.logError("Error creating delegator", 
> module);
>   e.printStackTrace();
>   }
>   }
>   
>   
>   
>public void testFirstService(){
>obj = new HashMap();
>obj.put("username","Sujit");
>try{
>Map serviceResult = dispatcher.runSync("display_name", 
> obj);
>//System.out.println("This is the user
> name:"+(String)serviceResult.get("username"));
>
> assertEquals("Sujit",(String)serviceResult.get("username"));
> }catch(Exception e){
> e.printStackTrace();
> }
> }
>   
>public static  Test suite()
>{
>TestSuite suite=new TestSuite();
>suite.addTest(new GreetTest("testFirstService"));
>return suite;
>}
>public static void main(String[] args)
>{  junit.textui.TestRunner.run(GreetTest.class);
>   System.exit(0);
>   
>}
> }
>
>
> By the way I am using Eclipse 3.1 . When I run the test I get one lengthy
> error on my console which is :
>
> 2007-11-21 10:09:09,130 (main)
> [GenericDelegator.java:getGenericDelegator:124 :INFO ] :: Creating new
> delegator [default] (main)
>
> 2007-11-21 10:09:09,209 (main) [UtilURL.java:fromOfbizHomePath:110 :WARN ]
> :: No ofbiz.home property set in environment
>
> 2007-11-21 10:09:09,217 (main) [EntityConfigUtil.java::91  :ERROR] ::
>  exception report
> --
> Error loading entity config XML file entityengine.xml
> Exception: org.ofbiz.entity.GenericEntityConfException
> Message: Could not get entity engine XML root element (ERROR: could not f

Re: ofBiz for a Super Market

2007-09-11 Thread Brett Palmer
Thomas,

If you do use Flex or Lazlo you will need to access the services
through the ofbiz controller (presentation layer).

You will also have to re-implement existing funtionality in Flex/Lazlo
if you don't use ofbiz screens.

If you need to use a UI like flex I would isolate it to some key
funtionality and try to use existing apps where possible.


Brett


On 9/11/07, Al Byers <[EMAIL PROTECTED]> wrote:
> Thomas,
>
> I have been doing a bit with Dojo (http://www.dojotoolkit.org) lately and I
> recommend it. I think it will be possible to integrate the XML-based screen
> widget technology with that toolkit, but I don't know how soon it will be
> happening.
>
> BTW, I have been adding bits and pieces of GIS functionality to OFBiz so you
> could use GeoRSS (search in JIRA for GeoRSS) to work with Google Maps or
> there is the skeleton of a WFS interface in OFBiz which would allow you to
> get the long/lat values from other clients such as MapBuilder.
>
> -Al
>
> On 9/11/07, Thomas Jiji <[EMAIL PROTECTED]> wrote:
> >
> > Hi all,
> >
> >
> >
> > Im getting ready to jump in OfBiz to build a supermarket E-Store
> > (Multi-Facility, Pick up-Delivery, recurrent Shopping lists, recipes).
> >
> > I've been reading alot on ofBiz this past week but i still need a
> > confirmation for this issue.
> >
> >
> >
> > 1) Using the ofBiz Service Engine or any other form of API, is it
> > possible to build a Rich UI ( Lazslo, Flex ...) on top of that API ?
> >
> >
> >
> > 2)Has anyone seen a Supermarket e-store built on ofBiz, because i didnt
> > see one the the Project List
> >
> >
> >
> > It would be much appreciated to get an answer back.
> >
> >
> >
> > Thank you.
> >
> >
> >
> >
> >
> > -- Thomas Jiji
> >
> >
> >
> >
>


Re: ofbiz handheld

2007-08-29 Thread Brett Palmer
It would be a big project to put the ofbiz shopping cart on a j2me
application.  It would be easier to use WAP and communicate with an
ofbiz server.

Brett

On 8/29/07, 2275429 <[EMAIL PROTECTED]> wrote:
>
> I am new to ofbiz  i had to devlop application for  online  webstore for
> mobile (handheld devices)  using ofbiz
> frame work.
> is it possible to devlop applicaton similar to ofbiz webstore in mobile ,
> please replay soon
>
> thankyou
> ANIL BHAT
> --
> View this message in context:
> http://www.nabble.com/ofbiz-handheld-tf4347840.html#a12387208
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>


Re: ofbiz handheld

2007-08-28 Thread Brett Palmer
I'm not sure what you mean by "handheld devices using ofbiz
framework".  OFBiz is an enterprise framework that would be too large
to run on a handheld device.

You can integrate a j2me client with an ofbiz web application by using
http request to the server.  If you provide more details on what you
want to do we could probably give you some suggestions.  I have
written j2me clients that work with ofbiz.  IMHO its easier to use WAP
for mobile applications than a custom j2me client but it depends on
the application.


Brett

On 8/29/07, 2275429 <[EMAIL PROTECTED]> wrote:
>
> I am new to ofbiz we need to develop an  application  in j2me  for handheld
> devices using ofbiz framework
> for simple data i am using hhfacility of ofbiz, however we need to be able
> to do several things that require J2ME.
>  please suggest me how to integrate j2me with ofbiz .please replay
>
> thankyou
> anil bhat
>
> --
> View this message in context: 
> http://www.nabble.com/ofbiz-handheld-tf4345911.html#a12381306
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>


Re: RMI problem

2007-08-14 Thread Brett Palmer
You will need to get a copy of the

org.ofbiz.service.rmi.socket.zip.CompressionClientSocketFactory
and
org.ofbiz.service.rmi.socket.zip.CompressionServerSocketFactory

from revision 451171 as they are no longer in the trunk due to license
issues if you want the example from the wiki to work.

Quote from svn:
"Author: jonesde
Date: Fri Sep 29 01:50:42 2006
New Revision: 451171

URL: http://svn.apache.org/viewvc?view=rev&rev=451171
Log:
Removed compression code from Sun that has a problematic license, people can
still grab and use this, but we just won't be distributing it as before;
this is not used by default; note that there may be other zip socket
implementations that we could put in place if this is important to someone,
but I don't know that anyone has looked into this yet"


Brett

On 8/13/07, Scott Gray <[EMAIL PROTECTED]> wrote:
> Hi Stefan
>
> If you just want to get the example working and aren't too worried about
> security at this stage, then this link will show you how to connect without
> certs:
> http://ofbizwiki.go-integral.com/Wiki.jsp?page=UsingNonSSLRMI
>
> Regards
> Scott
>
> On 14/08/07, Stefan Selariu <[EMAIL PROTECTED]> wrote:
> >
> >
> > The exception source:
> > org.ofbiz.base.util.MultiTrustManager.checkServerTrusted(
> > MultiTrustManager.java:70)
> >
> > On Mon, 2007-08-13 at 16:20 +0300, Stefan Selariu wrote:
> > > I'm getting a "No trusted certificate found" exception when I'm trying
> > > to invoke an ofbiz service.
> > >
> > > The jsse.properties is set correctly to point to the ofbizrmi.jks
> > >
> > > I followed the instructions written in the ExampleRemoteClient javadoc.
> > > Perhaps I'm missing something.
> > >
> > > What could be the problem?
> > >
> > > Another unrelated question...
> > > Why does jsse.properties contain refences to ofbiztrust.jks and
> > > ofbizcerts.jks? These files are not available in the trunk
> > >
> >
> >
>


Re: Debugging new component in eclipse

2007-08-06 Thread Brett Palmer
Rizwan,

You need to make sure your remote connection is setup in the same
eclipse project as the component you are debugging or it can miss it.
If you set it up this way you can also debug the default ofbiz code as
well because your project likely depends on it.

This problem occurs if you have multiple projects in eclipse using ofbiz.


Brett

On 8/6/07, Rizwan Sharif <[EMAIL PROTECTED]> wrote:
> Hi,
> I am able to debug the ofbiz + components that comes with it but unable to
> debug the component that I have added. When I call one of the services in
> new component it runs successfully but does not break into the debugger. Is
> there something I forgot to configure?
>
> Rizwan
>


Re: Why is a new java class cannot be found?

2007-08-04 Thread Brett Palmer
If you are running an ant build make sure the built Jar file is part
of the classpath in your ofbiz-component.xml file.

Brett

On 8/4/07, Mathius Allo <[EMAIL PROTECTED]> wrote:
>   Hi,
>
>   I just created a new java class to implement java method but when I could
> not make use if it.
>
>   why trying to invoke a method from the java class as below:
>
>invoke="findCustomerById"/>
>
>   It could not find the class "org.ofbiz.customer.CustomerServices". The
> class has been compiled successfully.
>
>   Error message:
>   
>   2007-08-05 00:50:52,265 (http-0.0.0.0-8443-Processor3) [
> RequestHandler.java:308:ERROR] Request viewCustomer caused an error with the
> following message: Error calling event:
> org.ofbiz.webapp.event.EventHandlerException: Error invoking event, the
> class org.ofbiz.customer.CustomerServices was not found
>
>   I'm using eclipse.
>
>   Does anybody have quick feedback on what steps I might have missed out?
>
>   Regards,
>   Mathius
>
>
>
> -
> Be a better Globetrotter. Get better travel answers from someone who knows.
> Yahoo! Answers - Check it out.


xsl-fo question on border around page

2007-08-02 Thread Brett Palmer
I'm trying to create a "certificate" PDF report using xsl-fo, but I
can't get the border to show around the whole page.  I am able to get
borders on single cells in a table but not around the whole page.

Does anyone have a simple sample of how this would work?


Here is what I have for the border around a single cell:

http://www.w3.org/1999/XSL/Format";>











   
 <#list questionsAndAnswers as qAndA >
   <#if qAndA.question.surveyQuestionId == "Q7">

 
${(qAndA.response.textResponse)?if_exists}


   
  


 
   



Any suggestions would be appreciated.  Also a good website with
samples that work with the latest ofbiz.  Most of the samples I have
used are no longer compatible with the ofbiz xsl-fo library.

Thanks in advance,

Brett


Re: Apache server, Tomcat , SEO and 302 issue

2007-07-23 Thread Brett Palmer

I have had similar requests from clients that use an Apache-Tomcat
combination.  In this case it was a tomcat struts application but the
problem was the same for ofbiz.

We were advised that redirecting to tomcat was not recommended for
SEO.  This is particularly a problem when the whole site it in tomcat
and apache is just used as a frontend with a single page.

I would be interested in the correct answer for SEO
and if anyone has found an optimal solution.


Brett

On 7/23/07, Jacques Le Roux <[EMAIL PROTECTED]> wrote:

Thanks David,

I was asked this by a client who uses a pre-Apache OFBiz  version (rev.
4969). He was advised by a SEO company. The problem is that,
for the moment, the page indexed is target and not source. My client would
prefer to see her domain page (whitout suffix) showing
1st in Google...I have to read deeper in that later. At 1st reading the
status has changed either for Google and Yahoo, MNS status
is unclear.

I wonder if we should not use a modified Tomcat OOTB to handle this. Perhaps
there are other ways to do it (Rewrite rules ?) but
doing so this problem will vanish forever (just have to reaplied the patch
when upgrading Tomcat until they introduce a parameter
themself as it's planified in link below).

I will let you know as soon as I completly clear on that, this is not a high
priority ...

Jacques

PS : the current target behavior seems correct :
http://www.mattcutts.com/blog/seo-advice-url-canonicalization/ (look for
302)

De : "David Garrett" <[EMAIL PROTECTED]>
> Jacques,
>
> I think relying on SEO information from 2003(ref a.) and Feb 2005(ref b.)
in
> SEO is dangerous.
>
> There has been considerable effort by the SEs in the last 1/2 years to
> improve redirect handling, eg Google Bigdaddy introduction and Yahoo's
> "standard" behaviour as given in the links below.
>
> http://www.mattcutts.com/blog/seo-advice-discussing-302-redirects/
> http://help.yahoo.com/help/us/ysearch/slurp/slurp-11.html
>
> I would suggest these are quite authorative pages.
>
> This is a VERY subjective area but for me, using your example, I would
> rather have www.domain.com indexed rather than
www.domain.com/control/main.
> As this is an "in domain" transfer a 302 temporary redirect (for me) is
the
> correct solution on all counts.
>
> I don't completely follow what your change proposes but for me keep the
302.
>
> I know this is a very subjective areas and you will get informed and
> uninformed views to the contrary. The key point to consider is what do you
> want indexed in the SERPs? My preference is the shorter URL.
>
> David G
>
>
> > -Original Message-
> > From: Jacques Le Roux [mailto:[EMAIL PROTECTED]
> > Sent: Sunday, 22 July 2007 9:57 PM
> > To: user@ofbiz.apache.org
> > Subject: Apache server, Tomcat , SEO and 302 issue
> >
> > Hi All,
> >
> > Supportin temporary or permanent redirection of matching
> > requests in Tomcat is pious vow from some times now
> > (http://www.jajakarta.org/tomcat/tomcat3.2-4.0/tomcat-4.0b5/sr
> > c/catalina/docs/dev/todo.html see
> > [org.apache.catalina.valves.RedirectValve])
> >
> > So when in OFBiz, using Apache server as frontal with
> > jkmount, if someone ask for  a domain (say
> > http://www.domain.com) this activate a redirection to
> > http://www.domain.com/control/main. An you get a 302 redirect
> > (moved temporarily) and not a 301 (permanent). Not persuaded
> > ? see http://livehttpheaders.mozdev.org/. This makes sense
> > because if it's permanent why use something dynamic ? But the
> > problem with 302 is that it's not good for search engines
> > (this is clearly explained in the 2d link below). So I
> > searched for a solution. I found 2
> >   a.. http://www.sitepoint.com/forums/showthread.php?t=231044
> >   b..
> > http://blog.spaceprogram.com/2003/06/fixing-tomcat-302-redirec
> > t-issue_18.html
> > I tried the 1st in 1st place but got not the expected result.
> > I guess because the jkmount gives no chance to a 404. I
> > wonder now how OFBiz users deals with this problem before
> > creating my own Tomcat version (actually I will simply
> > replace the concerned class in the corresponding jar)
> > inspired by the 2d solution... Any ideas, advices ?
> >
> > Thanks
> >
> > Jacques
> >
> > PS : I looked also at rewrite rules solutions as in
> > http://www.webmasterworld.com/forum92/2309.htm
> >
>




Re: PayPal - Verisign SDK

2007-07-09 Thread Brett Palmer

I'm not using Verisign right now but I have used in on other projects.

Brett

On 7/9/07, Richard Fleming <[EMAIL PROTECTED]> wrote:

Brett,

Thanks for the reply.  We actually do have the .jar path defined in build.xml.  
And our service  compiles and executes fine so long as I don't make any calls  
to the PayPal API. I'll check the ofbiz-component.xml in the morning. Thanks 
for the heads up. (PayPal requires the PayflowPro.jar and two other xerces 
executables.)   Are you using Verisign with OfBiz?

Thanks
Rick

Brett Palmer <[EMAIL PROTECTED]> wrote: Rick,

If you have any account with PayPal/Verisign you should have their Jar
file that contains the PayflowAPI class in it.  This Jar file needs to
be in a directory specified in the one of the ofbiz-component.xml
file.  For example, you could put the jar file in the
ofbiz/application/accounting/lib directory.  Then the the
ofbiz-component.xml file in the accounting directory would pick it up
with the following line:



It seems like there was another file that had to be in the classpath
along with the Jar file but the Verisign docs should explain that.

Hope that helps.


Brett

On 7/9/07, Richard Fleming  wrote:
> David -
>
>   Here's the log: I can see a "no classdef found" and I've tried to add a 
classpath statement and I've copied the .jar files to several different lib directories in 
ofbiz - to no avail. I left a message with Paypal integration specialist today and should 
hear back tomorrow. What questions should I ask him?
>
>   Rick
>
>   2007-07-09 16:26:14,687 (http-0.0.0.0-8443-Processor3) [  
ServiceDispatcher.java:391:ERROR]
>  exception report 
--
> Service [paypalproCCProcessor] threw an unexpected exception/error
> Exception: org.ofbiz.service.GenericServiceException
> Message: Service target threw an unexpected exception 
(paypal/payflow/PayflowAPI)
>  stack trace 
---
> org.ofbiz.service.GenericServiceException: Service target threw an unexpected 
exception (paypal/payflow/PayflowAPI)
> 
org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:106)
> 
org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:56)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:339)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:214)
> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:153)
> 
org.ofbiz.accounting.payment.PaymentGatewayServices.authPayment(PaymentGatewayServices.java:489)
> 
org.ofbiz.accounting.payment.PaymentGatewayServices.authOrderPaymentPreference(PaymentGatewayServices.java:161)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:585)
> 
org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:94)
> 
org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:56)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:339)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:214)
> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:139)
> 
org.ofbiz.accounting.payment.PaymentGatewayServices.authOrderPayments(PaymentGatewayServices.java:343)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:585)
> 
org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:94)
> 
org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:56)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:339)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:214)
> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:153)
> 
org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:933)
> 
org.ofbiz.order.shoppingcart.CheckOutEvents.processPayment(CheckOutEvents.java:508)
> 
org.ofbiz.order.shoppingcart.CheckOutEvents.processPayment(CheckOutEvents.java:472)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:585)
> org.ofbiz.webapp.event.JavaEv

Re: How to debug SQL

2007-07-04 Thread Brett Palmer

Change the debug.properties to use verbose.  I think this file is on
the base/config directory but that is from memory.

Brett

On 7/4/07, X Gylee <[EMAIL PROTECTED]> wrote:

Hello all,
I just started using OFBiz for my work, and I need help to debug a findByAnd
problem.
Is there a way in OFBiz to see the generated SQL statement during an entity
operation?
This way, I can debug my application should a problem appear.



Re: Linux install instruction error

2007-06-23 Thread Brett Palmer

Is there a space between "ofbiz" and "chown"?  It should mean something like
"add the user ofbiz" and then recursively "-R" change the ownership for the
new user "ofbiz".

I'm not running Fedora but the command should work in any linux install.

Brett

On 6/23/07, BJ Freeman <[EMAIL PROTECTED]> wrote:



in the page
http://docs.ofbiz.org/display/OFBIZ/How+to+run+OFBiz+as+a+Service
there is a line
useradd -m ofbizchown -R ofbiz /opt/ofbizchmod 700 /opt/ofbiz

the -R is not supported in Fedora
can someone give what that was suppose to mean so I can change it.
thanks



Re: Subscription HOWTO

2007-05-14 Thread Brett Palmer

We are working on a subscription project that is scheduled to roll out
in June.  We will post our findings and possibly a HowTo document when
complete.

FYI, we are using the ShoppingList module for doing subscription based
payments.  This is similar to how recurring orders are done with the
ecommerce application.


Brett

On 5/11/07, Jules-Henri Gavetti <[EMAIL PROTECTED]> wrote:

Hello,

I look for an "HOWTO setup products with subscription" and how work the
renew process.

Thanks

Jules-Henri






Re: Chat Modules

2007-04-23 Thread Brett Palmer

I don't know of any ofbiz modules.  You might want to look at jabber
as a good open source I.M. technology.  I'm not sure what the license
is but there are lots of clients to choose from and the security is
good.  You could possibly integrate this with ofbiz but it depends on
what you want to accomplish.

If the objective is to control I.M. Communication internally than
jabber is a good solution.

www.jabber.org


Brett

On 4/23/07, Scott A <[EMAIL PROTECTED]> wrote:


Hello All,

We want to add a chat module to ofbiz for our employees to be able to
communicate with each other when they are online. We currently use MSN
Messenger and we like the ability to have private chats or conferences,
notifications, etc but we want to close it from the outside world for now.

Does anyone know of any modules out there that may be consistent with the
Apache license that we could work on and give back to the community? Any
pointers from the senior guys here?

Much appreciated.

--
View this message in context:
http://www.nabble.com/Chat-Modules-tf3631776.html#a10140868
Sent from the OFBiz - User mailing list archive at Nabble.com.




Re: Quickbooks & OfBi

2007-04-11 Thread Brett Palmer

I worked on a contract where we integrated ofbiz orders with
quickbooks. The project never finished but we did discover that using
a 3rd party library call QODBC was much faster than the intuit web
services interface.  The difficult part was mapping all the data
values  between the two systems.  And if you need to do updates in QB
you have to store record IDs on the ofbiz side.

Brett


On 4/11/07, Chris Howe <[EMAIL PROTECTED]> wrote:

I believe there were two efforts in this regard, one from
OpenSourceStrategies and the other from Brian Johnson.  I'm note sure
what came of OSS's, but Brian Johnson's can be found here:

http://sherbang.com/devel/ofbiz/qb-ofbiz-20060314.tar.bz2


--- Scott A <[EMAIL PROTECTED]> wrote:

>
> I was wondering if anyone had any info on a module that can
> import/export
> data to and from Quickbooks?
>
> I've read in various places of the existence of something but I was
> never
> able to find it. All the threads seem to go back to 2005. Is there
> such a
> monster and if so, where could I find it.
>
> Thanks in advance.
> --
> View this message in context:
> http://www.nabble.com/Quickbooks---OfBiz-tf3560507.html#a9943445
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>