This is willfully done. They are only warning. The goal is to know which 
problems arise and to fix them. There is a branch currently
used for that: typecheckcleanup200810. Scott is working on it.

Though reporting is warning is desirable, locally I just commented out the 
warnings

Index: framework/entity/src/org/ofbiz/entity/condition/EntityExpr.java
===================================================================
--- framework/entity/src/org/ofbiz/entity/condition/EntityExpr.java (revision 
727747)
+++ framework/entity/src/org/ofbiz/entity/condition/EntityExpr.java (working 
copy)
@@ -264,7 +264,7 @@
        if (!ObjectType.instanceOf(value, type.getJavaType())) {
            String errMsg = "In entity field [" + modelEntity.getEntityName() + "." 
+ curField.getName() + "] set the value passed
in [" + value.getClass().getName() + "] is not compatible with the Java type of the field 
[" + type.getJavaType() + "]";
            // eventually we should do this, but for now we'll do a "soft" 
failure: throw new IllegalArgumentException(errMsg);
-            Debug.logWarning(new Exception("Location of database type error"), 
"=-=-=-=-=-=-=-=-= DATABASE TYPE ERROR in EntityExpr
=-=-=-=-=-=-=-=-= " + errMsg, module);
+            //Debug.logWarning(new Exception("Location of database type error"), 
"=-=-=-=-=-=-=-=-= DATABASE TYPE ERROR in
EntityExpr =-=-=-=-=-=-=-=-= " + errMsg, module);
        }
    }

Index: framework/entity/src/org/ofbiz/entity/GenericEntity.java
===================================================================
--- framework/entity/src/org/ofbiz/entity/GenericEntity.java (revision 727747)
+++ framework/entity/src/org/ofbiz/entity/GenericEntity.java (working copy)
@@ -410,7 +410,7 @@
                if (!ObjectType.instanceOf(value, type.getJavaType())) {
                    String errMsg = "In entity field [" + this.getEntityName() + "." + 
name + "] set the value passed in [" +
value.getClass().getName() + "] is not compatible with the Java type of the field [" + 
type.getJavaType() + "]";
                    // eventually we should do this, but for now we'll do a 
"soft" failure: throw new
IllegalArgumentException(errMsg);
-                    Debug.logWarning(new Exception("Location of database type 
error"), "=-=-=-=-=-=-=-=-= DATABASE TYPE error IN
GenericEntity.set =-=-=-=-=-=-=-=-= " + errMsg, module);
+                    //Debug.logWarning(new Exception("Location of database type 
error"), "=-=-=-=-=-=-=-=-= DATABASE TYPE error IN
GenericEntity.set =-=-=-=-=-=-=-=-= " + errMsg, module);
                }
            }
            Object old = fields.put(name, value);

I tried as attachment also since it's more convenient

Jacques

----- Original Message ----- From: "madppiper" <[email protected]>
To: <[email protected]>
Sent: Thursday, December 18, 2008 5:27 PM
Subject: Database Type Error: not compatible with Double



Hey everyone,

I am receiving a very strange error on the ecommerce application ever since
I switched on the VAT feature, which reads as the following:


=-=-=-=-=-=-=-=-= DATABASE TYPE ERROR in EntityExpr =-=-=-=-=-=-=-=-= In
entity field [TaxAuthorityRateProduct.minPurchase] set the value passed in
[java.math.BigDecimal] is not compatible with the Java type of the field
[Double]


Is this a known bug? I expect it to be caused by the productsummary
screen...
--
View this message in context: 
http://www.nabble.com/Database-Type-Error%3A-not-compatible-with-Double-tp21075962p21075962.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Reply via email to