9.3 Creating proxies with CGLIB for package-protected types
Prev | 9. Known Issues | Next

## 9.3 Creating proxies with CGLIB for package-protected types

In traditional Java EE applications user types are loaded by the same `ClassLoader` as CGLIB. This allows CGLIB to proxy package-protected types. In OSGi environments, user types and CGLIB will most likely be packaged in separate bundles. This results in the user types and CGLIB being loaded by different `ClassLoaders`. This prevents CGLIB from proxying any package-protected types.

The workaround for this issue is to make all types that require proxying public.

Prev | Up | Next
9.2 ClassNotFoundError When Creating a Proxy | Home | 9.4 Tomcat Restrictions