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

Erro 404

baixei o projeto importei para o eclipse e sempre da erro 404

16 respostas

Oi Thiago,

Você consegue acessar o tomcat só entrando no localhost:8080 ?

Se eu acessar o tomcate só entrando em localhist:8080 da o erro de 404 HTTP Status 404 - /

type Status report

message /

description The requested resource is not available.

Apache Tomcat/7.0.62

e acessando o projeto

HTTP Status 404 - /vraptor-produtos/

type Status report

message /vraptor-produtos/

description The requested resource is not available.

Apache Tomcat/7.0.62

Vai na aba servers do eclipse, de um pause no eclipse e um duplo clique em cima dele e vai abrir uma janela. Depois procure a opção Server Location e marque a opção Use Tomcat Installation (takes control of Tomcat installation).

Depois disso de um start no tomcat e tente acessar o localhost:8080

O apache funcionou mas o vraptor ainda da 404

HTTP Status 404 - /vraptor-produtos/

type Status report

message /vraptor-produtos/

description The requested resource is not available.

Apache Tomcat/7.0.62

abaixo o que aparece no console do eclipse

Jun 02, 2015 11:30:53 PM org.apache.tomcat.util.digester.SetPropertiesRule begin ADVERTÊNCIA: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:vraptor-produtos' did not find a matching property. Jun 02, 2015 11:30:53 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Server version: Apache Tomcat/7.0.62 Jun 02, 2015 11:30:53 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Server built: May 7 2015 17:14:55 UTC Jun 02, 2015 11:30:53 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Server number: 7.0.62.0 Jun 02, 2015 11:30:53 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: OS Name: Linux Jun 02, 2015 11:30:53 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: OS Version: 3.13.0-24-generic Jun 02, 2015 11:30:53 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Architecture: i386 Jun 02, 2015 11:30:53 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Java Home: /usr/lib/jvm/java-7-openjdk-i386/jre Jun 02, 2015 11:30:53 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: JVM Version: 1.7.0_75-b13 Jun 02, 2015 11:30:53 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: JVM Vendor: Oracle Corporation Jun 02, 2015 11:30:53 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: CATALINA_BASE: /home/thiago/curso java/apache-tomcat-7.0.62 Jun 02, 2015 11:30:53 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: CATALINA_HOME: /home/thiago/curso java/apache-tomcat-7.0.62 Jun 02, 2015 11:30:53 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Dcatalina.base=/home/thiago/curso java/apache-tomcat-7.0.62 Jun 02, 2015 11:30:53 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Dcatalina.home=/home/thiago/curso java/apache-tomcat-7.0.62 Jun 02, 2015 11:30:53 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Dwtp.deploy=/home/thiago/curso java/apache-tomcat-7.0.62/wtpwebapps Jun 02, 2015 11:30:53 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Djava.endorsed.dirs=/home/thiago/curso java/apache-tomcat-7.0.62/endorsed Jun 02, 2015 11:30:53 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Dfile.encoding=UTF-8 Jun 02, 2015 11:30:53 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFORMAÇÕES: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/server:/usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386:/usr/lib/jvm/java-7-openjdk-i386/jre/../lib/i386:/usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/client:/usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386::/usr/java/packages/lib/i386:/usr/lib/i386-linux-gnu/jni:/lib/i386-linux-gnu:/usr/lib/i386-linux-gnu:/usr/lib/jni:/lib:/usr/lib Jun 02, 2015 11:30:53 PM org.apache.coyote.AbstractProtocol init INFORMAÇÕES: Initializing ProtocolHandler ["http-bio-8080"] Jun 02, 2015 11:30:53 PM org.apache.coyote.AbstractProtocol init INFORMAÇÕES: Initializing ProtocolHandler ["ajp-bio-8009"] Jun 02, 2015 11:30:53 PM org.apache.catalina.startup.Catalina load INFORMAÇÕES: Initialization processed in 851 ms Jun 02, 2015 11:30:53 PM org.apache.catalina.core.StandardService startInternal INFORMAÇÕES: Starting service Catalina Jun 02, 2015 11:30:53 PM org.apache.catalina.core.StandardEngine startInternal INFORMAÇÕES: Starting Servlet Engine: Apache Tomcat/7.0.62 Jun 02, 2015 11:30:55 PM org.apache.catalina.startup.TldConfig execute INFORMAÇÕES: 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. log4j:WARN No appenders could be found for logger (org.jboss.logging). log4j:WARN Please initialize the log4j system properly. 23:31:07,756 INFO [DefaultConverters ] Registering bundled converters 23:31:07,773 INFO [DefaultConverters ] Registering bundled converters 23:31:07,782 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.CalendarConverter to class java.util.Calendar 23:31:07,783 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.PrimitiveDoubleConverter to double 23:31:07,783 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.IntegerConverter to class java.lang.Integer 23:31:07,817 DEBUG [InterceptorStereotypeHandler] Found interceptor for class br.com.caelum.vraptor.interceptor.FlashInterceptor 23:31:07,833 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.ByteConverter to class java.lang.Byte 23:31:07,835 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.PrimitiveShortConverter to short 23:31:07,835 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.ShortConverter to class java.lang.Short 23:31:07,835 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.PrimitiveFloatConverter to float 23:31:07,836 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.FloatConverter to class java.lang.Float 23:31:07,836 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.CharacterConverter to class java.lang.Character 23:31:07,836 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.EnumConverter to class java.lang.Enum 23:31:07,837 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.BigIntegerConverter to class java.math.BigInteger 23:31:07,837 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.observer.upload.UploadedFileConverter to interface br.com.caelum.vraptor.observer.upload.UploadedFile 23:31:07,838 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.PrimitiveBooleanConverter to boolean 23:31:07,838 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.BigDecimalConverter to class java.math.BigDecimal 23:31:07,838 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.DateConverter to class java.util.Date 23:31:07,839 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.LongConverter to class java.lang.Long 23:31:07,840 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.PrimitiveByteConverter to byte 23:31:07,840 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.PrimitiveCharConverter to char 23:31:07,841 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.PrimitiveIntConverter to int 23:31:07,842 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.BooleanConverter to class java.lang.Boolean 23:31:07,842 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.DoubleConverter to class java.lang.Double 23:31:07,842 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.PrimitiveLongConverter to long 23:31:07,843 DEBUG [InterceptorStereotypeHandler] Found interceptor for class br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor 23:31:07,843 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.StringConverter to class java.lang.String 23:31:07,858 DEBUG [InterceptorStackHandlersCache] Caching br.com.caelum.vraptor.interceptor.FlashInterceptor 23:31:07,883 DEBUG [InterceptorStackHandlersCache] Caching br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor 23:31:07,884 INFO [VRaptor ] VRaptor 4.0.0.Final successfuly initialized Jun 02, 2015 11:31:07 PM org.apache.catalina.startup.HostConfig deployDirectory INFORMAÇÕES: Deploying web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/manager Jun 02, 2015 11:31:08 PM org.apache.catalina.startup.HostConfig deployDirectory INFORMAÇÕES: Deployment of web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/manager has finished in 136 ms Jun 02, 2015 11:31:08 PM org.apache.catalina.startup.HostConfig deployDirectory INFORMAÇÕES: Deploying web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/docs Jun 02, 2015 11:31:08 PM org.apache.catalina.startup.HostConfig deployDirectory INFORMAÇÕES: Deployment of web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/docs has finished in 120 ms Jun 02, 2015 11:31:08 PM org.apache.catalina.startup.HostConfig deployDirectory INFORMAÇÕES: Deploying web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/examples Jun 02, 2015 11:31:09 PM org.apache.catalina.core.ApplicationContext log INFORMAÇÕES: ContextListener: contextInitialized() Jun 02, 2015 11:31:09 PM org.apache.catalina.core.ApplicationContext log INFORMAÇÕES: SessionListener: contextInitialized() Jun 02, 2015 11:31:09 PM org.apache.catalina.core.ApplicationContext log INFORMAÇÕES: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@1e47a51') Jun 02, 2015 11:31:09 PM org.apache.catalina.startup.HostConfig deployDirectory INFORMAÇÕES: Deployment of web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/examples has finished in 894 ms Jun 02, 2015 11:31:09 PM org.apache.catalina.startup.HostConfig deployDirectory INFORMAÇÕES: Deploying web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/host-manager Jun 02, 2015 11:31:09 PM org.apache.catalina.startup.HostConfig deployDirectory INFORMAÇÕES: Deployment of web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/host-manager has finished in 105 ms Jun 02, 2015 11:31:09 PM org.apache.catalina.startup.HostConfig deployDirectory INFORMAÇÕES: Deploying web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/ROOT Jun 02, 2015 11:31:09 PM org.apache.catalina.startup.HostConfig deployDirectory INFORMAÇÕES: Deployment of web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/ROOT has finished in 106 ms Jun 02, 2015 11:31:09 PM org.apache.coyote.AbstractProtocol start INFORMAÇÕES: Starting ProtocolHandler ["http-bio-8080"] Jun 02, 2015 11:31:09 PM org.apache.coyote.AbstractProtocol start INFORMAÇÕES: Starting ProtocolHandler ["ajp-bio-8009"] Jun 02, 2015 11:31:09 PM org.apache.catalina.startup.Catalina start INFORMAÇÕES: Server startup in 16078 ms 23:31:37,807 DEBUG [DefaultControllerTranslator] trying to access / 23:31:37,835 DEBUG [VRaptor ] VRaptor ended the request 23:34:09,192 DEBUG [DefaultControllerTranslator] trying to access / 23:34:09,192 DEBUG [VRaptor ] VRaptor ended the request 23:35:53,800 DEBUG [DefaultControllerTranslator] trying to access / 23:35:53,800 DEBUG [VRaptor ] VRaptor ended the request

23:40:03,117 DEBUG [DefaultControllerTranslator] trying to access / 23:40:03,187 DEBUG [VRaptor ] VRaptor ended the request

e continua 404 ainda não criei nenhuma classe

Thiago

Parece que o vraptor está subindo normalmente pelo que vi no log. Agora você tem seguir com os exercícios para criar o controller necessário.

Faça isso e depois me fala se deu certo.

Fiz o primeiro exercicio e continua o mesmo erro

solução!
Jun 04, 2015 1:09:37 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
ADVERTÊNCIA: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:vraptor-produtos' did not find a matching property.
Jun 04, 2015 1:09:37 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Server version:        Apache Tomcat/7.0.62
Jun 04, 2015 1:09:37 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Server built:          May 7 2015 17:14:55 UTC
Jun 04, 2015 1:09:37 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Server number:         7.0.62.0
Jun 04, 2015 1:09:37 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: OS Name:               Linux
Jun 04, 2015 1:09:37 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: OS Version:            3.13.0-24-generic
Jun 04, 2015 1:09:37 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Architecture:          i386
Jun 04, 2015 1:09:37 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Java Home:             /usr/lib/jvm/java-7-openjdk-i386/jre
Jun 04, 2015 1:09:37 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: JVM Version:           1.7.0_75-b13
Jun 04, 2015 1:09:37 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: JVM Vendor:            Oracle Corporation
Jun 04, 2015 1:09:37 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: CATALINA_BASE:         /home/thiago/curso java/apache-tomcat-7.0.62
Jun 04, 2015 1:09:37 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: CATALINA_HOME:         /home/thiago/curso java/apache-tomcat-7.0.62
Jun 04, 2015 1:09:37 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dcatalina.base=/home/thiago/curso java/apache-tomcat-7.0.62
Jun 04, 2015 1:09:37 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dcatalina.home=/home/thiago/curso java/apache-tomcat-7.0.62
Jun 04, 2015 1:09:37 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dwtp.deploy=/home/thiago/curso java/apache-tomcat-7.0.62/wtpwebapps
Jun 04, 2015 1:09:37 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Djava.endorsed.dirs=/home/thiago/curso java/apache-tomcat-7.0.62/endorsed
Jun 04, 2015 1:09:37 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dfile.encoding=UTF-8
Jun 04, 2015 1:09:37 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFORMAÇÕES: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/server:/usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386:/usr/lib/jvm/java-7-openjdk-i386/jre/../lib/i386:/usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/client:/usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386::/usr/java/packages/lib/i386:/usr/lib/i386-linux-gnu/jni:/lib/i386-linux-gnu:/usr/lib/i386-linux-gnu:/usr/lib/jni:/lib:/usr/lib
Jun 04, 2015 1:09:37 PM org.apache.coyote.AbstractProtocol init
INFORMAÇÕES: Initializing ProtocolHandler ["http-bio-8080"]
Jun 04, 2015 1:09:37 PM org.apache.coyote.AbstractProtocol init
INFORMAÇÕES: Initializing ProtocolHandler ["ajp-bio-8009"]
Jun 04, 2015 1:09:37 PM org.apache.catalina.startup.Catalina load
INFORMAÇÕES: Initialization processed in 1057 ms
Jun 04, 2015 1:09:37 PM org.apache.catalina.core.StandardService startInternal
INFORMAÇÕES: Starting service Catalina
Jun 04, 2015 1:09:37 PM org.apache.catalina.core.StandardEngine startInternal
INFORMAÇÕES: Starting Servlet Engine: Apache Tomcat/7.0.62
Jun 04, 2015 1:09:40 PM org.apache.catalina.startup.TldConfig execute
INFORMAÇÕES: 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.
log4j:WARN No appenders could be found for logger (org.jboss.logging).
log4j:WARN Please initialize the log4j system properly.
13:09:54,249  INFO [DefaultConverters   ] Registering bundled converters
13:09:54,272  INFO [DefaultConverters   ] Registering bundled converters
13:09:54,282 DEBUG [DefaultConverters   ] adding converter class br.com.caelum.vraptor.converter.CalendarConverter to class java.util.Calendar
13:09:54,283 DEBUG [DefaultConverters   ] adding converter class br.com.caelum.vraptor.converter.PrimitiveDoubleConverter to double
13:09:54,283 DEBUG [DefaultConverters   ] adding converter class br.com.caelum.vraptor.converter.IntegerConverter to class java.lang.Integer
13:09:54,340 DEBUG [InterceptorStereotypeHandler] Found interceptor for class br.com.caelum.vraptor.interceptor.FlashInterceptor
13:09:54,359 DEBUG [DefaultConverters   ] adding converter class br.com.caelum.vraptor.converter.ByteConverter to class java.lang.Byte
13:09:54,360 DEBUG [DefaultConverters   ] adding converter class br.com.caelum.vraptor.converter.PrimitiveShortConverter to short
13:09:54,360 DEBUG [DefaultConverters   ] adding converter class br.com.caelum.vraptor.converter.ShortConverter to class java.lang.Short
13:09:54,365 DEBUG [DefaultConverters   ] adding converter class br.com.caelum.vraptor.converter.PrimitiveFloatConverter to float
13:09:54,366 DEBUG [DefaultConverters   ] adding converter class br.com.caelum.vraptor.converter.FloatConverter to class java.lang.Float
13:09:54,369 DEBUG [DefaultConverters   ] adding converter class br.com.caelum.vraptor.converter.CharacterConverter to class java.lang.Character
13:09:54,370 DEBUG [DefaultConverters   ] adding converter class br.com.caelum.vraptor.converter.EnumConverter to class java.lang.Enum
13:09:54,370 DEBUG [DefaultConverters   ] adding converter class br.com.caelum.vraptor.converter.BigIntegerConverter to class java.math.BigInteger
13:09:54,370 DEBUG [DefaultConverters   ] adding converter class br.com.caelum.vraptor.observer.upload.UploadedFileConverter to interface br.com.caelum.vraptor.observer.upload.UploadedFile
13:09:54,371 DEBUG [DefaultConverters   ] adding converter class br.com.caelum.vraptor.converter.PrimitiveBooleanConverter to boolean
13:09:54,371 DEBUG [DefaultConverters   ] adding converter class br.com.caelum.vraptor.converter.BigDecimalConverter to class java.math.BigDecimal
13:09:54,372 DEBUG [DefaultConverters   ] adding converter class br.com.caelum.vraptor.converter.DateConverter to class java.util.Date
13:09:54,378 DEBUG [DefaultConverters   ] adding converter class br.com.caelum.vraptor.converter.LongConverter to class java.lang.Long
13:09:54,379 DEBUG [DefaultConverters   ] adding converter class br.com.caelum.vraptor.converter.PrimitiveByteConverter to byte
13:09:54,379 DEBUG [DefaultConverters   ] adding converter class br.com.caelum.vraptor.converter.PrimitiveCharConverter to char
13:09:54,387 DEBUG [DefaultConverters   ] adding converter class br.com.caelum.vraptor.converter.PrimitiveIntConverter to int
13:09:54,388 DEBUG [DefaultConverters   ] adding converter class br.com.caelum.vraptor.converter.BooleanConverter to class java.lang.Boolean
13:09:54,388 DEBUG [DefaultConverters   ] adding converter class br.com.caelum.vraptor.converter.DoubleConverter to class java.lang.Double
13:09:54,389 DEBUG [DefaultConverters   ] adding converter class br.com.caelum.vraptor.converter.PrimitiveLongConverter to long
13:09:54,389 DEBUG [InterceptorStereotypeHandler] Found interceptor for class br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor
13:09:54,390 DEBUG [DefaultConverters   ] adding converter class br.com.caelum.vraptor.converter.StringConverter to class java.lang.String
13:09:54,411 DEBUG [InterceptorStackHandlersCache] Caching br.com.caelum.vraptor.interceptor.FlashInterceptor 
13:09:54,479 DEBUG [InterceptorStackHandlersCache] Caching br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor 
13:09:54,480  INFO [VRaptor             ] VRaptor 4.0.0.Final successfuly initialized
Jun 04, 2015 1:09:54 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deploying web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/manager
Jun 04, 2015 1:09:54 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deployment of web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/manager has finished in 225 ms
Jun 04, 2015 1:09:54 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deploying web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/docs
Jun 04, 2015 1:09:54 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deployment of web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/docs has finished in 132 ms
Jun 04, 2015 1:09:54 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deploying web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/examples
Jun 04, 2015 1:09:55 PM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: ContextListener: contextInitialized()
Jun 04, 2015 1:09:55 PM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: SessionListener: contextInitialized()
Jun 04, 2015 1:09:55 PM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@1222f41')
Jun 04, 2015 1:09:55 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deployment of web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/examples has finished in 486 ms
Jun 04, 2015 1:09:55 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deploying web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/host-manager
Jun 04, 2015 1:09:55 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deployment of web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/host-manager has finished in 115 ms
Jun 04, 2015 1:09:55 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deploying web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/ROOT
Jun 04, 2015 1:09:55 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deployment of web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/ROOT has finished in 115 ms
Jun 04, 2015 1:09:55 PM org.apache.coyote.AbstractProtocol start
INFORMAÇÕES: Starting ProtocolHandler ["http-bio-8080"]
Jun 04, 2015 1:09:55 PM org.apache.coyote.AbstractProtocol start
INFORMAÇÕES: Starting ProtocolHandler ["ajp-bio-8009"]
Jun 04, 2015 1:09:55 PM org.apache.catalina.startup.Catalina start
INFORMAÇÕES: Server startup in 18062 ms
13:10:33,296 DEBUG [DefaultControllerTranslator] trying to access /
13:10:33,379 DEBUG [VRaptor             ] VRaptor ended the request
13:10:38,364 DEBUG [DefaultControllerTranslator] trying to access /
13:10:38,364 DEBUG [VRaptor             ] VRaptor ended the request

pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>br.com.caelum</groupId>
    <artifactId>vraptor-produtos</artifactId>
    <version>1.0.0</version>
    <packaging>war</packaging>

    <description>Um projeto de produtos e estoque com VRaptor 4</description>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>br.com.caelum</groupId>
            <artifactId>vraptor</artifactId>
            <version>4.0.0.Final</version>
        </dependency>

<!--         <dependency> -->
<!--             <groupId>br.com.caelum.vraptor</groupId> -->
<!--             <artifactId>vraptor-jpa</artifactId> -->
<!--             <version>4.0.0-Final</version> -->
<!--         </dependency> -->

<!--         <dependency> -->
<!--             <groupId>br.com.caelum.vraptor</groupId> -->
<!--             <artifactId>vraptor-simplemail</artifactId> -->
<!--             <version>4.0.0-RC2</version> -->
<!--         </dependency> -->

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator-cdi</artifactId>
            <version>5.0.2.Final</version>
        </dependency>

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>4.3.0.Final</version>
        </dependency>

        <dependency>
            <groupId>org.hsqldb</groupId>
            <artifactId>hsqldb</artifactId>
            <version>2.3.0</version>
        </dependency>

        <dependency>
            <groupId>org.jboss.weld.servlet</groupId>
            <artifactId>weld-servlet</artifactId>
            <version>2.1.1.Final</version>
        </dependency>

        <dependency>
            <groupId>javax.el</groupId>
            <artifactId>el-api</artifactId>
            <version>2.2</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.6.0</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.6.0</version>
        </dependency>
    </dependencies>

    <build>
        <finalName>vraptor-produtos</finalName>
        <outputDirectory>${basedir}/src/main/webapp/WEB-INF/classes</outputDirectory>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-eclipse-plugin</artifactId>
                <version>2.8</version>
                <configuration>
                    <downloadSources>true</downloadSources>
                    <downloadJavadocs>true</downloadJavadocs>
                    <wtpversion>2.0</wtpversion>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.4</version>
            </plugin>

            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.1</version>
            </plugin>

            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>maven-jetty-plugin</artifactId>
                <version>6.1.26</version>
                <configuration>
                    <scanIntervalSeconds>3</scanIntervalSeconds>
                    <stopKey>foo</stopKey>
                    <stopPort>9999</stopPort>
                    <webAppConfig>
                        <contextPath>/</contextPath>
                    </webAppConfig>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8</version>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.3</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <configuration>
                            <descriptors>
                                <descriptor>assembly.xml</descriptor>
                            </descriptors>
                        </configuration>
                        <goals>
                            <goal>assembly</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
package br.com.caelum.vraptor.controller;

import java.util.List;

import javax.persistence.EntityManager;

import br.com.caelum.vraptor.Controller;
import br.com.caelum.vraptor.Path;
import br.com.caelum.vraptor.dao.ProdutoDao;
import br.com.caelum.vraptor.model.Produto;
import br.com.caelum.vraptor.util.JPAUtil;

@Controller
public class ProdutoController {
    @Path("/")
    public void inicio(){

    }

    @Path("/produto/sobre")
    public void sobre() {
    }

    @Path("/produto/lista")
    public List<Produto> lista() {
        EntityManager em = JPAUtil.criaEntityManager();
        ProdutoDao produtoDao = new ProdutoDao(em);
        return produtoDao.lista();
    }
}

e criei em WEB-INF/jsp/produtos/sobre.jsp,inicio.jsp,lista.jsp

Mesmo assim não funciona e não acho erro no console preciso de ajuda

Alguem pode me ajudar

Olá Thiago, tudo bem? Você disse que criou a JSP assim:

WEB-INF/jsp/produtos/sobre.jsp,inicio.jsp,lista.jsp

Mas como seu controller chama ProdutoController, no singular, precisa ser:

WEB-INF/jsp/produto/sobre.jsp,inicio.jsp,lista.jsp

Tenta renomear a pasta pra produto e ver se funciona. Um abraço

Continua dando erro .Alguém pode me ajudar???

Oi Thiago, tudo bem? Você testou fazer a alteração que eu sugeri?

Se sim, o que aconteceu? Como está a sua estrutura de pastas agora?

Esta assim

WEB-INF/jsp/produto/inicio.jsp

meu controler package br.com.caelum.vraptor.controller;

import br.com.caelum.vraptor.Controller; import br.com.caelum.vraptor.Path; @Controller public class ProdutoController { @Path("/") public void inicio() { System.out.println("teste");

}

}

meu console Dez 02, 2015 2:50:19 PM org.apache.tomcat.util.digester.SetPropertiesRule begin ADVERTÊNCIA: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:vraptor-produtos' did not find a matching property. Dez 02, 2015 2:50:19 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Server version: Apache Tomcat/7.0.62 Dez 02, 2015 2:50:19 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Server built: May 7 2015 17:14:55 UTC Dez 02, 2015 2:50:19 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Server number: 7.0.62.0 Dez 02, 2015 2:50:19 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: OS Name: Linux Dez 02, 2015 2:50:19 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: OS Version: 3.13.0-24-generic Dez 02, 2015 2:50:19 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Architecture: i386 Dez 02, 2015 2:50:19 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Java Home: /usr/lib/jvm/java-7-openjdk-i386/jre Dez 02, 2015 2:50:19 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: JVM Version: 1.7.0_75-b13 Dez 02, 2015 2:50:19 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: JVM Vendor: Oracle Corporation Dez 02, 2015 2:50:19 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: CATALINA_BASE: /home/thiago/curso java/apache-tomcat-7.0.62 Dez 02, 2015 2:50:19 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: CATALINA_HOME: /home/thiago/curso java/apache-tomcat-7.0.62 Dez 02, 2015 2:50:19 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Dcatalina.base=/home/thiago/curso java/apache-tomcat-7.0.62 Dez 02, 2015 2:50:19 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Dcatalina.home=/home/thiago/curso java/apache-tomcat-7.0.62 Dez 02, 2015 2:50:19 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Dwtp.deploy=/home/thiago/curso java/apache-tomcat-7.0.62/wtpwebapps Dez 02, 2015 2:50:19 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Djava.endorsed.dirs=/home/thiago/curso java/apache-tomcat-7.0.62/endorsed Dez 02, 2015 2:50:19 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Dfile.encoding=UTF-8 Dez 02, 2015 2:50:19 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFORMAÇÕES: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/server:/usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386:/usr/lib/jvm/java-7-openjdk-i386/jre/../lib/i386:/usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/client:/usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386::/usr/java/packages/lib/i386:/usr/lib/i386-linux-gnu/jni:/lib/i386-linux-gnu:/usr/lib/i386-linux-gnu:/usr/lib/jni:/lib:/usr/lib Dez 02, 2015 2:50:19 PM org.apache.coyote.AbstractProtocol init INFORMAÇÕES: Initializing ProtocolHandler ["http-bio-8080"] Dez 02, 2015 2:50:19 PM org.apache.coyote.AbstractProtocol init INFORMAÇÕES: Initializing ProtocolHandler ["ajp-bio-8009"] Dez 02, 2015 2:50:19 PM org.apache.catalina.startup.Catalina load INFORMAÇÕES: Initialization processed in 900 ms Dez 02, 2015 2:50:19 PM org.apache.catalina.core.StandardService startInternal INFORMAÇÕES: Starting service Catalina Dez 02, 2015 2:50:19 PM org.apache.catalina.core.StandardEngine startInternal INFORMAÇÕES: Starting Servlet Engine: Apache Tomcat/7.0.62 Dez 02, 2015 2:50:21 PM org.apache.catalina.startup.TldConfig execute INFORMAÇÕES: 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. log4j:WARN No appenders could be found for logger (org.jboss.logging). log4j:WARN Please initialize the log4j system properly. 14:50:29,908 INFO [DefaultConverters ] Registering bundled converters 14:50:29,934 INFO [DefaultConverters ] Registering bundled converters 14:50:29,936 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.CalendarConverter to class java.util.Calendar 14:50:29,937 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.PrimitiveDoubleConverter to double 14:50:29,937 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.IntegerConverter to class java.lang.Integer 14:50:29,990 DEBUG [InterceptorStereotypeHandler] Found interceptor for class br.com.caelum.vraptor.interceptor.FlashInterceptor 14:50:30,007 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.ByteConverter to class java.lang.Byte 14:50:30,008 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.PrimitiveShortConverter to short 14:50:30,008 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.ShortConverter to class java.lang.Short 14:50:30,008 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.PrimitiveFloatConverter to float 14:50:30,009 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.FloatConverter to class java.lang.Float 14:50:30,009 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.CharacterConverter to class java.lang.Character 14:50:30,009 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.EnumConverter to class java.lang.Enum 14:50:30,022 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.BigIntegerConverter to class java.math.BigInteger 14:50:30,022 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.observer.upload.UploadedFileConverter to interface br.com.caelum.vraptor.observer.upload.UploadedFile 14:50:30,023 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.PrimitiveBooleanConverter to boolean 14:50:30,023 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.BigDecimalConverter to class java.math.BigDecimal 14:50:30,024 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.DateConverter to class java.util.Date 14:50:30,025 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.LongConverter to class java.lang.Long 14:50:30,025 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.PrimitiveByteConverter to byte 14:50:30,026 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.PrimitiveCharConverter to char 14:50:30,026 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.PrimitiveIntConverter to int 14:50:30,027 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.BooleanConverter to class java.lang.Boolean 14:50:30,027 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.DoubleConverter to class java.lang.Double 14:50:30,028 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.PrimitiveLongConverter to long 14:50:30,028 DEBUG [InterceptorStereotypeHandler] Found interceptor for class br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor 14:50:30,032 DEBUG [DefaultConverters ] adding converter class br.com.caelum.vraptor.converter.StringConverter to class java.lang.String 14:50:30,045 DEBUG [InterceptorStackHandlersCache] Caching br.com.caelum.vraptor.interceptor.FlashInterceptor 14:50:30,103 DEBUG [InterceptorStackHandlersCache] Caching br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor 14:50:30,104 INFO [VRaptor ] VRaptor 4.0.0.Final successfuly initialized Dez 02, 2015 2:50:30 PM org.apache.catalina.startup.HostConfig deployDirectory INFORMAÇÕES: Deploying web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/manager Dez 02, 2015 2:50:30 PM org.apache.catalina.startup.HostConfig deployDirectory INFORMAÇÕES: Deployment of web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/manager has finished in 108 ms Dez 02, 2015 2:50:30 PM org.apache.catalina.startup.HostConfig deployDirectory INFORMAÇÕES: Deploying web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/docs Dez 02, 2015 2:50:30 PM org.apache.catalina.startup.HostConfig deployDirectory INFORMAÇÕES: Deployment of web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/docs has finished in 69 ms Dez 02, 2015 2:50:30 PM org.apache.catalina.startup.HostConfig deployDirectory INFORMAÇÕES: Deploying web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/examples Dez 02, 2015 2:50:30 PM org.apache.catalina.core.ApplicationContext log INFORMAÇÕES: ContextListener: contextInitialized() Dez 02, 2015 2:50:30 PM org.apache.catalina.core.ApplicationContext log INFORMAÇÕES: SessionListener: contextInitialized() Dez 02, 2015 2:50:30 PM org.apache.catalina.core.ApplicationContext log INFORMAÇÕES: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@1f4bb12') Dez 02, 2015 2:50:30 PM org.apache.catalina.startup.HostConfig deployDirectory INFORMAÇÕES: Deployment of web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/examples has finished in 341 ms Dez 02, 2015 2:50:30 PM org.apache.catalina.startup.HostConfig deployDirectory INFORMAÇÕES: Deploying web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/host-manager Dez 02, 2015 2:50:30 PM org.apache.catalina.startup.HostConfig deployDirectory INFORMAÇÕES: Deployment of web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/host-manager has finished in 43 ms Dez 02, 2015 2:50:30 PM org.apache.catalina.startup.HostConfig deployDirectory INFORMAÇÕES: Deploying web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/ROOT Dez 02, 2015 2:50:30 PM org.apache.catalina.startup.HostConfig deployDirectory INFORMAÇÕES: Deployment of web application directory /home/thiago/curso java/apache-tomcat-7.0.62/webapps/ROOT has finished in 38 ms Dez 02, 2015 2:50:30 PM org.apache.coyote.AbstractProtocol start INFORMAÇÕES: Starting ProtocolHandler ["http-bio-8080"] Dez 02, 2015 2:50:30 PM org.apache.coyote.AbstractProtocol start INFORMAÇÕES: Starting ProtocolHandler ["ajp-bio-8009"] Dez 02, 2015 2:50:30 PM org.apache.catalina.startup.Catalina start INFORMAÇÕES: Server startup in 11637 ms 14:50:52,916 DEBUG [DefaultControllerTranslator] trying to access / 14:50:52,942 DEBUG [VRaptor ] VRaptor ended the request

Oi Thiago, quer compartilhar essa aplicação comigo pra eu dar uma olhada no código todo? Tudo parece certo nos trechos que você enviou por aqui. Se quiser, me mande por email ou coloque em algum dropbox ou github da vida e compartilhe o link. Meu email é rodrigo.turini@caelum.com.br.

Te enviei o código todo por email

Oi Thiago, tudo bem? Encontrei o problema.

Por alguma razão o seu projeto está sem o arquivo beans.xml, que é o responsável por ativar o CDI.

https://github.com/alura-cursos/desenvolvimento-web-com-vraptor-4/blob/master/src/main/resources/META-INF/beans.xml

basta copiar esse arquivo dentro da sua pasta META-INF que vai funcionar