Bug 244660 - [web connector] Importing Mylyn 2.3.2 backups with generic web connector repository into fresh installed E3.3.2+Mylyn 3.0.1 results in duplicate repository
Summary: [web connector] Importing Mylyn 2.3.2 backups with generic web connector repo...
Status: CLOSED MOVED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: 3.0   Edit
Hardware: PC All
: P4 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2008-08-20 03:51 EDT by Jörg Thönnes CLA
Modified: 2010-05-21 22:00 EDT (History)
0 users

See Also:


Attachments
Duplicate task repository (8.35 KB, image/png)
2008-08-20 04:42 EDT, Jörg Thönnes CLA
no flags Details
WebQuery with the old syntax (36.80 KB, image/png)
2008-08-26 10:44 EDT, Jörg Thönnes CLA
no flags Details
WebQuery with the new (current) syntax (34.01 KB, image/png)
2008-08-26 10:46 EDT, Jörg Thönnes CLA
no flags Details
Synthetic WebRepository generated for the old queries (47.86 KB, image/png)
2008-08-26 10:48 EDT, Jörg Thönnes CLA
no flags Details
WebRepository with the current (new) syntax (54.09 KB, image/png)
2008-08-26 10:49 EDT, Jörg Thönnes CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jörg Thönnes CLA 2008-08-20 03:51:45 EDT
Steps to reproduce:

1. Installation: E3.3.2 + Mylyn 2.3.2
2. Use Generic Web Connector + some queries
3. Backup complete data
4. Installation: fresh E3.3.2 (JEE package with Mylyn)
5. Upgrade using weekly update sites (all extras, generic web connector)
6. Start fresh work space
7. Import backup from Mylyn 2.3.2

Result:

- Task Repositories view shows extra (duplicate) Generic web connectory repository with the link as name
- Queries seem to be imported correctly
- but all queries are updated twice, so I get an incoming marker on all web connector queries

Further steps:

8. Mark all incoming as read
9. Restart eclipse
10. Again the same queries have (old) incoming data

I suspect that both generic web connector repositories contribute to the same queries resulting in fake incoming.

In summary, this makes the imported backup unusable (marking as Major severity).
Did not find any workaround so far.
Comment 1 Steffen Pingel CLA 2008-08-20 04:00:01 EDT
Thanks for the detailed steps. I would like to reproduce this. Can you post an example of a repository and query that is causing the error?
Comment 2 Jörg Thönnes CLA 2008-08-20 04:42:56 EDT
Created attachment 110420 [details]
Duplicate task repository

The view shows a duplicate task repository:

green cross: CARD --- original
red cross: http://intranet/cgi-bin/QueryCardDatabase --- duplicate
Comment 3 Jörg Thönnes CLA 2008-08-20 04:54:14 EDT
If I delete the duplicate task repository, this works. But after restarting Eclipse, the task repository reappears.
Comment 4 Jörg Thönnes CLA 2008-08-20 05:03:59 EDT
(In reply to comment #1)
> Thanks for the detailed steps. I would like to reproduce this. Can you post an
> example of a repository and query that is causing the error?

Looking at the query details, I found that some queries use an old syntax (refer to an old task repository config).
Historic background: In the first step, I parsed the HTML output from our local issue tracker. In the second step,
I used an own cgi interface which generated text lines easier to parse.

Possibly, the problem results from the issue that web connector queries just clone the _current_ task repository config,
but do not _reference_ it.

Possible steps to reproduce this are:

1. With Mylyn 2.3.2:
1.1. Create task repository using web connector
1.2. Create query based on the task repository
1.3. Change the properties/query attributes/parsing of the task repository
1.4. Create a new query which is based on a clone of the current one
1.5. Now both queries differ since they are based on a specific point in time of the task repository config
1.6. Create complete backup
2. With Mylyn 3.0.1:
2.1. Restore from above backup
2.2. Mylyn should generate the web connector and a synthetic one for the _old_ query configuration
2.3. Somehow both task repository contribute to the update / refresh process resulting in spurious (false) incomings

If time allows, I will try this myself.
Comment 5 Jörg Thönnes CLA 2008-08-26 07:44:07 EDT
Just upgraded my Mylyn 2.3.0 workspace to Mylyn 3.0.2 weekly build. Same behaviour:
I get a duplicate task repository of web connector style which mixed up my queries.
Comment 6 Jörg Thönnes CLA 2008-08-26 10:36:38 EDT
Doing some further experiments:

1. Import backup
2. Delete additional (synthetic) task repository
3. Tasks are moved into the Unmatched category for the deleted repository
4. Select all those unmatched tasks and press Delete

The following NullPointerException is thrown:



-- Error Details --
Date: Tue Aug 26 16:30:01 CEST 2008
Message: Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench".
Severity: Error
Plugin: org.eclipse.ui.workbench
Session Data:
eclipse.buildId=M20080221-1800
java.version=1.6.0_07
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86
This is a continuation of log file /export/home/joerg/macd/INSTALL-workspace/.metadata/.bak_0.log
Created Time: 2008-08-26 16:29:45.958

Exception Stack Trace:
java.lang.NullPointerException
at org.eclipse.mylyn.internal.tasks.ui.util.AttachmentUtil.canDownloadAttachment(AttachmentUtil.java:398)
at org.eclipse.mylyn.internal.tasks.ui.util.TaskPropertyTester.test(TaskPropertyTester.java:50)
at org.eclipse.core.internal.expressions.Property.test(Property.java:58)
at org.eclipse.core.internal.expressions.TestExpression.evaluate(TestExpression.java:98)
at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
at org.eclipse.core.internal.expressions.AndExpression.evaluate(AndExpression.java:29)
at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
at org.eclipse.core.internal.expressions.IterateExpression.evaluate(IterateExpression.java:150)
at org.eclipse.ui.internal.services.EvaluationResultCache.evaluate(EvaluationResultCache.java:74)
at org.eclipse.ui.internal.services.ExpressionAuthority.evaluate(ExpressionAuthority.java:160)
at org.eclipse.ui.internal.services.EvaluationAuthority.refsWithSameExpression(EvaluationAuthority.java:151)
at org.eclipse.ui.internal.services.EvaluationAuthority.sourceChanged(EvaluationAuthority.java:126)
at org.eclipse.ui.internal.services.ExpressionAuthority.sourceChanged(ExpressionAuthority.java:306)
at org.eclipse.ui.internal.services.ExpressionAuthority.sourceChanged(ExpressionAuthority.java:297)
at org.eclipse.ui.AbstractSourceProvider.fireSourceChanged(AbstractSourceProvider.java:79)
at org.eclipse.ui.internal.services.CurrentSelectionSourceProvider.selectionChanged(CurrentSelectionSourceProvider.java:115)
at org.eclipse.ui.internal.services.CurrentSelectionSourceProvider.swapListeners(CurrentSelectionSourceProvider.java:141)
at org.eclipse.ui.internal.services.CurrentSelectionSourceProvider.access$0(CurrentSelectionSourceProvider.java:131)
at org.eclipse.ui.internal.services.CurrentSelectionSourceProvider$1.windowActivated(CurrentSelectionSourceProvider.java:54)
at org.eclipse.ui.internal.Workbench$11.run(Workbench.java:801)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.ui.internal.Workbench.fireWindowActivated(Workbench.java:799)
at org.eclipse.ui.internal.WorkbenchWindow$24.shellActivated(WorkbenchWindow.java:2904)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:81)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1125)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1106)
at org.eclipse.swt.widgets.Shell.filterProc(Shell.java:653)
at org.eclipse.swt.widgets.Display.filterProc(Display.java:1457)
at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1487)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2969)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
Comment 7 Jörg Thönnes CLA 2008-08-26 10:44:50 EDT
Created attachment 110942 [details]
WebQuery with the old syntax

This shows the web query with the old syntax. If the repository is updated to use the new syntax, the old queries are kept as is.
Comment 8 Jörg Thönnes CLA 2008-08-26 10:46:38 EDT
Created attachment 110943 [details]
WebQuery with the new (current) syntax

The query expression matches the repository configuration.
Comment 9 Jörg Thönnes CLA 2008-08-26 10:48:33 EDT
Created attachment 110945 [details]
Synthetic WebRepository generated for the old queries

This is the additional (synthetic) web repository generated for the old style queries.
The repository has no configuration / expressions.
Comment 10 Jörg Thönnes CLA 2008-08-26 10:49:49 EDT
Created attachment 110946 [details]
WebRepository with the current (new) syntax

This web repository contains the simplified query expression with the new interface ...ForMylyn...
Comment 11 Jörg Thönnes CLA 2008-08-26 10:53:52 EDT
Finally, I found the following workaround:

1. Using Mylyn 2.3.2
1.1. Delete all old-style queries
1.2. Delete resulting tasks in the unmatched category
1.3. Export as backup
2. Using Mylyn 3.0.1
2.1. Import backup
2.2. Delete synthetic task repository which still appears(!)
2.3. Export as backup
2.4. Re-Import

Now the extra repository seems to be gone.

But it is difficult to find out the old-style queries and update or delete them.

IMHO, the query should be tied to a specific (named) Web connector query config. Any update of the repository config will also
update the queries or generate a new named query config.
Comment 12 Jörg Thönnes CLA 2008-08-26 11:14:03 EDT
OK, the synthetic web repository is gone, but I still get a strange behaviour with the Web connector:

In some queries, tasks without a full name, but just the web link as name appear. If I open the properties of the query and press finish,
the query tasks are updated, the "link" name is replaced by a normal name, but nearly all tasks are marked as incoming changes.
Then I select mark as read for all, but I am not sure whether corrects this behaviour permanently.
Comment 13 Jörg Thönnes CLA 2008-08-26 11:18:17 EDT
(In reply to comment #12)
> Then I select mark as read for all, but I am not sure whether corrects this
> behaviour permanently.

No, there are still fake incomings. I have no idea how I could correct this, so the notification of incomings is broken for me.

Is it possible to send you some mylyn backups via private e-mail since I do not want to publish these files as attachments?
Comment 14 Jörg Thönnes CLA 2009-08-12 06:24:41 EDT
Is this still needed? I do not need it any longer.
Comment 15 Jörg Thönnes CLA 2009-10-06 13:15:38 EDT
I would suggest to close this as WONTFIX. Otherwise, you keep pushing around this...
Comment 16 Steffen Pingel CLA 2009-10-07 01:25:12 EDT
You provided so much input to this task that I don't want to disregard it and I think it's worth fixing. Unfortunately I am busy with other priorities at the moment but I'll give it one last shot in the next release cycle to work on this.
Comment 17 Jörg Thönnes CLA 2010-05-19 06:55:37 EDT
(In reply to comment #16)
> You provided so much input to this task that I don't want to disregard it and I
> think it's worth fixing. Unfortunately I am busy with other priorities at the
> moment but I'll give it one last shot in the next release cycle to work on this.

If moving out of 3.4 was your "last shot", then I would like to close this. Please re-open if you disagree.
Comment 18 Steffen Pingel CLA 2010-05-21 22:00:09 EDT
Well, it's still a bug and someone else may pick this up so I would like to keep it open until fixed.
Comment 19 Eclipse Webmaster CLA 2022-11-15 11:45:08 EST
Mylyn has been restructured, and our issue tracking has moved to GitHub [1].

We are closing ~14K Bugzilla issues to give the new team a fresh start. If you feel that this issue is still relevant, please create a new one on GitHub.

[1] https://github.com/orgs/eclipse-mylyn