Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.4.2
-
None
Description
I am presently using Guice and OSGi. Our OSGi platform is used as a plugin platform for our web application. We load the OSGi framework and load it into Guice as a service provider. The plugins can be used to return panel or other wicket components that are then used in the pages.
When one of the plugins components have a Guice injection, there is a class not found problem that is seen when trying to use injected stuff :
org.apache.wicket.guice.GuiceProxyTargetLocator.locateProxyTarget(GuiceProxyTargetLocator.java:79)
This class not found is because the Guice injector is trying to access the class directly by making a Class.forName. Since using an OSGi framework, the classloader is not capable of returning the class correctly.
To solve this issue, the wicket-guice integration should use the wicket Classes.resolveClass static method that is using a class resolver that can be changed and check for class in other class loader.