You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacopo Cappellato (JIRA)" <ji...@apache.org> on 2007/05/18 12:28:16 UTC
[jira] Assigned: (OFBIZ-742) NullPointerException inside
SqlJdbcUtil.java
[ https://issues.apache.org/jira/browse/OFBIZ-742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jacopo Cappellato reassigned OFBIZ-742:
---------------------------------------
Assignee: Jacopo Cappellato
> NullPointerException inside SqlJdbcUtil.java
> --------------------------------------------
>
> Key: OFBIZ-742
> URL: https://issues.apache.org/jira/browse/OFBIZ-742
> Project: OFBiz (The Open for Business Project)
> Issue Type: Bug
> Components: framework
> Affects Versions: SVN trunk
> Environment: SUSE Linux 10.1 with MySQL 5.0.18
> Reporter: Michael Imhof
> Assigned To: Jacopo Cappellato
> Attachments: patch742.txt
>
>
> <entity entity-name="Archivindex"
> package-name="ch.nowhow.isgate.archiv"
> title="Archiv Index Entity" no-auto-stamp="true">
> <field name="id" type="id-num"></field>
> <field name="date" type="date" not-null="true"></field>
> <prim-key field="id"/>
> </entity>
> <field-type-def type="date" sql-type="DATETIME" java-type="java.util.Date"></field-type-def>
> If the date field on the database is NULL, we got an error in the SqlJdbcUtil.java.
> Method:
> ======
> public static void setValue(SQLProcessor sqlP, ModelField modelField, String entityName, Object fieldValue, ModelFieldTypeReader modelFieldTypeReader).
> Code:
> =====
> case 14:
> sqlP.setValue(new java.sql.Date(((java.util.Date) fieldValue).getTime()));
> break;
> Solution:
> ======
> case 14:
> if (fieldValue != null) {
> sqlP.setValue(new java.sql.Date(((java.util.Date) fieldValue).getTime()));
> } else {
> sqlP.setValue((java.sql.Date)null);
> }
> break;
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.