Re: jQuery validator defaults
Thanks a lot Sasha! On Wed, Jul 13, 2011 at 7:52 AM, Sascha Rodekamp sascha.rodekamp.lynx.de@ googlemail.com wrote: Hi Jonatan, you can't put label tags in js files, because they are interpreted by the freemarker parser, which don't parse js files. Some month ago, i created a JS function which can resolve ui Label tags. You can find it in the selectall.js There are two functions, one which takes an JSON array with ui label information and one which only takes a resource and one label. /** * Reads the requiered uiLabels from the uiLabelXml Files * @param requiredLabels JSON Object {resource : [label1, label2 ...], resource2 : [label1, label2, ...]} * @return JSON Object */ function getJSONuiLabels(requiredLabels) { /** * Read the requiered uiLabel from the uiLabelXml Resource * @param uiResource String * @param errUiLabel String * @returns String with Label */ function getJSONuiLabel(uiResource, errUiLabel) { Hope that helps. Have a good day Sascha 2011/7/12 Jonatan Soto seniledemen...@gmail.com Hi all, I want to use the uiLabelMap variable in a .js I've created in order to set the defaults of any sort for jQuery plugins like validator. To do that I just included this in the main-decorator (CommonScreens.xml): set field=layoutSettings.javaScripts[] value=/images/defaults.js global=true/ In this file I put the code like that: jQuery.extend(jQuery.validator.messages, { required: '${uiLabelMap.EcommerceRequired}' }); Of course, this is not properly rendered, so the question is: Would you put all the javascript code in the header.ftl for example? Thanks in advance. Regards, Jonatan Soto -- Sascha Rodekamp Visit the new german OFBiz Blog: http://www.ofbiz.biz Lynx-Consulting GmbH Johanniskirchplatz 6 D-33615 Bielefeld http://www.lynx.de -- - Jonatan Soto
Re: ofbiz mavenizer
I know various people have expressed interest in Maven over the years. From a quick search I see such discussions going back to 2003! OFBiz would definitely benefit from more modularization, and Maven may be able to help with that. However, it is just a tool and would still require significant work in addition to what Eric describes below to clean up higher-level OFBiz artifacts like services and screens and such to make the dependency tree clean. Based on the build-time dependencies Eric has generated an interesting graph that he sent to me, and it turns out to be a pretty good graph of component dependencies (even though technically if everything were written in the way intended by the framework, there wouldn't be so many build-time dependencies like this). The graph is actually better than the old old one I hand-rolled (that is in the Component and Component Set Dependencies document in the OFBADMIN space on Confluence). Getting back to the point, does anyone have an opinion on: 1. better modularizing OFBiz 2. using Maven for build and/or module dependency management? -David On Jul 12, 2011, at 12:09 PM, Eric Bowman wrote: Hi, I've written a tool that we're considering open sourcing, and I'm curious to gauge how much interest there would be in it. The purpose of the tool is to generate proper poms for each of the ofbiz modules by inspecting an ofbiz directory. It works in two steps, and it uses the Nexus search API (so it's not that interesting unless you have a Nexus repository installed somewhere nearby). Here's what it does: 1. Inspects $OFBIZ_HOME recursively, identifying external dependency libraries 2. Generates the SHA1 hash of each jar, and uses a Nexus API to determine whether that jar already exists in Nexus as a known artifact. 3. If it does not, it takes a random sample of the classes in each jar, and queries Nexus to see can it figure out a reasonable groupId artifactId. 4. For artifacts not already in Nexus, it synthesizes a mvn deploy:deploy-file for each jar and each possible groupId/artifactId/version it decides might be useful, and lets you decide which commands to run to get all the dependency jars in Nexus. 5. After all the external dependencies are in Nexus, it looks through $OFBIZ_HOME again, and determines all the transitive dependencies between ofbiz modules 6. Next it synthesizes a pom for each module, that captures both the dependencies in that module's lib directory, as well as the simplest transitive graph of dependencies on other modules. 7. Finally it prints out mvn deploy:deploy-file commands which can be run separately to put each ofbiz module's jar file into Nexus, along with its pom. If you are using maven, this is pretty nice -- this way you don't have to worry about declaring dependencies against all the jars in the ofbiz directory; it figures all that out, and leverages maven's transitive dependency resolution to make a clean build. Obviously it doesn't solve other problems, like how to deploy an ofbiz server in a maveny way, but that may follow. If you're interested in seeing this open sourced, perhaps you can reply off-list; if there is enough interest I'll put this on github. And maybe even if there isn't. :) Cheers, Eric Bowman
Tata eCommerce based on Apache OFBiz?
I heard a rumor that Tata (TCS) has an ecommerce system that is based on OFBiz, though with re-written ecommerce and catalog/etc management applications. Has anyone heard of this, or even better... is anyone involved with this effort at TCS or perhaps using it in their company or for a client? This seems similar to the idea that was discussed a few years ago about creating a cleaner ecommerce app and back-end app for catalog/order/customer/etc in order to better compete with Magento for smaller companies, or in general organizations looking for something written in Java but more usable OOTB. -David
Re: ofbiz mavenizer
Hi, One other point: this tool is currently useful against ofbiz as-is, in order to build software that depends on it, using maven. Converting ofbiz to use maven is a considerably bigger project. On 13 Jul 2011, at 15:01, David E Jones wrote: I know various people have expressed interest in Maven over the years. From a quick search I see such discussions going back to 2003! OFBiz would definitely benefit from more modularization, and Maven may be able to help with that. However, it is just a tool and would still require significant work in addition to what Eric describes below to clean up higher-level OFBiz artifacts like services and screens and such to make the dependency tree clean. Based on the build-time dependencies Eric has generated an interesting graph that he sent to me, and it turns out to be a pretty good graph of component dependencies (even though technically if everything were written in the way intended by the framework, there wouldn't be so many build-time dependencies like this). The graph is actually better than the old old one I hand-rolled (that is in the Component and Component Set Dependencies document in the OFBADMIN space on Confluence). Getting back to the point, does anyone have an opinion on: 1. better modularizing OFBiz 2. using Maven for build and/or module dependency management? -David On Jul 12, 2011, at 12:09 PM, Eric Bowman wrote: Hi, I've written a tool that we're considering open sourcing, and I'm curious to gauge how much interest there would be in it. The purpose of the tool is to generate proper poms for each of the ofbiz modules by inspecting an ofbiz directory. It works in two steps, and it uses the Nexus search API (so it's not that interesting unless you have a Nexus repository installed somewhere nearby). Here's what it does: 1. Inspects $OFBIZ_HOME recursively, identifying external dependency libraries 2. Generates the SHA1 hash of each jar, and uses a Nexus API to determine whether that jar already exists in Nexus as a known artifact. 3. If it does not, it takes a random sample of the classes in each jar, and queries Nexus to see can it figure out a reasonable groupId artifactId. 4. For artifacts not already in Nexus, it synthesizes a mvn deploy:deploy-file for each jar and each possible groupId/artifactId/version it decides might be useful, and lets you decide which commands to run to get all the dependency jars in Nexus. 5. After all the external dependencies are in Nexus, it looks through $OFBIZ_HOME again, and determines all the transitive dependencies between ofbiz modules 6. Next it synthesizes a pom for each module, that captures both the dependencies in that module's lib directory, as well as the simplest transitive graph of dependencies on other modules. 7. Finally it prints out mvn deploy:deploy-file commands which can be run separately to put each ofbiz module's jar file into Nexus, along with its pom. If you are using maven, this is pretty nice -- this way you don't have to worry about declaring dependencies against all the jars in the ofbiz directory; it figures all that out, and leverages maven's transitive dependency resolution to make a clean build. Obviously it doesn't solve other problems, like how to deploy an ofbiz server in a maveny way, but that may follow. If you're interested in seeing this open sourced, perhaps you can reply off-list; if there is enough interest I'll put this on github. And maybe even if there isn't. :) Cheers, Eric Bowman
Re: ofbiz mavenizer
Is part of the intent to use the Maven release plugin for deployment and such as well? -David On Jul 13, 2011, at 3:12 PM, Eric Bowman wrote: Hi, One other point: this tool is currently useful against ofbiz as-is, in order to build software that depends on it, using maven. Converting ofbiz to use maven is a considerably bigger project. On 13 Jul 2011, at 15:01, David E Jones wrote: I know various people have expressed interest in Maven over the years. From a quick search I see such discussions going back to 2003! OFBiz would definitely benefit from more modularization, and Maven may be able to help with that. However, it is just a tool and would still require significant work in addition to what Eric describes below to clean up higher-level OFBiz artifacts like services and screens and such to make the dependency tree clean. Based on the build-time dependencies Eric has generated an interesting graph that he sent to me, and it turns out to be a pretty good graph of component dependencies (even though technically if everything were written in the way intended by the framework, there wouldn't be so many build-time dependencies like this). The graph is actually better than the old old one I hand-rolled (that is in the Component and Component Set Dependencies document in the OFBADMIN space on Confluence). Getting back to the point, does anyone have an opinion on: 1. better modularizing OFBiz 2. using Maven for build and/or module dependency management? -David On Jul 12, 2011, at 12:09 PM, Eric Bowman wrote: Hi, I've written a tool that we're considering open sourcing, and I'm curious to gauge how much interest there would be in it. The purpose of the tool is to generate proper poms for each of the ofbiz modules by inspecting an ofbiz directory. It works in two steps, and it uses the Nexus search API (so it's not that interesting unless you have a Nexus repository installed somewhere nearby). Here's what it does: 1. Inspects $OFBIZ_HOME recursively, identifying external dependency libraries 2. Generates the SHA1 hash of each jar, and uses a Nexus API to determine whether that jar already exists in Nexus as a known artifact. 3. If it does not, it takes a random sample of the classes in each jar, and queries Nexus to see can it figure out a reasonable groupId artifactId. 4. For artifacts not already in Nexus, it synthesizes a mvn deploy:deploy-file for each jar and each possible groupId/artifactId/version it decides might be useful, and lets you decide which commands to run to get all the dependency jars in Nexus. 5. After all the external dependencies are in Nexus, it looks through $OFBIZ_HOME again, and determines all the transitive dependencies between ofbiz modules 6. Next it synthesizes a pom for each module, that captures both the dependencies in that module's lib directory, as well as the simplest transitive graph of dependencies on other modules. 7. Finally it prints out mvn deploy:deploy-file commands which can be run separately to put each ofbiz module's jar file into Nexus, along with its pom. If you are using maven, this is pretty nice -- this way you don't have to worry about declaring dependencies against all the jars in the ofbiz directory; it figures all that out, and leverages maven's transitive dependency resolution to make a clean build. Obviously it doesn't solve other problems, like how to deploy an ofbiz server in a maveny way, but that may follow. If you're interested in seeing this open sourced, perhaps you can reply off-list; if there is enough interest I'll put this on github. And maybe even if there isn't. :) Cheers, Eric Bowman
Re: ofbiz mavenizer
Yes. We version our changes of ofbiz in a mavenesque way, and intend to use the maven release plugin to generate releases which get deployed (in maven terminology) to a repository, from which they get deployed to real servers. On 13 Jul 2011, at 15:18, David E Jones wrote: Is part of the intent to use the Maven release plugin for deployment and such as well? -David On Jul 13, 2011, at 3:12 PM, Eric Bowman wrote: Hi, One other point: this tool is currently useful against ofbiz as-is, in order to build software that depends on it, using maven. Converting ofbiz to use maven is a considerably bigger project. On 13 Jul 2011, at 15:01, David E Jones wrote: I know various people have expressed interest in Maven over the years. From a quick search I see such discussions going back to 2003! OFBiz would definitely benefit from more modularization, and Maven may be able to help with that. However, it is just a tool and would still require significant work in addition to what Eric describes below to clean up higher-level OFBiz artifacts like services and screens and such to make the dependency tree clean. Based on the build-time dependencies Eric has generated an interesting graph that he sent to me, and it turns out to be a pretty good graph of component dependencies (even though technically if everything were written in the way intended by the framework, there wouldn't be so many build-time dependencies like this). The graph is actually better than the old old one I hand-rolled (that is in the Component and Component Set Dependencies document in the OFBADMIN space on Confluence). Getting back to the point, does anyone have an opinion on: 1. better modularizing OFBiz 2. using Maven for build and/or module dependency management? -David On Jul 12, 2011, at 12:09 PM, Eric Bowman wrote: Hi, I've written a tool that we're considering open sourcing, and I'm curious to gauge how much interest there would be in it. The purpose of the tool is to generate proper poms for each of the ofbiz modules by inspecting an ofbiz directory. It works in two steps, and it uses the Nexus search API (so it's not that interesting unless you have a Nexus repository installed somewhere nearby). Here's what it does: 1. Inspects $OFBIZ_HOME recursively, identifying external dependency libraries 2. Generates the SHA1 hash of each jar, and uses a Nexus API to determine whether that jar already exists in Nexus as a known artifact. 3. If it does not, it takes a random sample of the classes in each jar, and queries Nexus to see can it figure out a reasonable groupId artifactId. 4. For artifacts not already in Nexus, it synthesizes a mvn deploy:deploy-file for each jar and each possible groupId/artifactId/version it decides might be useful, and lets you decide which commands to run to get all the dependency jars in Nexus. 5. After all the external dependencies are in Nexus, it looks through $OFBIZ_HOME again, and determines all the transitive dependencies between ofbiz modules 6. Next it synthesizes a pom for each module, that captures both the dependencies in that module's lib directory, as well as the simplest transitive graph of dependencies on other modules. 7. Finally it prints out mvn deploy:deploy-file commands which can be run separately to put each ofbiz module's jar file into Nexus, along with its pom. If you are using maven, this is pretty nice -- this way you don't have to worry about declaring dependencies against all the jars in the ofbiz directory; it figures all that out, and leverages maven's transitive dependency resolution to make a clean build. Obviously it doesn't solve other problems, like how to deploy an ofbiz server in a maveny way, but that may follow. If you're interested in seeing this open sourced, perhaps you can reply off-list; if there is enough interest I'll put this on github. And maybe even if there isn't. :) Cheers, Eric Bowman
Re: How to configure OFBiz database using MS Sql Server 2008 R2
Ready, and is running well in SQL Server 2008 R2, I just need to raise test data, thus giving the error because the database did not contain any records in its tables. I ran the following command: ant run-install; and then: startofbiz.bat. Thanks, Rafael On Tue, Jul 12, 2011 at 4:47 PM, Rafael Rondon raron...@gmail.com wrote: Thank you very much Jeroen for your help, but after doing what you recommended just told me that it could not connect to the database. Then I realized that the problem is that I need to configure remote connections in SQL Server 2008. I thought I'd post the solution if it happens to another, I ran the SQL Server Configuration Manager, and that SQL Server Network Protocols for SQLEXPRESS -- configuration - Property TPCP / IP. And put port you want to use (see image attached). Sure, when I run startofbiz.bat already, does not fail, and gets to create the database tables in the database. But when I try to run in the browser gives me other errors (see screen attached). The same version of OFBiz if run with Derby DB works fine. If you can please help me with this new error, Attach I send the log files of the last run of startofbiz.bat. Regards, Rafael On Mon, Jul 11, 2011 at 5:06 PM, Jeroen van der Wal jer...@stromboli.itwrote: Here's a link to the JDBC V4 driver: http://www.microsoft.com/download/en/details.aspx?displaylang=enid=11774 -- Jeroen van der Wal Stromboli b.v. +31 655 874050 On Mon, Jul 11, 2011 at 10:55 PM, Jeroen van der Wal jer...@stromboli.it wrote: We got it working in SQL Server 2008 R2 - add sqljdbc4.jar to /framework/entity/lib/jdbc folder - create a user ofbiz with password ofbiz (as in this example) - make sure you create the database on the sql server and grant the user ofbiz to create tables. Here's a snippet of entityengine.xml in /framework/entity/config (it looked like you copied it to the wrong folder): datasource name=localmssql helper-class=org.ofbiz.entity.datasource.GenericHelperDAO schema-name=dbo field-type-name=mssql check-on-start=true add-missing-on-start=true join-style=ansi alias-view-columns=false use-indices-unique=false use-fk-initially-deferred=false read-data reader-name=seed/ read-data reader-name=seed-initial/ read-data reader-name=demo/ read-data reader-name=ext/ inline-jdbc jdbc-driver=com.microsoft.sqlserver.jdbc.SQLServerDriver jdbc-uri=jdbc:sqlserver://ams-s-sql08.ecp.loc:1433;databaseName=ofbiz;SelectMethod=cursor; jdbc-username=ofbiz jdbc-password=ofbiz isolation-level=ReadCommitted pool-minsize=2 pool-maxsize=250 time-between-eviction-runs-millis=60/ !-- jndi-jdbc jndi-server-name=default jndi-name=comp/env/jdbc/xa/localmssql isolation-level=ReadCommitted/ -- !-- Orion Style JNDI name -- /datasource Hope this helps. -- Jeroen van der Wal Stromboli b.v. +31 655 874050 On Mon, Jul 11, 2011 at 10:35 PM, Rafael Rondon raron...@gmail.com wrote: Hello, I need help to configure and can create me OFBiz database in MS Sql Server 2008 R2. I download the jdbc v2 and v3, with none working. Copy it to D:\ofbiz\ofiz-trunk-20110705\framework\entity\lib\ jdbc. Also edit the file D:\ofbiz\ofbiz-trunk-20110705\framework\entity\lib\jdbc\entityengine.xml with the following configuration: entity-eca-reader=main entity-group-reader=main delegator distributed-cache-clear-enabled=false entity-model-reader=main name=default group-name=org.ofbiz group-map datasource-name=localmssql/ group-name=org.ofbiz.olap group-map datasource-name=localmssqlolap/ group-name=org.ofbiz.tenant group-map datasource-name=localmssqltenant/ ... Datasource name = localmssql helper-class = org.ofbiz.entity.datasource.GenericHelperDAO schema-name = dbo field-type-name = mssql check-on-start = true add-missing-on-start = true join-style = ansi alias-view-columns = false use-fk-INITIALLY-deferred = false reader-name=seed/ read-data reader-name=seed-initial/ read-data reader-name=demo/ read-data reader-name=ext/ read-data Inline-jdbc jdbc-driver = com.microsoft.sqlserver.jdbc.SQLServerDriver jdbc-uri = jdbc: sqlserver: / / localhost: 1433; databaseName = ofbiz; SelectMethod = cursor; jdbc-username = ofbiz jdbc-password = ofbiz isolation-level = ReadCommitted pool-minsize = 2 pool-maxsize = 250 time-between-eviction-runs-millis = 60 / !
Re: ofbiz mavenizer
Hi David, hi Eric, first: cool tool Eric would love to see it! I worked a lot with maven in the last year and must say it is pretty amazing how easy thinks can be when you follow the convention over configuration pattern. There are plenty of plugins which support you by building/deploying/organization your application. So when maven is working it's is a really powerful tool. But during my projects i had to migrate some ANT based builds to Maven based build, that was a lot of work (and some times pretty frustrating). To your points David: 1. better modularizing OFBiz That would be a really great benefit and maven have a good modularization support 2. using Maven for build and/or module dependency management? That effects point one. The maven structure made it easy to create separate POMs (ProjectObjectModel) for each module (which can inherit other POMs) and combine them in one super pom which defines global (build/ deployment etc.) options ... Just a few thoughts this evening :) regards, Sascha 2011/7/13 David E Jones d...@me.com This is an interesting idea, and there seem to be a number of plugins for Maven that deal with release/build/deploy automation. Looking around to learn more about this I found this interesting intro presentation that talks about the Maven release plugin, plus plugins for other tools like Codehaus Cargo and LiquiBase (with a nice little intro to LiquiBase, which is very cool BTW): http://www.slideshare.net/wakaleo/automated-deployment-with-maven-going-the-whole-nine-yards -David On Jul 13, 2011, at 3:39 PM, Eric Bowman wrote: Yes. We version our changes of ofbiz in a mavenesque way, and intend to use the maven release plugin to generate releases which get deployed (in maven terminology) to a repository, from which they get deployed to real servers. On 13 Jul 2011, at 15:18, David E Jones wrote: Is part of the intent to use the Maven release plugin for deployment and such as well? -David On Jul 13, 2011, at 3:12 PM, Eric Bowman wrote: Hi, One other point: this tool is currently useful against ofbiz as-is, in order to build software that depends on it, using maven. Converting ofbiz to use maven is a considerably bigger project. On 13 Jul 2011, at 15:01, David E Jones wrote: I know various people have expressed interest in Maven over the years. From a quick search I see such discussions going back to 2003! OFBiz would definitely benefit from more modularization, and Maven may be able to help with that. However, it is just a tool and would still require significant work in addition to what Eric describes below to clean up higher-level OFBiz artifacts like services and screens and such to make the dependency tree clean. Based on the build-time dependencies Eric has generated an interesting graph that he sent to me, and it turns out to be a pretty good graph of component dependencies (even though technically if everything were written in the way intended by the framework, there wouldn't be so many build-time dependencies like this). The graph is actually better than the old old one I hand-rolled (that is in the Component and Component Set Dependencies document in the OFBADMIN space on Confluence). Getting back to the point, does anyone have an opinion on: 1. better modularizing OFBiz 2. using Maven for build and/or module dependency management? -David On Jul 12, 2011, at 12:09 PM, Eric Bowman wrote: Hi, I've written a tool that we're considering open sourcing, and I'm curious to gauge how much interest there would be in it. The purpose of the tool is to generate proper poms for each of the ofbiz modules by inspecting an ofbiz directory. It works in two steps, and it uses the Nexus search API (so it's not that interesting unless you have a Nexus repository installed somewhere nearby). Here's what it does: 1. Inspects $OFBIZ_HOME recursively, identifying external dependency libraries 2. Generates the SHA1 hash of each jar, and uses a Nexus API to determine whether that jar already exists in Nexus as a known artifact. 3. If it does not, it takes a random sample of the classes in each jar, and queries Nexus to see can it figure out a reasonable groupId artifactId. 4. For artifacts not already in Nexus, it synthesizes a mvn deploy:deploy-file for each jar and each possible groupId/artifactId/version it decides might be useful, and lets you decide which commands to run to get all the dependency jars in Nexus. 5. After all the external dependencies are in Nexus, it looks through $OFBIZ_HOME again, and determines all the transitive dependencies between ofbiz modules 6. Next it synthesizes a pom for each module, that captures both the dependencies in that module's lib directory, as well as the simplest transitive graph of dependencies on other modules. 7. Finally it prints out mvn deploy:deploy-file commands which can be run separately
Re: Accounting doc
google ofbiz reconciliation you will get some jira issues about it. there is help on each page. you can also see the complete doc available by using http://demo-trunk.ofbiz.apache.org/cmssite/cms/APACHE_OFBIZ_HTML then do a find in the browser for the what you looking for. does not always work but this time it did. http://demo-trunk.ofbiz.apache.org/cmssite/cms/APACHE_OFBIZ_HTML#N21241 prasanth r sent the following on 7/12/2011 10:29 PM: I am looking for reconciliation process in ofbiz. On Wed, Jul 13, 2011 at 10:52 AM, Prince Sewani princesew...@ymail.comwrote: Hi Prasanth, Checkout : http://www.hotwaxmedia.com/apache-ofbiz-blog/ofbiz-accounting-setup-chart-of-accounts/ http://www.hotwaxmedia.com/apache-ofbiz-blog/ofbiz-tutorial-charts-of-accounts/ http://www.hotwaxmedia.com/apache-ofbiz-blog/ofbiz-tutorial-adding-glaccount-to-chart-of-accounts/ http://www.myofbiz.com/control/downloadFile?dataResourceId=Accounting5StepGuide.pdf Regards Prince From: prasanth r prasanth.sunr...@gmail.com To: user@ofbiz.apache.org Sent: Wednesday, July 13, 2011 10:31 AM Subject: Accounting doc Hi, Is there any possible way to get Ofbiz Accounting Manager Manual? thanks prasanth rajan
JobManager failing to schedule jobs
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
the key is Transaction timeout this could be the job length could be the database connection please specify the version of ofbiz since earlier transaction problems were taken care of by changing code that deals with transactions. Josh Jacobson sent the following on 7/13/2011 11:48 AM: 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,
Re: JobManager failing to schedule jobs
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 josh.s.jacob...@gmail.comwrote: 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
BJ, I am running 10.04. On Wed, Jul 13, 2011 at 12:00 PM, BJ Freeman bjf...@free-man.net wrote: the key is Transaction timeout this could be the job length could be the database connection please specify the version of ofbiz since earlier transaction problems were taken care of by changing code that deals with transactions. Josh Jacobson sent the following on 7/13/2011 11:48 AM: 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,
Re: JobManager failing to schedule jobs
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 brettgpal...@gmail.com 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 josh.s.jacob...@gmail.comwrote: 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
Ok so you have the latest code. what is the eviorment you working with. OS Memory CPU speed Josh Jacobson sent the following on 7/13/2011 12:12 PM: BJ, I am running 10.04. On Wed, Jul 13, 2011 at 12:00 PM, BJ Freeman bjf...@free-man.net wrote: the key is Transaction timeout this could be the job length could be the database connection please specify the version of ofbiz since earlier transaction problems were taken care of by changing code that deals with transactions. Josh Jacobson sent the following on 7/13/2011 11:48 AM: 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,
Re: JobManager failing to schedule jobs
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.comwrote: 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 brettgpal...@gmail.com 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 josh.s.jacob...@gmail.comwrote: 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
Currently I am running: Red Hat Enterprise Linux Server release 5.5 6 CPUs, 16384MB RAM It was very recently upgraded from 2 CPUs and 8GB of RAM because we were having performance issues (lots of swap memory being used). It's on one of those cloud servers. Now it's running without using any swap. On Wed, Jul 13, 2011 at 12:22 PM, BJ Freeman bjf...@free-man.net wrote: Ok so you have the latest code. what is the eviorment you working with. OS Memory CPU speed Josh Jacobson sent the following on 7/13/2011 12:12 PM: BJ, I am running 10.04. On Wed, Jul 13, 2011 at 12:00 PM, BJ Freeman bjf...@free-man.net wrote: the key is Transaction timeout this could be the job length could be the database connection please specify the version of ofbiz since earlier transaction problems were taken care of by changing code that deals with transactions. Josh Jacobson sent the following on 7/13/2011 11:48 AM: 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,
Re: JobManager failing to schedule jobs
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. I see. I already did that: We had 2.6 million lines on the JobSandbox, mostly of completed or failed jobs. We deleted completed and failed and are now looking at about 260L pending jobs. I want to run those jobs, so I can get the machine back to normal. 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. I understand the possible race condition. So how do I figure what to set the timeout to and where do I configure that? Thanks, -- Josh.
Re: JobManager failing to schedule jobs
On Wed, Jul 13, 2011 at 12:51 PM, Josh Jacobson josh.s.jacob...@gmail.com wrote: 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. I see. I already did that: We had 2.6 million lines on the JobSandbox, mostly of completed or failed jobs. We deleted completed and failed and are now looking at about 260L pending jobs. I want to run those jobs, so I can get the machine back to normal. Sorry, just noticed the typo: We currently have 260K + jobs as pending and I want to process them to get things back to normal. Thanks for the help, -- Josh.
Re: JobManager failing to schedule jobs
You now know why I don't recommend cloud configuration for realtime operations, unless your running over dedicate lines not part of the internet. to summarize you environment caused the problem not ofbiz Now you have jobs cued that should have been run but have piled up. you need a way to get the job run so they don;t time out the system. I recommend you look at the purge old jobs service, copy and modify it to run your jobs, maybe by time group. Josh Jacobson sent the following on 7/13/2011 12:48 PM: Currently I am running: Red Hat Enterprise Linux Server release 5.5 6 CPUs, 16384MB RAM It was very recently upgraded from 2 CPUs and 8GB of RAM because we were having performance issues (lots of swap memory being used). It's on one of those cloud servers. Now it's running without using any swap. On Wed, Jul 13, 2011 at 12:22 PM, BJ Freeman bjf...@free-man.net wrote: Ok so you have the latest code. what is the eviorment you working with. OS Memory CPU speed Josh Jacobson sent the following on 7/13/2011 12:12 PM: BJ, I am running 10.04. On Wed, Jul 13, 2011 at 12:00 PM, BJ Freeman bjf...@free-man.net wrote: the key is Transaction timeout this could be the job length could be the database connection please specify the version of ofbiz since earlier transaction problems were taken care of by changing code that deals with transactions. Josh Jacobson sent the following on 7/13/2011 11:48 AM: 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,
Re: JobManager failing to schedule jobs
Thanks for the pointers. I'll take a look. There is one more piece of information: The purgeOldJobs service is in a crashed status. Do you think that is significant? Thanks, On Wed, Jul 13, 2011 at 4:32 PM, BJ Freeman bjf...@free-man.net wrote: You now know why I don't recommend cloud configuration for realtime operations, unless your running over dedicate lines not part of the internet. to summarize you environment caused the problem not ofbiz Now you have jobs cued that should have been run but have piled up. you need a way to get the job run so they don;t time out the system. I recommend you look at the purge old jobs service, copy and modify it to run your jobs, maybe by time group. Josh Jacobson sent the following on 7/13/2011 12:48 PM: Currently I am running: Red Hat Enterprise Linux Server release 5.5 6 CPUs, 16384MB RAM It was very recently upgraded from 2 CPUs and 8GB of RAM because we were having performance issues (lots of swap memory being used). It's on one of those cloud servers. Now it's running without using any swap. On Wed, Jul 13, 2011 at 12:22 PM, BJ Freeman bjf...@free-man.net wrote: Ok so you have the latest code. what is the eviorment you working with. OS Memory CPU speed Josh Jacobson sent the following on 7/13/2011 12:12 PM: BJ, I am running 10.04. On Wed, Jul 13, 2011 at 12:00 PM, BJ Freeman bjf...@free-man.net wrote: the key is Transaction timeout this could be the job length could be the database connection please specify the version of ofbiz since earlier transaction problems were taken care of by changing code that deals with transactions. Josh Jacobson sent the following on 7/13/2011 11:48 AM: 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,
Re: JobManager failing to schedule jobs
it means it will not purge job done so you will get a build up you can do a run service to start it again Josh Jacobson sent the following on 7/13/2011 4:41 PM: Thanks for the pointers. I'll take a look. There is one more piece of information: The purgeOldJobs service is in a crashed status. Do you think that is significant? Thanks, On Wed, Jul 13, 2011 at 4:32 PM, BJ Freeman bjf...@free-man.net wrote: You now know why I don't recommend cloud configuration for realtime operations, unless your running over dedicate lines not part of the internet. to summarize you environment caused the problem not ofbiz Now you have jobs cued that should have been run but have piled up. you need a way to get the job run so they don;t time out the system. I recommend you look at the purge old jobs service, copy and modify it to run your jobs, maybe by time group. Josh Jacobson sent the following on 7/13/2011 12:48 PM: Currently I am running: Red Hat Enterprise Linux Server release 5.5 6 CPUs, 16384MB RAM It was very recently upgraded from 2 CPUs and 8GB of RAM because we were having performance issues (lots of swap memory being used). It's on one of those cloud servers. Now it's running without using any swap. On Wed, Jul 13, 2011 at 12:22 PM, BJ Freeman bjf...@free-man.net wrote: Ok so you have the latest code. what is the eviorment you working with. OS Memory CPU speed Josh Jacobson sent the following on 7/13/2011 12:12 PM: BJ, I am running 10.04. On Wed, Jul 13, 2011 at 12:00 PM, BJ Freeman bjf...@free-man.net wrote: the key is Transaction timeout this could be the job length could be the database connection please specify the version of ofbiz since earlier transaction problems were taken care of by changing code that deals with transactions. Josh Jacobson sent the following on 7/13/2011 11:48 AM: 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,
Re: JobManager failing to schedule jobs
Thanks, that is what I figured. First things first though: I need to get those jobs running somehow. Thanks for the help. On Wed, Jul 13, 2011 at 4:46 PM, BJ Freeman bjf...@free-man.net wrote: it means it will not purge job done so you will get a build up you can do a run service to start it again Josh Jacobson sent the following on 7/13/2011 4:41 PM: Thanks for the pointers. I'll take a look. There is one more piece of information: The purgeOldJobs service is in a crashed status. Do you think that is significant? Thanks, On Wed, Jul 13, 2011 at 4:32 PM, BJ Freeman bjf...@free-man.net wrote: You now know why I don't recommend cloud configuration for realtime operations, unless your running over dedicate lines not part of the internet. to summarize you environment caused the problem not ofbiz Now you have jobs cued that should have been run but have piled up. you need a way to get the job run so they don;t time out the system. I recommend you look at the purge old jobs service, copy and modify it to run your jobs, maybe by time group. Josh Jacobson sent the following on 7/13/2011 12:48 PM: Currently I am running: Red Hat Enterprise Linux Server release 5.5 6 CPUs, 16384MB RAM It was very recently upgraded from 2 CPUs and 8GB of RAM because we were having performance issues (lots of swap memory being used). It's on one of those cloud servers. Now it's running without using any swap. On Wed, Jul 13, 2011 at 12:22 PM, BJ Freeman bjf...@free-man.net wrote: Ok so you have the latest code. what is the eviorment you working with. OS Memory CPU speed Josh Jacobson sent the following on 7/13/2011 12:12 PM: BJ, I am running 10.04. On Wed, Jul 13, 2011 at 12:00 PM, BJ Freeman bjf...@free-man.net wrote: the key is Transaction timeout this could be the job length could be the database connection please specify the version of ofbiz since earlier transaction problems were taken care of by changing code that deals with transactions. Josh Jacobson sent the following on 7/13/2011 11:48 AM: 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,
Re: JobManager failing to schedule jobs
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.comwrote: 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 brettgpal...@gmail.com 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 josh.s.jacob...@gmail.comwrote: 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
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.comwrote: 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 brettgpal...@gmail.com 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 josh.s.jacob...@gmail.comwrote: 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
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.comwrote: 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 brettgpal...@gmail.com 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 josh.s.jacob...@gmail.comwrote: 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
Re: JobManager failing to schedule jobs
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 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.comwrote: 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 brettgpal...@gmail.com 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 josh.s.jacob...@gmail.comwrote: 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
Re: JobManager failing to schedule jobs
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 scott.g...@hotwaxmedia.com 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 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.comwrote: 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 brettgpal...@gmail.com 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
Re: JobManager failing to schedule jobs
Ah okay, that is entirely dependent on the number of jobs and the speed the server can process them. As a side note I would keep a close eye on the purgeOldJobs service, when it starts falling over (transaction timeout again) then the number of rows in the table will increase quickly which in turn will slow down polling. In general the whole persisted jobs implementation is a bit fragile, especially when dealing with a large number of jobs. I've wanted to replace it with something like quartz for a while but haven't had the time. Regards Scott On 14/07/2011, at 2: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 scott.g...@hotwaxmedia.com 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 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.comwrote: 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 brettgpal...@gmail.com 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 smime.p7s Description: S/MIME cryptographic signature
Re: JobManager failing to schedule jobs
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 josh.s.jacob...@gmail.comwrote: 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 scott.g...@hotwaxmedia.com 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 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.comwrote: 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 brettgpal...@gmail.com wrote: Josh, I've also seen this problem if the JobSandbox table has too many rows
Re: JobManager failing to schedule jobs
I tried 60 seconds for timeout but that didn't work. I guess Ill double it now and keep trying. I have about 260,000 pending jobs, and nothing is getting done. I know what you mean about purgeOldjobs. That service is crashed now and I deleted old jobs from the database by hand. I was up to 2.6 million rows. Ofbiz was pretty much unusable. If you have any other suggestions I'd love Yo hear them. On Wednesday, July 13, 2011, Scott Gray scott.g...@hotwaxmedia.com wrote: Ah okay, that is entirely dependent on the number of jobs and the speed the server can process them. As a side note I would keep a close eye on the purgeOldJobs service, when it starts falling over (transaction timeout again) then the number of rows in the table will increase quickly which in turn will slow down polling. In general the whole persisted jobs implementation is a bit fragile, especially when dealing with a large number of jobs. I've wanted to replace it with something like quartz for a while but haven't had the time. Regards Scott On 14/07/2011, at 2: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 scott.g...@hotwaxmedia.com 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 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.comwrote: Brett,
Re: ofbiz mavenizer
Yes, that's the point, I strong recommend migrate the build system to maven, it's very handy to build/development/deploy/release with maven since there is lots of plugins can be use, and you also can write your plugin if possible. Just as Sascha mentioned, IMHO, 1. Maven follow the convention over configuration, you can avoid lots of unnecessary work, more important, ofbiz is also follow this principle, ofbiz follow the standard ofbiz-module-directory. 2. One of the goal of Maven is to support multiple module development, it's really easy and powerful, there is lots of project(open source or commercial ) are base upon maven build system, such as glassfish, hibernate, james, seam, xwiki... Ofbiz is really a large multiple module project, it's easy to mapping to maven's module. You can focus on the module with maven module support, no need build other moduleit's very important for larger project since you can build quickly and work more effective. 3. Beyond dependency management, maven standardize the release lifecycle, project management, document management and more development activity. 4. Most of the IDE provide powerful support maven, you can open an maven project just as open normal IDE's project, such as idea, eclipse, netbean. 5. Maven provide dependency management which ensure all dependent artifact have accurate version. This is very important to ensure the system stable. Seems some dependent jar of ofbiz miss the version information from my memory. So, I would vote for provide maven build support.。。 Please be free to contact with me for any question or suggestion. Thanks Best Regards . Young Gu | Software Engineer | http://www.infor.com On 7/14/2011 12:12 AM, Sascha Rodekamp wrote: Hi David, hi Eric, first: cool tool Eric would love to see it! I worked a lot with maven in the last year and must say it is pretty amazing how easy thinks can be when you follow the convention over configuration pattern. There are plenty of plugins which support you by building/deploying/organization your application. So when maven is working it's is a really powerful tool. But during my projects i had to migrate some ANT based builds to Maven based build, that was a lot of work (and some times pretty frustrating). To your points David: 1. better modularizing OFBiz That would be a really great benefit and maven have a good modularization support 2. using Maven for build and/or module dependency management? That effects point one. The maven structure made it easy to create separate POMs (ProjectObjectModel) for each module (which can inherit other POMs) and combine them in one super pom which defines global (build/ deployment etc.) options ... Just a few thoughts this evening :) regards, Sascha 2011/7/13 David E Jonesd...@me.com This is an interesting idea, and there seem to be a number of plugins for Maven that deal with release/build/deploy automation. Looking around to learn more about this I found this interesting intro presentation that talks about the Maven release plugin, plus plugins for other tools like Codehaus Cargo and LiquiBase (with a nice little intro to LiquiBase, which is very cool BTW): http://www.slideshare.net/wakaleo/automated-deployment-with-maven-going-the-whole-nine-yards -David On Jul 13, 2011, at 3:39 PM, Eric Bowman wrote: Yes. We version our changes of ofbiz in a mavenesque way, and intend to use the maven release plugin to generate releases which get deployed (in maven terminology) to a repository, from which they get deployed to real servers. On 13 Jul 2011, at 15:18, David E Jones wrote: Is part of the intent to use the Maven release plugin for deployment and such as well? -David On Jul 13, 2011, at 3:12 PM, Eric Bowman wrote: Hi, One other point: this tool is currently useful against ofbiz as-is, in order to build software that depends on it, using maven. Converting ofbiz to use maven is a considerably bigger project. On 13 Jul 2011, at 15:01, David E Jones wrote: I know various people have expressed interest in Maven over the years. From a quick search I see such discussions going back to 2003! OFBiz would definitely benefit from more modularization, and Maven may be able to help with that. However, it is just a tool and would still require significant work in addition to what Eric describes below to clean up higher-level OFBiz artifacts like services and screens and such to make the dependency tree clean. Based on the build-time dependencies Eric has generated an interesting graph that he sent to me, and it turns out to be a pretty good graph of component dependencies (even though technically if everything were written in the way intended by the framework, there wouldn't be so many build-time dependencies like this). The graph is actually better than the old old one I hand-rolled (that is in the Component and
Re: JobManager failing to schedule jobs
Not sure what db you're using but it probably wouldn't hurt to run a vacuum on the table to speed up processing. By the way, I'm pretty sure the default timeout is 60 seconds so you might want to try something a little larger :-) Regards Scott On 14/07/2011, at 2:58 PM, Josh Jacobson wrote: I tried 60 seconds for timeout but that didn't work. I guess Ill double it now and keep trying. I have about 260,000 pending jobs, and nothing is getting done. I know what you mean about purgeOldjobs. That service is crashed now and I deleted old jobs from the database by hand. I was up to 2.6 million rows. Ofbiz was pretty much unusable. If you have any other suggestions I'd love Yo hear them. On Wednesday, July 13, 2011, Scott Gray scott.g...@hotwaxmedia.com wrote: Ah okay, that is entirely dependent on the number of jobs and the speed the server can process them. As a side note I would keep a close eye on the purgeOldJobs service, when it starts falling over (transaction timeout again) then the number of rows in the table will increase quickly which in turn will slow down polling. In general the whole persisted jobs implementation is a bit fragile, especially when dealing with a large number of jobs. I've wanted to replace it with something like quartz for a while but haven't had the time. Regards Scott On 14/07/2011, at 2: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 scott.g...@hotwaxmedia.com 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 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.comwrote: Brett, smime.p7s Description: S/MIME cryptographic signature
Re: JobManager failing to schedule jobs
Vacuum has been run, (took quite a while). Yeah, I see now that the JobManager actually tries to update all the JobSandbox rows in the transaction, so 60 seconds was pretty low. I am trying 10 minutes now and see how that goes. I am using postgress by the way. Thanks for the help, I really appreciate it. -- Josh. On Wed, Jul 13, 2011 at 8:29 PM, Scott Gray scott.g...@hotwaxmedia.com wrote: Not sure what db you're using but it probably wouldn't hurt to run a vacuum on the table to speed up processing. By the way, I'm pretty sure the default timeout is 60 seconds so you might want to try something a little larger :-) Regards Scott On 14/07/2011, at 2:58 PM, Josh Jacobson wrote: I tried 60 seconds for timeout but that didn't work. I guess Ill double it now and keep trying. I have about 260,000 pending jobs, and nothing is getting done. I know what you mean about purgeOldjobs. That service is crashed now and I deleted old jobs from the database by hand. I was up to 2.6 million rows. Ofbiz was pretty much unusable. If you have any other suggestions I'd love Yo hear them. On Wednesday, July 13, 2011, Scott Gray scott.g...@hotwaxmedia.com wrote: Ah okay, that is entirely dependent on the number of jobs and the speed the server can process them. As a side note I would keep a close eye on the purgeOldJobs service, when it starts falling over (transaction timeout again) then the number of rows in the table will increase quickly which in turn will slow down polling. In general the whole persisted jobs implementation is a bit fragile, especially when dealing with a large number of jobs. I've wanted to replace it with something like quartz for a while but haven't had the time. Regards Scott On 14/07/2011, at 2: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 scott.g...@hotwaxmedia.com 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 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.comwrote: Brett,
Re: ofbiz mavenizer
I used Maven Ant Tasks in the development of new OFBiz applications. The Maven Ant Tasks allow some of the Maven's artifact handling features including the dependency management to be used from within the Ant build. So this could be an option for those who wants to use POM to manage the dependencies, and stick to the standard OFBiz project structure at the same time. On 14/07/2011, hyysguy...@gmail.com hyysguy...@gmail.com wrote: Yes, that's the point, I strong recommend migrate the build system to maven, it's very handy to build/development/deploy/release with maven since there is lots of plugins can be use, and you also can write your plugin if possible. Just as Sascha mentioned, IMHO, 1. Maven follow the convention over configuration, you can avoid lots of unnecessary work, more important, ofbiz is also follow this principle, ofbiz follow the standard ofbiz-module-directory. 2. One of the goal of Maven is to support multiple module development, it's really easy and powerful, there is lots of project(open source or commercial ) are base upon maven build system, such as glassfish, hibernate, james, seam, xwiki... Ofbiz is really a large multiple module project, it's easy to mapping to maven's module. You can focus on the module with maven module support, no need build other moduleit's very important for larger project since you can build quickly and work more effective. 3. Beyond dependency management, maven standardize the release lifecycle, project management, document management and more development activity. 4. Most of the IDE provide powerful support maven, you can open an maven project just as open normal IDE's project, such as idea, eclipse, netbean. 5. Maven provide dependency management which ensure all dependent artifact have accurate version. This is very important to ensure the system stable. Seems some dependent jar of ofbiz miss the version information from my memory. So, I would vote for provide maven build support.。。 Please be free to contact with me for any question or suggestion. Thanks Best Regards . Young Gu | Software Engineer | http://www.infor.com On 7/14/2011 12:12 AM, Sascha Rodekamp wrote: Hi David, hi Eric, first: cool tool Eric would love to see it! I worked a lot with maven in the last year and must say it is pretty amazing how easy thinks can be when you follow the convention over configuration pattern. There are plenty of plugins which support you by building/deploying/organization your application. So when maven is working it's is a really powerful tool. But during my projects i had to migrate some ANT based builds to Maven based build, that was a lot of work (and some times pretty frustrating). To your points David: 1. better modularizing OFBiz That would be a really great benefit and maven have a good modularization support 2. using Maven for build and/or module dependency management? That effects point one. The maven structure made it easy to create separate POMs (ProjectObjectModel) for each module (which can inherit other POMs) and combine them in one super pom which defines global (build/ deployment etc.) options ... Just a few thoughts this evening :) regards, Sascha 2011/7/13 David E Jonesd...@me.com This is an interesting idea, and there seem to be a number of plugins for Maven that deal with release/build/deploy automation. Looking around to learn more about this I found this interesting intro presentation that talks about the Maven release plugin, plus plugins for other tools like Codehaus Cargo and LiquiBase (with a nice little intro to LiquiBase, which is very cool BTW): http://www.slideshare.net/wakaleo/automated-deployment-with-maven-going-the-whole-nine-yards -David On Jul 13, 2011, at 3:39 PM, Eric Bowman wrote: Yes. We version our changes of ofbiz in a mavenesque way, and intend to use the maven release plugin to generate releases which get deployed (in maven terminology) to a repository, from which they get deployed to real servers. On 13 Jul 2011, at 15:18, David E Jones wrote: Is part of the intent to use the Maven release plugin for deployment and such as well? -David On Jul 13, 2011, at 3:12 PM, Eric Bowman wrote: Hi, One other point: this tool is currently useful against ofbiz as-is, in order to build software that depends on it, using maven. Converting ofbiz to use maven is a considerably bigger project. On 13 Jul 2011, at 15:01, David E Jones wrote: I know various people have expressed interest in Maven over the years. From a quick search I see such discussions going back to 2003! OFBiz would definitely benefit from more modularization, and Maven may be able to help with that. However, it is just a tool and would still require significant work in addition to what Eric describes below to clean up higher-level OFBiz artifacts
who is using ofbiz or where are the providers?
For the people who do not follow any of the below twitters: @apache_ofbiz @ofbiz_info We have created two screens you can use for promotional purposes: OFBiz end users: http://www.ofbiz.info/control/endusers OFBiz providers: http://www.ofbiz.info/control/providers Everybody can add himself or maintain his information by registering or logging in. Do not know your login? please send an email to supp...@ofbiz.info Yes, we are drinking our own champagne! :-) Regards, Hans -- Ofbiz on twitter: http://twitter.com/apache_ofbiz Myself on twitter: http://twitter.com/hansbak Antwebsystems.com: Quality services for competitive rates.
Re: JobManager failing to schedule jobs
you going to run into this from time to time or one reason or another. the approach I took was to spread the jobs out so they are not lumped together. take a look at how the jobs are Marshalled to be run. Josh Jacobson sent the following on 7/13/2011 8:35 PM: Vacuum has been run, (took quite a while). Yeah, I see now that the JobManager actually tries to update all the JobSandbox rows in the transaction, so 60 seconds was pretty low. I am trying 10 minutes now and see how that goes. I am using postgress by the way. Thanks for the help, I really appreciate it. -- Josh. On Wed, Jul 13, 2011 at 8:29 PM, Scott Gray scott.g...@hotwaxmedia.com wrote: Not sure what db you're using but it probably wouldn't hurt to run a vacuum on the table to speed up processing. By the way, I'm pretty sure the default timeout is 60 seconds so you might want to try something a little larger :-) Regards Scott On 14/07/2011, at 2:58 PM, Josh Jacobson wrote: I tried 60 seconds for timeout but that didn't work. I guess Ill double it now and keep trying. I have about 260,000 pending jobs, and nothing is getting done. I know what you mean about purgeOldjobs. That service is crashed now and I deleted old jobs from the database by hand. I was up to 2.6 million rows. Ofbiz was pretty much unusable. If you have any other suggestions I'd love Yo hear them. On Wednesday, July 13, 2011, Scott Gray scott.g...@hotwaxmedia.com wrote: Ah okay, that is entirely dependent on the number of jobs and the speed the server can process them. As a side note I would keep a close eye on the purgeOldJobs service, when it starts falling over (transaction timeout again) then the number of rows in the table will increase quickly which in turn will slow down polling. In general the whole persisted jobs implementation is a bit fragile, especially when dealing with a large number of jobs. I've wanted to replace it with something like quartz for a while but haven't had the time. Regards Scott On 14/07/2011, at 2: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 scott.g...@hotwaxmedia.com 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 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.comwrote: Brett,