Re: Bugs in OrderView.groovy
Lots of talk about different types of contributors etc and it should be noted there are also lots of types of bugs. Your other posts highlight specific: do this, do that, it crashes/doesn't provide the expected result. That's helpful and will tend to get a response fairly quickly as they may not require as much time to verify and fix. This post is very different and could be titled Potential bugs in OrderView.groovy. I don't think anybody involved in OFBiz can answer your post with out doing a full code review of the file. There are numerous possible reasons for including the first check and not the second, it depends on lots of things and the file is split in to several 'if' sections that may have a lot of impact on whether a productStore is expected to be found. And in a file that is over 400 lines long it could take some effort to assess and justify the one thing you've highlighted before dealing with the I didn't note all of them others. I think with the: If yes, why the first test ? If no, there is missing a test in the second case. you might be over simplifying the problem as there are always other dependencies. So although it's a reasonable post to suggest there are problems in the file the difficulty is you need someone else to volunteer a reasonable amount of their own time to investigate, justify and fix a potential issue. It's basically a retrospective code review that will take a lot of effort, and carries it's own risks of introducing new problems. Generally code quality gets looked at when someone is working on a file. Don't take it personally on this post but I suspect you won't get someone jumping in and adding/removing a speculative 'if' wrapper as you are indirectly asking for quite a lot. On the other hand if you read the code and can produce a test case that triggers a null pointer exception on line 380 Ray Cimballi wrote: Well, I don't know how to explain you, it seems evident to me... In the first case you check if productStore is null or not. In the second case, you don't check. So, what is the correct behaviour ? Should an order be linked to a productStore or not ? If yes, why the first test ? If no, there is missing a test in the second case. From my point of view I would say no because an order with products of type service don't need productStore. To Scott : you should consider there are different kind of contributors on open source projects, I'm the kind of contributor who send emails when I find something I think is a bug, I'm still not in the category of patch providers ! :-) Cimballi On Fri, May 29, 2009 at 7:16 PM, Scott Gray scott.g...@hotwaxmedia.com wrote: Hi Cimballi Inconsistencies aren't necessarily bugs, but you are most welcome to create a patch and jira issue for the corrections you think should be made. Thanks Scott On 30/05/2009, at 10:39 AM, Cimballi wrote: Hi, There are several inconsistancies in the file applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy. I didn't note all of them, but here is an example : Line 260, productStore can be null : productStore = orderHeader.getRelatedOne(ProductStore); if (productStore) { facility = productStore.getRelatedOne(Facility); Line 380, here productStore cannot be null : productStoreId = orderHeader.getRelatedOne(ProductStore).productStoreId; Cimballi
Re: Bugs in OrderView.groovy
+1 Thanks -- Divesh Ray wrote: Lots of talk about different types of contributors etc and it should be noted there are also lots of types of bugs. Your other posts highlight specific: do this, do that, it crashes/doesn't provide the expected result. That's helpful and will tend to get a response fairly quickly as they may not require as much time to verify and fix. This post is very different and could be titled Potential bugs in OrderView.groovy. I don't think anybody involved in OFBiz can answer your post with out doing a full code review of the file. There are numerous possible reasons for including the first check and not the second, it depends on lots of things and the file is split in to several 'if' sections that may have a lot of impact on whether a productStore is expected to be found. And in a file that is over 400 lines long it could take some effort to assess and justify the one thing you've highlighted before dealing with the I didn't note all of them others. I think with the: If yes, why the first test ? If no, there is missing a test in the second case. you might be over simplifying the problem as there are always other dependencies. So although it's a reasonable post to suggest there are problems in the file the difficulty is you need someone else to volunteer a reasonable amount of their own time to investigate, justify and fix a potential issue. It's basically a retrospective code review that will take a lot of effort, and carries it's own risks of introducing new problems. Generally code quality gets looked at when someone is working on a file. Don't take it personally on this post but I suspect you won't get someone jumping in and adding/removing a speculative 'if' wrapper as you are indirectly asking for quite a lot. On the other hand if you read the code and can produce a test case that triggers a null pointer exception on line 380 Ray Cimballi wrote: Well, I don't know how to explain you, it seems evident to me... In the first case you check if productStore is null or not. In the second case, you don't check. So, what is the correct behaviour ? Should an order be linked to a productStore or not ? If yes, why the first test ? If no, there is missing a test in the second case. From my point of view I would say no because an order with products of type service don't need productStore. To Scott : you should consider there are different kind of contributors on open source projects, I'm the kind of contributor who send emails when I find something I think is a bug, I'm still not in the category of patch providers ! :-) Cimballi On Fri, May 29, 2009 at 7:16 PM, Scott Gray scott.g...@hotwaxmedia.com wrote: Hi Cimballi Inconsistencies aren't necessarily bugs, but you are most welcome to create a patch and jira issue for the corrections you think should be made. Thanks Scott On 30/05/2009, at 10:39 AM, Cimballi wrote: Hi, There are several inconsistancies in the file applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy. I didn't note all of them, but here is an example : Line 260, productStore can be null : productStore = orderHeader.getRelatedOne(ProductStore); if (productStore) { facility = productStore.getRelatedOne(Facility); Line 380, here productStore cannot be null : productStoreId = orderHeader.getRelatedOne(ProductStore).productStoreId; Cimballi
OFBiz eProcurement .
Hello users, I've a question, Is OFBIz provide any user interface for eProcurement and tendering ? Any help would be highly appreciated. Thanks Ritika
R9.04 does not compile
We have currently an issue with R9.04 : it does not compile. Not time to look further... r780196 seems involved, see : if (wrapper.getMainPartCount() 1) { Jacques
order is not verified for packing
HI, Just after having created an order from eCOmmerce, when I try to pack it I get now OFB10010 is not verified for packing. How should I verify an order for packing ? Thanks Jacques
Re: order is not verified for packing
Hello Jacques, A new process to Verify Pick before an order can be packed has been introduced. So Once an order is verified from Very Pick screen you can pack it as its now verified. https://localhost:8443/facility/control/VerifyPick?facilityId=WebStoreWarehouse Thanks Regards -- Pranay Pandey HotWax Media | http://www.hotwaxmedia.com Direct: +919826035576 Skype: pranay.pandey On May 31, 2009, at 7:07 PM, Jacques Le Roux wrote: HI, Just after having created an order from eCOmmerce, when I try to pack it I get now OFB10010 is not verified for packing. How should I verify an order for packing ? Thanks Jacques
FYI 9.04
been putting 9.04 through paces but doing a lot of Imports through the web tools and switching pages. on top of this, the ecommece pages are being hit every few seconds. though I doubt this contributes, also use the AJP. The problem is intermittent and Have not had time to dig down to figure out the reason. what happens it errors start showing up about not finding Common Decorator. It has happen twice in the last month. this is cured by restarting ofbiz, I am guessing it has to do with cache or something with Catalina. -- BJ Freeman http://www.businessesnetwork.com/automation http://bjfreeman.elance.com http://www.linkedin.com/profile?viewProfile=key=1237480locale=en_UStrk=tab_pro Systems Integrator.
Re: setting default transaction timeout
While I was working on a related issue, I found this idea in Neogia. They added this snippet // Begin neogia specific : FR1417354 add a way to setup default transaction timeout globally else { Debug.logVerbose([TransactionUtil.begin] set default transaction timeout to : + EntityConfigUtil.getDefaultTransactionTimeout() + seconds, module); ut.setTransactionTimeout(EntityConfigUtil.getDefaultTransactionTimeout()); } // End neogia specific : FR1417354 add a way to setup default transaction timeout globally just after this block // set the timeout for THIS transaction if (timeout 0) { ut.setTransactionTimeout(timeout); Debug.logVerbose([TransactionUtil.begin] set transaction timeout to : + timeout + seconds, module); } in TransactionUtil.java They use their EntityConfigUtil class for that, but as a test you could simply get the timeout data from a properties file... HTH Jacques From: mayo albertmay...@hotmail.com Thanks for the information guys. This was very good help. I ended up setting the transactiontimeout for the particular services that were timing out and it worked great. I am still interested in the default value and will look into what you suggested David. Thanks for the quick responses. David E Jones-3 wrote: Actually, neither of those are the transaction timeout, those are just connection pool management settings. As for where to configure it now... I'm disappointed to say that it isn't configurable anymore (maybe it never was, but I thought it was a long time ago). In general you can specify a transaction timeout period when beginning a transaction. In OFBiz this is mostly done on service definitions since that is where most transactions are begun. If no timeout value is specified, then the default setup in the transaction manager is used. In the current code base the default value is set in the GeronimoTransactionFactory.defaultTransactionTimeoutSeconds variable, which is passed into the GeronimoTransactionManager object when it is created. In older code, like 4.0, it is set differently. The easiest way to find it is still to look at the *TransactionFactory class that is referred to in the entityengine.xml file (near the top) and see how the default is set. -David On May 28, 2009, at 2:06 PM, Jacques Le Roux wrote: Mmm, too quick... Actually it seems to be 120 seconds and set by pool.setMaxWait(12); I was abused by the OFBiz documentation which says that it's 60 seconds and saw after that in pool.setTimeBetweenEvictionRunsMillis(60); it's actually 10 mins... The doc is here http://commons.apache.org/dbcp/configuration.html Jacques From: Jacques Le Roux jacques.le.r...@les7arts.com For the embedded Geronimo it's set à 60 seconds see DBCPConnectionFactory.java[96] http://commons.apache.org/dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setTimeBetweenEvictionRunsMillis(long) Jacques From: mayo albertmay...@hotmail.com I've been searching through the mailing list and google, but can't find if there is a default transaction timeout for OFBiz. I have read that I should set my system's SO. I googled on this and there was little help. Does OFBiz 4.0 use this system SO as its default timeout value? If so, can someone point me in the right direction for setting it for Linux? -- View this message in context: http://www.nabble.com/setting-default-transaction-timeout-tp23765847p23765847.html Sent from the OFBiz - User mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/setting-default-transaction-timeout-tp23765847p23771011.html Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: order is not verified for packing
Thanks Pranay, But could we not do something for the Pack Order command in order view ? https://localhost:8443/facility/control/PackOrder?facilityId=WebStoreWarehouseorderId=DEMO10090shipGroupSeqId=1 Thanks Jacques From: Pranay Pandey pranay.pan...@hotwaxmedia.com Hello Jacques, A new process to Verify Pick before an order can be packed has been introduced. So Once an order is verified from Very Pick screen you can pack it as its now verified. https://localhost:8443/facility/control/VerifyPick?facilityId=WebStoreWarehouse Thanks Regards -- Pranay Pandey HotWax Media | http://www.hotwaxmedia.com Direct: +919826035576 Skype: pranay.pandey On May 31, 2009, at 7:07 PM, Jacques Le Roux wrote: HI, Just after having created an order from eCOmmerce, when I try to pack it I get now OFB10010 is not verified for packing. How should I verify an order for packing ? Thanks Jacques
Jython error
Dear all, I'm trying to run a jython service, but I'm getting the following error: Problems loading org.apache.bsf.BSFEngine: jpython (unable to load language: jpython)) I spent about an hour tracing the error through the code, but that was of no avail. Seems to me that the trouble is with BSF loading the JPython classes, but this is just a guess. Any help would be much appreciated. The service definition looks like this: service name=testPython engine=jpython location=component://order/script/org/ofbiz/order/test/Test.py descriptiontesting the service engine/description attribute name=status type=String mode=OUT optional=false/ /service and I call the service with this: result = dispatcher.runSync(testPython, null) Thanks and Regards, Anshuman Manur
Re: Jython error
Unless I missed something jpython is not supported also only valid engines are java and simple feel free to make a jira http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices Anshuman Manur sent the following on 5/31/2009 9:44 AM: Dear all, I'm trying to run a jython service, but I'm getting the following error: Problems loading org.apache.bsf.BSFEngine: jpython (unable to load language: jpython)) I spent about an hour tracing the error through the code, but that was of no avail. Seems to me that the trouble is with BSF loading the JPython classes, but this is just a guess. Any help would be much appreciated. The service definition looks like this: service name=testPython engine=jpython location=component://order/script/org/ofbiz/order/test/Test.py descriptiontesting the service engine/description attribute name=status type=String mode=OUT optional=false/ /service and I call the service with this: result = dispatcher.runSync(testPython, null) Thanks and Regards, Anshuman Manur -- BJ Freeman http://www.businessesnetwork.com/automation http://bjfreeman.elance.com http://www.linkedin.com/profile?viewProfile=key=1237480locale=en_UStrk=tab_pro Systems Integrator.
Re: R9.04 does not compile
Guess that is why the demo9.04 is down :D Jacques Le Roux sent the following on 5/31/2009 6:19 AM: We have currently an issue with R9.04 : it does not compile. Not time to look further... r780196 seems involved, see : if (wrapper.getMainPartCount() 1) { Jacques -- BJ Freeman http://www.businessesnetwork.com/automation http://bjfreeman.elance.com http://www.linkedin.com/profile?viewProfile=key=1237480locale=en_UStrk=tab_pro Systems Integrator.
Re: R9.04 does not compile
I complied the 780443 with no problem BTW. Looks like hans did revert. Jacques Le Roux sent the following on 5/31/2009 6:19 AM: We have currently an issue with R9.04 : it does not compile. Not time to look further... r780196 seems involved, see : if (wrapper.getMainPartCount() 1) { Jacques -- BJ Freeman http://www.businessesnetwork.com/automation http://bjfreeman.elance.com http://www.linkedin.com/profile?viewProfile=key=1237480locale=en_UStrk=tab_pro Systems Integrator.
findParty Service return empty partyList
I tried to put various parameters in findParty service but always partyList OUT parameter is empty. Does somebody have any clue? Thanks
Re: Bug when searching for order and deselecting all status
After thinking about it, I think there is a difficult point here. The fact that the entity engine is really permissive is a good point I think, so that each applications can choose which data is mandatory or not depending on its business. The import tool should be compliant with the entity engine, so that it lets you import data as for the previous rule. Now, the problem is if you want to import data that is compliant with the provided services and interfaces. Here is the problem because we don't know which data is mandatory from the provided code point of view. I don't have any solutions for this last point, but it's something on which you should thought. Maybe add an option in the import tool to tell if you want to validate your data for the provided services and interfaces (but this means you will also need to add a way to tell which data is mandatory or not). Cimballi On Fri, May 29, 2009 at 1:44 PM, Cimballi cimba...@cimballi.net wrote: I give more precision about this bug. In fact, I added samples data in a XML data file and imported it. In my order, there was no status and no orderDate, but the import worked well. And then, in the application, if an order has no status or no orderDate (and maybe other fields), the lookup generates errors. So there is inconsistancy here because you can import data that generates errors in the application. There are 2 solutions : - The import tool should reject the data - The web application should accept this data even with the missing fields Cimballi On Fri, May 29, 2009 at 12:51 PM, Cimballi cimba...@cimballi.net wrote: Hi, I think there is a bug in the Lookup orders page. If you deselect all the status and click on Find, you have this message : Error on line 167, column 13 in component://order/webapp/ordermgr/order/orderlist.ftl orderHeader.getRelatedOneCache(StatusItem) is undefined. It cannot be assigned to status The problematic instruction: -- == assignment: status=orderHeader.getRelatedOneCache(StatusItem) [on line 167, column 13 in component://order/webapp/ordermgr/order/orderlist.ftl] -- Java backtrace for programmers: -- freemarker.core.InvalidReferenceException: Error on line 167, column 13 in component://order/webapp/ordermgr/order/orderlist.ftl orderHeader.getRelatedOneCache(StatusItem) is undefined. It cannot be assigned to status at freemarker.core.Assignment.accept(Assignment.java:111) at freemarker.core.Environment.visit(Environment.java:209) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:209) at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:167) at freemarker.core.Environment.visit(Environment.java:416) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102) at freemarker.core.Environment.visit(Environment.java:209) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:209) at freemarker.core.IfBlock.accept(IfBlock.java:82) at freemarker.core.Environment.visit(Environment.java:209) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:209) at freemarker.core.Environment.process(Environment.java:189) at org.ofbiz.base.util.template.FreeMarkerWorker.renderTemplate(FreeMarkerWorker.java:205) at org.ofbiz.widget.screen.HtmlWidget.renderHtmlTemplate(HtmlWidget.java:201) at org.ofbiz.widget.screen.HtmlWidget$HtmlTemplate.renderWidgetString(HtmlWidget.java:245) at org.ofbiz.widget.screen.HtmlWidget.renderWidgetString(HtmlWidget.java:107) at org.ofbiz.widget.screen.ModelScreenWidget$PlatformSpecific.renderWidgetString(ModelScreenWidget.java:976) at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:138) at org.ofbiz.widget.screen.ModelScreenWidget$DecoratorSection.renderWidgetString(ModelScreenWidget.java:676) at org.ofbiz.widget.screen.ModelScreenWidget$SectionsRenderer.render(ModelScreenWidget.java:167) at org.ofbiz.widget.screen.ModelScreenWidget$DecoratorSectionInclude.renderWidgetString(ModelScreenWidget.java:706) at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:138) at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:227) at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:138) at org.ofbiz.widget.screen.ModelScreenWidget$DecoratorSection.renderWidgetString(ModelScreenWidget.java:676) at org.ofbiz.widget.screen.ModelScreenWidget$SectionsRenderer.render(ModelScreenWidget.java:167) at org.ofbiz.widget.screen.ModelScreenWidget$DecoratorSectionInclude.renderWidgetString(ModelScreenWidget.java:706) at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:138) at
Re: Bug when searching for order and deselecting all status
not sure if you talking about the webtools import or not. Looks like you may be talking about import thru seed, ext. The entity engine only checkes for Keys, unless you use the webtools import where you can turn it off. Now if you doing importing using your own code say from an external source if you call a service instead of using the entity then you the service will define mandatory data. you can define in the in-map if data is mandatory of a service. Cimballi sent the following on 5/31/2009 1:00 PM: After thinking about it, I think there is a difficult point here. The fact that the entity engine is really permissive is a good point I think, so that each applications can choose which data is mandatory or not depending on its business. The import tool should be compliant with the entity engine, so that it lets you import data as for the previous rule. Now, the problem is if you want to import data that is compliant with the provided services and interfaces. Here is the problem because we don't know which data is mandatory from the provided code point of view. I don't have any solutions for this last point, but it's something on which you should thought. Maybe add an option in the import tool to tell if you want to validate your data for the provided services and interfaces (but this means you will also need to add a way to tell which data is mandatory or not). Cimballi On Fri, May 29, 2009 at 1:44 PM, Cimballi cimba...@cimballi.net wrote: I give more precision about this bug. In fact, I added samples data in a XML data file and imported it. In my order, there was no status and no orderDate, but the import worked well. And then, in the application, if an order has no status or no orderDate (and maybe other fields), the lookup generates errors. So there is inconsistancy here because you can import data that generates errors in the application. There are 2 solutions : - The import tool should reject the data - The web application should accept this data even with the missing fields Cimballi On Fri, May 29, 2009 at 12:51 PM, Cimballi cimba...@cimballi.net wrote: Hi, I think there is a bug in the Lookup orders page. If you deselect all the status and click on Find, you have this message : Error on line 167, column 13 in component://order/webapp/ordermgr/order/orderlist.ftl orderHeader.getRelatedOneCache(StatusItem) is undefined. It cannot be assigned to status The problematic instruction: -- == assignment: status=orderHeader.getRelatedOneCache(StatusItem) [on line 167, column 13 in component://order/webapp/ordermgr/order/orderlist.ftl] -- Java backtrace for programmers: -- freemarker.core.InvalidReferenceException: Error on line 167, column 13 in component://order/webapp/ordermgr/order/orderlist.ftl orderHeader.getRelatedOneCache(StatusItem) is undefined. It cannot be assigned to status at freemarker.core.Assignment.accept(Assignment.java:111) at freemarker.core.Environment.visit(Environment.java:209) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:209) at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:167) at freemarker.core.Environment.visit(Environment.java:416) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102) at freemarker.core.Environment.visit(Environment.java:209) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:209) at freemarker.core.IfBlock.accept(IfBlock.java:82) at freemarker.core.Environment.visit(Environment.java:209) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:209) at freemarker.core.Environment.process(Environment.java:189) at org.ofbiz.base.util.template.FreeMarkerWorker.renderTemplate(FreeMarkerWorker.java:205) at org.ofbiz.widget.screen.HtmlWidget.renderHtmlTemplate(HtmlWidget.java:201) at org.ofbiz.widget.screen.HtmlWidget$HtmlTemplate.renderWidgetString(HtmlWidget.java:245) at org.ofbiz.widget.screen.HtmlWidget.renderWidgetString(HtmlWidget.java:107) at org.ofbiz.widget.screen.ModelScreenWidget$PlatformSpecific.renderWidgetString(ModelScreenWidget.java:976) at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:138) at org.ofbiz.widget.screen.ModelScreenWidget$DecoratorSection.renderWidgetString(ModelScreenWidget.java:676) at org.ofbiz.widget.screen.ModelScreenWidget$SectionsRenderer.render(ModelScreenWidget.java:167) at org.ofbiz.widget.screen.ModelScreenWidget$DecoratorSectionInclude.renderWidgetString(ModelScreenWidget.java:706) at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:138) at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:227) at
Re: Bugs in OrderView.groovy
Here is a data file which you can import and which will generate the null pointer exception when trying to view the order : ?xml version=1.0 encoding=UTF-8? entity-engine-xml OrderType description=Special Sales hasTable=N orderTypeId=SPECIAL_SALES_ORDER parentTypeId=SALES_ORDER / OrderHeader orderId=OH0001 orderTypeId=SPECIAL_SALES_ORDER orderDate=2009-01-01 12:00:00.0 entryDate=2009-01-01 12:00:00.0 statusId=ORDER_CREATED / OrderRole orderId=OH0001 partyId=DemoCustomer roleTypeId=PLACING_CUSTOMER / /entity-engine-xml And the stack trace (the beginning) : 2009-05-31 15:54:22,417 (http-0.0.0.0-8443-1) [ ControlServlet.java:204:ERROR] exception report -- Error in request handler: Exception: org.ofbiz.widget.screen.ScreenRenderException Message: Error rendering screen [component://order/widget/ordermgr/OrderViewScreens.xml#OrderHeaderView]: java.lang.NullPointerException (null) cause - Exception: java.lang.NullPointerException Message: null stack trace --- java.lang.NullPointerException org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:178) org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:477) OrderView.run(OrderView.groovy:380) org.ofbiz.base.util.GroovyUtil.runScriptAtLocation(GroovyUtil.java:117) ... Cimballi On Sun, May 31, 2009 at 5:28 AM, Divesh Dutta divesh.du...@hotwaxmedia.com wrote: +1 Thanks -- Divesh Ray wrote: Lots of talk about different types of contributors etc and it should be noted there are also lots of types of bugs. Your other posts highlight specific: do this, do that, it crashes/doesn't provide the expected result. That's helpful and will tend to get a response fairly quickly as they may not require as much time to verify and fix. This post is very different and could be titled Potential bugs in OrderView.groovy. I don't think anybody involved in OFBiz can answer your post with out doing a full code review of the file. There are numerous possible reasons for including the first check and not the second, it depends on lots of things and the file is split in to several 'if' sections that may have a lot of impact on whether a productStore is expected to be found. And in a file that is over 400 lines long it could take some effort to assess and justify the one thing you've highlighted before dealing with the I didn't note all of them others. I think with the: If yes, why the first test ? If no, there is missing a test in the second case. you might be over simplifying the problem as there are always other dependencies. So although it's a reasonable post to suggest there are problems in the file the difficulty is you need someone else to volunteer a reasonable amount of their own time to investigate, justify and fix a potential issue. It's basically a retrospective code review that will take a lot of effort, and carries it's own risks of introducing new problems. Generally code quality gets looked at when someone is working on a file. Don't take it personally on this post but I suspect you won't get someone jumping in and adding/removing a speculative 'if' wrapper as you are indirectly asking for quite a lot. On the other hand if you read the code and can produce a test case that triggers a null pointer exception on line 380 Ray Cimballi wrote: Well, I don't know how to explain you, it seems evident to me... In the first case you check if productStore is null or not. In the second case, you don't check. So, what is the correct behaviour ? Should an order be linked to a productStore or not ? If yes, why the first test ? If no, there is missing a test in the second case. From my point of view I would say no because an order with products of type service don't need productStore. To Scott : you should consider there are different kind of contributors on open source projects, I'm the kind of contributor who send emails when I find something I think is a bug, I'm still not in the category of patch providers ! :-) Cimballi On Fri, May 29, 2009 at 7:16 PM, Scott Gray scott.g...@hotwaxmedia.com wrote: Hi Cimballi Inconsistencies aren't necessarily bugs, but you are most welcome to create a patch and jira issue for the corrections you think should be made. Thanks Scott On 30/05/2009, at 10:39 AM, Cimballi wrote: Hi, There are several inconsistancies in the file applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy. I didn't note all of them, but here is an example : Line 260, productStore can be null : productStore = orderHeader.getRelatedOne(ProductStore); if (productStore) { facility = productStore.getRelatedOne(Facility); Line 380, here productStore cannot be null :
Re: Bugs in OrderView.groovy
the import tools was not meant for a novice to use but someone familiar with the system. that is the reason it it only allowed under admin. it is up to the importer to know what is required and supply it. the same goes for the datafile importing. Cimballi sent the following on 5/31/2009 1:56 PM: Here is a data file which you can import and which will generate the null pointer exception when trying to view the order : ?xml version=1.0 encoding=UTF-8? entity-engine-xml OrderType description=Special Sales hasTable=N orderTypeId=SPECIAL_SALES_ORDER parentTypeId=SALES_ORDER / OrderHeader orderId=OH0001 orderTypeId=SPECIAL_SALES_ORDER orderDate=2009-01-01 12:00:00.0 entryDate=2009-01-01 12:00:00.0 statusId=ORDER_CREATED / OrderRole orderId=OH0001 partyId=DemoCustomer roleTypeId=PLACING_CUSTOMER / /entity-engine-xml And the stack trace (the beginning) : 2009-05-31 15:54:22,417 (http-0.0.0.0-8443-1) [ ControlServlet.java:204:ERROR] exception report -- Error in request handler: Exception: org.ofbiz.widget.screen.ScreenRenderException Message: Error rendering screen [component://order/widget/ordermgr/OrderViewScreens.xml#OrderHeaderView]: java.lang.NullPointerException (null) cause - Exception: java.lang.NullPointerException Message: null stack trace --- java.lang.NullPointerException org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:178) org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:477) OrderView.run(OrderView.groovy:380) org.ofbiz.base.util.GroovyUtil.runScriptAtLocation(GroovyUtil.java:117) ... Cimballi On Sun, May 31, 2009 at 5:28 AM, Divesh Dutta divesh.du...@hotwaxmedia.com wrote: +1 Thanks -- Divesh Ray wrote: Lots of talk about different types of contributors etc and it should be noted there are also lots of types of bugs. Your other posts highlight specific: do this, do that, it crashes/doesn't provide the expected result. That's helpful and will tend to get a response fairly quickly as they may not require as much time to verify and fix. This post is very different and could be titled Potential bugs in OrderView.groovy. I don't think anybody involved in OFBiz can answer your post with out doing a full code review of the file. There are numerous possible reasons for including the first check and not the second, it depends on lots of things and the file is split in to several 'if' sections that may have a lot of impact on whether a productStore is expected to be found. And in a file that is over 400 lines long it could take some effort to assess and justify the one thing you've highlighted before dealing with the I didn't note all of them others. I think with the: If yes, why the first test ? If no, there is missing a test in the second case. you might be over simplifying the problem as there are always other dependencies. So although it's a reasonable post to suggest there are problems in the file the difficulty is you need someone else to volunteer a reasonable amount of their own time to investigate, justify and fix a potential issue. It's basically a retrospective code review that will take a lot of effort, and carries it's own risks of introducing new problems. Generally code quality gets looked at when someone is working on a file. Don't take it personally on this post but I suspect you won't get someone jumping in and adding/removing a speculative 'if' wrapper as you are indirectly asking for quite a lot. On the other hand if you read the code and can produce a test case that triggers a null pointer exception on line 380 Ray Cimballi wrote: Well, I don't know how to explain you, it seems evident to me... In the first case you check if productStore is null or not. In the second case, you don't check. So, what is the correct behaviour ? Should an order be linked to a productStore or not ? If yes, why the first test ? If no, there is missing a test in the second case. From my point of view I would say no because an order with products of type service don't need productStore. To Scott : you should consider there are different kind of contributors on open source projects, I'm the kind of contributor who send emails when I find something I think is a bug, I'm still not in the category of patch providers ! :-) Cimballi On Fri, May 29, 2009 at 7:16 PM, Scott Gray scott.g...@hotwaxmedia.com wrote: Hi Cimballi Inconsistencies aren't necessarily bugs, but you are most welcome to create a patch and jira issue for the corrections you think should be made. Thanks Scott On 30/05/2009, at 10:39 AM, Cimballi wrote: Hi, There are several inconsistancies in the file
Re: findParty Service return empty partyList
that is strange you should get an error or succeed sound like your code. Muhammad Aamir sent the following on 5/31/2009 12:54 PM: I tried to put various parameters in findParty service but always partyList OUT parameter is empty. Does somebody have any clue? Thanks -- BJ Freeman http://www.businessesnetwork.com/automation http://bjfreeman.elance.com http://www.linkedin.com/profile?viewProfile=key=1237480locale=en_UStrk=tab_pro Systems Integrator.
demo904 -Visual Theme resources not found.
https://demo904.ofbiz.org/catalog/control/main Error rendering included template at location [component://common/webcommon/includes/header.ftl]: java.lang.IllegalArgumentException: FreeMarker file not found at location: component://common/webcommon/includes/header.ftl Error rendering included template at location [component://common/webcommon/includes/appbar.ftl]: java.lang.IllegalArgumentException: FreeMarker file not found at location: component://common/webcommon/includes/appbar.ftl The Following Errors Occurred: Visual Theme resources not found. -- BJ Freeman http://www.businessesnetwork.com/automation http://bjfreeman.elance.com http://www.linkedin.com/profile?viewProfile=key=1237480locale=en_UStrk=tab_pro Systems Integrator.
Re: OFBiz eProcurement .
Ritika, The short answer is... it depends. ;) Are you looking for a solution for buying or selling (ie what role does the organization play)? Are you looking for just a user interface or will you need interfaces with other systems as well? If you need interfaces to other systems, which systems or standards will you need work with? There are quite a few different scenarios supported OOTB in OFBiz, and various others that are partially supported. For example if you are trying to support eprocurement for business customers as a supplier then there is good support for letting customers submit a Request for Quote, then someone in your organization can prepate a Quote that the customer can see online, and they can also place an order for Quote online. There is also general support for other types of requests, agreements with suppliers and customers to help automate more frequent transactions, and all sorts of other things. In short the most correct answer is it depends, and chances are the answer is yes. -David On May 31, 2009, at 6:09 AM, Ritika Agrawal wrote: Hello users, I've a question, Is OFBIz provide any user interface for eProcurement and tendering ? Any help would be highly appreciated. Thanks Ritika
Has anyone debug the catagorywork.java
that does not use CATALOG1 my read of the code says if I assign a category as the top one in catalog manager, that it should show in the SideDeepCategory.ftl so I am missing something. somewhere. -- BJ Freeman http://www.businessesnetwork.com/automation http://bjfreeman.elance.com http://www.linkedin.com/profile?viewProfile=key=1237480locale=en_UStrk=tab_pro Systems Integrator.
Re: Bugs in OrderView.groovy
Just because the data model allows an order without a product store doesn't mean that the code does. There are a million ways that you can cause errors in the system with incorrectly loaded data. Regards Scott On 1/06/2009, at 8:56 AM, Cimballi wrote: Here is a data file which you can import and which will generate the null pointer exception when trying to view the order : ?xml version=1.0 encoding=UTF-8? entity-engine-xml OrderType description=Special Sales hasTable=N orderTypeId=SPECIAL_SALES_ORDER parentTypeId=SALES_ORDER / OrderHeader orderId=OH0001 orderTypeId=SPECIAL_SALES_ORDER orderDate=2009-01-01 12:00:00.0 entryDate=2009-01-01 12:00:00.0 statusId=ORDER_CREATED / OrderRole orderId=OH0001 partyId=DemoCustomer roleTypeId=PLACING_CUSTOMER / /entity-engine-xml And the stack trace (the beginning) : 2009-05-31 15:54:22,417 (http-0.0.0.0-8443-1) [ ControlServlet.java:204:ERROR] exception report -- Error in request handler: Exception: org.ofbiz.widget.screen.ScreenRenderException Message: Error rendering screen [component://order/widget/ordermgr/ OrderViewScreens.xml#OrderHeaderView]: java.lang.NullPointerException (null) cause - Exception: java.lang.NullPointerException Message: null stack trace --- java.lang.NullPointerException org .codehaus .groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:178) org .codehaus .groovy .runtime .ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:477) OrderView.run(OrderView.groovy:380) org.ofbiz.base.util.GroovyUtil.runScriptAtLocation(GroovyUtil.java: 117) ... Cimballi On Sun, May 31, 2009 at 5:28 AM, Divesh Dutta divesh.du...@hotwaxmedia.com wrote: +1 Thanks -- Divesh Ray wrote: Lots of talk about different types of contributors etc and it should be noted there are also lots of types of bugs. Your other posts highlight specific: do this, do that, it crashes/ doesn't provide the expected result. That's helpful and will tend to get a response fairly quickly as they may not require as much time to verify and fix. This post is very different and could be titled Potential bugs in OrderView.groovy. I don't think anybody involved in OFBiz can answer your post with out doing a full code review of the file. There are numerous possible reasons for including the first check and not the second, it depends on lots of things and the file is split in to several 'if' sections that may have a lot of impact on whether a productStore is expected to be found. And in a file that is over 400 lines long it could take some effort to assess and justify the one thing you've highlighted before dealing with the I didn't note all of them others. I think with the: If yes, why the first test ? If no, there is missing a test in the second case. you might be over simplifying the problem as there are always other dependencies. So although it's a reasonable post to suggest there are problems in the file the difficulty is you need someone else to volunteer a reasonable amount of their own time to investigate, justify and fix a potential issue. It's basically a retrospective code review that will take a lot of effort, and carries it's own risks of introducing new problems. Generally code quality gets looked at when someone is working on a file. Don't take it personally on this post but I suspect you won't get someone jumping in and adding/removing a speculative 'if' wrapper as you are indirectly asking for quite a lot. On the other hand if you read the code and can produce a test case that triggers a null pointer exception on line 380 Ray Cimballi wrote: Well, I don't know how to explain you, it seems evident to me... In the first case you check if productStore is null or not. In the second case, you don't check. So, what is the correct behaviour ? Should an order be linked to a productStore or not ? If yes, why the first test ? If no, there is missing a test in the second case. From my point of view I would say no because an order with products of type service don't need productStore. To Scott : you should consider there are different kind of contributors on open source projects, I'm the kind of contributor who send emails when I find something I think is a bug, I'm still not in the category of patch providers ! :-) Cimballi On Fri, May 29, 2009 at 7:16 PM, Scott Gray scott.g...@hotwaxmedia.com wrote: Hi Cimballi Inconsistencies aren't necessarily bugs, but you are most welcome to create a patch and jira issue for the corrections you think should be made. Thanks Scott On 30/05/2009, at 10:39 AM, Cimballi wrote: Hi, There are several inconsistancies in the file applications/order/webapp/ordermgr/WEB-INF/actions/order/
Re: Jython error
Not supported? I don't understand - in the Best Practices Guidehttp://docs.ofbiz.org/display/OFBADMIN/Best+Practices+Guide, the logic layer section contains the following lines: * Always implement your service using the easiest and most appropriate language or tool. You can implement services with many different languages including Java, Groovy, Beanshell or any BSF compliant scripting language (Jython, Jacl, JavaScript, etc), OFBiz Workflow Engine processes, OFBiz MiniLang simple-methods, and various others.* And, the serviceengine.xml file in framework/config/ contains the following entry: *engine name=jpython class=org.ofbiz.service.engine.BSFEngine/* Could someone please tell me if Jython is supported, because I feel it is and I'd be happy to create a Jira otherwise. Anshuman Manur On Sun, May 31, 2009 at 10:58 PM, BJ Freeman bjf...@free-man.net wrote: Unless I missed something jpython is not supported also only valid engines are java and simple feel free to make a jira http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices Anshuman Manur sent the following on 5/31/2009 9:44 AM: Dear all, I'm trying to run a jython service, but I'm getting the following error: Problems loading org.apache.bsf.BSFEngine: jpython (unable to load language: jpython)) I spent about an hour tracing the error through the code, but that was of no avail. Seems to me that the trouble is with BSF loading the JPython classes, but this is just a guess. Any help would be much appreciated. The service definition looks like this: service name=testPython engine=jpython location=component://order/script/org/ofbiz/order/test/Test.py descriptiontesting the service engine/description attribute name=status type=String mode=OUT optional=false/ /service and I call the service with this: result = dispatcher.runSync(testPython, null) Thanks and Regards, Anshuman Manur -- BJ Freeman http://www.businessesnetwork.com/automation http://bjfreeman.elance.com http://www.linkedin.com/profile?viewProfile=key=1237480locale=en_UStrk=tab_pro Systems Integrator.