Thanks for the tip, I will investigate this. At first sight I haven't seen any dependencies to javax.servlet.descriptor which is why I suspected iPojo. I'll look again.
/Bengt Den fre 8 dec. 2023 kl 12:21 skrev Александр Шаклеин <cheester...@gmail.com >: > Hey > I don't think that is an ipojo problem because it is just trying to create > proxy for interface by provided dependency > So if one of your component has dependency > javax.servlet.descriptor.JspPropertyGroupDescriptor ipojo will try to find > this interface and create proxy > So if you have upgraded from javax to jakarta I think you should check > javax dependencies and change them to jakarta package. That's a common > problem for jaxb for example when migrating from java 8 to java 11+ > > ср, 6 дек. 2023 г. в 21:54, Bengt Rodehav <be...@rodehav.com>: > > > I have a problem with iPojo not finding the JspPropertyGroupDescriptor > > class. I have discussed this in the ops4j mailing list: > > https://groups.google.com/g/ops4j/c/qMSZT4RNRqc > > > > But, I'm not sure if this is a Pax-Web problem or an iPojo problem. > > > > I am using Karaf 4.4.4 with Pax-Web 8.0.22. > > > > I get the following error in the log: > > > > 2023-11-30T17:55:19,274 | ERROR | [iPOJO] pool-1-thread-1 | web-console > > | 108 - se.digia.seco.web.web-console - 3.1.0.SNAPSHOT | > > [ERROR] : Cannot create the proxy object > > java.lang.NoClassDefFoundError: > > javax/servlet/descriptor/JspPropertyGroupDescriptor > > at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:?] > > at java.lang.Class.privateGetDeclaredMethods(Class.java:3402) ~[?:?] > > at java.lang.Class.privateGetPublicMethods(Class.java:3427) ~[?:?] > > at java.lang.Class.getMethods(Class.java:2019) ~[?:?] > > at > > > > > org.apache.felix.ipojo.handlers.dependency.ProxyGenerator.dumpProxy(ProxyGenerator.java:89) > > ~[!/:?] > > at > > > > > org.apache.felix.ipojo.handlers.dependency.Dependency$SmartProxyFactory.getProxyClass(Dependency.java:1133) > > ~[!/:?] > > at > > > > > org.apache.felix.ipojo.handlers.dependency.Dependency$SmartProxyFactory.getProxy(Dependency.java:1151) > > [!/:?] > > at > > > > > org.apache.felix.ipojo.handlers.dependency.Dependency.start(Dependency.java:516) > > [!/:?] > > at > > > > > org.apache.felix.ipojo.handlers.dependency.DependencyHandler.__M_start(DependencyHandler.java:496) > > [!/:?] > > at > > > > > org.apache.felix.ipojo.handlers.dependency.DependencyHandler.start(DependencyHandler.java) > > [!/:?] > > at org.apache.felix.ipojo.HandlerManager.start(HandlerManager.java:136) > > [!/:?] > > at org.apache.felix.ipojo.InstanceManager.start(InstanceManager.java:421) > > [!/:?] > > at > > > > > org.apache.felix.ipojo.ComponentFactory.createInstance(ComponentFactory.java:179) > > [!/:?] > > at > > > > > org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:319) > > [!/:?] > > at > > > > > org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:240) > > [!/:?] > > at > > > > > org.apache.felix.ipojo.extender.internal.linker.ManagedType$InstanceSupport$1.call(ManagedType.java:312) > > [!/:?] > > at > > > > > org.apache.felix.ipojo.extender.internal.linker.ManagedType$InstanceSupport$1.call(ManagedType.java:306) > > [!/:?] > > at > > > > > org.apache.felix.ipojo.extender.internal.queue.JobInfoCallable.call(JobInfoCallable.java:114) > > [!/:?] > > at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?] > > at > > > > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) > > [?:?] > > at > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) > > [?:?] > > at java.lang.Thread.run(Thread.java:833) [?:?] > > Caused by: java.lang.ClassNotFoundException: > > javax.servlet.descriptor.JspPropertyGroupDescriptor not found by > > org.ops4j.pax.web.pax-web-api [94] > > at > > > > > org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1591) > > ~[?:?] > > at > > > > > org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:79) > > ~[?:?] > > at > > > > > org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1976) > > ~[?:?] > > at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?] > > ... 22 more > > > > In Pax-Web 7.3.23 (used in Karaf 4.3.3) the following bundle was > included: > > > > javax.servlet-api/3.1.0 > > > > In Pax-Web 8.0.22 (used in Karaf 4.4.4) it has been replaced by the > > following pair: > > > > jakarta.servlet-api/4.0.4 > > pax-web-compatibility-servlet31/8.0.22 > > > > I am using Servlet 3.1 which was provided cleanly in Pax-Web 7.3.23. But > in > > 8.0.22 it is instead provided by the Servlet 4.0 bundle in combination > with > > a fragment that (if I understand correctly) re-exports that code as > version > > 3.1. Correct me if I am wrong. > > > > This setup doesn't seem to work with iPojo. It's unclear to me why this > is. > > > > Looking at the bundle org.ops4j.pax.web/pax-web-api/8.0.22, it seems like > > it only imports the following javax.servlet packages: > > > > javax.servlet; version="[3.1, 5)", > > javax.servlet.annotation; version="[3.1, 5)", > > javax.servlet.http; version="[3.1, 5)" > > > > ...but not > > > > javax.servlet.descriptor > > > > If I add the following: > > > > javax.servlet.descriptor;version="[3.1,5)" > > > > To the Import-Package section of the MANIFEST.MF of the pax-web-api jar, > > then it works. It makes me wonder if this import is missing in > pax-web-api. > > On the other hand I wonder why iPojo is looking for this class in > > pax-web-api and not in the bundle that actually exports it. > > > > /Bengt > > >