[arquillian-issues] [JBoss JIRA] (ARQ-1819) CDI not working in Jboss as 7.1

Raj Haque (JIRA) issues at jboss.org
Tue Jul 15 09:48:30 EDT 2014


    [ https://issues.jboss.org/browse/ARQ-1819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985208#comment-12985208 ] 

Raj Haque commented on ARQ-1819:
--------------------------------

FIXED: for some reason I had to  add all this to get it working. Not sure why?


 .setWebXML(new File("src/main/webapp/WEB-INF/web.xml"))
.addAsResource(new File("src/main/webapp/WEB-INF/jboss-web.xml"))
.addAsResource("META-INF/persistence.xml", "META-INF/persistence.xml")
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");

> CDI not working in Jboss as 7.1
> -------------------------------
>
>                 Key: ARQ-1819
>                 URL: https://issues.jboss.org/browse/ARQ-1819
>             Project: Arquillian
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>            Reporter: Raj Haque
>            Priority: Critical
>
> Hi Guys, I am having problems in Arquillian CDI.
> I am using in my parent pom....
> <dependency>
> 			<groupId>org.jboss.arquillian.junit</groupId>
> 			<artifactId>arquillian-junit-container</artifactId>
> 			<version>1.0.0.CR7</version>
> 			<scope>test</scope>
> </dependency>
> My Arquillian.xml is like this
> <?xml version="1.0" encoding="UTF-8"?>
> <arquillian xmlns="http://jboss.org/schema/arquillian"
>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>    xsi:schemaLocation="http://jboss.org/schema/arquillian
>         http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
>   
>   <engine>  
>       <property name="deploymentExportPath">/SDDevelopmentMVN/TEST_temp</property>  
>   </engine>    
>    <!-- Example configuration for a remote JBoss AS 7 instance -->
>    <container qualifier="jboss" default="true">
>       <protocol type="jmx-as7">
>          <property name="executionType">REMOTE</property>
>       </protocol>
>       <configuration>
>          <property name="jbossHome">/SDDevelopmentMVN/jboss/jbossInternalMVN</property>
>           <property name="managementAddress">127.0.0.1</property>
>            <property name="managementPort">10099</property>
>       </configuration>
>    </container>
> </arquillian>
> -------------------------
> My Test class is
> @RunWith(Arquillian.class)
> @RunAsClient
> public class PayrollCRUDServiceRestfullTest {
> @Deployment
> public static Archive<?> createTestArchive() {
> 	return ShrinkWrap.create(WebArchive.class, "test1177.war")
> 			.addClasses(MiscUtilsSD.class,GenericAuditService.class,PayrollCRUDService.class, SmartDAO.class,Resources.class)
> 			.addPackage("com.animation2000.coreservices.domain")
> 			.addPackage("com.animation2000.coreservices.audit.domain")
> 			.addPackage("com.animation2000.coreservices.audit.service")
> 			.addPackage("com.animation2000.coreservices.audit.wrapper")
> 			.addPackage("com.animation2000.coreservices.domain.customized")
> 			
> 			.addPackage("com.animation2000.smart.dao")
> 			.addPackage("com.animation2000.coreservices.payroll.crud.service")
> 			.addAsResource("META-INF/persistence.xml", "META-INF/persistence.xml")
> 			
> 			.addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));
> 	        
>      }
> @Inject
> PayrollCRUDService payrollCRUDService;
> But payrollCRUDService is null..
> Any advise?Please.
> Many Thanks



--
This message was sent by Atlassian JIRA
(v6.2.6#6264)


More information about the arquillian-issues mailing list