Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-dev] [tycho-user] Tycho 0.22.0 staged

tycho-surefire doesn't use Thread.currentThread.setContextClassLoader() directly.

surefire-booter (which Tycho uses) does though:

https://github.com/apache/maven-surefire/blob/master/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ProviderFactory.java

it's perfectly possible there was a classloader behaviour change that came with the upgrade from surefire 2.10 to 2.17.

Jan



From: tycho-dev-bounces@xxxxxxxxxxx [mailto:tycho-dev-bounces@xxxxxxxxxxx] On Behalf Of Jeff MAURY
Sent: Montag, 19. Januar 2015 10:51
To: Tycho developers list
Subject: Re: [tycho-dev] [tycho-user] Tycho 0.22.0 staged

I have spent some tile about the issue and discovered that this is related to commons-logging/log4j.
commons-loggings tries to guess the logging framework to use and it uses the thread context class loader to load some classes. It starts with Log4j and as the thread context class loader seems to be set by either surefire or tycho-surefire, it think that the log4j is ok.
But later, usung reflection, it tries to get method handles on the commons-logging provider and this fails as the commons-logging bundle has no dependency on the log4j provider.
I have found a workaround by forcing the log provider to be SimpleLog instead of Log4J.
You were right, ths seems to be related on classpath change in tycho surefire 0.22.0.
I will try to reproduce the problem with a simple project and let you know

Jeff

On Mon, Nov 24, 2014 at 2:00 PM, Sievers, Jan <jan.sievers@xxxxxxx> wrote:
may be related to

http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/commit/?id=0449913869b5efc79ec8a4cdbcdaab56aafd8b8d

but hard to tell without a sample project.

Jan




From: tycho-dev-bounces@xxxxxxxxxxx [mailto:tycho-dev-bounces@xxxxxxxxxxx] On Behalf Of Jeff MAURY
Sent: Montag, 24. November 2014 13:38
To: Tycho developers list
Subject: Re: [tycho-dev] [tycho-user] Tycho 0.22.0 staged

I already compared the list of the bundles in config.ini but seen no difference

Jeff
Le Mon Nov 24 2014 at 13:30:56, Sievers, Jan <jan.sievers@xxxxxxx> a écrit :
-X should give you some more details about which bundles are part of the test OSGi runtime.
you may also compare the target/ folder of the test bundle, in particular generated files in target/work

Jan

From: tycho-dev-bounces@xxxxxxxxxxx [mailto:tycho-dev-bounces@xxxxxxxxxxx] On Behalf Of Jeff MAURY
Sent: Montag, 24. November 2014 12:41
To: Tycho user list (tycho-user@xxxxxxxxxxx)
Cc: Tycho developers list (tycho-dev@xxxxxxxxxxx)
Subject: Re: [tycho-dev] [tycho-user] Tycho 0.22.0 staged

Tested it against my product build. Some UT are failing (SWTBot widget errors and commons logging unable to load a dependent class). I checked the generated class path for the test and it does not seem to be different: do you think running Maven with -X could help ? Build is OK with Tycho 0.21.0

Jeff

Le Mon Nov 24 2014 at 09:16:42, Sievers, Jan <jan.sievers@xxxxxxx> a écrit :
Tycho milestone release 0.22.0 has been staged.

For details of new features and bugfixes, see release notes [1].
Please help by testing the staged milestone build. To use it, change your tycho version to 0.22.0 and add snippet [2] to your pom.

We plan to promote this release in one week unless major regressions are found.

Regards,
Tycho team

[1] http://wiki.eclipse.org/Tycho/Release_Notes/0.22
[2]
<pluginRepositories>
 <pluginRepository>
  <id>tycho-staged</id>
  <url>https://oss.sonatype.org/content/repositories/orgeclipsetycho-1020</url>
 </pluginRepository>
</pluginRepositories>
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-dev mailing list
tycho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-dev
_______________________________________________
tycho-dev mailing list
tycho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-dev




-- 
Jeff MAURY


"Legacy code" often differs from its suggested alternative by actually working and scaling.
 - Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury

Back to the top