Error migrating from 5.0 to 6.2

UI Components for JSF
Post Reply
azro
Posts: 12
Joined: 12 Jun 2018, 11:31

18 Jun 2018, 10:03

I'm trying to update my project from primfaces 5.0 to 6.2

I get the .jar, I updated libraries in Netbeans, I read the miration guide from github (bu apparently nothing to change in my code)

My lib contains
- primefaces-6.2.jar
- all-themes-1.0.8.jar
- commons-fileupload-1.3.jar
- commons-io-2.4.jar
- itext-2.1.7.jar
- resources-ckeditor-2.0.0.jar
- resources-codemirror-2.0.0.jar
resources-optimizer-maven-plugin-1.1.0.jar

But I got an error at deploy :
  • On web page : XML analysis error at line 1 col 1
  • Stack trace : java.lang.NoSuchMethodError : org.primfaces.context.ApplicationContext.getConfig()Lorg/primefaces/config/ConfigContainer

Full StackTrace if needed:

Code: Select all

Infos:   org.primefaces.context.ApplicationContext.getConfig()Lorg/primefaces/config/ConfigContainer;
Grave:   javax.servlet.ServletException: org.primefaces.context.ApplicationContext.getConfig()Lorg/primefaces/config/ConfigContainer;
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)
	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at filters.AuthFilter.doFilter(AuthFilter.java:42)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:415)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
	at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
	at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
	at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
	at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
	at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchMethodError: org.primefaces.context.ApplicationContext.getConfig()Lorg/primefaces/config/ConfigContainer;
	at org.primefaces.metadata.ComponentMetadataTransformerListener.processEvent(ComponentMetadataTransformerListener.java:40)
	at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108)
	at javax.faces.event.ComponentSystemEvent.processListener(ComponentSystemEvent.java:118)
	at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2187)
	at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2163)
	at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:303)
	at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:247)
	at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2246)
	at javax.faces.component.UIComponentBase.doPostAddProcessing(UIComponentBase.java:1927)
	at javax.faces.component.UIComponentBase.setParent(UIComponentBase.java:447)
	at javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:2680)
	at javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:2652)
	at com.sun.faces.facelets.tag.jsf.ComponentSupport.addComponent(ComponentSupport.java:489)
	at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.addComponentToView(ComponentTagHandlerDelegateImpl.java:350)
	at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.addComponentToView(ComponentTagHandlerDelegateImpl.java:333)
	at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:222)
	at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
	at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
	at com.sun.faces.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:225)
	at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
	at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
	at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:87)
	at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:161)
	at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:990)
	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:99)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
	... 33 more

Melloware
Posts: 3716
Joined: 22 Apr 2013, 15:48

19 Jun 2018, 01:07

You have a mix of PF 6.2 and PF Extensions old version 2.0.0. You need to upgrade your PF Extensions to match PF 6.2. See this post...

viewtopic.php?f=14&t=55339
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

azro
Posts: 12
Joined: 12 Jun 2018, 11:31

19 Jun 2018, 09:20

Because I thougt none of these jars were usefull, I removed all of them, and still same

I checked the lib folders and nothing deal with other than 6.2

But when run stil in log I have

Running on PF 6.2
Running on PFE 2.0.0

azro
Posts: 12
Joined: 12 Jun 2018, 11:31

19 Jun 2018, 09:47

- - - - - - - - - - - - - - - - - - - -

I thought I could trust "clean" command, but nope, jars were still ther, hidding in a folder
get them bu a smple search in file system, remove and work

- - - - - - - - - - - - - - - - - - - -

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 28 guests