-
Bug
-
Resolution: Timed out
-
Low
-
None
-
3.6.4, 6.3.9
-
3.06
-
1
-
Severity 3 - Minor
-
The definiton of the Interface AttachmentManager contains the following method
public ChangeItemBean createAttachment(File file, String filename, String contentType, User remoteUser, org.ofbiz.core.entity.GenericValue issue, Map attachmentProperties, Date createdTime) throws AttachmentException, org.ofbiz.core.entity.GenericEntityException
Actually the Date createdTime refers to java.util.Date but the underlying ofbiz layer does not support it. Instead of java.util.Date it can persist java.sql.Date which is a subclass of it. The following stack trace shows what happens with java.util.Date:
org.ofbiz.core.entity.GenericNotImplementedException: Java type java.util.Date not currently supported. Sorry. at org.ofbiz.core.entity.jdbc.SqlJdbcUtil.getType(SqlJdbcUtil.java:720) at org.ofbiz.core.entity.jdbc.SqlJdbcUtil.setValue(SqlJdbcUtil.java:632) at org.ofbiz.core.entity.jdbc.SqlJdbcUtil.setValue(SqlJdbcUtil.java:601) at org.ofbiz.core.entity.jdbc.SqlJdbcUtil.setValues(SqlJdbcUtil.java:436) at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:114) at org.ofbiz.core.entity.GenericDAO.insert(GenericDAO.java:88) at org.ofbiz.core.entity.GenericHelperDAO.create(GenericHelperDAO.java:63) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:470) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:450) at org.ofbiz.core.entity.GenericValue.create(GenericValue.java:77) at com.atlassian.core.ofbiz.util.EntityUtils.createValue(EntityUtils.java:61) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:101) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:202) .....
I suppose that the definition of the method (and the other createAttachment method) and the implementing class should be changed to java.sql.Date.
Workaround
Use java.sql.Date instead of java.util.Date
- relates to
-
JRASERVER-25304 EAP Feedback - JIRA 5.0
- Closed