Product Price Rule page load error.

2011-06-28 Thread rohit
hi, 

there is a problem in the product price rules page. 

the default value in the conditions table under the input drop-down list
is product, which causes the value drop-down list to list all the
products currently in the catalog. A store may have thousands of products
which in this case will all be listed under the 'value' list. This cause the
page to time-out or hang, and i suppose is not the best option and it should
be replaces with a search box besides it, as we have in 'search products'
tab. 

Thanks 

Rohit 

-
saanjhi.com 
--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Product-Price-Rule-page-load-error-tp3629705p3629705.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Catalog component loading Very slow on trunk

2011-06-28 Thread Ganesh Bawne
Thanks you Jacques,

Its strange,  I checked the issue on other server m/c and is also taking
around 7-8 secs.

My machine details are as follows:
Processor : Intel Core 2 Due CPU T9400@2.53 GHz
RAM : 3 GB
DB - Postgres 9.0


Thanks,
Ganesh


On Mon, Jun 27, 2011 at 5:16 PM, Jacques Le Roux 
jacques.le.r...@les7arts.com wrote:

 Indeed, at 1st glance it seems there is something wrong (doubled lookups
 requests), I will have a closer look...

 Else it's not that long here. A second to load the whole page on a simple
 dev machine. Which type of setting are you using (machine, network, DBMS,
 etc.)?

 Jacques
   - Original Message -
  From: Ganesh Bawne
  To: user@ofbiz.apache.org
  Sent: Monday, June 27, 2011 6:54 AM
  Subject: Catalog component loading Very slow on trunk


  Hi,


  The catalog component in back-end loading very slow, Its taking almost
 10-12 secs to load the page.
  After looking in details I found that its because of the 'Search Products'
 left bar screen.


  There are below ajax request called on every page load and are taking more
 time.
  1.
 https://demo-trunk.ofbiz.apache.org:8443/catalog/control/LookupProductCategory(Its
  called 6 times for every page load )
  2. 
 https://demo-trunk.ofbiz.apache.org:8443/catalog/control/LookupProduct(its 
 called 4 times for every page load)


  Can we avoid those request to call on page load.
  As they are for auto lookup, we need to fire those request when someone
 really try to search product/category.
  May be onFocus event on category and product search text box.




  I have attached the screen shot to see multiple ajax calls with there load
 time.






  --
  Thanks,
  Ganesh Bawne
  Enterprise Software Developer
  Viithiisys Pvt. Ltd.
  http://www.viithiisys.com




-- 
Thanks  Regards
Ganesh Bawne
Enterprise Software Developer
Viithiisys Pvt. Ltd.
http://www.viithiisys.com


Re: Product Price Rule page load error.

2011-06-28 Thread Jacques Le Roux

Hi Rohit,

Your contribution would be welcome. Else you can then use the old way. Another 
option is to use an input field with Id instead of a
drop-down in the new screen below

See the comment I put just above
   !--screen name=EditProductPriceRules
in PriceScreens.xml

Jacques

From: rohit rohitksur...@yahoo.com

hi,

there is a problem in the product price rules page.

the default value in the conditions table under the input drop-down list
is product, which causes the value drop-down list to list all the
products currently in the catalog. A store may have thousands of products
which in this case will all be listed under the 'value' list. This cause the
page to time-out or hang, and i suppose is not the best option and it should
be replaces with a search box besides it, as we have in 'search products'
tab.

Thanks

Rohit

-
saanjhi.com
--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Product-Price-Rule-page-load-error-tp3629705p3629705.html
Sent from the OFBiz - User mailing list archive at Nabble.com.





Re: Problem: mysql with ofbiz 10.4

2011-06-28 Thread Santosh Malviya
The exception you posted is not complete, post full exception.

-- 
Thanks and Regards
Santosh Malviya

On Tue, Jun 28, 2011 at 10:40 AM, Rakesh_Ists rake...@istsinc.com wrote:

 HI,

 I am getting following exceptions.

[java] 2011-06-28 16:24:06,503 (main) [ModelViewEntity.java:532:WARN
 ] Conversion for complex-alias needs to be implemented for cache and
 in-memory eval stuff to work correctly, will not work for alias:
 totQuantityAvailable of view-entity OrderItemAndShipGrpInvResAndItemSum
 [java] 2011-06-28 16:24:06,570 (main) [
 ModelReader.java:389:INFO ] FINISHED LOADING ENTITIES - ALL FILES;
 #Entities=849 #ViewEntities=267 #Fields=8870 #Relationships=2925
 #AutoRelationships=2157
 [java] 2011-06-28 16:24:06,583 (main) [
 GenericDelegator.java:244:INFO ] Doing entity definition check...
 [java] 2011-06-28 16:24:06,587 (main) [
 ModelEntityChecker.java:502:INFO ] [initReservedWords] array length=1023
 [java] Exception in thread main java.lang.NullPointerException
 [java] at

 org.ofbiz.entity.GenericDelegator.getEntityFieldType(GenericDelegator.java:548)
 [java] at

 org.ofbiz.entity.model.ModelEntityChecker.checkEntities(ModelEntityChecker.java:101)
 [java] at
 org.ofbiz.entity.GenericDelegator.init(GenericDelegator.java:245)
 [java] at

 org.ofbiz.entity.DelegatorFactoryImpl.getInstance(DelegatorFactoryImpl.java:33)
 [java] at

 org.ofbiz.entity.DelegatorFactoryImpl.getInstance(DelegatorFactoryImpl.java:25)
 [java] at
 org.ofbiz.base.util.UtilObject.getObjectFromFactory(UtilObject.java:202)
 [java] at
 org.ofbiz.entity.DelegatorFactory.getDelegator(DelegatorFactory.java:47)
 [java] at

 org.ofbiz.entityext.data.EntityDataLoadContainer.start(EntityDataLoadContainer.java:230)
 [java] at
 org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:100)
 [java] at
 org.ofbiz.base.start.Start.startStartLoaders(Start.java:272)
 [java] at org.ofbiz.base.start.Start.startServer(Start.java:322)
 [java] at org.ofbiz.base.start.Start.start(Start.java:326)
 [java] at org.ofbiz.base.start.Start.main(Start.java:411)
  [java] 2011-06-28 16:24:06,644 (OFBiz_Shutdown_Hook) [
 ContainerLoader.java:113:INFO ] Shutting down containers
 [java] Java Result: 1

 BUILD SUCCESSFUL


 --
 View this message in context:
 http://ofbiz.135035.n4.nabble.com/Problem-mysql-with-ofbiz-10-4-tp3616546p3629471.html
 Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: Problem: mysql with ofbiz 10.4

2011-06-28 Thread Mike
A couple of things I noticed.  When I used mysql (I don't anymore, I
use PG) I had this:

delegator name=default entity-model-reader=main
entity-group-reader=main entity-eca-reader=main
distributed-cache-clear-enabled=false
group-map group-name=org.ofbiz datasource-name=localmysql/
group-map group-name=org.ofbiz.olap datasource-name=localmysql/
/delegator

I used localmysql for both (even olap).  Maybe this is wrong, but it
seemed to work for me.  For my localmysql, it looked like this (I
noticed you used UTF8, which is good).


datasource name=localmysql
helper-class=org.ofbiz.entity.datasource.GenericHelperDAO
field-type-name=mysql
check-on-start=true
add-missing-on-start=true
check-pks-on-start=false
use-foreign-keys=true
join-style=ansi-no-parenthesis
alias-view-columns=false
drop-fk-use-foreign-key-keyword=true
table-type=InnoDB
character-set=utf8
collate=utf8_general_ci
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.mysql.jdbc.Driver

jdbc-uri=jdbc:mysql://10.2.10.101/ofbiz?autoReconnect=true;characterEncoding=UTF-8
jdbc-username=ofbiz
jdbc-password=ofbizpass
isolation-level=ReadCommitted
pool-minsize=2
pool-maxsize=250/
/datasource

10.2.10.101 is my DB server.  Yours may be 127.0.0.1

I believe you need the characterEncoding=UTF-8 to the URI.

On another note, I noticed that you are using root as your login to
mysql.  This is not considered a good practice.  In the above example,
you should create a user login for mysql for the user ofbiz and
assign a password to it.  The user ofbiz has to have sufficient
credentials (i.e. grant all) as to allow creation of a database.  If
your mysql database is on a separate machine, then you need to make
sure you are able to login remotely, which is what ofbiz does.

Example(s):
mysql grant all on *.* to 'ofbiz'@'host_where_ofbiz_runs' identified
by 'ofbizpass';
mysql drop database ofbiz;
mysql create database ofbiz;

You can test whether you can login remotely by doing something like this:

# mysql -u ofbiz -h dbhost -pofbizpass -A -D ofbiz -e show databases
++
| Database   |
++
| information_schema |
| mysql  |
| ofbiz  |
++

There are a lot of examples on the web on how to configure mysql for
this.  To restart, you probably have to drop the ofbiz database to
restart the whole process.

Also, ofbiz has over 800 tables, so you must optimize mysql.  If you
don't, it will be dog-slow.  The table_cache is real important.  This
is what I used to use (probably overkill).

bind-address= 0.0.0.0
#
# * Fine Tuning
#
key_buffer  = 64M
max_allowed_packet  = 640M
thread_stack= 192K
thread_cache_size   = 8
max_connections= 50
table_cache= 2400
table_definition_cache  = 2400
max_heap_table_size = 512M
tmp_table_size  = 512M
join_buffer_size= 5M
query_cache_limit   = 64M
query_cache_size= 128M

Good luck.

On Mon, Jun 27, 2011 at 12:33 AM, Rakesh_Ists rake...@istsinc.com wrote:
 Hi,

 It started proper with derby.

 my entityEngine.xml look likes as folows

 ?xml version=1.0 encoding=UTF-8 ?

 entity-config xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;

 xsi:noNamespaceSchemaLocation=http://ofbiz.apache.org/dtds/entity-config.xsd;
    resource-loader name=fieldfile
 class=org.ofbiz.base.config.FileLoader
            prepend-env=ofbiz.home prefix=/framework/entity/fieldtype//



    transaction-factory
 class=org.ofbiz.geronimo.GeronimoTransactionFactory/






    connection-factory
 class=org.ofbiz.entity.connection.DBCPConnectionFactory/

    delegator name=default entity-model-reader=main
 entity-group-reader=main entity-eca-reader=main
 distributed-cache-clear-enabled=false
        group-map group-name=org.ofbiz datasource-name=localmysql/
        group-map group-name=org.ofbiz.olap
 datasource-name=odbcmysql/

    /delegator
    delegator name=default-no-eca entity-model-reader=main
 entity-group-reader=main entity-eca-reader=main
 entity-eca-enabled=false distributed-cache-clear-enabled=false
         group-map group-name=org.ofbiz datasource-name=localmysql/
        group-map group-name=org.ofbiz.olap datasource-name=odbcmysql/
  /delegator


    delegator name=test entity-model-reader=main
 entity-group-reader=main entity-eca-reader=main
        group-map group-name=org.ofbiz datasource-name=localmysql/
        group-map group-name=org.ofbiz.olap datasource-name=odbcmysql/
    /delegator
        delegator name=other entity-model-reader=main
 entity-group-reader=main 

Re: Catalog component loading Very slow on trunk

2011-06-28 Thread Ganesh Bawne
Hi Guys,

Does anyone faced similar issue?


Thanks,
Ganesh

On Mon, Jun 27, 2011 at 10:24 AM, Ganesh Bawne ganesh4of...@gmail.comwrote:

 Hi,

 The catalog component in back-end loading very slow, Its taking almost
 10-12 secs to load the page.
 After looking in details I found that its because of the 'Search Products'
 left bar screen.

 There are below ajax request called on every page load and are taking more
 time.
 1.
 https://demo-trunk.ofbiz.apache.org:8443/catalog/control/LookupProductCategory(Its
  called 6 times for every page load )
 2. https://demo-trunk.ofbiz.apache.org:8443/catalog/control/LookupProduct(its 
 called 4 times for every page load)

 Can we avoid those request to call on page load.
 As they are for auto lookup, we need to fire those request when someone
 really try to search product/category.
 May be onFocus event on category and product search text box.


 I have attached the screen shot to see multiple ajax calls with there load
 time.




 --
 Thanks,
 Ganesh Bawne
 Enterprise Software Developer
 Viithiisys Pvt. Ltd.
 http://www.viithiisys.com



GenericValue and nulls

2011-06-28 Thread BJ Freeman
I know you can, through expressions, setup null_field parms.
I have a field as a string and do a GenericValue.getString(fieldname)
and it throws a null exception.
what I am looking for is to go through I iteration and check if the
field is empty(null).

is there something I missed?


Re: GenericValue and nulls

2011-06-28 Thread Scott Gray
You'll have to provide more detail about the error, but 
GenericEntity.getXXX(...) doesn't really throw any sort of exceptions.

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 29/06/2011, at 10:45 AM, BJ Freeman wrote:

 I know you can, through expressions, setup null_field parms.
 I have a field as a string and do a GenericValue.getString(fieldname)
 and it throws a null exception.
 what I am looking for is to go through I iteration and check if the
 field is empty(null).
 
 is there something I missed?



smime.p7s
Description: S/MIME cryptographic signature


Access_log name format

2011-06-28 Thread Mike
In my runtime/logs directory, access_log get created like this:

-rw-rw 1 ofbiz ofbiz   72258 2011-06-26 23:58 access_log.2011-06-26
-rw-rw 1 ofbiz ofbiz  100759 2011-06-27 23:54 access_log.2011-06-27
-rw-rw 1 ofbiz ofbiz 4689194 2011-06-28 16:41 access_log.2011-06-28

Is there a way to force ofbiz to just create access_log (w/o the
date), and then when logs are rotated, then add the date?

I already poked around /framework/base/config/ofbiz-containers.xml
(and both-containers.xml), but it still escapes me.

Thanks


Re: Access_log name format

2011-06-28 Thread Adrian Crum

Those are created by Catalina. Try searching Tomcat docs.

-Adrian

On 6/29/2011 12:49 AM, Mike wrote:

In my runtime/logs directory, access_log get created like this:

-rw-rw 1 ofbiz ofbiz   72258 2011-06-26 23:58 access_log.2011-06-26
-rw-rw 1 ofbiz ofbiz  100759 2011-06-27 23:54 access_log.2011-06-27
-rw-rw 1 ofbiz ofbiz 4689194 2011-06-28 16:41 access_log.2011-06-28

Is there a way to force ofbiz to just create access_log (w/o the
date), and then when logs are rotated, then add the date?

I already poked around /framework/base/config/ofbiz-containers.xml
(and both-containers.xml), but it still escapes me.

Thanks


Re: GenericValue and nulls

2011-06-28 Thread BJ Freeman
I am calling a new routine from controller.java
So I am not down to the log4 level yet.

denylist = delegator.findList(VisitFllter, EntityCondition
.makeCondition(exprs, EntityOperator.AND), null, null,
null, Boolean.FALSE);

while (denylistitr.hasNext()status == Boolean.FALSE) {
  GenericValue denylistrcd = (GenericValue) denylistitr.next();
I am getting a
java.lang.NullPointerException on this line
String remoteHoststr =denylistrcd.getString(remoteHost);

it works find it the field is not null

Scott Gray sent the following on 6/28/2011 3:55 PM:
 You'll have to provide more detail about the error, but 
 GenericEntity.getXXX(...) doesn't really throw any sort of exceptions.
 
 Regards
 Scott
 
 HotWax Media
 http://www.hotwaxmedia.com
 
 On 29/06/2011, at 10:45 AM, BJ Freeman wrote:
 
 I know you can, through expressions, setup null_field parms.
 I have a field as a string and do a GenericValue.getString(fieldname)
 and it throws a null exception.
 what I am looking for is to go through I iteration and check if the
 field is empty(null).

 is there something I missed?
 


Re: GenericValue and nulls

2011-06-28 Thread Scott Gray
The only reason I can see why you'd get an NPE on that line is if denylistrcd 
were null.  GenericValue won't throw an NPE on a call to getString().

Regards
Scott

On 29/06/2011, at 12:28 PM, BJ Freeman wrote:

 I am calling a new routine from controller.java
 So I am not down to the log4 level yet.
 
 denylist = delegator.findList(VisitFllter, EntityCondition
   .makeCondition(exprs, EntityOperator.AND), null, null,
   null, Boolean.FALSE);
 
 while (denylistitr.hasNext()status == Boolean.FALSE) {
  GenericValue denylistrcd = (GenericValue) denylistitr.next();
 I am getting a
 java.lang.NullPointerException on this line
 String remoteHoststr =denylistrcd.getString(remoteHost);
 
 it works find it the field is not null
 
 Scott Gray sent the following on 6/28/2011 3:55 PM:
 You'll have to provide more detail about the error, but 
 GenericEntity.getXXX(...) doesn't really throw any sort of exceptions.
 
 Regards
 Scott
 
 HotWax Media
 http://www.hotwaxmedia.com
 
 On 29/06/2011, at 10:45 AM, BJ Freeman wrote:
 
 I know you can, through expressions, setup null_field parms.
 I have a field as a string and do a GenericValue.getString(fieldname)
 and it throws a null exception.
 what I am looking for is to go through I iteration and check if the
 field is empty(null).
 
 is there something I missed?
 



smime.p7s
Description: S/MIME cryptographic signature


Re: GenericValue and nulls

2011-06-28 Thread BJ Freeman
each row has on field that is not null. did not think to
testsdenylistrcd for null. will give it a try.




Scott Gray sent the following on 6/28/2011 5:41 PM:
 The only reason I can see why you'd get an NPE on that line is if denylistrcd 
 were null.  GenericValue won't throw an NPE on a call to getString().
 
 Regards
 Scott
 
 On 29/06/2011, at 12:28 PM, BJ Freeman wrote:
 
 I am calling a new routine from controller.java
 So I am not down to the log4 level yet.

 denylist = delegator.findList(VisitFllter, EntityCondition
  .makeCondition(exprs, EntityOperator.AND), null, null,
  null, Boolean.FALSE);

 while (denylistitr.hasNext()status == Boolean.FALSE) {
  GenericValue denylistrcd = (GenericValue) denylistitr.next();
 I am getting a
 java.lang.NullPointerException on this line
 String remoteHoststr =denylistrcd.getString(remoteHost);

 it works find it the field is not null

 Scott Gray sent the following on 6/28/2011 3:55 PM:
 You'll have to provide more detail about the error, but 
 GenericEntity.getXXX(...) doesn't really throw any sort of exceptions.

 Regards
 Scott

 HotWax Media
 http://www.hotwaxmedia.com

 On 29/06/2011, at 10:45 AM, BJ Freeman wrote:

 I know you can, through expressions, setup null_field parms.
 I have a field as a string and do a GenericValue.getString(fieldname)
 and it throws a null exception.
 what I am looking for is to go through I iteration and check if the
 field is empty(null).

 is there something I missed?

 


Re: GenericValue and nulls

2011-06-28 Thread BJ Freeman
nope it is not null
here is part of the log as you can see it work till this record what
ever it is.
2011-06-28 18:01:42,978 (http-0.0.0.0-8443-1) [
VisitHandler.java:455:INFO ] VisitFllter checking
initialUserAgent=Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US;
rv:1.9.2.17) Gecko/20110420 Firefox/3.6.17
2011-06-28 18:01:42,979 (http-0.0.0.0-8443-1) [
VisitHandler.java:467:INFO ] VisitFllter checking remoteAddr=0:0:0:0:0:0:0:1
2011-06-28 18:01:43,021 (http-0.0.0.0-8443-1)
[StandardWrapperValve.java:281:ERROR] Servlet.service() for servlet
ControlServlet threw exception
java.lang.NullPointerException
at 
org.ofbiz.webapp.stats.VisitHandler.filterVisitor(VisitHandler.java:473)

will ponder some more
thanks for replies


BJ Freeman sent the following on 6/28/2011 5:52 PM:
 each row has on field that is not null. did not think to
 testsdenylistrcd for null. will give it a try.
 
 
 
 
 Scott Gray sent the following on 6/28/2011 5:41 PM:
 The only reason I can see why you'd get an NPE on that line is if 
 denylistrcd were null.  GenericValue won't throw an NPE on a call to 
 getString().

 Regards
 Scott

 On 29/06/2011, at 12:28 PM, BJ Freeman wrote:

 I am calling a new routine from controller.java
 So I am not down to the log4 level yet.

 denylist = delegator.findList(VisitFllter, EntityCondition
 .makeCondition(exprs, EntityOperator.AND), null, null,
 null, Boolean.FALSE);

 while (denylistitr.hasNext()status == Boolean.FALSE) {
  GenericValue denylistrcd = (GenericValue) denylistitr.next();
 I am getting a
 java.lang.NullPointerException on this line
 String remoteHoststr =denylistrcd.getString(remoteHost);

 it works find it the field is not null

 Scott Gray sent the following on 6/28/2011 3:55 PM:
 You'll have to provide more detail about the error, but 
 GenericEntity.getXXX(...) doesn't really throw any sort of exceptions.

 Regards
 Scott

 HotWax Media
 http://www.hotwaxmedia.com

 On 29/06/2011, at 10:45 AM, BJ Freeman wrote:

 I know you can, through expressions, setup null_field parms.
 I have a field as a string and do a GenericValue.getString(fieldname)
 and it throws a null exception.
 what I am looking for is to go through I iteration and check if the
 field is empty(null).

 is there something I missed?


 


Re: Problem: mysql with ofbiz 10.4

2011-06-28 Thread Ricky Khatri
Hi

you don't need to include jar file for derby because derby is an ASF product
setup defaultly with OFBiz

i will suggest you first take svn update and then start working with OFBiz
project




Regards
Ricky Khatri