2

I'll briefly explain the situation.

I need to mavenise an application, and deploy it on websphere, there is two part in the application. Presentation and business. I've successfully mavenised presentation part which only consist in war and this part is now deploy on websphere. But i now encounter problem since 2 day on business part deployment. The fact is that i'm in trouble to package ejb-impl, ejb-client and ear. Indeed, when i try to deploy business part, there is an exception in websphere which refuse to start server because ejb-impl is not finding interfaces

I'm trying to reproduce the working non-mavenise dev architecture which is pack in an EAR as follow when extract :

- META-INF
    - application.xml
    - MANIFEST
- lib 
    - dom4j
    - jaxen
    - ODApi
- EJB3 (implementation)
- EJB3Client (interfaces)
- Common (needed module)
- ODemand (needed module)

And if i extract EJB there is this hierarchy :

- com
- META-INF
    - ejb-jar
    - ibm-ejb-jar-bnd
- EJB3Client (jar)

As you can this, the EJB3Client jar is rightly added.

Now, if i extract my own non-working EAR, this is the result :

- META-INF
    - maven
    - application
    - MANIFEST
- EJB3 (jar)
- EBJ3Client (jar)
- Common (jar)
- ODemand (jar)
- ... (tons of libraries)

After some tests and analysis, i think the problem comes from this EJB(implementation) module ... Indeed, i have tried to add a war module to the project, and no problem, dependency in the war was not added in the root of EAR, but if i add a dependency for example mockito to the EJB's dependencies, it also appear in the root after extracting.

That's why i think the problem comes from the packaging, and when i try to specify in the EJB module, in deployment assembly to add maven dependencies in WEB-INF/lib, it's not possible because if i click

DeploymentAssembly -> Add -> Java Build Path Entries

There is nothing (no maven dependencies) ... I know nothing about EJB and i'm fairly new to Maven, so i'm asking if you guys are some idea to succeed this deployment..

To give a bit more things (can't give a lot, i've remove private informations) :

pom.xml of EAR business :

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <packaging>ear</packaging>
    <artifactId>BusinessEAR</artifactId>

    <parent>
        <artifactId>BusinessParent</artifactId>
        <version>1.0.0-SNAPSHOT</version>
    </parent>

    <dependencies>
        <dependency>
            <artifactId>EJB3</artifactId>
            <version>1.0.0-SNAPSHOT</version>
            <type>ejb</type>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-ear-plugin</artifactId>
                <configuration>
                    <modules>
                        <ejbModule>
                            <artifactId>EJB</artifactId>
                        </ejbModule>
                    </modules>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <encoding>cp1252</encoding>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

pom.xml of EJB :

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <artifactId>EJB3</artifactId>
    <packaging>ejb</packaging>

    <parent>
        <artifactId>BusinessParent</artifactId>
        <version>1.0.0-SNAPSHOT</version>
    </parent>

    <dependencies>

        <dependency>
            <artifactId>EJB3Client</artifactId>
            <version>1.0.0-SNAPSHOT</version>
        </dependency>

        <dependency>
            <artifactId>Common</artifactId>
            <version>1.0.0-SNAPSHOT</version>
        </dependency>

        <dependency>
            <artifactId>ODemand</artifactId>
            <version>1.0.0-SNAPSHOT</version>
        </dependency>

        <dependency>
            <groupId>javax.ejb</groupId>
            <artifactId>ejb-api</artifactId>
            <version>3.0</version>
        </dependency>

        <dependency>
            <groupId>javax.ejb</groupId>
            <artifactId>javax.ejb-api</artifactId>
            <version>3.2</version>
        </dependency>

        <dependency>
            <groupId>dom4j</groupId>
            <artifactId>dom4j</artifactId>
            <version>1.6.1</version>
        </dependency>

        <dependency>
            <groupId>jaxen</groupId>
            <artifactId>jaxen</artifactId>
            <version>1.1.1</version>
        </dependency>

        <dependency>
            <groupId>ODApi</groupId>
            <artifactId>ODApi</artifactId>
            <version>1.5.0</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <encoding>cp1252</encoding>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-ejb-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <ejbVersion>3.1</ejbVersion>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

I can't really give more informations because the application and source code is private sorry..

Finally, i've try to be ISO with my presentation part hierarchy but still, i really think the EJB part is the problem

Thanks in advance

LenweSeregon
  • 132
  • 1
  • 10

0 Answers0