Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 194973

Summary: DataAccessException when trying to close an issue in Mylyn eclipse plugin
Product: z_Archived Reporter: Hung Huynh <magus_iii>
Component: MylynAssignee: Eugene Kuleshov <ekuleshov>
Status: RESOLVED FIXED QA Contact:
Severity: blocker    
Priority: P3 CC: ekuleshov, john.allen, marko.asplund
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip none

Description Hung Huynh CLA 2007-06-29 17:39:28 EDT
Cause:
com.atlassian.jira.exception.DataAccessException: com.atlassian.jira.issue.customfields.impl.FieldValidationException: Invalid date format. Please enter the date in the format "d/MMM/yy". 

Stack Trace: [hide] 

com.atlassian.jira.exception.DataAccessException: com.atlassian.jira.issue.customfields.impl.FieldValidationException: Invalid date format. Please enter the date in the format "d/MMM/yy".
	at com.atlassian.jira.issue.fields.CustomFieldImpl.updateIssue(CustomFieldImpl.java:720)
	at com.atlassian.jira.workflow.WorkflowTransitionUtilImpl.progress(WorkflowTransitionUtilImpl.java:265)
	at com.atlassian.jira.web.action.issue.CommentAssignIssue.doExecute(CommentAssignIssue.java:190)
	at webwork.action.ActionSupport.execute(ActionSupport.java:153)
	at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:57)
	at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:132)
	at com.atlassian.jira.web.dispatcher.JiraServletDispatcher.service(JiraServletDispatcher.java:185)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.atlassian.jira.web.filters.AccessLogFilter.doFilter(AccessLogFilter.java:51)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)
	at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)
	at com.atlassian.jira.web.filters.SitemeshExcludePathFilter.doFilter(SitemeshExcludePathFilter.java:38)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:182)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.atlassian.seraph.filter.LoginFilter.doFilter(LoginFilter.java:181)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:132)
	at com.atlassian.jira.web.filters.ProfilingAndErrorFilter.doFilter(ProfilingAndErrorFilter.java:35)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.atlassian.jira.web.filters.ActionCleanupDelayFilter.doFilter(ActionCleanupDelayFilter.java:39)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.atlassian.johnson.filters.JohnsonFilter.doFilter(JohnsonFilter.java:91)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.atlassian.jira.web.filters.gzip.GzipFilter.doFilter(GzipFilter.java:72)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.atlassian.core.filters.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:37)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:833)
	at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:639)
	at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1285)
	at java.lang.Thread.run(Thread.java:595)
Caused by: com.atlassian.jira.issue.customfields.impl.FieldValidationException: Invalid date format. Please enter the date in the format "d/MMM/yy".
	at com.atlassian.jira.issue.customfields.converters.DatePickerConverter.getTimestamp(DatePickerConverter.java:57)
	at com.atlassian.jira.ext.charting.field.AbstractCalculatedDateCFType.getSingularObjectFromString(AbstractCalculatedDateCFType.java:80)
	at com.atlassian.jira.issue.customfields.impl.CalculatedCFType.getValueFromCustomFieldParams(CalculatedCFType.java:62)
	at com.atlassian.jira.issue.fields.CustomFieldImpl.updateIssue(CustomFieldImpl.java:714)
	... 49 more

Referer URL: Unknown

Build Information:
Uptime: N/A
Edition: Enterprise
Version: 3.6.5
Build Number: 161
Atlassian Partner: null


Server Information:
Application Server: Apache Tomcat/5.5.20
Servlet Version: 2.4


File Paths:
Location of entityengine.xml: file:/usr/local/apache-tomcat-5.5.20/webapps/jira/WEB-INF/classes/entityengine.xml
Location of atlassian-jira.log: Could not find atlassian-jira.log in current working directory


Memory Information:
Total Memory: 766 MB
Free Memory: 81 MB
Used Memory: 685 MB


System Information:
System Date: Friday, 29 Jun 2007
System Time: 14:33:51
Current Working Directory: /
Java Version: 1.5.0_09
Java Vendor: Sun Microsystems Inc.
JVM Version: 1.0
JVM Vendor: Sun Microsystems Inc.
JVM Implementation Version: 1.5.0_09-b03
Java Runtime: Java(TM) 2 Runtime Environment, Standard Edition
Java VM: Java HotSpot(TM) Server VM
User Name: tomcat
User Timezone: America/Los_Angeles
User Locale: English (United States)
System Encoding: UTF-8
Operating System: Linux 2.6.18-1.2849.fc6
OS Architecture: i386
Application Server Container: 
Database type: postgres
Database JNDI address: java:comp/env/jdbc/JiraDS
Database version: 8.1.8
Database driver: PostgreSQL Native Driver PostgreSQL 8.1 JDBC3 with SSL (build 408)


Request Information:
Request URL: http://localhost:8080/jira/500page.jsp
- Scheme: http
- Server: localhost
- Port: 8080
- URI: /jira/500page.jsp
- - Context Path: /jira
- - Servlet Path: /500page.jsp
- - Path Info: null
- - Query String: 
Request Attributes:
- javax.servlet.forward.request_uri : /jira/secure/CommentAssignIssue.jspa
- javax.servlet.forward.context_path : /jira
- javax.servlet.forward.servlet_path : /secure/CommentAssignIssue.jspa
- javax.servlet.forward.path_info : /500page.jsp
- javax.servlet.error.message : 
- javax.servlet.error.exception : javax.servlet.ServletException: com.atlassian.jira.issue.customfields.impl.FieldValidationException: Invalid date format. Please enter the date in the format "d/MMM/yy".
- os_securityfilter_already_filtered : true
- com.atlassian.jira.web.filters.ActionCleanupDelayFilter : true
- com.atlassian.johnson.filters.JohnsonFilter_already_filtered : true
- javax.servlet.error.request_uri : /jira/secure/CommentAssignIssue.jspa
- jira.webwork.generic.dispatcher : webwork.dispatcher.GenericDispatcher@119f6b4
- javax.servlet.error.status_code : 500
- __sitemesh__filterapplied : true
- jira.webwork.cleanup : false
- javax.servlet.error.servlet_name : action
- com.atlassian.jira.web.filters.gzip.GzipFilter_already_filtered : true
- atlassian.core.seraph.original.url : /secure/CommentAssignIssue.jspa
- loginfilter.already.filtered : true
- webwork.result : Value stack =========== =========== 


Request Logging:
0 log statements generated by this request:
Comment 1 Mik Kersten CLA 2007-06-29 18:04:16 EDT
Eugene: can you investigate?
Comment 2 Eugene Kuleshov CLA 2007-06-29 18:24:21 EDT
Will do. It seems like Hung's JIRA has some customization. I'll try to look at this on the weekend, but are we good to resume regular commits yet?
Comment 3 Mik Kersten CLA 2007-06-29 19:09:50 EDT
Yes, you can go ahead with regular commits, the tree is tagged and a JIRA update can be made since it is on the Extras site.
Comment 4 Eugene Kuleshov CLA 2007-06-29 19:38:35 EDT
Great. Thanks.
Comment 5 Eugene Kuleshov CLA 2007-07-03 12:30:07 EDT
I've committed fix to add missing required fields. It now works on Hung's server, but we need to add the rest of fields to Issue.getFieldValues() method and add some more tests.
Comment 6 Eugene Kuleshov CLA 2007-07-03 12:30:09 EDT
Created attachment 72967 [details]
mylyn/context/zip
Comment 7 Marko Asplund CLA 2007-09-04 05:31:12 EDT
I'm seeing a similar issue trying to update an issue:

Exception occurred: com.atlassian.jira.exception.DataAccessException: com.atlassian.jira.issue.customfields.impl.FieldValidationException: Invalid date format. Please enter the date in the format "d-MMM-yy". 

- Mylyn and the Jira connectors v2.0.0.v20070831-1600 dev build
- Jira 3.10
- Eclipse 3.3 (MyEclipseIDE 6.0)
Comment 8 Eugene Kuleshov CLA 2007-09-04 10:15:06 EDT
Marko, are you working with some public JIRA instance or is it possible to get exported configuration from your JIRA? This seem like issue with JIRA customization that will be difficult to reproduce without seeing your configuration.
Comment 9 Marko Asplund CLA 2007-09-04 10:39:14 EDT
It's an internal instance.
I can probably get the administrator to provide you with the information you need.
Could you give me instructions on what info to provide and how?
Comment 10 Eugene Kuleshov CLA 2007-09-04 10:58:11 EDT
Marko, if you could ask your JIRA admin to run Export action available from JIRA Administration page and email me exported archive that would be a huge help. Alternatively it will also work if you can create a test project in your JIRA instance (configured in a same way as one you having problems updating) and give me access to that project.
Comment 11 Marko Asplund CLA 2007-09-07 03:47:47 EDT
According to our Jira admin all the project data will be included in the export so he feels uncomfortable providing the export file.
Do you know if there's a way to just export the settings or to restrict the export contents?
Comment 12 John Allen CLA 2007-09-10 10:48:00 EDT
We've got the same issue since we upgraded JIRA from 3.7 to 3.10. There are a number of observations:

1) When hitting 'validate server settings' in the JIRA configuration one now gets a Mylyn only supports JIRA version above 3.3 error message. Fortunately you can still okay this and use the connector

2) Custom fields are the main stay of JIRA so any JIRA-Mylyn integration is going to have to handle these. We used to have plenty of custom fields on our 3.7 JIRA instance that Mylyn was happy with so I don't think it's directly related to this (could easily be wrong mind;).

We JAD'ed some of the connector code and ran a packet sniffer on the dialogue between eclipse and JIRA. Observations from this include:

Errors raised - one gets a NPE and a dataformaterror. the NPE is, i expect, from a corrupt JIRA issue object in the connector's model as it was coming from a simple issue.getCreateDate() and I would guess that came about from some other previous failing, sorry I don't have the NPE line at hand.

One is able to comment an issue once using mylyn successfully and perform a synchronise but if one tries again we got a dateformaterror. All further syncs hit this error.

Sniffing the edit post call you make to update the JIRA ticket shows that JIRA is coming back with an on screen error (actually JIRA represents the edit screen with a red box at the top, this is the type of box JIRA usually uses to 'inline highlight' which field is in error). The error box says that a required field has not been populated (or something like that) and quotes a custom field but I'm not really sure it is, and if it is, its not an on screen one (and mylyn used to work fine before we upgrdaded to JIRA 3.10 and we've not added any of our own new fields in that time).

The main change we can see with our new JIRA 3.10 is the 'Edit your comment' and 'Edit your worklogs' stuff, and with that JIRA is now maintaining more data about a comment (date etc).

I have assigned a developer to investigate this in house (Fujitsu Services) but we would be doing this by sniffing and trying to reverse engineer the connector so obviously someone who knows the design in the first place is going to be much better placed to sort it out.

Sorry i havent got more concrete info bar, it used to work with JIRA 3.7 and now with JIAR 3.10.1 it doesn't but I've got egg on my face at the mo' i have sold mylyn big time into our development communities and have had to withdraw it.

Comment 13 Eugene Kuleshov CLA 2007-09-10 13:55:17 EDT
(In reply to comment #12)
> We've got the same issue since we upgraded JIRA from 3.7 to 3.10. There are a
> number of observations:
> 
> 1) When hitting 'validate server settings' in the JIRA configuration one now
> gets a Mylyn only supports JIRA version above 3.3 error message. Fortunately
> you can still okay this and use the connector

Please note that this issue been fixed almost 2 months ago.

> 2) Custom fields are the main stay of JIRA so any JIRA-Mylyn integration is
> going to have to handle these. We used to have plenty of custom fields on our
> 3.7 JIRA instance that Mylyn was happy with so I don't think it's directly
> related to this (could easily be wrong mind;).

There are limitations about custom fields whe we have outlined in the connector FAQ at http://wiki.eclipse.org/Mylyn_FAQ#Known_limitations_2

> We JAD'ed some of the connector code and ran a packet sniffer on the dialogue
> between eclipse and JIRA. Observations from this include:
> [skipped]
> I have assigned a developer to investigate this in house (Fujitsu Services) but
> we would be doing this by sniffing and trying to reverse engineer the connector
> [skipped]
> 
> Sorry i havent got more concrete info bar, it used to work with JIRA 3.7 and
> now with JIAR 3.10.1 it doesn't but I've got egg on my face at the mo' i have
> sold mylyn big time into our development communities and have had to withdraw
> it.

Excuse my ignorance, but I am not quite get why do you need to reverse engineer open source code? We have relatively detailed guide how to setup your workspace, so you can simply step trough the Mylyn code in the debugger. 

However I just relized that the original issue been actually fixed, and recent dev build does work on reporter (Hung) JIRA instance. So, I'd really appreciate separate bug reports if you still having troubles to use connector on your own JIRA instance.
Comment 14 John Allen CLA 2007-09-10 14:08:22 EDT
(In reply to comment #13)
> (In reply to comment #12)
> > We've got the same issue since we upgraded JIRA from 3.7 to 3.10. There are a
> > number of observations:
> > 
> > 1) When hitting 'validate server settings' in the JIRA configuration one now
> > gets a Mylyn only supports JIRA version above 3.3 error message. Fortunately
> > you can still okay this and use the connector
> 
> Please note that this issue been fixed almost 2 months ago.
> 
> > 2) Custom fields are the main stay of JIRA so any JIRA-Mylyn integration is
> > going to have to handle these. We used to have plenty of custom fields on our
> > 3.7 JIRA instance that Mylyn was happy with so I don't think it's directly
> > related to this (could easily be wrong mind;).
> 
> There are limitations about custom fields whe we have outlined in the connector
> FAQ at http://wiki.eclipse.org/Mylyn_FAQ#Known_limitations_2
> 
> > We JAD'ed some of the connector code and ran a packet sniffer on the dialogue
> > between eclipse and JIRA. Observations from this include:
> > [skipped]
> > I have assigned a developer to investigate this in house (Fujitsu Services) but
> > we would be doing this by sniffing and trying to reverse engineer the connector
> > [skipped]
> > 
> > Sorry i havent got more concrete info bar, it used to work with JIRA 3.7 and
> > now with JIAR 3.10.1 it doesn't but I've got egg on my face at the mo' i have
> > sold mylyn big time into our development communities and have had to withdraw
> > it.
> 
> Excuse my ignorance, but I am not quite get why do you need to reverse engineer
> open source code? We have relatively detailed guide how to setup your
> workspace, so you can simply step trough the Mylyn code in the debugger. 

When i say reverse engineer I do not mean decompile. The fact its open source does not negate the fact that we would need to spend more time than a mylyn dev as we would need to familiarise ourselves with its design and operation behaviours.

> However I just relized that the original issue been actually fixed, and recent
> dev build does work on reporter (Hung) JIRA instance. So, I'd really appreciate
> separate bug reports if you still having troubles to use connector on your own
> JIRA instance.

This is most excellent news and i apologise for the inclusion of two bugs in one, my interest was related to this ticket's subject and i will schedule a trial of the latest dev build.

Comment 15 Eugene Kuleshov CLA 2007-09-10 14:54:06 EDT
(In reply to comment #14)
> > > We JAD'ed some of the connector code...
> When i say reverse engineer I do not mean decompile. 

He he. You just said that you did decompiled connector code. :-)

> The fact its open source
> does not negate the fact that we would need to spend more time than a mylyn dev
> as we would need to familiarise ourselves with its design and operation
> behaviours.

True. That is why there are number of reasonable active mailing lists where you can ask questions to save your own time. please don't hesitate. See http://www.eclipse.org/mylyn/community/

> This is most excellent news and i apologise for the inclusion of two bugs in
> one, my interest was related to this ticket's subject and i will schedule a
> trial of the latest dev build.

Great.
Comment 16 Eugene Kuleshov CLA 2007-09-10 16:12:36 EDT
(In reply to comment #11)
> According to our Jira admin all the project data will be included in the export
> so he feels uncomfortable providing the export file.
> Do you know if there's a way to just export the settings or to restrict the
> export contents?

That is true and as far as I know there is no way around that. If you send it to me, I can only promise you that I'll only use this data for debugging and delete it once we'll resolve this issue.

Maybe we can implement some kind of tool to scramble all the private data, but I am not sure if I'll have time to work on that this week.
Comment 17 John Allen CLA 2007-09-10 16:20:31 EDT
(In reply to comment #16)
> (In reply to comment #11)
> > According to our Jira admin all the project data will be included in the export
> > so he feels uncomfortable providing the export file.
> > Do you know if there's a way to just export the settings or to restrict the
> > export contents?
> 

Maybe you could try just creating a new JIRA project that uses all the same JIRA schemes? This should give it the same underlying JIRA schemas and, if you seed with data and replicate the fault, allow you to create a sandbox to test mylyn against? Of course this won't work if the problem is some historical data or some other evil but it might beworth a try.
Comment 18 Marko Asplund CLA 2007-09-11 13:54:50 EDT
I took the issue up with our Jira admin again today but he was reluctant to provide the export file because the installation contains sensitive data about our client projects.
Comment 19 Marko Asplund CLA 2007-09-11 14:00:11 EDT
(In reply to comment #17)
> Maybe you could try just creating a new JIRA project that uses all the same
> JIRA schemes? This should give it the same underlying JIRA schemas and, if you
> seed with data and replicate the fault, allow you to create a sandbox to test
> mylyn against? Of course this won't work if the problem is some historical data
> or some other evil but it might beworth a try.

Do you suggest creating another Jira installation and copy the configuration from the old installation?
I'm not really familiar with Jira administration so unfortunately I don't know which files would be relevant here.
Do you know which files should be copied in order to replicate the configuration?
Comment 20 Eugene Kuleshov CLA 2007-09-11 14:07:31 EDT
(In reply to comment #19)
> Do you suggest creating another Jira installation and copy the configuration
> from the old installation?
> I'm not really familiar with Jira administration so unfortunately I don't know
> which files would be relevant here.
> Do you know which files should be copied in order to replicate the
> configuration?

Actually that is a good suggestion. You can install another JIRA instance, import your configuration there and then delete/rename all private/sensitive tasks/projects, etc. Just make sure that you still can reproduce same errors on this copied instance.
Comment 21 Eugene Kuleshov CLA 2007-09-18 13:37:10 EDT
Marco, since original issue been fixed, I am going to resolve this issue. Please open new bug report if you'll be able to figure out how can you share your configuration with us. Thanks.
Comment 22 Mik Kersten CLA 2007-09-18 22:44:35 EDT
Marco: if the connector is not working for you, we should have an open bug for that regardless of whether you can share the configuration or not, so if you can't connect please do file a new bug summarizing the points that you made here.
Comment 23 Marko Asplund CLA 2007-09-20 05:39:04 EDT
There seems to be new Mylyn and Jira connector dev builds (v2.0.0.v20070917-2100) available.
Is this issue fixed in that build?
Comment 24 Mik Kersten CLA 2007-09-20 15:33:17 EDT
Marko: there is a slightly newer dev build up (2.1.0.v20070920-1000).  Please try that and let us know what is still failing.
Comment 25 Marko Asplund CLA 2007-09-21 06:28:20 EDT
(In reply to comment #24)
> Marko: there is a slightly newer dev build up (2.1.0.v20070920-1000).  Please
> try that and let us know what is still failing.
> 

After upgrading to the latest build I'm now able to edit certain fields in a Jira task and add comments. Thanks.