Steps to reproduce:
Lets say we have the following project structure:
Bundle-2 has provided dependency on bundle-1 and bundle-3 has provided dependency on bundle-1/2. We want to use FooBar in our MVCPortlet bundle (bundle-4). For the sake of this example export packages in bundle-1/2/3 which should make Foo/Bar/FooBar visible to other bundles, and add bundle-1/2/3 as provided dependencies to build.gradle of bundle-4.
Use FooBar class in .java and.jsp code ( e.g. Bar bar = new FooBar(); bar.get(); )
Everything compiles and runs fine in .java and .jsp code.
.java code compiles and runs fine, .jsp throws the following error in runtime:
Explicitly adding unused import for Foo "solves" the problem. as Raymond Auge explained: "The problem is likely that the jsp introspection isn't deep enough, since it only looks at source and not bytecode."