Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-86851

ClassNotFoundException thrown by BundleLoader.findClassInternal when scanning CDI bean portlet

    Details

    • Story Points:
      0.25
    • Fix Priority:
      3

      Description

      Steps to Reproduce:

      1. Deploy the WAR attached to this issue to Liferay Portal:
      cp tck-V3URLTests.war $LIFERAY_HOME/deploy

      *OR*

      1. Clone the Apache Pluto git repo
      git clone https://github.com/apache/portals-pluto.git

      2. Build Apache Pluto with the "liferay" profile:
      cd portals-pluto
      mvn -P liferay,all clean install

      3. Deploy the V3RenderStateTests WAR to Liferay Portal:
      cp portlet-tck_3.0/V3URLTests/target/tck-V3URLTests.war $LIFERAY_HOME/deploy

      Expected Results

      The following 4 portlets are registered and can be added to a portal page:

      • ActionURLTests
      • BaseURLTests
      • RenderURLTests
      • ResourceURLTests

      Actual Results

      The following exception appears in the console log during the deployment process:

      Caused by: java.lang.ClassNotFoundException: net.fortuna.ical4j.model.property.XProperty cannot be found by tck-V3URLTests_1.0.0
      	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:508)
      	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:419)
      	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:411)
      	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      	... 42 more
      

      It's caused by the following line in BeansModelBuilder.java looking for "java.util.TimeZoneSensitive":
      https://github.com/apache/aries/blob/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/BeansModelBuilder.java#L74

      Upon closer analysis, the TimeZoneSensitive.java has a dependency on iCal4J:
      https://github.com/liferay/liferay-portal/blob/master/util-java/src/com/liferay/util/TimeZoneSensitive.java#L17-L23

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Days since last comment:
                  11 weeks, 3 days ago