VRaptor 3 + GenericController [RESOLVIDO]

Estou trabalho com GenericController nos meus controladores so que nos metodos adiciona tenho que fazer override em meu controlador alguem poderia me explicar como poderia manipular isso vi que no meu console imprimi isso quando eu nao sobrescrevo o metodo no controlador:
INFO: /cadindexador [POST] -> GenericoController.adiciona(Object)

E tambem acho eu quem monta isso e o DefaultRouteBuilder e extendi a classe PathAnnotationRoutesParser e fiz algumas customizacao se alguem puder me ajudar

@Component
@ApplicationScoped
public class CustomPathAnotationRoutes extends PathAnnotationRoutesParser {
	private final Router router;
	
	public CustomPathAnotationRoutes(Router router) {
		super(router);
		// TODO Auto-generated constructor stub
		this.router = router;
	}
	
	@Override
	protected String defaultUriFor(String controllerName, String methodName) {
		// TODO Auto-generated method stub
		if ((methodName.equals("adiciona")) || (methodName.equals("deletar")) || (methodName.equals("formulario"))) {
			return controllerName.toLowerCase();
		} else {
			if ((methodName.equals("localizar")) || (methodName.equals("lista"))) {
				return super.defaultUriFor(controllerName, methodName).toLowerCase();				
			} else {
				return super.defaultUriFor(controllerName, methodName);
			}
		}
	}
	
	@Override
	protected List<Route> registerRulesFor(Class<?> baseType) {
		// TODO Auto-generated method stub
		// TESTE
		ParameterizedType parameterizedType = (ParameterizedType)baseType.getGenericSuperclass();
		System.out.println((Class)parameterizedType.getActualTypeArguments()[0]);
		System.out.println(baseType.getName());
		
		List<Route> routes = new ArrayList<Route>();
		for (Method javaMethod : baseType.getMethods()) {
			if (isEligible(javaMethod)) {
				System.out.println(baseType.getName());				
				String[] uris = getURIsFor(javaMethod, baseType);
				for (String uri : uris) {
					RouteBuilder rule = this.router.builderFor(uri);
					Boolean ruleWith = false;
					for (HttpMethod m : HttpMethod.values()) {
						if (javaMethod.isAnnotationPresent(m.getAnnotation())) {
							rule.with(m);
							ruleWith = true;							
						}
					}
					//CODIFICACAO JVDS
					if ((!ruleWith) && baseType.getSuperclass().getSimpleName().equals("GenericoController")) {
						for (Method m : baseType.getSuperclass().getMethods()) {
							if (m.getName().equals(javaMethod.getName())) {
								for (HttpMethod j : HttpMethod.values()) {
									if (m.isAnnotationPresent(j.getAnnotation())) {
										rule.with(j);
									}
								}
								
							}
						}
					}
					//
					if (javaMethod.isAnnotationPresent(Path.class)) {
						rule.withPriority(javaMethod.getAnnotation(Path.class).priority());
					}
					rule.is(baseType, javaMethod);
					rule.build();
					routes.add(rule.build());
				}
			}
		}
		return routes;				
	}
}

Obrigado !!!
JVDS

olá,

qual é o erro que dá se vc não sobrescreve o método adiciona?

de qqer forma, baseType.getMethods() já inclui o GenericController.class.getMethods() (qdo existe a herança), vc não precisava ter customizado o método registerRulesFor.

[quote=Lucas Cavalcanti]olá,

qual é o erro que dá se vc não sobrescreve o método adiciona?

de qqer forma, baseType.getMethods() já inclui o GenericController.class.getMethods() (qdo existe a herança), vc não precisava ter customizado o método registerRulesFor.[/quote]

A exception que tomo e esta quando nao sobrescrevo o metodo adiciona no controlador.

br.com.caelum.vraptor.InterceptionException: exception raised, check root cause for details: java.lang.IllegalArgumentException: attempt to create saveOrUpdate event with null entity
	at br.com.caelum.vraptor.interceptor.ExecuteMethodInterceptor.intercept(ExecuteMethodInterceptor.java:86)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor.intercept(ExceptionHandlerInterceptor.java:69)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.core.LazyInterceptorHandler.execute(LazyInterceptorHandler.java:61)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.interceptor.ParametersInstantiatorInterceptor.intercept(ParametersInstantiatorInterceptor.java:90)
	at br.com.caelum.vraptor.core.LazyInterceptorHandler.execute(LazyInterceptorHandler.java:59)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.interceptor.InstantiateInterceptor.intercept(InstantiateInterceptor.java:42)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.interceptor.InterceptorListPriorToExecutionExtractor.intercept(InterceptorListPriorToExecutionExtractor.java:44)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.interceptor.FlashInterceptor.intercept(FlashInterceptor.java:81)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.interceptor.ResourceLookupInterceptor.intercept(ResourceLookupInterceptor.java:67)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:56)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.core.DefaultRequestExecution.execute(DefaultRequestExecution.java:70)
	at br.com.caelum.vraptor.VRaptor$1.insideRequest(VRaptor.java:92)
	at br.com.caelum.vraptor.ioc.spring.SpringProvider.provideForRequest(SpringProvider.java:56)
	at br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:89)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
	at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.IllegalArgumentException: attempt to create saveOrUpdate event with null entity
	at org.hibernate.event.SaveOrUpdateEvent.<init>(SaveOrUpdateEvent.java:63)
	at org.hibernate.event.SaveOrUpdateEvent.<init>(SaveOrUpdateEvent.java:46)
	at org.hibernate.impl.SessionImpl.save(SessionImpl.java:701)
	at org.hibernate.impl.SessionImpl.save(SessionImpl.java:697)
	at org.springframework.orm.hibernate3.HibernateTemplate$12.doInHibernate(HibernateTemplate.java:686)
	at org.springframework.orm.hibernate3.HibernateTemplate$12.doInHibernate(HibernateTemplate.java:1)
	at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
	at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
	at org.springframework.orm.hibernate3.HibernateTemplate.save(HibernateTemplate.java:683)
	at br.com.jvds.telecon.spring.dao.DaoHibernateSpring.adiciona(DaoHibernateSpring.java:32)
	at br.com.jvds.telecon.controller.GenericoController.adiciona(GenericoController.java:43)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at br.com.caelum.vraptor.interceptor.ExecuteMethodInterceptor.intercept(ExecuteMethodInterceptor.java:57)
	... 40 more

Obrigado !!!
JVDS

certo, isso quer dizer que o VRaptor tá passando null pro método adiciona…

como vc está passando os parâmetros na requisição?
produto.nome=Banana
ou
object.nome=Banana
(onde object é o nome do parametro do metodo adiciona no GenericController)

[quote=Lucas Cavalcanti]certo, isso quer dizer que o VRaptor tá passando null pro método adiciona…

como vc está passando os parâmetros na requisição?
produto.nome=Banana
ou
object.nome=Banana
(onde object é o nome do parametro do metodo adiciona no GenericController)[/quote]

Nos jsp meus estao com o nome real das entidades ou seja na input name=“produto.nome”

Ok

o VRaptor só vai conseguir popular usando o nome do parametro do GenericController…

mas vc pode hackear isso :wink:
crie uma classe igual a essa:

e na linha 94 vc vê se é a lógica adiciona (ou atualiza) do
GenericController, e nesse caso use o nome da classe (method.getResource().getType().getSimpleName() - “Controller”, primeira minuscula)

[quote=Lucas Cavalcanti]o VRaptor só vai conseguir popular usando o nome do parametro do GenericController…

mas vc pode hackear isso :wink:
crie uma classe igual a essa:

e na linha 94 vc vê se é a lógica adiciona (ou atualiza) do
GenericController, e nesse caso use o nome da classe (method.getResource().getType().getSimpleName() - “Controller”, primeira minuscula)
[/quote]

Fiz o que voce me falou e estou recebendo esta exception aqui

br.com.caelum.vraptor.http.InvalidParameterException: unable to retrieve values to invoke method
	at br.com.jvds.vraptor.custom.CustomOgnlParametersProvider.getParametersFor(CustomOgnlParametersProvider.java:102)
	at br.com.caelum.vraptor.interceptor.ParametersInstantiatorInterceptor.getParametersFor(ParametersInstantiatorInterceptor.java:108)
	at br.com.caelum.vraptor.interceptor.ParametersInstantiatorInterceptor.intercept(ParametersInstantiatorInterceptor.java:78)
	at br.com.caelum.vraptor.core.LazyInterceptorHandler.execute(LazyInterceptorHandler.java:59)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.interceptor.InstantiateInterceptor.intercept(InstantiateInterceptor.java:42)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.interceptor.InterceptorListPriorToExecutionExtractor.intercept(InterceptorListPriorToExecutionExtractor.java:44)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.interceptor.FlashInterceptor.intercept(FlashInterceptor.java:81)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.interceptor.ResourceLookupInterceptor.intercept(ResourceLookupInterceptor.java:67)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:56)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.core.DefaultRequestExecution.execute(DefaultRequestExecution.java:70)
	at br.com.caelum.vraptor.VRaptor$1.insideRequest(VRaptor.java:92)
	at br.com.caelum.vraptor.ioc.spring.SpringProvider.provideForRequest(SpringProvider.java:56)
	at br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:89)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
	at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.NoSuchMethodException: GenericoController$adiciona$1904627582$2.getCadindexador()
	at java.lang.Class.getMethod(Class.java:1605)
	at br.com.jvds.vraptor.custom.CustomOgnlParametersProvider.getParametersFor(CustomOgnlParametersProvider.java:98)
	... 34 more

é um dos componentes que deve estar fazendo cache erradamente…

só pra confirmar, crie a classe:

@Component
@ApplicationScoped
public class CustomTypeCreator extends AsmBasedTypeCreator{...}

[quote=Lucas Cavalcanti]é um dos componentes que deve estar fazendo cache erradamente…

só pra confirmar, crie a classe:

@Component
@ApplicationScoped
public class CustomTypeCreator extends AsmBasedTypeCreator{...}

[/quote]

Criei a classe na hora que subo a aplicacao ja da exception no console.

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'stereotypedBeansRegistrar': Unsatisfied dependency expressed through constructor argument with index 0 of type [java.util.List]: : Error creating bean with name 'stereotypeHandler': Unsatisfied dependency expressed through constructor argument with index 0 of type [br.com.caelum.vraptor.http.route.Router]: : Error creating bean with name 'defaultRouter': Unsatisfied dependency expressed through constructor argument with index 2 of type [br.com.caelum.vraptor.http.TypeCreator]: : No unique bean of type [br.com.caelum.vraptor.http.TypeCreator] is defined: more than one 'primary' bean found among candidates: [asmBasedTypeCreator, customTypeCreator, cacheBasedTypeCreator]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [br.com.caelum.vraptor.http.TypeCreator] is defined: more than one 'primary' bean found among candidates: [asmBasedTypeCreator, customTypeCreator, cacheBasedTypeCreator]; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultRouter': Unsatisfied dependency expressed through constructor argument with index 2 of type [br.com.caelum.vraptor.http.TypeCreator]: : No unique bean of type [br.com.caelum.vraptor.http.TypeCreator] is defined: more than one 'primary' bean found among candidates: [asmBasedTypeCreator, customTypeCreator, cacheBasedTypeCreator]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [br.com.caelum.vraptor.http.TypeCreator] is defined: more than one 'primary' bean found among candidates: [asmBasedTypeCreator, customTypeCreator, cacheBasedTypeCreator]; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'stereotypeHandler': Unsatisfied dependency expressed through constructor argument with index 0 of type [br.com.caelum.vraptor.http.route.Router]: : Error creating bean with name 'defaultRouter': Unsatisfied dependency expressed through constructor argument with index 2 of type [br.com.caelum.vraptor.http.TypeCreator]: : No unique bean of type [br.com.caelum.vraptor.http.TypeCreator] is defined: more than one 'primary' bean found among candidates: [asmBasedTypeCreator, customTypeCreator, cacheBasedTypeCreator]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [br.com.caelum.vraptor.http.TypeCreator] is defined: more than one 'primary' bean found among candidates: [asmBasedTypeCreator, customTypeCreator, cacheBasedTypeCreator]; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultRouter': Unsatisfied dependency expressed through constructor argument with index 2 of type [br.com.caelum.vraptor.http.TypeCreator]: : No unique bean of type [br.com.caelum.vraptor.http.TypeCreator] is defined: more than one 'primary' bean found among candidates: [asmBasedTypeCreator, customTypeCreator, cacheBasedTypeCreator]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [br.com.caelum.vraptor.http.TypeCreator] is defined: more than one 'primary' bean found among candidates: [asmBasedTypeCreator, customTypeCreator, cacheBasedTypeCreator]
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:730)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:196)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
	at org.springframework.context.event.AbstractApplicationEventMulticaster.getApplicationListeners(AbstractApplicationEventMulticaster.java:148)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:86)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)
	at br.com.caelum.vraptor.ioc.spring.SpringBasedContainer.start(SpringBasedContainer.java:68)
	at br.com.caelum.vraptor.ioc.spring.SpringProvider.start(SpringProvider.java:82)
	at br.com.caelum.vraptor.VRaptor.init(VRaptor.java:110)
	at br.com.caelum.vraptor.VRaptor.init(VRaptor.java:103)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
	at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4001)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4651)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
	at org.apache.catalina.core.StandardService.start(StandardService.java:519)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'stereotypeHandler': Unsatisfied dependency expressed through constructor argument with index 0 of type [br.com.caelum.vraptor.http.route.Router]: : Error creating bean with name 'defaultRouter': Unsatisfied dependency expressed through constructor argument with index 2 of type [br.com.caelum.vraptor.http.TypeCreator]: : No unique bean of type [br.com.caelum.vraptor.http.TypeCreator] is defined: more than one 'primary' bean found among candidates: [asmBasedTypeCreator, customTypeCreator, cacheBasedTypeCreator]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [br.com.caelum.vraptor.http.TypeCreator] is defined: more than one 'primary' bean found among candidates: [asmBasedTypeCreator, customTypeCreator, cacheBasedTypeCreator]; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultRouter': Unsatisfied dependency expressed through constructor argument with index 2 of type [br.com.caelum.vraptor.http.TypeCreator]: : No unique bean of type [br.com.caelum.vraptor.http.TypeCreator] is defined: more than one 'primary' bean found among candidates: [asmBasedTypeCreator, customTypeCreator, cacheBasedTypeCreator]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [br.com.caelum.vraptor.http.TypeCreator] is defined: more than one 'primary' bean found among candidates: [asmBasedTypeCreator, customTypeCreator, cacheBasedTypeCreator]
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:730)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:196)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:844)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:744)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:703)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:795)
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:723)
	... 36 more
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultRouter': Unsatisfied dependency expressed through constructor argument with index 2 of type [br.com.caelum.vraptor.http.TypeCreator]: : No unique bean of type [br.com.caelum.vraptor.http.TypeCreator] is defined: more than one 'primary' bean found among candidates: [asmBasedTypeCreator, customTypeCreator, cacheBasedTypeCreator]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [br.com.caelum.vraptor.http.TypeCreator] is defined: more than one 'primary' bean found among candidates: [asmBasedTypeCreator, customTypeCreator, cacheBasedTypeCreator]
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:730)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:196)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:844)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:786)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:703)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:795)
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:723)
	... 50 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [br.com.caelum.vraptor.http.TypeCreator] is defined: more than one 'primary' bean found among candidates: [asmBasedTypeCreator, customTypeCreator, cacheBasedTypeCreator]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.determinePrimaryCandidate(DefaultListableBeanFactory.java:868)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:794)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:703)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:795)
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:723)
	... 64 more

suspeitei que isso fosse acontecer =(

tenta com esse snapshot que eu acabei de gerar:
https://oss.sonatype.org/content/repositories/snapshots/br/com/caelum/vraptor/3.2.1-SNAPSHOT/vraptor-3.2.1-20101020.174235-3.jar

acho que ele resolve o problema de caching
[]'s

[quote=Lucas Cavalcanti]suspeitei que isso fosse acontecer =(

tenta com esse snapshot que eu acabei de gerar:
https://oss.sonatype.org/content/repositories/snapshots/br/com/caelum/vraptor/3.2.1-SNAPSHOT/vraptor-3.2.1-20101020.174235-3.jar

acho que ele resolve o problema de caching
[]'s[/quote]

Lucas, agora coloquei esse novo jar la na aplicacao desabilitei public class CustomTypeCreator extends AsmBasedTypeCreator {}, mas agora subi a aplicacao quando mando abrir um formulario.

java.lang.NullPointerException
	at br.com.jvds.vraptor.custom.CustomOgnlParametersProvider.createViaOgnl(CustomOgnlParametersProvider.java:135)
	at br.com.jvds.vraptor.custom.CustomOgnlParametersProvider.createRoot(CustomOgnlParametersProvider.java:109)
	at br.com.jvds.vraptor.custom.CustomOgnlParametersProvider.getParametersFor(CustomOgnlParametersProvider.java:85)
	at br.com.caelum.vraptor.interceptor.ParametersInstantiatorInterceptor.getParametersFor(ParametersInstantiatorInterceptor.java:108)
	at br.com.caelum.vraptor.interceptor.ParametersInstantiatorInterceptor.intercept(ParametersInstantiatorInterceptor.java:78)
	at br.com.caelum.vraptor.core.LazyInterceptorHandler.execute(LazyInterceptorHandler.java:59)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.interceptor.InstantiateInterceptor.intercept(InstantiateInterceptor.java:42)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.interceptor.InterceptorListPriorToExecutionExtractor.intercept(InterceptorListPriorToExecutionExtractor.java:44)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.interceptor.FlashInterceptor.intercept(FlashInterceptor.java:81)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.interceptor.ResourceLookupInterceptor.intercept(ResourceLookupInterceptor.java:67)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:56)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.core.DefaultRequestExecution.execute(DefaultRequestExecution.java:70)
	at br.com.caelum.vraptor.VRaptor$1.insideRequest(VRaptor.java:92)
	at br.com.caelum.vraptor.ioc.spring.SpringProvider.provideForRequest(SpringProvider.java:56)
	at br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:89)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
	at java.lang.Thread.run(Thread.java:637)

Obrigado !!!
JVDS

o que tem nessa linha: CustomOgnlParametersProvider.java:135) ?

Olha lucas eu copie a classe(OgnlParametersProvider) do codigo vraptor e fiz apenas uma alteracao onde comentei //JVDS

package br.com.jvds.vraptor.custom;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Type;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.List;
import java.util.ResourceBundle;

import javax.servlet.http.HttpServletRequest;

import ognl.MethodFailedException;
import ognl.NoSuchPropertyException;
import ognl.Ognl;
import ognl.OgnlContext;
import ognl.OgnlException;
import ognl.OgnlRuntime;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import br.com.caelum.vraptor.converter.ConversionError;
import br.com.caelum.vraptor.core.Converters;
import br.com.caelum.vraptor.http.InvalidParameterException;
import br.com.caelum.vraptor.http.ParameterNameProvider;
import br.com.caelum.vraptor.http.TypeCreator;
import br.com.caelum.vraptor.http.ognl.ArrayAccessor;
import br.com.caelum.vraptor.http.ognl.EmptyElementsRemoval;
import br.com.caelum.vraptor.http.ognl.ListAccessor;
import br.com.caelum.vraptor.http.ognl.OgnlParametersProvider;
import br.com.caelum.vraptor.http.ognl.ReflectionBasedNullHandler;
import br.com.caelum.vraptor.http.ognl.VRaptorConvertersAdapter;
import br.com.caelum.vraptor.ioc.Component;
import br.com.caelum.vraptor.ioc.Container;
import br.com.caelum.vraptor.ioc.RequestScoped;
import br.com.caelum.vraptor.resource.ResourceMethod;
import br.com.caelum.vraptor.validator.Message;
import br.com.caelum.vraptor.validator.ValidationMessage;
import br.com.caelum.vraptor.validator.annotation.ValidationException;
import br.com.caelum.vraptor.vraptor2.Info;
import br.com.jvds.Util;

/**
 * Provides parameters using ognl to parse expression values into parameter
 * values.
 *
 * @author guilherme silveira
 */
@Component
@RequestScoped
public class CustomOgnlParametersProvider extends OgnlParametersProvider {
	private final TypeCreator creator;

	private final Container container;

	private final Converters converters;

	private final ParameterNameProvider provider;

	private static final Logger logger = LoggerFactory.getLogger(OgnlParametersProvider.class);

	private final HttpServletRequest request;

	private final EmptyElementsRemoval removal;

	public CustomOgnlParametersProvider(TypeCreator creator,
			Container container, Converters converters,
			ParameterNameProvider provider, HttpServletRequest request,
			EmptyElementsRemoval removal) {
		super(creator, container, converters, provider, request, removal);
		// TODO Auto-generated constructor stub
		this.creator = creator;
		this.container = container;
		this.converters = converters;
		this.provider = provider;
		this.request = request;
		this.removal = removal;	
		OgnlRuntime.setNullHandler(Object.class, new ReflectionBasedNullHandler());
		OgnlRuntime.setPropertyAccessor(List.class, new ListAccessor());
		OgnlRuntime.setPropertyAccessor(Object[].class, new ArrayAccessor());		
	}

	@Override
	public Object[] getParametersFor(ResourceMethod method, List<Message> errors, ResourceBundle bundle) {
		Object root = createRoot(method, errors, bundle);
		removal.removeExtraElements();
		Type[] types = method.getMethod().getGenericParameterTypes();
		Object[] result = new Object[types.length];
		String[] names = provider.parameterNamesFor(method.getMethod());		
		//JVDS
		if (method.getMethod().getName().equals("adiciona")) {
			names[0] = Util.extractGenericLogic(method.getResource().getType()).toLowerCase();
			System.out.println("get" + Info.capitalize(names[0]) + "-sssss" );			
		}		
		//
		for (int i = 0; i < types.length; i++) {
			try {
				result[i] = root.getClass().getMethod("get" + Info.capitalize(names[i])).invoke(root);
			} catch (InvocationTargetException e) {
				throw new InvalidParameterException("unable to retrieve values to invoke method", e.getCause());
			} catch (Exception e) {
				throw new InvalidParameterException("unable to retrieve values to invoke method", e);
			}
		}
		return result;
	}

	private Object createRoot(ResourceMethod method, List<Message> errors, ResourceBundle bundle) {
		return createViaOgnl(method, errors, bundle);
	}

	private Object createViaOgnl(ResourceMethod method, List<Message> errors, ResourceBundle bundle) {
		Class<?> type = creator.typeFor(method);
		/*Desabilitado gambiarra
		Class<?> type = null;
		if (method.getMethod().getName().equals("adiciona")) {
			type = method.getResource().getType();
			try {
				type.newInstance();
			} catch (InstantiationException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (IllegalAccessException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		} else {
			type = creator.typeFor(method);
		}
		*/
		Object root;
		try {
			root = type.getDeclaredConstructor().newInstance();
		} catch (Exception ex) {
			throw new InvalidParameterException("unable to instantiate type" + type.getName(), ex);
		}
		OgnlContext context = (OgnlContext) Ognl.createDefaultContext(root);
		context.setTraceEvaluations(true);
		context.put(Container.class, this.container);

		VRaptorConvertersAdapter adapter = new VRaptorConvertersAdapter(converters, bundle);
		Ognl.setTypeConverter(context, adapter);
		for (Enumeration<?> enumeration = request.getParameterNames(); enumeration.hasMoreElements();) {
			String key = (String) enumeration.nextElement();
			System.out.println(key);
			String[] values = request.getParameterValues(key);
			try {
				if (logger.isDebugEnabled()) {
					logger.debug("Applying " + key + " with " + Arrays.toString(values));
				}
				Ognl.setValue(key, context, root, values.length == 1 ? values[0] : values);
			} catch (ConversionError ex) {
				errors.add(new ValidationMessage(ex.getMessage(), key));
			} catch (MethodFailedException e) { // setter threw an exception

				Throwable cause = e.getCause();
				if (cause.getClass().isAnnotationPresent(ValidationException.class)) {
					errors.add(new ValidationMessage(cause.getLocalizedMessage(), key));
				} else {
					throw new InvalidParameterException("unable to parse expression '" + key + "'", e);
				}

			} catch (NoSuchPropertyException ex) {
				// TODO optimization: be able to ignore or not
				if (logger.isDebugEnabled()) {
					logger.debug("cant find property for expression {} ignoring", key);
				}
				if (logger.isTraceEnabled()) {
					logger.trace("cant find property for expression " + key + ", ignoring. Reason:", ex);

				}
			} catch (OgnlException e) {
				// TODO it fails when parameter name is not a valid java
				// identifier... ignoring by now
				if (logger.isDebugEnabled()) {
					logger.debug("unable to parse expression '" + key + "'. Ignoring", e);
				}
			}
		}		
		return root;
	}
}

copia a linha que tá dando o nullPointer

Mas qual linha do GenericoController e esta hora que mando salvar

Meu GenericoController

	@Post
	public void adiciona(T obj) {
		// TODO Auto-generated method stub
		System.out.println("adiciona...");
		this.daoGenerico.getDao().adiciona(obj);
	}

Quer dizer era para executar esta logica mas nem chega aqui da exception dentro do CustomOgnlParametersProvider.java

Meu CadIndexadorController esta assim

@Resource
public class CadIndexadorController extends GenericoController<CadIndexador> {
	public CadIndexadorController(Result result, Validator validator,
			DaoGenerico daoGenerico) {
		super(result, validator, daoGenerico);
		// TODO Auto-generated constructor stub
	}	
}
java.lang.NullPointerException  
    at br.com.jvds.vraptor.custom.CustomOgnlParametersProvider.createViaOgnl(CustomOgnlParametersProvider.java:135)  
    at br.com.jvds.vraptor.custom.CustomOgnlParametersProvider.createRoot(CustomOgnlParametersProvider.java:109)  

qual é a linha 135 da classe CustomOgnlParametersProvider?

[quote=Lucas Cavalcanti] java.lang.NullPointerException at br.com.jvds.vraptor.custom.CustomOgnlParametersProvider.createViaOgnl(CustomOgnlParametersProvider.java:135) at br.com.jvds.vraptor.custom.CustomOgnlParametersProvider.createRoot(CustomOgnlParametersProvider.java:109)
qual é a linha 135 da classe CustomOgnlParametersProvider?[/quote]

e esta que esta dentro do try catch

root = type.getDeclaredConstructor().newInstance();

eu tinha esquecido de mudar uma das linhas =X
jurava que o teste tava pegando esse caso, mas não estava =(

https://oss.sonatype.org/content/repositories/snapshots/br/com/caelum/vraptor/3.2.1-SNAPSHOT/vraptor-3.2.1-20101021.130049-4.jar

esse snapshot está funcionando, pelo menos pra esse nullpointer…
desculpe pela confusão =S

[quote=Lucas Cavalcanti]eu tinha esquecido de mudar uma das linhas =X
jurava que o teste tava pegando esse caso, mas não estava =(

https://oss.sonatype.org/content/repositories/snapshots/br/com/caelum/vraptor/3.2.1-SNAPSHOT/vraptor-3.2.1-20101021.130049-4.jar

esse snapshot está funcionando, pelo menos pra esse nullpointer…
desculpe pela confusão =S[/quote]

olha lucas beleza parou de dar o NullPointer mas continua dando a mesma exception de antes.

br.com.caelum.vraptor.http.InvalidParameterException: unable to retrieve values to invoke method
	at br.com.jvds.vraptor.custom.CustomOgnlParametersProvider.getParametersFor(CustomOgnlParametersProvider.java:102)
	at br.com.caelum.vraptor.interceptor.ParametersInstantiatorInterceptor.getParametersFor(ParametersInstantiatorInterceptor.java:108)
	at br.com.caelum.vraptor.interceptor.ParametersInstantiatorInterceptor.intercept(ParametersInstantiatorInterceptor.java:78)
	at br.com.caelum.vraptor.core.LazyInterceptorHandler.execute(LazyInterceptorHandler.java:59)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.interceptor.InstantiateInterceptor.intercept(InstantiateInterceptor.java:42)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.interceptor.InterceptorListPriorToExecutionExtractor.intercept(InterceptorListPriorToExecutionExtractor.java:44)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.interceptor.FlashInterceptor.intercept(FlashInterceptor.java:81)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.interceptor.ResourceLookupInterceptor.intercept(ResourceLookupInterceptor.java:67)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:56)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:53)
	at br.com.caelum.vraptor.core.DefaultRequestExecution.execute(DefaultRequestExecution.java:70)
	at br.com.caelum.vraptor.VRaptor$1.insideRequest(VRaptor.java:92)
	at br.com.caelum.vraptor.ioc.spring.SpringProvider.provideForRequest(SpringProvider.java:56)
	at br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:89)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
	at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.NoSuchMethodException: GenericoController$adiciona$1904627582$1.getCadindexador()
	at java.lang.Class.getMethod(Class.java:1605)
	at br.com.jvds.vraptor.custom.CustomOgnlParametersProvider.getParametersFor(CustomOgnlParametersProvider.java:98)
	... 34 more

Ok

ah, entendi qual é o problema…

se vc mandar os parâmetros da requisição como object ao invez de cadIndexador funciona? (object é o nome do parametro no generic controller

se sim, tire a sua customização do método getParametersFor, vá no método createViaOgnl, e depois da linha

String key = (String) enumeration.nextElement();

faça

key = key.replaceFirst("cadIndexador", "object");

se funcionar, troque esse cadIndexador pelo Util.extractGenericLogic(method.getResource().getType()).toLowerCase();