First I thought I might have to put the classes under WEB-INF/classes because it is a web-bundle. So I moved the classes to:

bundle-root
WEB-INF/classes/xxx/yyy/Test1Filter.class
META-INF

This indeed works if I adjust the classpath accordingly:

Bundle-ClassPath: .,WEB-INF/classes,WEB-INF/lib/someJar.jar

The "classes" directory can also be named differently. The only matter seems to be that it is within the WEB-INF directory.
The funny thing is that classes other than filters are found in the . classpath.
For example I added a ServletRequestListener in the web.xml which I put as such:

The listener class is resolved just fine whereas the filter class must reside somewhere within WEB-INF. The osgi specification about web-bundles says

Unlike a WAR, a WAB is not constrained to package classes and code resources in the WEB-INF/
classes/ directory or dependent JARs in WEB-INF/lib/ only. These entries can be packaged in any way
that's valid for an OSGi bundle as long as such directories and JARs are part of bundle class path as set
with the Bundle-ClassPath header and any attached fragments.

So I assume this is some kind of weird bug? Or am I missing something?

Hi Violeta,
thanks for the example. I have to admit, that I cannot reproduce the problem. Last friday/saturday it almost made me crazy but now I cannot reproduce it. My filter is an NTLM filter which extends jcifs NTLM filter which itself is provided via a bundle. The bundle was installed but while resolving my filter Virgo kept complaining about not being able to resolve javax.servlet.Filter. In this context I created a simple filter (like yours) to check if virgo could resolve the simple filter. I could swear that the simple filter was only resolved with the above class path issues.... In order to solve the real problem I ended up with copying the jcifs jar into my war bundle. And suddenly it worked. And now I am trying to step back and its simply not reproducible. I will keep an eye on it. Sry for wasting your time.