Sts4: Duplicate com.sun.xml.bind installed screw other plugins

Created on 16 Jan 2021  Â·  11Comments  Â·  Source: spring-projects/sts4

Describe the bug
Duplicate com.sun.xml.bind installed which prevent other plugins to load Mylyn is good example.

To Reproduce
Install vanilla STS 4.9.0
install Mylyn from eclipse market place and restart
Open Task Repositories view for example
Eclipse still have original plugin com.sun.xml.bind_2.2.0.v201505121915.jar
Install Timekeeper 2 from https://resheim.net/p2/eclipse-timekeeper_beta/ and restart
It will install com.sun.xml.bind_2.3.3.v20201118-1818.jar and now eclipse has both 2.3.3 and 2.2.0 version of the plugin.
Open Task Repositories view is not working as well as Workweek from timekeeper.

The same happens if you install following plugin from Mylyn (http://download.eclipse.org/mylyn/releases/latest)
Mylyn Builds Connector: Hudson/Jenkins 1.17.0.v20200730-1155 org.eclipse.mylyn.hudson.feature.group Eclipse Mylyn
instead of timekeeper

I have tried the same with latest Eclipse and it behaves the same but all both plugins are working well.

Running on
java 15 2020-09-15
Java(TM) SE Runtime Environment (build 15+36-1562)
Java HotSpot(TM) 64-Bit Server VM (build 15+36-1562, mixed mode, sharing)

eclipse assigned bug install-issue

All 11 comments

Thanks a lot for including the detailed steps, that helped a lot to reproduce this. Once the installation reaches a certain point, it causes a package-use conflict for the javax.xml.bind package, specifically around the bundle org.eclipse.mylyn.commons.notifications.feed, which causes the bundle to not resolve anymore.

This can also be reproduced using the latest Eclipse SDK and the steps above instead of Spring Tools 4 for Eclipse 4.9.0, even though the problem surfaces differently on the UI. But the package-use conflict in the Mylyn bundle is still happening.

I would suggest to report this against the Mylyn project.

As a workaround, you could install the Spring Dashboard (optional) feature from here:
https://download.springsource.com/snapshot/TOOLS/nightly/e4.18

It installs an old STS3 dashboard, but that feature keeps the right bundle versions around to prevent the package-use conflict from happening. You can even install this into a "broken" install and it should make it work again.

Hope that helps!

I tried the same steps with eclipse.buildId=4.18.0.I20201202-1800 and it's working well. I can use timekeeper2 and hudson connector.
I have also installed spring STS plugins ( Spring Tool Suite 4 Main Feature 4.9.0.202012132054 org.springframework.boot.ide.main.feature.feature.group Pivotal, Inc.) and no problem so far.

@tkupka Ok, sounds good. Should we close the issue then? We could re-open again if anything additional comes up.

The Mylyn behaves in strange way STS 4.9.0 in STS. I lost my queries from JIRA multiple times. I hope it will be fixed in up-comming rel. in meantime the eclipse.buildId=4.18.0.I20201202-1800 with all STS plugins looks good.
Let's close it

yep, workaround works.
May it has to be mentioned, that only the Spring Dashboard is needed from https://download.springsource.com/snapshot/TOOLS/nightly/e4.18 ... all other components could left unchecked.

I added the workaround for this that is included in the mentioned Spring Dashboard to the main Spring Tools 4 feature that is included in the Spring Tools 4 for Eclipse distribution, so that from Spring Tools 4.10.0.RELEASE on you should be able to install those Mylyn conponents into the distribution without stumbling upon this issue anymore.

Is this related to the bug 558753 reported on the Mylyn Bugzilla https://bugs.eclipse.org/bugs/show_bug.cgi?id=558753

@ronatartifact The part in the Eclipse bug complaining about the unresolved package import for javax.xml.bind looks related, but I haven't seen the xmlrpc related ones above myself. My guess would be that the root cause is the same.

My problem is very easy to reproduce and I am glad that the next version of STS will have it fixed.
I have used STS for a long time (Springframework since 2007/8) and have been very happy with it even if I don't use everything that it does.
Any idea about when 4.10 will be available?

Spring Tools for Eclipse 4.10.0 will be released shortly after Eclipse 2021-03 is released, which is planned for March 17.

If you want to try the latest CI build: http://dist.springsource.com/snapshot/STS4/nightly-distributions.html

Installed the nightly distribution and it fixes the problem.
I created a new workspace since it threatened to update the old one and
make it incompatible with older STS 4 (normal thing to happen).

I created the link to my Bugilla repo and added a query. It all seems to
work.

I imported one Spring Batch project from my 4.9 workspace. Seems to be
all there. I updated the project from Java 11 to 15. Still need to do
some tweaking to get it to run its tests but I am pretty sure that the
current problems are all mine to fix.

I did notice one nice touch. I did not have to manually add lombok. It
seemed to work out of the box at least to the point of adding all of the
getters and setters.

Will let you know if I see anything unusual but so far so good.

Thanks for the quick response and to the team for providing the
workaround for the osgi bug.

Ron

On 2021-03-07 9:18 a.m., Martin Lippert wrote:
>

Spring Tools for Eclipse 4.10.0 will be released shortly after Eclipse
2021-03 is released, which is planned for March 17.

If you want to try the latest CI build:
http://dist.springsource.com/snapshot/STS4/nightly-distributions.html
http://dist.springsource.com/snapshot/STS4/nightly-distributions.html

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/spring-projects/sts4/issues/588#issuecomment-792286513,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AC2K6WZKA3N3N5GJMJF2F3LTCODMVANCNFSM4WFGZNWA.

--
Ron Wheeler
Artifact Software
438-345-3369
[email protected]

Was this page helpful?
0 / 5 - 0 ratings