1

I'm getting a ClassCastException when Liferay 7.1 starts:

 INFO  [main][ModuleFrameworkImpl:1636] Starting dynamic bundles
 ERROR [Start Level: Equinox Container: 08ae8322-2575-4260-9c68-db4761a17500][org_apache_felix_scr:97] bundle org.apache.felix.scr:2.1.14 (34)Error while loading components of bundle com.liferay.portal.remote.soap.extender.impl:2.0.5 (555) 
java.lang.ClassCastException: org.eclipse.osgi.internal.loader.FragmentLoader cannot be cast to org.eclipse.osgi.internal.loader.BundleLoader

Any help would be appreciated

Thanks

javaxiss
  • 680
  • 3
  • 13
  • 34
  • which *exact* version of Liferay? Does this happen with a customized bundle, or with a fresh install (because I can't reproduce with a fresh install)? Which Java version, what plugins are in there? Is it possible that you introduced duplicate bundles in custom plugins? – Olaf Kock Apr 11 '19 at 13:09
  • I'm using Liferay-ce-portal-7.1.2-ga3, openjdk-8 and that happens when I deploy a custom portlet. After some tests, that error no longer appears when I upgraded xmlschema-core jar (2.2.1-->2.2.3), but still do not understand that. Note that this jar is deployed in osgi modules directory. – javaxiss Apr 15 '19 at 14:04

1 Answers1

0

Seems this is a bug in equinox framework that is already fixed. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=423728 . You can try to update eclipse to version 3.10.0.

Christian Schneider
  • 19,420
  • 2
  • 39
  • 64
  • Actually, org.eclipse.osgi.jar's version is 3.13.0.LIFERAY-PATCHED-4. – javaxiss Apr 11 '19 at 09:55
  • Is this happening with a standard liferay or did you change something? – Christian Schneider Apr 11 '19 at 14:03
  • That happens with a standard liferay..I just deployed a custom portlet. – javaxiss Apr 11 '19 at 14:14
  • Does the issue only happen in combination with your portlet? If yes then maybe you embed the package org.eclipse.osgi.internal.loader. Such things often cause class loading issues. – Christian Schneider Apr 12 '19 at 07:03
  • As I indicated in my comment to @olaf-kock above, after some tries in osgi modules folder. I proceeded by elimination concerning the jars deployed there and I've found that xml-schema-core bundle seems to cause the error with its 2.2.1 version, but do not know why... – javaxiss Apr 15 '19 at 14:09