Running the sample project on TomCat

Post Reply
kumkle
Posts: 2
Joined: 08 Mar 2021, 21:19

18 Mar 2021, 15:14

Hello guys, i'm learning jsf wth primefaces and bought the Atlantis theme.

Could you give me some tips on how to deploy the sample project with TomCat?

I'm using the following:
  • Spring Tool Suite 4
  • TomCat 8.5
  • Maven 3.6.3
  • Java 1.8.0_181
  • Atlantis theme 2.0.1
  • Sass 1.32.8
I tried the following:
  1. Downloaded the files and extracted them
  2. Imported the sample project contained in the folder 'tag'
  3. Put the jar file in the classpath
  4. changed the web.xml 'primefaces.THEME' to 'atlantis-green'
  5. ran 'sass --watch src/main/resources' at the project directory
  6. ran 'mvn clean install' at the project directory
  7. Tried to run TomCat but got the following log:

Code: Select all

mar. 18, 2021 12:49:59 DA TARDE org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version:        Apache Tomcat/8.5.37
mar. 18, 2021 12:49:59 DA TARDE org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built:          Dec 12 2018 12:07:02 UTC
mar. 18, 2021 12:49:59 DA TARDE org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number:         8.5.37.0
mar. 18, 2021 12:49:59 DA TARDE org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name:               Windows 10
mar. 18, 2021 12:49:59 DA TARDE org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version:            10.0
mar. 18, 2021 12:49:59 DA TARDE org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture:          amd64
mar. 18, 2021 12:49:59 DA TARDE org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home:             C:\dev\STS 4.9.0\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507\jre
mar. 18, 2021 12:49:59 DA TARDE org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version:           15.0.1+9-18
mar. 18, 2021 12:49:59 DA TARDE org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor:            Oracle Corporation
mar. 18, 2021 12:49:59 DA TARDE org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE:         C:\dev\repo-sts\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
mar. 18, 2021 12:49:59 DA TARDE org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME:         C:\dev\tools\tomcat 8.5
mar. 18, 2021 12:49:59 DA TARDE org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=C:\dev\repo-sts\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
mar. 18, 2021 12:49:59 DA TARDE org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=C:\dev\tools\tomcat 8.5
mar. 18, 2021 12:49:59 DA TARDE org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dwtp.deploy=C:\dev\repo-sts\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
mar. 18, 2021 12:49:59 DA TARDE org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=Cp1252
mar. 18, 2021 12:49:59 DA TARDE org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -XX:+ShowCodeDetailsInExceptionMessages
mar. 18, 2021 12:49:59 DA TARDE org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\dev\STS 4.9.0\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507\jre\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/dev/STS 4.9.0//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507/jre/bin/server;C:/dev/STS 4.9.0//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507/jre/bin;SASS_HOME\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\Broadcom\Broadcom 802.11 Network Adapter;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program Files\Intel\WiFi\bin\;c:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Hewlett-Packard\SimplePass\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\dev\tools\apache-maven-3.6.3\bin;JAVA_HOME\bin;C:\ProgramData\chocolatey\bin;c:\Program Files\Intel\WiFi\bin\;c:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\Kumkle\AppData\Local\Microsoft\WindowsApps;C:\tools\dart-sdk\bin;C:\Users\Kumkle\AppData\Roaming\Pub\Cache\bin;;C:\dev\STS 4.9.0;;.]
mar. 18, 2021 12:50:00 DA TARDE org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
mar. 18, 2021 12:50:00 DA TARDE org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
mar. 18, 2021 12:50:00 DA TARDE org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
mar. 18, 2021 12:50:00 DA TARDE org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
mar. 18, 2021 12:50:00 DA TARDE org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 750 ms
mar. 18, 2021 12:50:00 DA TARDE org.apache.catalina.core.StandardService startInternal
INFO: Starting service [Catalina]
mar. 18, 2021 12:50:00 DA TARDE org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.5.37
mar. 18, 2021 12:50:02 DA TARDE org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
mar. 18, 2021 12:50:02 DA TARDE org.apache.webbeans.lifecycle.AbstractLifeCycle bootstrapApplication
INFO: OpenWebBeans Container is starting...
mar. 18, 2021 12:50:02 DA TARDE org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery addWebBeansXmlLocation
INFO: added beans archive URL: file:/C:/dev/repo-sts/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/atlantis/WEB-INF/beans.xml
mar. 18, 2021 12:50:02 DA TARDE org.apache.webbeans.web.scanner.WebScannerService addWarBeansArchive
INFO: Adding information from WEB-INF/beans.xml
mar. 18, 2021 12:50:02 DA TARDE org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery addWebBeansXmlLocation
INFO: added beans archive URL: file:/C:/dev/repo-sts/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/atlantis/WEB-INF/lib/jakarta.faces-2.3.13.jar
mar. 18, 2021 12:50:02 DA TARDE org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery addWebBeansXmlLocation
INFO: added beans archive URL: file:/C:/dev/repo-sts/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/atlantis/WEB-INF/lib/primefaces-8.0.jar
mar. 18, 2021 12:50:02 DA TARDE org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery addWebBeansXmlLocation
INFO: added beans archive URL: file:/C:/dev/repo-sts/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/atlantis/WEB-INF/lib/classmate-0.8.0.jar
mar. 18, 2021 12:50:02 DA TARDE org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery addWebBeansXmlLocation
INFO: added beans archive URL: file:/C:/dev/repo-sts/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/atlantis/WEB-INF/lib/validation-api-1.1.0.Final.jar
mar. 18, 2021 12:50:02 DA TARDE org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery addWebBeansXmlLocation
INFO: added beans archive URL: file:/C:/dev/tools/tomcat%208.5/lib/
mar. 18, 2021 12:50:02 DA TARDE org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery addWebBeansXmlLocation
INFO: added beans archive URL: file:/C:/dev/repo-sts/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/atlantis/WEB-INF/lib/hibernate-validator-5.0.1.Final.jar
mar. 18, 2021 12:50:03 DA TARDE org.apache.webbeans.config.BeansDeployer validateInjectionPoints
INFO: All injection points were validated successfully.
mar. 18, 2021 12:50:03 DA TARDE org.apache.webbeans.lifecycle.AbstractLifeCycle bootstrapApplication
INFO: OpenWebBeans Container has started, it took [789] ms.
mar. 18, 2021 12:50:03 DA TARDE com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra |version.string| for context '/atlantis'
mar. 18, 2021 12:50:03 DA TARDE com.sun.faces.spi.InjectionProviderFactory createInstance
INFO: JSF1048: PostConstruct/PreDestroy annotations present.  ManagedBeans methods marked with these annotations will have said annotations processed.
com.sun.faces.config.ConfigurationException: 
  Source Document: file:/C:/dev/repo-sts/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/atlantis/WEB-INF/faces-config.xml
  Cause: Unable to create a new instance of 'org.primefaces.atlantis.component.MenuRenderer': javax.faces.FacesException: org.primefaces.atlantis.component.MenuRenderer
	at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:264)
	at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:199)
	at com.sun.faces.config.processor.RenderKitConfigProcessor.addRenderers(RenderKitConfigProcessor.java:291)
	at com.sun.faces.config.processor.RenderKitConfigProcessor.process(RenderKitConfigProcessor.java:167)
	at com.sun.faces.config.ConfigManager.lambda$initialize$1(ConfigManager.java:325)
	at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:720)
	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
	at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:308)
	at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:206)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5278)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1423)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1413)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: javax.faces.FacesException: org.primefaces.atlantis.component.MenuRenderer
	at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:306)
	at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:208)
	... 17 more
Caused by: java.lang.ClassNotFoundException: org.primefaces.atlantis.component.MenuRenderer
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1344)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1172)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:468)
	at com.sun.faces.util.Util.loadClass(Util.java:308)
	at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:299)
	... 18 more
mar. 18, 2021 12:50:04 DA TARDE org.primefaces.webapp.PostConstructApplicationEventListener processEvent
INFO: Running on PrimeFaces 8.0
mar. 18, 2021 12:50:04 DA TARDE com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra |version.string| for context '/atlantis'
mar. 18, 2021 12:50:04 DA TARDE com.sun.faces.spi.InjectionProviderFactory createInstance
INFO: JSF1048: PostConstruct/PreDestroy annotations present.  ManagedBeans methods marked with these annotations will have said annotations processed.
com.sun.faces.config.ConfigurationException: 
  Source Document: file:/C:/dev/repo-sts/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/atlantis/WEB-INF/faces-config.xml
  Cause: Unable to create a new instance of 'org.primefaces.atlantis.component.MenuRenderer': javax.faces.FacesException: org.primefaces.atlantis.component.MenuRenderer
	at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:264)
	at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:199)
	at com.sun.faces.config.processor.RenderKitConfigProcessor.addRenderers(RenderKitConfigProcessor.java:291)
	at com.sun.faces.config.processor.RenderKitConfigProcessor.process(RenderKitConfigProcessor.java:167)
	at com.sun.faces.config.ConfigManager.lambda$initialize$1(ConfigManager.java:325)
	at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:720)
	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
	at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:308)
	at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:206)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4810)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5278)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1423)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1413)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: javax.faces.FacesException: org.primefaces.atlantis.component.MenuRenderer
	at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:306)
	at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:208)
	... 17 more
Caused by: java.lang.ClassNotFoundException: org.primefaces.atlantis.component.MenuRenderer
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1344)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1172)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:468)
	at com.sun.faces.util.Util.loadClass(Util.java:308)
	at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:299)
	... 18 more
mar. 18, 2021 12:50:04 DA TARDE org.primefaces.webapp.PostConstructApplicationEventListener processEvent
INFO: Running on PrimeFaces 8.0
mar. 18, 2021 12:50:04 DA TARDE org.primefaces.webapp.PostConstructApplicationEventListener processEvent
INFO: Running on PrimeFaces 8.0
mar. 18, 2021 12:50:04 DA TARDE org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter [Character Encoding Filter]
java.lang.ClassNotFoundException: org.primefaces.atlantis.filter.CharacterEncodingFilter
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1344)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1172)
	at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:546)
	at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:527)
	at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:150)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:264)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4657)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5304)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1423)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1413)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:832)

mar. 18, 2021 12:50:04 DA TARDE org.apache.catalina.core.StandardContext startInternal
SEVERE: One or more Filters failed to start. Full details will be found in the appropriate container log file
mar. 18, 2021 12:50:04 DA TARDE org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/atlantis] startup failed due to previous errors
mar. 18, 2021 12:50:04 DA TARDE com.sun.faces.config.ConfigureListener contextDestroyed
WARNING: Unexpected state during contextDestroyed: no ConfigManager instance in current ServletContext but one is expected to exist.
mar. 18, 2021 12:50:04 DA TARDE org.apache.webbeans.web.lifecycle.WebContainerLifecycle afterStopApplication
INFO: OpenWebBeans Container was stopped for context path, [/atlantis]
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.catalina.loader.WebappClassLoaderBase (file:/C:/dev/tools/tomcat%208.5/lib/catalina.jar) to field java.io.ObjectStreamClass$Caches.localDescs
WARNING: Please consider reporting this to the maintainers of org.apache.catalina.loader.WebappClassLoaderBase
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
mar. 18, 2021 12:50:04 DA TARDE org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8080"]
mar. 18, 2021 12:50:04 DA TARDE org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-nio-8009"]
mar. 18, 2021 12:50:04 DA TARDE org.apache.catalina.startup.Catalina start
INFO: Server startup in 4768 ms

Could you help me?

thanks

merve7
Posts: 707
Joined: 12 Sep 2017, 10:44

22 Mar 2021, 10:00

Hi,
@siris, could check, please?

siris
Posts: 115
Joined: 29 Jul 2019, 13:57

26 Mar 2021, 13:40

Hi,

Sorry for delayed response!

I guess you forget copy and paste to your project atlantis menu components' faces-config.xml necessery lines in webapp folder. So please check faces-config.xml file. And try again please.

Best Regards,

kumkle
Posts: 2
Joined: 08 Mar 2021, 21:19

30 Mar 2021, 21:24

Hello!

I think didn't forget anything as I just imported the sample project, I double checked just to be sure.
I ended up trying it on Netbeans with TomCat 9.0 and it works there, trying it again on Spring Tool Suite 4 with TomCat 8.5 still doesn't work so maybe i's an issue with one of the two

Anyway, as I can run it on another IDE with another version of TomCat, I'll stick to those

Best Regards

Post Reply

Return to “Atlantis - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest