2016-04-27 5 views
0

Я создаю веб-приложение Maven на Netbeans IDE 8.1.Then, я добавить некоторые RESSOURCES (JS, CSS, ...) и веб-страницы index.html-CDI РазВЕРТЫВаНИя failure- Maven проект NetBeans 8.1

Также я добавить эту зависимость в файл pom.xml

<dependency> 
     <groupId>org.apache.mahout</groupId> 
     <artifactId>mahout-core</artifactId> 
     <version>0.8</version> 
    </dependency> 
    <dependency> 
     <groupId>org.apache.mahout</groupId> 
     <artifactId>mahout-integration</artifactId> 
     <version>0.8</version> 
    </dependency> 
    <dependency> 
     <groupId>mysql</groupId> 
     <artifactId>mysql-connector-java</artifactId> 
     <version>5.1.25</version> 
    </dependency> 

Это ошибка:

Grave: Exception while loading the app 
    Grave: Undeployment failed for context /SecondAppPfa 
    Grave: Exception while loading the app : CDI deployment failure:WELD-001408: Unsatisfied dependencies for type Set<Service> with qualifiers @Default 
     at injection point [BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedConstructor] @Inject com.google.common.util.concurrent.ServiceManager(Set<Service>) 
     at com.google.common.util.concurrent.ServiceManager.<init>(ServiceManager.java:0) 
    org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type Set<Service> with qualifiers @Default 
     at injection point [BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedConstructor] @Inject com.google.common.util.concurrent.ServiceManager(Set<Service>) 
     at com.google.common.util.concurrent.ServiceManager.<init>(ServiceManager.java:0) 
     at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:359) 
     at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:281) 
     at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:134) 
     at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:155) 
     at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:518) 
     ... 

ответ

0

Я нашел решение:

просто добавьте файл beans.xml в папку META-INF

<?xml version="1.0" encoding="UTF-8"?> 
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
     http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd" 
     bean-discovery-mode="all"> 
</beans> 

 Смежные вопросы

  • Нет связанных вопросов^_^