Problema ao adicionar produto

8 respostas
kivervinicius

Bom dia pessoal, novamente estou com problema, rs

Eu qndo estava utilizando a versão do vraptor 3.1.1 funcionava normalmente o adicionar ele está anotado com @Post e @GetPath mas quando agora eu dou um post pelo formulario somente me retorna o erro 405 como se eu envia-se um method invalido.

Controller
/* Crud */
	
	@Post @Path("/produtos")
	public void adiciona(final Produto produto) {
		dao.salva(produto);
		result.redirectTo(this).lista();
	}
	
	
	@Get @Path("/produtos/edita/{id}/{nome}")
	public Produto edita(Long id){
		return dao.carrega(id);
	}
	
	@Delete	@Path("/produtos/{id}")
	public void remove(Long id) {
		Produto produto = dao.carrega(id);
		dao.remove(produto);
		result.redirectTo(this).lista();
	}
	
	@Put @Path("/produtos/{produto.id}")
	public void altera(Produto produto) {
		dao.atualiza(produto);
		result.redirectTo(this).lista();
	}
	
	
	/* View */
	@Path("/produtos/novo")
	public void formulario(){
	}
		
	@Get @Path("/produtos")
	public List<Produto> lista() {
		return dao.listaTudo();
	}
	
	
	public List<Produto> busca(String nome) {
		result.include("nome", nome);
		return dao.busca(nome);
	}
	
	@Get
	@Path("/produtos/busca.json")
	public void buscaJson(String q) {
		result.use(json()).withoutRoot()
				.from(dao.busca(q))
				.exclude("id", "descricao")
				.serialize();
		
	}
JSP
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
	<form action="<c:url value="/produtos"/>" method="POST">
	<fieldset><legend>Adicionar Produto</legend> 
		<label	for="nome">Nome:</label> 
		<input id="nome" type="text" name="produto.nome" /> <br/>
		<label for="descricao">Descrição:</label> 
		<textarea id="descricao" name="produto.descricao"></textarea><br/>
		<label for="preco">Preço:</label>
		<input id="preco" type="text" name="produto.preco"/><br/>
		<button type="submit">Enviar</button>
		</fieldset>
	</form>
</body>
</html>

8 Respostas

Lucas_Cavalcanti

estranho… você registrou a rota em post… tá com o log do vraptor habilitado? veja se na inicialização aparecem todos os métodos que vc criou

kivervinicius

Lucas, como faço pra habilita-lo?

Lucas_Cavalcanti

copie esse arquivo pra sua pasta src:

kivervinicius

Quando inicio o tomcat da essas informações

22/03/2012 13:47:55 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\Java\jre6\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files (x86)/Java/jre6/bin/client;C:/Program Files (x86)/Java/jre6/bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Embarcadero\RAD Studio\7.0\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\delphi\bpl;D:\TGA\EXE;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files (x86)\Java\jre6\bin;C:\delphi\jedi\;.
22/03/2012 13:47:55 org.apache.tomcat.util.digester.SetPropertiesRule begin
AVISO: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:VRaptor' did not find a matching property.
22/03/2012 13:47:55 org.apache.tomcat.util.digester.SetPropertiesRule begin
AVISO: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:vraptor-produtos' did not find a matching property.
22/03/2012 13:47:55 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
22/03/2012 13:47:55 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 366 ms
22/03/2012 13:47:55 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
22/03/2012 13:47:55 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
log4j:WARN No appenders could be found for logger (br.com.caelum.vraptor.config.BasicConfiguration).
log4j:WARN Please initialize the log4j system properly.
Abre Fabrica
13:47:57,304  INFO [BasicConfiguration  ] Using class br.com.caelum.vraptor.ioc.spring.SpringProvider as Container Provider
13:47:57,317  INFO [DefaultSpringLocator] No application context found
13:47:57,426  INFO [WebAppBootstrapFactory] No static WebAppBootstrap found.
13:47:57,426  INFO [BasicConfiguration  ] br.com.caelum.vraptor.scanning = null
13:47:57,530  INFO [AnnotationConfigWebApplicationContext] Refreshing Root WebApplicationContext: startup date [Thu Mar 22 13:47:57 GMT-04:00 2012]; root of context hierarchy
13:47:57,653  WARN [BaseComponents      ] There is neither commons-fileupload nor servlet3 handlers registered. If you are willing to upload a file, please add the commons-fileupload in your classpath or use a Servlet 3 Container
13:47:57,677  INFO [DefaultListableBeanFactory] Overriding bean definition for bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor': replacing [Root bean: class [org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Root bean: class [br.com.caelum.vraptor.ioc.spring.InjectionBeanPostProcessor]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]
13:47:57,742  INFO [DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@e2b07b: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,defaultMultipartConfig,defaultRouter,objenesisProxifier,defaultInterceptorHandlerFactory,defaultResourceTranslator,defaultRoutes,defaultDeserializers,defaultTypeNameExtractor,defaultMethodNotAllowedHandler,noRoutesConfiguration,paranamerNameProvider,defaultResourceNotFoundHandler,nullProxyInitializer,defaultRestDefaults,defaultTypeFinder,topologicalSortedInterceptorRegistry,defaultConverters,pathAnnotationRoutesParser,encodingHandlerFactory,interceptorListPriorToExecutionExtractor,XStreamXMLDeserializer,defaultAcceptHeaderToFormat,stereotypeHandler,converterHandler,interceptorStereotypeHandler,deserializesHandler,stereotypedBeansRegistrar,defaultSpringLocator,downloadInterceptor,defaultRepresentationResult,instantiateInterceptor,applicationConfiguration,defaultRestHeadersHandler,HTMLSerialization,exceptionHandlerInterceptor,defaultMethodInfo,defaultLogicResult,flashInterceptor,emptyResult,defaultPageResult,jstlLocalization,defaultRefererResult,parametersInstantiatorInterceptor,defaultExceptionMapper,defaultValidationViewsFactory,defaultPathResolver,jsonDeserializer,nullMultipartInterceptor,defaultFormatResolver,defaultHttpResult,executeMethodInterceptor,nullBeanValidator,XStreamJSONSerialization,resourceLookupInterceptor,deserializingInterceptor,XStreamJSONPSerialization,defaultResult,defaultValidator,emptyElementsRemoval,XStreamXMLSerialization,defaultStatus,outjectResult,replicatorOutjector,forwardToDefaultViewInterceptor,ognlParametersProvider,localeBasedDateConverter,doubleConverter,primitiveBooleanConverter,primitiveIntConverter,primitiveCharConverter,enumConverter,primitiveShortConverter,booleanConverter,longConverter,bigDecimalConverter,characterConverter,bigIntegerConverter,shortConverter,primitiveFloatConverter,primitiveByteConverter,primitiveLongConverter,byteConverter,stringConverter,primitiveDoubleConverter,localeBasedCalendarConverter,uploadedFileConverter,integerConverter,floatConverter,VRaptorRequestProvider,httpServletRequestProvider,httpServletResponseProvider,httpSessionProvider,defaultInterceptorStack,enhancedRequestExecution,org.springframework.aop.config.internalAutoProxyCreator,indexController]; root of factory hierarchy
13:47:57,814  INFO [DefaultConverters   ] Registering bundled converters
13:47:57,814 DEBUG [DefaultConverters   ] bundled converter to be registered: class br.com.caelum.vraptor.converter.LocaleBasedDateConverter
13:47:57,814 DEBUG [DefaultConverters   ] bundled converter to be registered: class br.com.caelum.vraptor.converter.DoubleConverter
13:47:57,814 DEBUG [DefaultConverters   ] bundled converter to be registered: class br.com.caelum.vraptor.converter.PrimitiveBooleanConverter
13:47:57,814 DEBUG [DefaultConverters   ] bundled converter to be registered: class br.com.caelum.vraptor.converter.PrimitiveIntConverter
13:47:57,836 DEBUG [DefaultConverters   ] bundled converter to be registered: class br.com.caelum.vraptor.converter.PrimitiveCharConverter
13:47:57,836 DEBUG [DefaultConverters   ] bundled converter to be registered: class br.com.caelum.vraptor.converter.EnumConverter
13:47:57,836 DEBUG [DefaultConverters   ] bundled converter to be registered: class br.com.caelum.vraptor.converter.PrimitiveShortConverter
13:47:57,836 DEBUG [DefaultConverters   ] bundled converter to be registered: class br.com.caelum.vraptor.converter.BooleanConverter
13:47:57,836 DEBUG [DefaultConverters   ] bundled converter to be registered: class br.com.caelum.vraptor.converter.LongConverter
13:47:57,846 DEBUG [DefaultConverters   ] bundled converter to be registered: class br.com.caelum.vraptor.converter.BigDecimalConverter
13:47:57,846 DEBUG [DefaultConverters   ] bundled converter to be registered: class br.com.caelum.vraptor.converter.CharacterConverter
13:47:57,846 DEBUG [DefaultConverters   ] bundled converter to be registered: class br.com.caelum.vraptor.converter.BigIntegerConverter
13:47:57,846 DEBUG [DefaultConverters   ] bundled converter to be registered: class br.com.caelum.vraptor.converter.ShortConverter
13:47:57,846 DEBUG [DefaultConverters   ] bundled converter to be registered: class br.com.caelum.vraptor.converter.PrimitiveFloatConverter
13:47:57,846 DEBUG [DefaultConverters   ] bundled converter to be registered: class br.com.caelum.vraptor.converter.PrimitiveByteConverter
13:47:57,846 DEBUG [DefaultConverters   ] bundled converter to be registered: class br.com.caelum.vraptor.converter.PrimitiveLongConverter
13:47:57,846 DEBUG [DefaultConverters   ] bundled converter to be registered: class br.com.caelum.vraptor.converter.ByteConverter
13:47:57,846 DEBUG [DefaultConverters   ] bundled converter to be registered: class br.com.caelum.vraptor.converter.StringConverter
13:47:57,846 DEBUG [DefaultConverters   ] bundled converter to be registered: class br.com.caelum.vraptor.converter.PrimitiveDoubleConverter
13:47:57,847 DEBUG [DefaultConverters   ] bundled converter to be registered: class br.com.caelum.vraptor.converter.LocaleBasedCalendarConverter
13:47:57,847 DEBUG [DefaultConverters   ] bundled converter to be registered: class br.com.caelum.vraptor.interceptor.multipart.UploadedFileConverter
13:47:57,847 DEBUG [DefaultConverters   ] bundled converter to be registered: class br.com.caelum.vraptor.converter.IntegerConverter
13:47:57,847 DEBUG [DefaultConverters   ] bundled converter to be registered: class br.com.caelum.vraptor.converter.FloatConverter
13:47:57,887 DEBUG [StereotypedBeansRegistrar] scanning class org.springframework.context.annotation.ConfigurationClassPostProcessor
13:47:57,887 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.ioc.spring.InjectionBeanPostProcessor
13:47:57,887 DEBUG [StereotypedBeansRegistrar] scanning class org.springframework.beans.factory.annotation.RequiredAnnotationBeanPostProcessor
13:47:57,887 DEBUG [StereotypedBeansRegistrar] scanning class org.springframework.context.annotation.CommonAnnotationBeanPostProcessor
13:47:57,887 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.interceptor.multipart.DefaultMultipartConfig
13:47:57,889 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.http.route.DefaultRouter
13:47:57,889 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.proxy.ObjenesisProxifier
13:47:57,889 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.core.DefaultInterceptorHandlerFactory
13:47:57,889 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.http.DefaultResourceTranslator
13:47:57,889 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.core.DefaultRoutes
13:47:57,889 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.deserialization.DefaultDeserializers
13:47:57,889 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.interceptor.DefaultTypeNameExtractor
13:47:57,889 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.resource.DefaultMethodNotAllowedHandler
13:47:57,889 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.http.route.NoRoutesConfiguration
13:47:57,889 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.http.ParanamerNameProvider
13:47:57,889 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.resource.DefaultResourceNotFoundHandler
13:47:57,889 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.serialization.NullProxyInitializer
13:47:57,889 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.restfulie.headers.DefaultRestDefaults
13:47:57,890 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.http.route.DefaultTypeFinder
13:47:57,890 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.interceptor.TopologicalSortedInterceptorRegistry
13:47:57,890 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.core.DefaultConverters
13:47:57,890 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.http.route.PathAnnotationRoutesParser
13:47:57,890 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.http.EncodingHandlerFactory
13:47:57,890 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.interceptor.InterceptorListPriorToExecutionExtractor
13:47:57,890 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.deserialization.XStreamXMLDeserializer
13:47:57,890 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.view.DefaultAcceptHeaderToFormat
13:47:57,890 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.ioc.ResourceHandler
13:47:57,890 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.ioc.ConverterHandler
13:47:57,890 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.ioc.InterceptorStereotypeHandler
13:47:57,890 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.deserialization.DeserializesHandler
13:47:57,890 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.ioc.spring.StereotypedBeansRegistrar
13:47:57,890 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.ioc.spring.DefaultSpringLocator
13:47:57,890 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.interceptor.download.DownloadInterceptor
13:47:57,890 DEBUG [InterceptorStereotypeHandler] Found interceptor for class br.com.caelum.vraptor.interceptor.download.DownloadInterceptor
13:47:57,898 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.serialization.DefaultRepresentationResult
13:47:57,898 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.interceptor.InstantiateInterceptor
13:47:57,898 DEBUG [InterceptorStereotypeHandler] Found interceptor for class br.com.caelum.vraptor.interceptor.InstantiateInterceptor
13:47:57,898 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.config.ApplicationConfiguration
13:47:57,898 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.restfulie.headers.DefaultRestHeadersHandler
13:47:57,898 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.serialization.HTMLSerialization
13:47:57,899 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor
13:47:57,899 DEBUG [InterceptorStereotypeHandler] Found interceptor for class br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor
13:47:57,899 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.core.DefaultMethodInfo
13:47:57,899 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.view.DefaultLogicResult
13:47:57,899 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.interceptor.FlashInterceptor
13:47:57,899 DEBUG [InterceptorStereotypeHandler] Found interceptor for class br.com.caelum.vraptor.interceptor.FlashInterceptor
13:47:57,899 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.view.EmptyResult
13:47:57,899 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.view.DefaultPageResult
13:47:57,899 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.core.JstlLocalization
13:47:57,899 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.view.DefaultRefererResult
13:47:57,899 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.interceptor.ParametersInstantiatorInterceptor
13:47:57,899 DEBUG [InterceptorStereotypeHandler] Found interceptor for class br.com.caelum.vraptor.interceptor.ParametersInstantiatorInterceptor
13:47:57,899 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.core.DefaultExceptionMapper
13:47:57,899 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.view.DefaultValidationViewsFactory
13:47:57,899 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.view.DefaultPathResolver
13:47:57,899 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.deserialization.JsonDeserializer
13:47:57,899 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.interceptor.multipart.NullMultipartInterceptor
13:47:57,900 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.http.DefaultFormatResolver
13:47:57,900 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.view.DefaultHttpResult
13:47:57,900 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.interceptor.ExecuteMethodInterceptor
13:47:57,900 DEBUG [InterceptorStereotypeHandler] Found interceptor for class br.com.caelum.vraptor.interceptor.ExecuteMethodInterceptor
13:47:57,900 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.validator.NullBeanValidator
13:47:57,900 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.serialization.xstream.XStreamJSONSerialization
13:47:57,900 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.interceptor.ResourceLookupInterceptor
13:47:57,900 DEBUG [InterceptorStereotypeHandler] Found interceptor for class br.com.caelum.vraptor.interceptor.ResourceLookupInterceptor
13:47:57,900 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.interceptor.DeserializingInterceptor
13:47:57,900 DEBUG [InterceptorStereotypeHandler] Found interceptor for class br.com.caelum.vraptor.interceptor.DeserializingInterceptor
13:47:57,900 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.serialization.xstream.XStreamJSONPSerialization
13:47:57,900 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.core.DefaultResult
13:47:57,900 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.validator.DefaultValidator
13:47:57,900 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.http.ognl.EmptyElementsRemoval
13:47:57,900 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.serialization.xstream.XStreamXMLSerialization
13:47:57,900 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.view.DefaultStatus
13:47:57,900 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.interceptor.OutjectResult
13:47:57,900 DEBUG [InterceptorStereotypeHandler] Found interceptor for class br.com.caelum.vraptor.interceptor.OutjectResult
13:47:57,900 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.validator.ReplicatorOutjector
13:47:57,900 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.interceptor.ForwardToDefaultViewInterceptor
13:47:57,900 DEBUG [InterceptorStereotypeHandler] Found interceptor for class br.com.caelum.vraptor.interceptor.ForwardToDefaultViewInterceptor
13:47:57,901 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.http.ognl.OgnlParametersProvider
13:47:57,901 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.converter.LocaleBasedDateConverter
13:47:57,901 DEBUG [ConverterHandler    ] Ignoring handling default converter class br.com.caelum.vraptor.converter.LocaleBasedDateConverter
13:47:57,901 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.converter.DoubleConverter
13:47:57,901 DEBUG [ConverterHandler    ] Ignoring handling default converter class br.com.caelum.vraptor.converter.DoubleConverter
13:47:57,901 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.converter.PrimitiveBooleanConverter
13:47:57,902 DEBUG [ConverterHandler    ] Ignoring handling default converter class br.com.caelum.vraptor.converter.PrimitiveBooleanConverter
13:47:57,902 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.converter.PrimitiveIntConverter
13:47:57,902 DEBUG [ConverterHandler    ] Ignoring handling default converter class br.com.caelum.vraptor.converter.PrimitiveIntConverter
13:47:57,902 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.converter.PrimitiveCharConverter
13:47:57,902 DEBUG [ConverterHandler    ] Ignoring handling default converter class br.com.caelum.vraptor.converter.PrimitiveCharConverter
13:47:57,902 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.converter.EnumConverter
13:47:57,903 DEBUG [ConverterHandler    ] Ignoring handling default converter class br.com.caelum.vraptor.converter.EnumConverter
13:47:57,903 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.converter.PrimitiveShortConverter
13:47:57,903 DEBUG [ConverterHandler    ] Ignoring handling default converter class br.com.caelum.vraptor.converter.PrimitiveShortConverter
13:47:57,903 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.converter.BooleanConverter
13:47:57,903 DEBUG [ConverterHandler    ] Ignoring handling default converter class br.com.caelum.vraptor.converter.BooleanConverter
13:47:57,903 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.converter.LongConverter
13:47:57,903 DEBUG [ConverterHandler    ] Ignoring handling default converter class br.com.caelum.vraptor.converter.LongConverter
13:47:57,904 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.converter.BigDecimalConverter
13:47:57,904 DEBUG [ConverterHandler    ] Ignoring handling default converter class br.com.caelum.vraptor.converter.BigDecimalConverter
13:47:57,904 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.converter.CharacterConverter
13:47:57,904 DEBUG [ConverterHandler    ] Ignoring handling default converter class br.com.caelum.vraptor.converter.CharacterConverter
13:47:57,904 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.converter.BigIntegerConverter
13:47:57,904 DEBUG [ConverterHandler    ] Ignoring handling default converter class br.com.caelum.vraptor.converter.BigIntegerConverter
13:47:57,904 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.converter.ShortConverter
13:47:57,905 DEBUG [ConverterHandler    ] Ignoring handling default converter class br.com.caelum.vraptor.converter.ShortConverter
13:47:57,905 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.converter.PrimitiveFloatConverter
13:47:57,905 DEBUG [ConverterHandler    ] Ignoring handling default converter class br.com.caelum.vraptor.converter.PrimitiveFloatConverter
13:47:57,905 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.converter.PrimitiveByteConverter
13:47:57,905 DEBUG [ConverterHandler    ] Ignoring handling default converter class br.com.caelum.vraptor.converter.PrimitiveByteConverter
13:47:57,906 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.converter.PrimitiveLongConverter
13:47:57,906 DEBUG [ConverterHandler    ] Ignoring handling default converter class br.com.caelum.vraptor.converter.PrimitiveLongConverter
13:47:57,906 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.converter.ByteConverter
13:47:57,906 DEBUG [ConverterHandler    ] Ignoring handling default converter class br.com.caelum.vraptor.converter.ByteConverter
13:47:57,906 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.converter.StringConverter
13:47:57,906 DEBUG [ConverterHandler    ] Ignoring handling default converter class br.com.caelum.vraptor.converter.StringConverter
13:47:57,906 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.converter.PrimitiveDoubleConverter
13:47:57,907 DEBUG [ConverterHandler    ] Ignoring handling default converter class br.com.caelum.vraptor.converter.PrimitiveDoubleConverter
13:47:57,907 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.converter.LocaleBasedCalendarConverter
13:47:57,907 DEBUG [ConverterHandler    ] Ignoring handling default converter class br.com.caelum.vraptor.converter.LocaleBasedCalendarConverter
13:47:57,907 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.interceptor.multipart.UploadedFileConverter
13:47:57,907 DEBUG [ConverterHandler    ] Ignoring handling default converter class br.com.caelum.vraptor.interceptor.multipart.UploadedFileConverter
13:47:57,907 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.converter.IntegerConverter
13:47:57,907 DEBUG [ConverterHandler    ] Ignoring handling default converter class br.com.caelum.vraptor.converter.IntegerConverter
13:47:57,908 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.converter.FloatConverter
13:47:57,910 DEBUG [ConverterHandler    ] Ignoring handling default converter class br.com.caelum.vraptor.converter.FloatConverter
13:47:57,911 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.core.RequestInfo
13:47:57,911 DEBUG [StereotypedBeansRegistrar] scanning interface br.com.caelum.vraptor.http.MutableRequest
13:47:57,911 DEBUG [StereotypedBeansRegistrar] scanning interface br.com.caelum.vraptor.http.MutableResponse
13:47:57,911 DEBUG [StereotypedBeansRegistrar] scanning interface javax.servlet.http.HttpSession
13:47:57,911 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.core.DefaultInterceptorStack
13:47:57,911 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.vraptor.core.EnhancedRequestExecution
13:47:57,911 DEBUG [StereotypedBeansRegistrar] scanning class org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator
13:47:57,911 DEBUG [StereotypedBeansRegistrar] scanning class br.com.caelum.online.loja.controlador.IndexController
13:47:57,911 DEBUG [ResourceHandler     ] Found resource: class br.com.caelum.online.loja.controlador.IndexController
13:47:57,922 DEBUG [ParanamerNameProvider] Found parameter names with paranamer for IndexController.root() as []
13:47:57,923 DEBUG [ParanamerNameProvider] Found parameter names with paranamer for IndexController.root() as []
13:47:57,924 DEBUG [DefaultParametersControl] For / retrieved / with {}
13:47:57,925  INFO [DefaultRouteBuilder ] /                                                 [ALL] -> IndexController.root()
13:47:57,925  INFO [VRaptor             ] VRaptor 3.3.1 successfuly initialized
22/03/2012 13:47:57 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
22/03/2012 13:47:57 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
22/03/2012 13:47:57 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/15  config=null
22/03/2012 13:47:57 org.apache.catalina.startup.Catalina start
INFO: Server startup in 2758 ms

Mas quando eu vou fazer o processo de adicionar que eu entro na jsp e clico em adicionar o mesmo não mostra mais nada no log, só na jsp

HTTP Status 405 -

type Status report

message

description The specified HTTP method is not allowed for the requested resource ().

Apache Tomcat/6.0.35
kivervinicius

O mais intrigante que o editar está funcionando corretamente :S

kivervinicius

Lucas, agora deu certo, eu retirei os jar de jstl e jsp e dei um clean no projeto e funcionou tudo, muito estranho isso, mas obrigado por enqnto

Lucas_Cavalcanti

acho que você colocou o log de outro projeto… esse é o log do blank project, não tem as coisas da sua aplicação

kivervinicius

Pois é lucas, foi só eu fazer o clean que começou a funcionar tdo de novo até o log.,

14:59:11,442 INFO [DefaultConverters ] Registering bundled converters 14:59:11,462 INFO [LinkToHandler ] Registering linkTo component 14:59:11,562 INFO [DefaultRouteBuilder ] /produtos [POST] -> ProdutoController.adiciona(Produto) 14:59:11,562 INFO [DefaultRouteBuilder ] /produtos [GET] -> ProdutoController.lista() 14:59:11,562 INFO [DefaultRouteBuilder ] /produtos/edita/{id}/{nome} [GET] -> ProdutoController.edita(Long) 14:59:11,562 INFO [DefaultRouteBuilder ] /produtos/{produto.id} [PUT] -> ProdutoController.altera(Produto) 14:59:11,562 INFO [DefaultRouteBuilder ] /produtos/novo [ALL] -> ProdutoController.formulario() 14:59:11,562 INFO [DefaultRouteBuilder ] /produto/busca [ALL] -> ProdutoController.busca(String) 14:59:11,562 INFO [DefaultRouteBuilder ] /produtos/busca.json [GET] -> ProdutoController.buscaJson(String) 14:59:11,562 INFO [DefaultRouteBuilder ] /produtos/{id} [DELETE] -> ProdutoController.remove(Long) 14:59:11,562 INFO [DefaultRouteBuilder ] /mundo/boasVindas [ALL] -> Mundo.boasVindas() 14:59:11,562 INFO [DefaultRouteBuilder ] /mundo/paises [ALL] -> Mundo.paises() 14:59:11,562 INFO [DefaultRouteBuilder ] /carrinho [POST] -> CarrinhoController.adiciona(Item) 14:59:11,562 INFO [VRaptor ] VRaptor 3.4.0 successfuly initialized

Criado 22 de março de 2012
Ultima resposta 22 de mar. de 2012
Respostas 8
Participantes 2