Replies: 7 comments 4 replies
-
So these are the bundles I have used to activate ical4j v4 in Felix, but I think it should be the same for v3.2.1 (asm-all may be the crucial missing bundle in your case):
|
Beta Was this translation helpful? Give feedback.
-
Yesterday, the code finally made it to the testing team and despite the fact that the ical4j bundle loads and activates just fine in felix and that my "mailserver" bundle is pulling in the ical4j bundle (see screenshot), I am getting a ClassNotFoundExceptions:
|
Beta Was this translation helpful? Give feedback.
-
Ok, I don't think I've tried the parser in OSGi yet, so it may be a bug. I'll try to recreate this as an integration test and let you know. |
Beta Was this translation helpful? Give feedback.
-
Sure, I started looking into adding OSGi integration tests, but I think that will take quite a bit longer to resolve. In the meantime I'll see if I can manually debug in an OSGi environment, will give some feedback on this in the next few days. |
Beta Was this translation helpful? Give feedback.
-
So I've done some testing on the ical4j 3.2.2 release using Apache Karaf, and have made some changes to fix issues with activation. First, I've added some more optional resolution for packages and features that aren't necessarily required for basic icalendar parsing. This allowed me to load ical4j and the new ical4j-validator project and I was able to successfully parse a file. I had to add the following Karaf features and bundles to get it to work:
|
Beta Was this translation helpful? Give feedback.
-
Dunno how but I kinda waited for a confirmation of the 2.3.2 release to be published. I checked today and it was there, I integrated it and downloaded the new dependencies into our bundle directory and the class loading issue is definitely gone. You got that fixed alright, great job and thank you for that! However (there is always one like this right), the first calendar invite I tried to parse is producing a parse exception. Can I pass it to you here or do you want me to create a separate ticket? |
Beta Was this translation helpful? Give feedback.
-
Ok, I will try that by modifying the start script, adding the options using -Dical4j.unfolding.relaxed=true -Dical4j.parsing.relaxed=true. I have also attached the stacktrace and the SMTP enveloppe that causes it. ls-calendar-parse-exception.txt |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I must be missing a dependency somewhere but I cannot figure out which one. I have copied the ical4j-3.2.1.jar into the felix bundle directory and the only missing requirement is:
org.osgi.framework.BundleException: Unable to resolve ical4j [45](R 45.0): missing requirement [ical4j [45](R 45.0)] osgi.extender; (osgi.extender=osgi.serviceloader.processor) Unresolved requirements: [[ical4j [45](R 45.0)] osgi.extender; (osgi.extender=osgi.serviceloader.processor)]
which I believe is provided by https://aries.apache.org/documentation/modules/spi-fly.html
The manifest file of that component clearly shows that it provides the capability osgi.serviceloader.processor:
Provide-Capability: osgi.extender;osgi.extender="osgi.serviceloader.re
gistrar";version:Version="1.0",osgi.extender;osgi.extender="osgi.serv
iceloader.processor";version:Version="1.0";uses:="org.apache.aries.sp
ifly"
I opted for the dynamic weaving framework extension (https://aries.apache.org/documentation/modules/spi-fly.html#_dynamic_weaving_framework_extension) as that is extending the system.bundle and therefore is always active long before any "custom" bundles from the application directory are loaded/activated.
I also modified felix/conf/config.properties and added:
org.apache.aries.spifly.auto.providers="
net.fortuna.ical4j.*;vendor=ical4j
I am not 100% sure if net.fortuna.ical4j.* is the correct syntax because the ical4j bundle says that it's symbolic name is ‘ical4j” . However, I also tried with:
org.apache.aries.spifly.auto.providers="
ical4j.*;vendor=ical4j
and that did not help either.
So with all the above, I believe that the osgi.serviceloader.processor dependency should be covered but the bundle does not activate. What am I doing wrong? How are you typically deploying the ical4j jar in a felix environment?
Beta Was this translation helpful? Give feedback.
All reactions