Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java Web Archive of release 3.5.9 won't deploy since included PrimeFaces and JSF versions are not compatible #1772

Open
gdmhrogut opened this issue Jan 10, 2025 · 0 comments

Comments

@gdmhrogut
Copy link

I downloaded the latest stable release 3.5.9 as a Java Web Archive and tried to deploy it under Apache Tomcat 9.0.97 but it failed with:

10-Jan-2025 11:50:44.272 SEVERE [main] com.sun.faces.config.ConfigureListener.contextInitialized Critical error during deployment: 
	com.sun.faces.config.ConfigurationException: Factory 'javax.faces.context.FacesContextFactory' was not configured properly.
		at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:330)
		at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:236)
		at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:439)
		at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:227)
		at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4018)
		at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4460)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164)
		at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:599)
		at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:571)
		at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:603)
		at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1014)
		at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1866)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
		at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
		at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:123)
		at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:816)
		at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:468)
		at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1584)
		at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:312)
		at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:109)
		at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:389)
		at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:336)
		at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:776)
		at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:721)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164)
		at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1203)
		at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1193)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
		at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
		at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
		at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:749)
		at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:211)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164)
		at org.apache.catalina.core.StandardService.startInternal(StandardService.java:415)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164)
		at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:874)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164)
		at org.apache.catalina.startup.Catalina.start(Catalina.java:735)
		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
		at java.base/java.lang.reflect.Method.invoke(Method.java:580)
		at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345)
		at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
	Caused by: javax.faces.FacesException: org.primefaces.context.PrimeFacesContextFactory
		at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:710)
		at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:572)
		at javax.faces.FactoryFinder.access$500(FactoryFinder.java:140)
		at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:1120)
		at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:379)
		at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:328)
		... 42 more
	Caused by: java.lang.reflect.InvocationTargetException
		at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:74)
		at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
		at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
		at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:690)
		... 47 more
	Caused by: java.lang.NoSuchMethodError: 'void javax.faces.context.FacesContextFactory.<init>(javax.faces.context.FacesContextFactory)'
		at org.primefaces.context.PrimeFacesContextFactory.<init>(PrimeFacesContextFactory.java:37)
		at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
		... 50 more

The Java Web Archive of release 3.5.9 currently includes WEB-INF/lib/jsf-impl-2.2.20.jar, WEB-INF/lib/primefaces-14.0.6.jar and WEB-INF/lib/primefaces-extensions-14.0.6.jar. But since the PrimeFaces migration guide 13.0.0 -> 14.0.0 says JSF 2.0, 2.1 and 2.2 support is has been removed, the PrimeFaces and JSF versions in the Java Web Archive of release 3.5.9 are not compatible. For me, the solution was as simple as replacing WEB-INF/lib/primefaces-14.0.6.jar and WEB-INF/lib/primefaces-extensions-14.0.6.jar by WEB-INF/lib/primefaces-13.0.6.jar and WEB-INF/lib/primefaces-extensions-13.0.6.jar from the Java Web Archive of release 3.5.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant