CDI and Java 7

Hello,
I’ve created a project using Vaadin 7.7.1 with CDI support on WildFly 9 and everything works fine. But when I try to do te same on JBoss AS 7 runing on java 7 I’m getting the “famous” error WELD-001408 Unsatisfied dependencies for type [XY]
with qualifiers [@Default]
at injection point.
But before this error there is also a deployment warning:
vaadin-cdi-1.0.3.jar" does not point to a valid jar for a Class-Path reference.

Since it is working well on WildFly and Java 8 but not on JBoss AS with Java 7, it makes me “feel” that maybe I only need some older versiond of the vaadin-cdi or some other libs as well which are made for Java 7? Or is it something completly else?

What is the bean that fails to resolve? Your own or something from the framework?

Hello Nicklas, thanks a lot for interesting about my problem!
In teh error is my bean mentioned…

12:40:35,596 INFO  [org.jboss.as.server.deployment]
 (MSC service thread 1-8) JBAS015876: Starting deployment of "LamStatEAR.ear"
12:40:35,601 INFO  [org.jboss.as.server.deployment]
 (MSC service thread 1-8) JBAS015876: Starting deployment of "LamStat.war"
12:40:35,993 WARN  [org.jboss.as.server.deployment]
 (MSC service thread 1-8) Class Path entry vaadin-server-7.5.1.jar in "/D:/JBoss/jboss-as-7.1.1.Final_Lamination/standalone/deployments/LamStatEAR.ear/LamStat.war/WEB-INF/lib/vaadin-cdi-1.0.3.jar"  does not point to a valid jar for a Class-Path reference.
12:40:35,994 WARN  [org.jboss.as.server.deployment]
 (MSC service thread 1-8) Class Path entry vaadin-sass-compiler-0.9.12.jar in "/D:/JBoss/jboss-as-7.1.1.Final_Lamination/standalone/deployments/LamStatEAR.ear/LamStat.war/WEB-INF/lib/vaadin-cdi-1.0.3.jar"  does not point to a valid jar for a Class-Path reference.
12:40:35,994 WARN  [org.jboss.as.server.deployment]
 (MSC service thread 1-8) Class Path entry vaadin-shared-7.5.1.jar in "/D:/JBoss/jboss-as-7.1.1.Final_Lamination/standalone/deployments/LamStatEAR.ear/LamStat.war/WEB-INF/lib/vaadin-cdi-1.0.3.jar"  does not point to a valid jar for a Class-Path reference.
12:40:35,995 WARN  [org.jboss.as.server.deployment]
 (MSC service thread 1-8) Class Path entry streamhtmlparser-jsilver-0.0.10.vaadin1.jar in "/D:/JBoss/jboss-as-7.1.1.Final_Lamination/standalone/deployments/LamStatEAR.ear/LamStat.war/WEB-INF/lib/vaadin-cdi-1.0.3.jar"  does not point to a valid jar for a Class-Path reference.
12:40:35,995 WARN  [org.jboss.as.server.deployment]
 (MSC service thread 1-8) Class Path entry guava-16.0.1.vaadin1.jar in "/D:/JBoss/jboss-as-7.1.1.Final_Lamination/standalone/deployments/LamStatEAR.ear/LamStat.war/WEB-INF/lib/vaadin-cdi-1.0.3.jar"  does not point to a valid jar for a Class-Path reference.
12:40:35,996 WARN  [org.jboss.as.server.deployment]
 (MSC service thread 1-8) Class Path entry jsoup-1.8.1.jar in "/D:/JBoss/jboss-as-7.1.1.Final_Lamination/standalone/deployments/LamStatEAR.ear/LamStat.war/WEB-INF/lib/vaadin-cdi-1.0.3.jar"  does not point to a valid jar for a Class-Path reference.
12:40:35,997 WARN  [org.jboss.as.server.deployment]
 (MSC service thread 1-8) Class Path entry yuicompressor-2.4.8.jar in "/D:/JBoss/jboss-as-7.1.1.Final_Lamination/standalone/deployments/LamStatEAR.ear/LamStat.war/WEB-INF/lib/vaadin-sass-compiler-0.9.13.jar"  does not point to a valid jar for a Class-Path reference.
12:40:35,998 WARN  [org.jboss.as.server.deployment]
 (MSC service thread 1-8) Class Path entry js-1.7R2.jar in "/D:/JBoss/jboss-as-7.1.1.Final_Lamination/standalone/deployments/LamStatEAR.ear/LamStat.war/WEB-INF/lib/vaadin-sass-compiler-0.9.13.jar"  does not point to a valid jar for a Class-Path reference.
12:40:36,004 INFO  [org.jboss.as.jpa]
 (MSC service thread 1-4) JBAS011401: Read persistence.xml for LamStatServer
12:40:36,078 INFO  [org.jboss.weld.deployer]
 (MSC service thread 1-7) JBAS016002: Processing weld deployment LamStatEAR.ear
12:40:36,114 INFO  [org.jboss.weld.deployer]
 (MSC service thread 1-4) JBAS016002: Processing weld deployment LamStat.war
12:40:36,139 INFO  [org.jboss.weld.deployer]
 (MSC service thread 1-1) JBAS016005: Starting Services for CDI deployment: LamStatEAR.ear
12:40:36,145 INFO  [org.jboss.as.jpa]
 (MSC service thread 1-4) JBAS011402: Starting Persistence Unit Service 'LamStatEAR.ear#LamStatServer'
12:40:36,146 INFO  [org.hibernate.ejb.Ejb3Configuration]
 (MSC service thread 1-4) HHH000204: Processing PersistenceUnitInfo [
    name: LamStatServer
    ...]
12:40:36,164 INFO  [org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator]
 (MSC service thread 1-4) HHH000130: Instantiating explicit connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
12:40:36,347 INFO  [org.hibernate.dialect.Dialect]
 (MSC service thread 1-4) HHH000400: Using dialect: org.hibernate.dialect.PostgreSQLDialect
12:40:36,348 INFO  [org.hibernate.engine.jdbc.internal.LobCreatorBuilder]
 (MSC service thread 1-4) HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
12:40:36,349 INFO  [org.hibernate.engine.transaction.internal.TransactionFactoryInitiator]
 (MSC service thread 1-4) HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory
12:40:36,351 INFO  [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory]
 (MSC service thread 1-4) HHH000397: Using ASTQueryTranslatorFactory
12:40:36,368 INFO  [org.hibernate.tool.hbm2ddl.SchemaUpdate]
 (MSC service thread 1-4) HHH000228: Running hbm2ddl schema update
12:40:36,369 INFO  [org.hibernate.tool.hbm2ddl.SchemaUpdate]
 (MSC service thread 1-4) HHH000102: Fetching database metadata
12:40:36,371 INFO  [org.hibernate.tool.hbm2ddl.SchemaUpdate]
 (MSC service thread 1-4) HHH000396: Updating schema
12:40:36,406 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata]
 (MSC service thread 1-4) HHH000261: Table found: public.laminationstatdata
12:40:36,407 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata]
 (MSC service thread 1-4) HHH000037: Columns: [id, nontrackingtime, effectivebeltarea, partsarea, trackingtime, beltstoppedtime, timeofrecord, station_id, partscount, totalbeltarea]

12:40:36,408 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata]
 (MSC service thread 1-4) HHH000108: Foreign keys: []
12:40:36,408 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata]
 (MSC service thread 1-4) HHH000126: Indexes: [laminationstatdata_pkey]

12:40:36,409 INFO  [org.hibernate.tool.hbm2ddl.SchemaUpdate]
 (MSC service thread 1-4) HHH000232: Schema update complete
12:40:36,410 INFO  [org.jboss.weld.deployer]
 (MSC service thread 1-2) JBAS016008: Starting weld service for deployment LamStatEAR.ear
12:40:36,441 INFO  [org.apache.deltaspike.core.util.ClassDeactivationUtils]
 (MSC service thread 1-2) class: org.apache.deltaspike.core.impl.scope.DeltaSpikeContextExtension activated=true
12:40:36,441 INFO  [org.apache.deltaspike.core.util.ClassDeactivationUtils]
 (MSC service thread 1-2) class: org.apache.deltaspike.core.impl.config.ConfigurationExtension activated=true
12:40:36,443 INFO  [org.apache.deltaspike.core.util.ClassDeactivationUtils]
 (MSC service thread 1-2) class: org.apache.deltaspike.core.impl.interceptor.GlobalInterceptorExtension activated=true
12:40:36,446 INFO  [org.apache.deltaspike.core.util.ProjectStageProducer]
 (MSC service thread 1-2) Computed the following DeltaSpike ProjectStage: Production
12:40:36,447 INFO  [org.apache.deltaspike.core.util.ClassDeactivationUtils]
 (MSC service thread 1-2) class: org.apache.deltaspike.core.impl.exception.control.extension.ExceptionControlExtension activated=true
12:40:36,448 INFO  [org.apache.deltaspike.core.util.ClassDeactivationUtils]
 (MSC service thread 1-2) class: org.apache.deltaspike.core.impl.message.MessageBundleExtension activated=true
12:40:36,449 INFO  [org.apache.deltaspike.core.util.ClassDeactivationUtils]
 (MSC service thread 1-2) class: org.apache.deltaspike.core.impl.jmx.MBeanExtension activated=true
12:40:36,449 INFO  [org.apache.deltaspike.core.util.ClassDeactivationUtils]
 (MSC service thread 1-2) class: org.apache.deltaspike.core.impl.exclude.extension.ExcludeExtension activated=true
12:40:36,450 INFO  [org.apache.deltaspike.core.util.ClassDeactivationUtils]
 (MSC service thread 1-2) class: org.apache.deltaspike.core.impl.exclude.CustomProjectStageBeanFilter activated=true
12:40:36,451 INFO  [org.apache.deltaspike.core.util.ClassDeactivationUtils]
 (MSC service thread 1-2) class: org.apache.deltaspike.core.impl.exclude.GlobalAlternative activated=true
12:40:36,991 INFO  [com.vaadin.cdi.internal.VaadinExtension]
 (MSC service thread 1-2) UIScopedContext registered for Vaadin CDI
12:40:36,993 INFO  [com.vaadin.cdi.internal.VaadinExtension]
 (MSC service thread 1-2) ViewScopedContext registered for Vaadin CDI
12:40:37,025 ERROR [org.jboss.msc.service.fail]
 (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."LamStatEAR.ear".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."LamStatEAR.ear".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [LaminationDataProviderJPA]
 with qualifiers [@Default]
 at injection point [[field]
 @Inject com.example.lamstat.LamstatUI.ldp]
    at org.jboss.as.weld.services.WeldService.start(WeldService.java:83)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_06]

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_06]

    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_06]

Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [LaminationDataProviderJPA]
 with qualifiers [@Default]
 at injection point [[field]
 @Inject com.example.lamstat.LamstatUI.ldp]
    at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:275)
    at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:244)
    at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:107)
    at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:127)
    at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:346)
    at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:331)
    at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:366)
    at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:83)
    at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)
    ... 5 more

12:40:37,236 INFO  [org.jboss.as.server]
 (DeploymentScanner-threads - 1) JBAS015870: Deploy of deployment "LamStatEAR.ear" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"LamStatEAR.ear\".WeldService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"LamStatEAR.ear\".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [LaminationDataProviderJPA]
 with qualifiers [@Default]
 at injection point [[field]
 @Inject com.example.lamstat.LamstatUI.ldp]"}}
12:40:37,243 INFO  [org.jboss.as.jpa]
 (MSC service thread 1-6) JBAS011403: Stopping Persistence Unit Service 'LamStatEAR.ear#LamStatServer'
12:40:37,275 INFO  [org.jboss.as.server.deployment]
 (MSC service thread 1-8) JBAS015877: Stopped deployment LamStat.war in 38ms
12:40:37,277 INFO  [org.jboss.as.server.deployment]
 (MSC service thread 1-8) JBAS015877: Stopped deployment LamStatEAR.ear in 41ms
12:40:37,279 INFO  [org.jboss.as.controller]
 (DeploymentScanner-threads - 1) JBAS014774: Service status report
JBAS014777:   Services which failed to start:      service jboss.deployment.unit."LamStatEAR.ear".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."LamStatEAR.ear".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [LaminationDataProviderJPA]
 with qualifiers [@Default]
 at injection point [[field]
 @Inject com.example.lamstat.LamstatUI.ldp]

12:40:37,281 ERROR [org.jboss.as.server.deployment.scanner]
 (DeploymentScanner-threads - 2) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"LamStatEAR.ear\".WeldService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"LamStatEAR.ear\".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [LaminationDataProviderJPA]
 with qualifiers [@Default]
 at injection point [[field]
 @Inject com.example.lamstat.LamstatUI.ldp]"}}}}

WELD-001408 Unsatisfied dependencies for type [LaminationDataProviderJPA]
with qualifiers [@Default]
at injection point [[field]
@Inject com.example.lamstat.LamstatUI.ldp]

LaminationDataProviderJPA is
@SessionScoped //@ApplicationScoped
@Stateful
sesson bean
and the com.example.lamstat.LamstatUI is and UI class where I try to @Inject that bean.

OK
For anybody who will have some similar problem: All it was missing was a CDI “support” in a JPA part of this project. In other words another beans.xml must have been added to my JPA.jar archive.