Class Cast Exception when starting Liferay 7.1 - liferay

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

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.

Related

CDIIntegrationService errors were found when Weblogic upgrade from 12.1.2 to 12.1.3

I have upgraded Weblogic version in linux server by changing the wl_home path in the setDomainEnv.sh for 12.1.2 to 12.1.3 and restart. when restarting it gives below errors.
Appreciate if anyone can give idea about this.
java.lang.IllegalAccessError: tried to access method com.bea.logging.LogBufferHandler.bufferLogObject(Ljava/lang/Object;)V from class weblogic.logging.log4j.WLLog4jMemoryBufferAppender
java.lang.IllegalStateException: Unable to perform operation: post construct on weblogic.diagnostics.lifecycle.LoggingServerService
java.lang.IllegalArgumentException: While attempting to resolve the dependencies of weblogic.diagnostics.lifecycle.DiagnosticFoundationService errors were found
java.lang.IllegalStateException: Unable to perform operation: resolve on weblogic.diagnostics.lifecycle.DiagnosticFoundationService
java.lang.IllegalArgumentException: While attempting to resolve the dependencies of com.oracle.injection.integration.CDIIntegrationService errors were found
java.lang.IllegalStateException: Unable to perform operation: resolve on com.oracle.injection.integration.CDIIntegrationService
Use the wllog4j.jar which is part of WLS 12.1.3 build. The one part of WLS_HOME/server/lib diretory.
If your domains-home/lib folder holds older wllog4.jar which was part of 12.1.2 then you will face this issue

Exception caught while initializing context: java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester

After starting Websphere 9 server, I am getting an exception. Below mentioned exception stack trace.
E com.ibm.ws.webcontainer.webapp.WebApp notifyServletContextCreated SRVE0283E: Exception caught while initializing context: {0}
java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester
at org.apache.myfaces.config.impl.digester.DigesterFacesConfigUnmarshallerImpl.<init>(DigesterFacesConfigUnmarshallerImpl.java:42)
at org.apache.myfaces.config.DefaultFacesConfigurationProvider.getUnmarshaller(DefaultFacesConfigurationProvider.java:93)
at org.apache.myfaces.config.DefaultFacesConfigurationProvider.getStandardFacesConfig(DefaultFacesConfigurationProvider.java:135)
at org.apache.myfaces.config.DefaultFacesConfigurationMerger.getFacesConfigData(DefaultFacesConfigurationMerger.java:69)
at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:416)
at org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:370)
at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:73)
at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:143)
at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:119)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1836)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:442)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:8
Can anyone help to fix this issue?
Make sure that you have all the dependencies of MyFaces and their corresponding versions.
http://myfaces.apache.org/core22/dependency-management.html
The last versions use commons-digester version 1.8.
It could also be a classloader issue, maybe this link helps WAS 8.5.5 & MyFaces 2.1 Shared library

Cannot deploy weblogic server application that contains log4j 2.9.x

I am not able to start application it gives below exception :
Java.lang.IllegalArgumentException
At com.bea.objectweb.asm.ClassReader.(Unknownsource)com.bea.objectweb.asm.ClassReader.(Unknown source)
Application got started after replacing below jars
Log4j-1.2-api-2.9.1.jar
Log4j-api-2.9.1.jar
Log4j-core-2.9.1.jar
Log4j-slf4j-impl-2.10.0.jar
With
Log4j-1.2-api-2.8.2.jar
Log4j-api-2.8.2jar
Log4j-core-2.8.2.jar
Log4j-slf4j-impl-2.8.2.jar
Since version 2.9.0 there are classes compiled in java 9.
One workaround is to remove them from log4j-api-2.x.y.jar

Unasked Mojarra initializing

I'm using Tapestry 5.3 framework in my Java 1.7 web-app, and run in under Tomcat 7.x.
Suddenly today I've found in startup logs of my app these lines:
jul 31, 2014 12:12:46 PM com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra 2.2.7 ( 20140610-1547 https://svn.java.net/svn/mojarra~svn/tags/2.2.7#13362) for context '/XXX'
jul 31, 2014 12:12:46 PM com.sun.faces.spi.InjectionProviderFactory createInstance
INFO: JSF1048: PostConstruct/PreDestroy annotations present. ManagedBeans methods marked with these annotations will have said annotations processed.
I have never seen these log-lines before in my app. Furthermore, "Initializing Mojarra" process takes some appreciable time.
So I should think, that somebody among our project developers have added special libraries - but there aren't any JSF or Faces libraries in the build.
I have no ideas what have changed and how I can cut out Mojarra from my project? Any help would be appreciated.
The problem was in jsf-*.jar libraries placed mistakenly in /lib folder of Tomcat. They were initialized due to tomcat startup. Removing them solved the problem.

Error while starting the Glassfish server + BIRT dependencies

I'm trying to deploy a Java web application on a GlassFish server (v 3.1.2) using Eclipse Indigo 3.7.1 but I'm always having this Exception:
cannot Deploy MetricsReportingProject
Deployment Error for module: MetricsReportingProject: Error occurred during deployment:
Exception while loading the app :
java.lang.IllegalStateException: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException:
java.lang.RuntimeException:
com.sun.faces.config.ConfigurationException:
java.util.concurrent.ExecutionException:
com.sun.faces.config.ConfigurationException:
Unable to parse document 'bundle://136.0:1/com/sun/faces/jsf-ri-runtime.xml':
DTD factory class org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl does not extend from DTDDVFactory.. Please see server.log for more details.
Here are my project's dependencies:
Hibernate 3.4.0 dependencies
BIRT DE and BIRT Viewer 3.7.1
JSF 2.0
PrimeFaces 3.2
The project was working when I'had created it but the problem appears after making some modifications and restarting the server many times.
Can anyone help me to solve this problem.
I hand the same problem.
Glassfish provides a
- xercesImpl-2.9.1.jar
- xml-apis-1.3.04.jar
But in the Birt Lib, they have xercesImpl-2.9.0.jar
I just deleted xercesImpl-2.9.0.jar from Birt Lib and redeployed. It worked fine.

Resources