我無法制作Arquillian和Websphere嵌入式EJBContainer一起工作順利。 因爲我不能使用arquillian-was-embedded-8 Jar文件(在公司Maven倉庫和Jenkins中缺少)。Arquillian無法加載Websphere嵌入式容器的LoadableExtension
我嘗試在我的Junit測試中加載WebSphereExtension(LoadableExtension),但未成功。有人能指出我正確的解決方案嗎?
我的第二個問題是,即使我在我的IDE本地加載這個jar文件,我也有接口(在我的EJB上)的問題。在這裏看到同樣的問題: [arquillian-was-embedded-8 runs but can't inject EJB. NullPointerException 我該如何避免這種情況?
我的Maven依賴:
<dependency>
<groupId>com.ibm.websphere</groupId>
<artifactId>com.ibm.ws.ejb.embeddableContainer</artifactId>
<version>8.0.0.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.ibm.websphere</groupId>
<artifactId>endorsed_apis</artifactId>
<version>8.0.0.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>1.1.4.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-build</artifactId>
<version>1.1.4.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-container-spi</artifactId>
<version>1.1.4.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<version>1.1.4.Final</version>
<scope>test</scope>
</dependency>
Java 6中,Junit的4.12,IDE 4.4.2月神
預先感謝您,我就明白了很多
WebSphere Application Server從不使用'mappedName'。如果它有效果,我不知何故懷疑你實際上正在使用WebSphere可嵌入容器。 –
Hi Brett,在LoadableExtension類中,您有一個可以覆蓋的註冊方法在這裏,您可以調用WebSphereEmbeddedContainer。 – smarra