Wildfly 8.1 , does not recognize my dependencies
inkimannen Feb 12, 2015 6:48 AMHello!
I am in the midst of porting my application from Glassfish to Wildfly 8.1.
This is a maven project ( mvn version is 3.0.5 ) , Java 1.7 and it is written in Netbeans 8.0.2.
I have created an EJB-module , the name of my deployable file is ServerApp-ejb.jar .
The EJB-module relies on my 'Domain-service'-module which is a jar - >DomainService-2.0-SNAPSHOT.jar .
When I deploy my my ejb-app.jar in Glassfish :
I can see that Glassfish use the DomainService-2.0-SNAPSHOT.jar that is located in my .m2-directory .
Pressing the Glassfish tab of 'General' I can see the following:
'Libraries'> /home/ingo/.m2/repository/se/server/tutorial/web/DomainService/2.0-SNAPSHOT/DomainService-2.0-SNAPSHOT.jar
I understand that class-loading is done differently in Wildfly than it is done in Glassfish.
I have seen some recommendation regarding war-files and ear-files.
My EJB has the following lines in my pom.xml
<groupId>se.nrm.mediaserver</groupId>
<artifactId>ServerApp-ejb</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>ejb</packaging>
And the following dependencies :
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>se.server.tutorial.web</groupId>
<artifactId>DomainService</artifactId>
<version>2.0-SNAPSHOT</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
<type>jar</type>
</dependency>
</dependencies>
The only file in the above dependency list that is not found is my own.
Could anyone advice me on the right thing to do, I would rather not change my packaging style <packaging>ejb</packaging>.
regards, ingo
Created a small demo-project and added this image later ( so the class-names + packages do not reflect the question above )
So my EJB-module relies on the EJB-Services [module] and the wiring is done in pom.xml .
When I deploy the EJB-module in Wildfly 8.x , wildfly cannot find the 'CrudService.class' .
But Glassfish 3.x can find the dependency.
The dependecy is like this :
@Startup
@Singleton
public class CrudBean implements CrudService {
Error message :
Message was edited by: Ing