You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Mike Müller <mi...@mysign.ch> on 2012/11/02 10:06:16 UTC
Integration tests fail because of SLING-2645
Hi
The integration tests now fail, because the SortingServiceTracker could not be
found in the released version of commons/osgi.
Am I correct, that the only way to correct this is to release Commons OSGi bundle in 2.1.2.
Or are there any alternative ways to make the tests run again?
best regards
mike
RE: Integration tests fail because of SLING-2645
Posted by Mike Müller <mi...@mysign.ch>.
> as I wrote :) the OSGi commons classes are inlined, therefore there
> shouldn't be any need to update the hard-coded version of commons osgi
> in the test classes. In fact it shouldn't even be needed.
> I've just committed a fix which inlines the new class as well.
>
> Regards
> Carsten
thanks Carsten, looked at the wrong thing... ;-)
best regards
mike
> 2012/11/2 Mike Müller <mi...@mysign.ch>:
> >> I haven't followed all the changes, but so far the installer did
> >> inline the classes from OSGi commons. Maybe this new class needs to be
> >> added to be inlined?
> >>
> >> Carsten
> >>
> >> 2012/11/2 Bertrand Delacretaz <bd...@apache.org>:
> >> > On Fri, Nov 2, 2012 at 11:21 AM, Mike Müller <mi...@mysign.ch> wrote:
> >> >> ...Is this the right list.xml which will be used by the integration tests from
> >> installer/it?...
> >> >
> >> > Of course not, but you didn't say you had failures in the *installer*
> >> > integration tests ;-)
> >> >
> >> > AFAIK the bundles that the installer/it tests use are defined in java
> >> > code, in [1] - that's probably where you need to make changes.
> >> >
> >> > -Bertrand
> >> >
> >> > [1]
> >>
> https://svn.apache.org/repos/asf/sling/trunk/installer/it/src/test/java/org/apache/sling/
> >> installer/it/OsgiInstallerTestBase.java
> >
> > I must have something missed. I found the part were the bundles are declared inline
> > in the OsgiInstallerTestBase (lines 385ff).
> > I added
> > mavenBundle("org.apache.felix", "org.apache.felix.eventadmin", "1.2.14"),
> > mavenBundle("org.apache.sling", "org.apache.sling.commons.osgi", "2.1.1-
> SNAPSHOT"),
> > but nevertheless the moved SortingServiceTracker is not found:
> >
> > Exception in thread "OsgiInstallerImpl" java.lang.NoClassDefFoundError:
> org/apache/sling/commons/osgi/SortingServiceTracker
> > 02.11.2012 17:02:07.072 *INFO* [FelixStartLevel] org.apache.sling.installer.core
> Service [Apache Sling Installer Controller Service,19] ServiceEvent REGISTERED
> > at java.lang.ClassLoader.defineClass1(Native Method)
> > at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
> > at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
> > at
> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:
> 1793)
> > at
> org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.j
> ava:688)
> > at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
> > at
> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java
> :1656)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> > 02.11.2012 17:02:07.072 *INFO* [FelixDispatchQueue]
> org.apache.sling.installer.core BundleEvent STARTED
> > at
> org.apache.sling.installer.core.impl.OsgiInstallerImpl.init(OsgiInstallerImpl.java:203)
> > at
> org.apache.sling.installer.core.impl.OsgiInstallerImpl.run(OsgiInstallerImpl.java:229)
> > at java.lang.Thread.run(Thread.java:662)
> > Caused by: java.lang.ClassNotFoundException:
> org.apache.sling.commons.osgi.SortingServiceTracker
> > at
> org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.j
> ava:744)
> > at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
> > at
> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java
> :1656)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> > ... 11 more
> >
> > by the way: We should find a way were at least always the actual released version
> will be tested,
> > without the need that someone remembers that there are some hardcoded versions
> in some tests.
> > But maybe that's not that easy ;-)
> >
> > best regards
> > mike
>
>
>
> --
> Carsten Ziegeler
> cziegeler@apache.org
Re: Integration tests fail because of SLING-2645
Posted by Carsten Ziegeler <cz...@apache.org>.
Hi,
as I wrote :) the OSGi commons classes are inlined, therefore there
shouldn't be any need to update the hard-coded version of commons osgi
in the test classes. In fact it shouldn't even be needed.
I've just committed a fix which inlines the new class as well.
Regards
Carsten
2012/11/2 Mike Müller <mi...@mysign.ch>:
>> I haven't followed all the changes, but so far the installer did
>> inline the classes from OSGi commons. Maybe this new class needs to be
>> added to be inlined?
>>
>> Carsten
>>
>> 2012/11/2 Bertrand Delacretaz <bd...@apache.org>:
>> > On Fri, Nov 2, 2012 at 11:21 AM, Mike Müller <mi...@mysign.ch> wrote:
>> >> ...Is this the right list.xml which will be used by the integration tests from
>> installer/it?...
>> >
>> > Of course not, but you didn't say you had failures in the *installer*
>> > integration tests ;-)
>> >
>> > AFAIK the bundles that the installer/it tests use are defined in java
>> > code, in [1] - that's probably where you need to make changes.
>> >
>> > -Bertrand
>> >
>> > [1]
>> https://svn.apache.org/repos/asf/sling/trunk/installer/it/src/test/java/org/apache/sling/
>> installer/it/OsgiInstallerTestBase.java
>
> I must have something missed. I found the part were the bundles are declared inline
> in the OsgiInstallerTestBase (lines 385ff).
> I added
> mavenBundle("org.apache.felix", "org.apache.felix.eventadmin", "1.2.14"),
> mavenBundle("org.apache.sling", "org.apache.sling.commons.osgi", "2.1.1-SNAPSHOT"),
> but nevertheless the moved SortingServiceTracker is not found:
>
> Exception in thread "OsgiInstallerImpl" java.lang.NoClassDefFoundError: org/apache/sling/commons/osgi/SortingServiceTracker
> 02.11.2012 17:02:07.072 *INFO* [FelixStartLevel] org.apache.sling.installer.core Service [Apache Sling Installer Controller Service,19] ServiceEvent REGISTERED
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
> at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1793)
> at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:688)
> at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
> at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1656)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> 02.11.2012 17:02:07.072 *INFO* [FelixDispatchQueue] org.apache.sling.installer.core BundleEvent STARTED
> at org.apache.sling.installer.core.impl.OsgiInstallerImpl.init(OsgiInstallerImpl.java:203)
> at org.apache.sling.installer.core.impl.OsgiInstallerImpl.run(OsgiInstallerImpl.java:229)
> at java.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.ClassNotFoundException: org.apache.sling.commons.osgi.SortingServiceTracker
> at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:744)
> at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
> at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1656)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> ... 11 more
>
> by the way: We should find a way were at least always the actual released version will be tested,
> without the need that someone remembers that there are some hardcoded versions in some tests.
> But maybe that's not that easy ;-)
>
> best regards
> mike
--
Carsten Ziegeler
cziegeler@apache.org
RE: Integration tests fail because of SLING-2645
Posted by Mike Müller <mi...@mysign.ch>.
> I haven't followed all the changes, but so far the installer did
> inline the classes from OSGi commons. Maybe this new class needs to be
> added to be inlined?
>
> Carsten
>
> 2012/11/2 Bertrand Delacretaz <bd...@apache.org>:
> > On Fri, Nov 2, 2012 at 11:21 AM, Mike Müller <mi...@mysign.ch> wrote:
> >> ...Is this the right list.xml which will be used by the integration tests from
> installer/it?...
> >
> > Of course not, but you didn't say you had failures in the *installer*
> > integration tests ;-)
> >
> > AFAIK the bundles that the installer/it tests use are defined in java
> > code, in [1] - that's probably where you need to make changes.
> >
> > -Bertrand
> >
> > [1]
> https://svn.apache.org/repos/asf/sling/trunk/installer/it/src/test/java/org/apache/sling/
> installer/it/OsgiInstallerTestBase.java
I must have something missed. I found the part were the bundles are declared inline
in the OsgiInstallerTestBase (lines 385ff).
I added
mavenBundle("org.apache.felix", "org.apache.felix.eventadmin", "1.2.14"),
mavenBundle("org.apache.sling", "org.apache.sling.commons.osgi", "2.1.1-SNAPSHOT"),
but nevertheless the moved SortingServiceTracker is not found:
Exception in thread "OsgiInstallerImpl" java.lang.NoClassDefFoundError: org/apache/sling/commons/osgi/SortingServiceTracker
02.11.2012 17:02:07.072 *INFO* [FelixStartLevel] org.apache.sling.installer.core Service [Apache Sling Installer Controller Service,19] ServiceEvent REGISTERED
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1793)
at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:688)
at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1656)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
02.11.2012 17:02:07.072 *INFO* [FelixDispatchQueue] org.apache.sling.installer.core BundleEvent STARTED
at org.apache.sling.installer.core.impl.OsgiInstallerImpl.init(OsgiInstallerImpl.java:203)
at org.apache.sling.installer.core.impl.OsgiInstallerImpl.run(OsgiInstallerImpl.java:229)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ClassNotFoundException: org.apache.sling.commons.osgi.SortingServiceTracker
at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:744)
at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1656)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 11 more
by the way: We should find a way were at least always the actual released version will be tested,
without the need that someone remembers that there are some hardcoded versions in some tests.
But maybe that's not that easy ;-)
best regards
mike
Re: Integration tests fail because of SLING-2645
Posted by Carsten Ziegeler <cz...@apache.org>.
I haven't followed all the changes, but so far the installer did
inline the classes from OSGi commons. Maybe this new class needs to be
added to be inlined?
Carsten
2012/11/2 Bertrand Delacretaz <bd...@apache.org>:
> On Fri, Nov 2, 2012 at 11:21 AM, Mike Müller <mi...@mysign.ch> wrote:
>> ...Is this the right list.xml which will be used by the integration tests from installer/it?...
>
> Of course not, but you didn't say you had failures in the *installer*
> integration tests ;-)
>
> AFAIK the bundles that the installer/it tests use are defined in java
> code, in [1] - that's probably where you need to make changes.
>
> -Bertrand
>
> [1] https://svn.apache.org/repos/asf/sling/trunk/installer/it/src/test/java/org/apache/sling/installer/it/OsgiInstallerTestBase.java
--
Carsten Ziegeler
cziegeler@apache.org
Re: Integration tests fail because of SLING-2645
Posted by Bertrand Delacretaz <bd...@apache.org>.
On Fri, Nov 2, 2012 at 11:21 AM, Mike Müller <mi...@mysign.ch> wrote:
> ...Is this the right list.xml which will be used by the integration tests from installer/it?...
Of course not, but you didn't say you had failures in the *installer*
integration tests ;-)
AFAIK the bundles that the installer/it tests use are defined in java
code, in [1] - that's probably where you need to make changes.
-Bertrand
[1] https://svn.apache.org/repos/asf/sling/trunk/installer/it/src/test/java/org/apache/sling/installer/it/OsgiInstallerTestBase.java
RE: Integration tests fail because of SLING-2645
Posted by Mike Müller <mi...@mysign.ch>.
> On Fri, Nov 2, 2012 at 10:06 AM, Mike Müller <mi...@mysign.ch> wrote:
> > ...The integration tests now fail, because the SortingServiceTracker could not be
> > found in the released version of commons/osgi.
> > Am I correct, that the only way to correct this is to release Commons OSGi bundle in
> 2.1.2.
> > Or are there any alternative ways to make the tests run again?...
>
> If you mean the launchpad/testing tests, you should be able to use a
> snapshot of that bundle by changing
> launchpad/xbuilder/src/main/bundles/list.xml
Hmm, if I change the
<artifactId>org.apache.sling.commons.osgi</artifactId>
<version>2.1.0</version>
to
<artifactId>org.apache.sling.commons.osgi</artifactId>
<version>2.1.1-SNAPSHOT</version>
in the launchpad/builder/src/main/bundles.xml
the tests fail as before, even if I also change the org.apache.sling.installer.core to 3.4.1-SNAPSHOT.
Is this the right list.xml which will be used by the integration tests from installer/it?
I'm a little bit lost here...
best regards
mike
Re: Integration tests fail because of SLING-2645
Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,
On Fri, Nov 2, 2012 at 10:06 AM, Mike Müller <mi...@mysign.ch> wrote:
> ...The integration tests now fail, because the SortingServiceTracker could not be
> found in the released version of commons/osgi.
> Am I correct, that the only way to correct this is to release Commons OSGi bundle in 2.1.2.
> Or are there any alternative ways to make the tests run again?...
If you mean the launchpad/testing tests, you should be able to use a
snapshot of that bundle by changing
launchpad/xbuilder/src/main/bundles/list.xml
-Bertrand