Erro ao implementar PathResolver

1 resposta
R
Implementei a PathREsolver, mas esta dando um erro de Specializing
@RequestScoped
@Specializes
public class UltraPathResolver implements PathResolver {
 
	private static final Logger logger = LoggerFactory.getLogger(DefaultPathResolver.class);
	private final FormatResolver resolver;
	
	/** 
	 * @deprecated CDI eyes only
	 */
	protected UltraPathResolver() {
		this(null);
	}
 
	@Inject
	public UltraPathResolver(FormatResolver resolver) {
		this.resolver = resolver;
	}
 
	public String pathFor(ControllerMethod method) {
		return "/WEB-INF/pages/";
	}
	
}
Erro:
ERROR [org.jboss.as.controller.management-operation] (DeploymentSca
nner-threads - 1) JBAS014613: Operation ("full-replace-deployment") failed - add
ress: ([]) - failure description: {"JBAS014671: Failed services" => {"jboss.depl
oyment.unit.\"ultraweb.war\".WeldStartService" => "org.jboss.msc.service.StartEx
ception in service jboss.deployment.unit.\"ultraweb.war\".WeldStartService: Fail
ed to start service
    Caused by: org.jboss.weld.exceptions.DefinitionException: WELD-000047: Speci
alizing bean must extend another bean:  Managed Bean [class br.com.ultraworks.ul
traweb.component.UltraPathResolver] with qualifiers [@Any @Default]"}}
23:05:29,997 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018
565: Replaced deployment "ultraweb.war" with deployment "ultraweb.war"
23:05:30,095 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBA
S014774: Service status report
JBAS014777:   Services which failed to start:      service jboss.deployment.unit
."ultraweb.war".WeldStartService: org.jboss.msc.service.StartException in servic
e jboss.deployment.unit."ultraweb.war".WeldStartService: Failed to start service

1 Resposta

Lucas_Cavalcanti

o @Specializes precisa ser uma classe filha…

se vc tirar essa anotação o que acontece?

tenta colocar

@Priority(javax.interceptor.Interceptor.APPLICATION)
Criado 4 de junho de 2014
Ultima resposta 9 de jun. de 2014
Respostas 1
Participantes 2