It seems it is failing as i am using an external jar file in which
javax.Inject is used.
When my war is deployed with this jar file it fails.
I tried to exclude the packages in jar file by declaring them in
WEB-INF/beans.xml i.e.
<?xml version="1.0" encoding="UTF-8"?>
<beans bean-discovery-mode="all" version="1.1"
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">
<scan>
<exclude name="com.xyz.*"/>
<exclude name="com.shipment.**"/>
</scan>
</beans>
CDI version is 1.2
Server is WILDFLY 8.2.0
Error that i am getting :
###############
Caused by: org.jboss.weld.exceptions.DefinitionException: WELD-000071:
Managed bean class org.apache.cxf.jaxrs.provider.DataBindingJSONProvider
must be @Dependent
at org.jboss.weld.bean.ManagedBean.checkType(ManagedBean.java:198)
at
org.jboss.weld.bean.AbstractBean.initializeAfterBeanDiscovery(AbstractBean.java:105)
at
org.jboss.weld.bean.ManagedBean.initializeAfterBeanDiscovery(ManagedBean.java:113)
at
org.jboss.weld.bootstrap.ConcurrentBeanDeployer$AfterBeanDiscoveryInitializerFactory.doWork(ConcurrentBeanDeployer.java:136)
at
org.jboss.weld.bootstrap.ConcurrentBeanDeployer$AfterBeanDiscoveryInitializerFactory.doWork(ConcurrentBeanDeployer.java:127)
at
org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
at
org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[rt.jar:1.8.0_25]
... 3 more
23:23:19,370 ERROR [org.jboss.as.controller.management-operation]
(Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address:
([("deployment" => "CaseManagementSystem.war")]) - failure
description:
{"JBAS014671: Failed services" =>
{"jboss.deployment.unit.\"CaseManagementSystem.war\".WeldStartService"
=>
"org.jboss.msc.service.StartException in service
jboss.deployment.unit.\"CaseManagementSystem.war\".WeldStartService: Failed
to start service
Caused by: org.jboss.weld.exceptions.DefinitionException: WELD-000071:
Managed bean class org.apache.cxf.jaxrs.provider.DataBindingJSONProvider
must be @Dependent"}}
23:23:19,437 INFO [org.jboss.as.server] (ServerService Thread Pool -- 31)
JBAS018559: Deployed "CaseManagementSystem.war" (runtime-name :
"CaseManagementSystem.war")
23:23:19,466 INFO [org.jboss.as.controller] (Controller Boot Thread)
JBAS014774: Service status report
JBAS014777: Services which failed to start: service
jboss.deployment.unit."CaseManagementSystem.war".WeldStartService:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."CaseManagementSystem.war".WeldStartService: Failed to
start service
23:23:19,822 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service
thread 1-3) JBAS010418: Stopped Driver service with driver-name =
CaseManagementSystem.war_com.mysql.jdbc.Driver_5_1
23:23:19,832 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 6)
JBAS011410: Stopping Persistence Unit (phase 2 of 2) Service
'CaseManagementSystem.war#hsn18cms'
23:23:19,842 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 17)
JBAS011410: Stopping Persistence Unit (phase 2 of 2) Service
'CaseManagementSystem.war#hsn18cmsaspect'
23:23:19,842 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service
thread 1-4) JBAS010418: Stopped Driver service with driver-name =
CaseManagementSystem.war_org.h2.Driver_1_4
23:23:19,852 INFO [org.jboss.weld.deployer] (MSC service thread 1-7)
JBAS016009: Stopping weld service for deployment CaseManagementSystem.war
23:23:19,972 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 17)
JBAS011410: Stopping Persistence Unit (phase 1 of 2) Service
'CaseManagementSystem.war#hsn18cmsaspect'
23:23:19,972 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 6)
JBAS011410: Stopping Persistence Unit (phase 1 of 2) Service
'CaseManagementSystem.war#hsn18cms'
23:23:21,872 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8)
JBAS015877: Stopped deployment CaseManagementSystem.war (runtime-name:
CaseManagementSystem.war) in 2076ms
23:23:21,872 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http
management interface listening on
http://127.0.0.1:9990/management
23:23:21,872 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin
console listening on
http://127.0.0.1:9990
23:23:21,872 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874:
WildFly 8.2.0.Final "Tweek" started in 134751ms - Started 241 of 290
services (95 services are lazy, passive or on-demand)
23:23:22,152 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2)
JBAS018558: Undeployed "CaseManagementSystem.war" (runtime-name:
"CaseManagementSystem.war")
23:23:22,162 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2)
JBAS014774: Service status report
######################
Kindly help and let me know how i can exclude the jar files in CDI.
Thanks,
Dev
--
View this message in context:
http://cdi-development-mailing-list.1064426.n5.nabble.com/Deploy-failing-...
Sent from the CDI Development mailing list mailing list archive at
Nabble.com.