Solucionado (ver solução)
Solucionado
(ver solução)
3
respostas

Erro ao dar start no TOMCAT 7

Estou usando o TOMCAT 7 e JAVA 9 e fiz todo o procedimento do vídeos da aula 2 e estava ocorrendo tudo certor. Quando fui verificar o console e vi o log de quando dou start no TOMCAT e estava da seguinte forma

dez 19, 2017 4:33:06 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:jsf-livraria' did not find a matching property.
dez 19, 2017 4:33:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version:        Apache Tomcat/7.0.82
dez 19, 2017 4:33:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built:          Sep 29 2017 12:23:15 UTC
dez 19, 2017 4:33:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number:         7.0.82.0
dez 19, 2017 4:33:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name:               Linux
dez 19, 2017 4:33:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version:            4.10.0-40-generic
dez 19, 2017 4:33:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture:          amd64
dez 19, 2017 4:33:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home:             /usr/lib/jvm/jdk-9.0.1
dez 19, 2017 4:33:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version:           9.0.1+11
dez 19, 2017 4:33:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor:            Oracle Corporation
dez 19, 2017 4:33:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE:         /home/carlos/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0
dez 19, 2017 4:33:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME:         /home/carlos/Downloads/apache-tomcat-7.0.82
dez 19, 2017 4:33:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=/home/carlos/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0
dez 19, 2017 4:33:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=/home/carlos/Downloads/apache-tomcat-7.0.82
dez 19, 2017 4:33:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dwtp.deploy=/home/carlos/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps
dez 19, 2017 4:33:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=UTF-8
dez 19, 2017 4:33:06 PM 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: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
dez 19, 2017 4:33:06 PM org.apache.catalina.core.JreMemoryLeakPreventionListener lifecycleEvent
SEVERE: Failed to trigger creation of the GC Daemon thread during Tomcat start to prevent possible memory leaks. This is expected on non-Sun JVMs.
java.lang.ClassNotFoundException: sun.misc.GC
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:563)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:292)
    at org.apache.catalina.core.JreMemoryLeakPreventionListener.lifecycleEvent(JreMemoryLeakPreventionListener.java:350)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:388)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:101)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:643)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:668)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:253)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:427)

dez 19, 2017 4:33:06 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
dez 19, 2017 4:33:06 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
dez 19, 2017 4:33:06 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1282 m
3 respostas
dez 19, 2017 4:33:06 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
dez 19, 2017 4:33:06 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.82
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.catalina.loader.WebappClassLoaderBase$1 (file:/home/carlos/Downloads/apache-tomcat-7.0.82/lib/catalina.jar) to method java.lang.ClassLoader.registerAsParallelCapable()
WARNING: Please consider reporting this to the maintainers of org.apache.catalina.loader.WebappClassLoaderBase$1
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
dez 19, 2017 4:33:07 PM org.apache.catalina.loader.WebappLoader buildClassPath
INFO: Unknown loader jdk.internal.loader.ClassLoaders$AppClassLoader@1b9e1916 class jdk.internal.loader.ClassLoaders$AppClassLoader
dez 19, 2017 4:33:07 PM org.apache.catalina.loader.WebappLoader buildClassPath
INFO: Unknown loader jdk.internal.loader.ClassLoaders$AppClassLoader@1b9e1916 class jdk.internal.loader.ClassLoaders$AppClassLoader
dez 19, 2017 4:33:08 PM com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra 2.1.14 ( 20121023-1153) for context '/jsf-livraria'
dez 19, 2017 4:33:09 PM com.sun.faces.spi.InjectionProviderFactory createInstance
INFO: JSF1048: PostConstruct/PreDestroy annotations present.  ManagedBeans methods marked with these annotations will have said annotations processed.
dez 19, 2017 4:33:09 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
dez 19, 2017 4:33:09 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
dez 19, 2017 4:33:09 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2803 ms
Gravando livro

O projeto rodou normalmente por enquanto. Alguem sabe me dizer o motivo do erro e como solucionar?

solução!

Carlos, tudo bem ?

um chute é que o tomcat 7 não dá suporte para java 9, fora que o java 9 muda toda a parte de configuração e tudo mais.

Recomendo usar o java 8.

Bom dia,

Desinstalei o Java 9 e instalei o Java 8 e rodou sem nenhum WARNING ou ERRO.

Pelo que vi teve muitas mudanças com o Java 9. Queria usar ele pois é o mais atualizado, mas estou tendo muita dificuldade.

Vou usar o Java 8 mesmo por enquanto :)

Muito obrigado!