Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8419081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:30:44+00:00 2026-06-10T02:30:44+00:00

I’ve created a new project which will only run the integration test with maven-ear-plugin

  • 0

I’ve created a new project which will only run the integration test with

  • maven-ear-plugin
  • maven-failsafe-plugin
  • maven-embedded-glassfish-plugin

When I set the packaging to ear the ear file gets created, glassfish runs but the tests are being ignored and I get the following message

[failsafe:integration-test] No tests to run.

and glassfish undeploy fails

[embedded-glassfish:undeploy]

17/08/2012 10:08:17 AM PluginUtil doUndeploy

INFO: Deployer = com.sun.enterprise.admin.cli.embeddable.DeployerImpl@105f0f87

17/08/2012 10:08:17 AM com.sun.enterprise.loader.ASURLClassLoader$SentinelInputStream
report

WARNING: Input stream has been finalized or forced closed without being explicitly
closed; stream instantiation reported in following stack trace

java.lang.Throwable

at com.sun.enterprise.loader.ASURLClassLoader$SentinelInputStream.
(ASURLClassLoader.java:1230)

When I set the packing to jar
I get

Running packageName.MyServiceTest

17/08/2012 10:09:34 AM com.sun.enterprise.v3.server.CommonClassLoaderServiceImpl
findDerbyClient

INFO: Cannot find javadb client jar file, derby jdbc driver will not be available by
default.

org.omg.CORBA.COMM_FAILURE: FINE: IOP00410001: Connection failure: socketType:
IIOP_CLEAR_TEXT; hostname: localhost; port: 3700 vmcid: OMG minor code: 1
completed: No

at sun.reflect.GeneratedConstructorAccessor27.newInstance(Unknown Source)

and glassfish does not start

I know it has to do something with Maven lifecycle that its not allowing me to create the ear file, start the glassfish embedded server and run integration tests in the same project.

Can someone please suggest me a solution ? I’m trying to create the ear file with just the EJB and Business entities project and deploy it to embedded glassfish server to run the integration test with maven-failsafe-plugin instead of deploying the ear file created by the parent pom.xml which adds UI and other projects into the ear file.

Here is my pom.xml file

http://maven.apache.org/xsd/maven-4.0.0.xsd”>
4.0.0

<parent>
    <groupId>company.MyProject</groupId>
    <artifactId>MyProject</artifactId>
    <version>3.8.1-SNAPSHOT</version>
</parent>

<artifactId>MyProject-integration-test</artifactId>
<packaging>jar</packaging>

<name>MyProject Integration Tests</name>

<properties>
    <ear-final-name>MyProject-integration-test-${project.version}</ear-final-name>
</properties>

<dependencies>
    <dependency>
        <groupId>org.glassfish.extras</groupId>
        <artifactId>glassfish-embedded-all</artifactId>
        <version>3.1.1</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.concordion</groupId>
        <artifactId>concordion</artifactId>
        <version>1.4.2</version>
        <scope>test</scope>
        <type>jar</type>
    </dependency>
    <dependency>
        <groupId>org.concordion</groupId>
        <artifactId>concordion-extensions</artifactId>
        <version>1.0.2</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>MyProject-ejb</artifactId>
        <version>${project.version}</version>
        <type>ejb</type>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>com.aspose</groupId>
        <artifactId>aspose-words-jdk15</artifactId>
        <version>${aspose.libraryVersion}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>javax.persistence</groupId>
        <artifactId>persistence-api</artifactId>
        <version>1.0.2</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>hibernate-entitymanager</groupId>
        <artifactId>hibernate-entitymanager</artifactId>
        <version>3.4.0.GA</version>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>3.3.2.GA</version>
    </dependency>
    <dependency>
        <groupId>hibernate-annotations</groupId>
        <artifactId>hibernate-annotations</artifactId>
        <version>3.4.0.GA</version>
    </dependency>
    <dependency>
        <groupId>hibernate-commons-annotations</groupId>
        <artifactId>hibernate-commons-annotations</artifactId>
        <version>3.4.0.GA</version>
    </dependency>
    <dependency>
        <groupId>com.oracle</groupId>
        <artifactId>ojdbc14</artifactId>
        <version>10.1.0.5.0</version>
    </dependency>
    <dependency>
        <groupId>ehcache</groupId>
        <artifactId>ehcache</artifactId>
        <version>1.2.3</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.6.6</version>
    </dependency>
    <dependency>
        <groupId>org-apache-commons-logging</groupId>
        <artifactId>org-apache-commons-logging</artifactId>
        <version>1.1.0</version>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-ear-plugin</artifactId>
            <version>2.5</version>
            <configuration>
                <version>5</version>
                <displayName>MyProject</displayName>
                <defaultLibBundleDir>lib</defaultLibBundleDir>
                <finalName>${ear-final-name}</finalName>
                <name>MyProject-integration-test</name>
                <modules>
                    <ejbModule>
                        <groupId>company.MyProject</groupId>
                        <artifactId>MyProject-ejb</artifactId>
                        <bundleFileName>MyProject-ejb.jar</bundleFileName>
                    </ejbModule>
                    <jarModule>
                        <groupId>company.MyProject</groupId>
                        <artifactId>MyProject-business-entities</artifactId>
                        <bundleFileName>MyProject-business-entities-3.8.1-SNAPSHOT.jar</bundleFileName>
                    </jarModule>
                    <jarModule>
                        <groupId>company.MyProject</groupId>
                        <artifactId>MyProject-util</artifactId>
                        <bundleFileName>MyProject-util-3.8.1-SNAPSHOT.jar</bundleFileName>
                    </jarModule>
                </modules>
            </configuration>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.12</version>
            <executions>
                <execution>
                    <id>failsafe-integration-tests</id>
                    <phase>integration-test</phase>
                    <goals>
                        <goal>integration-test</goal>
                    </goals>
                </execution>
                <execution>
                    <id>failsafe-verify</id>
                    <phase>verify</phase>
                    <goals>
                        <goal>verify</goal>
                    </goals>
                </execution>
            </executions>
            <dependencies>
                <dependency>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                    <version>4.8.2</version>
                </dependency>
            </dependencies>
        </plugin>

        <plugin>
            <groupId>org.glassfish</groupId>
            <artifactId>maven-embedded-glassfish-plugin</artifactId>
            <version>3.1.1</version>
            <configuration>
                <goalPrefix>embedded-glassfish</goalPrefix>
                <autoDelete>true</autoDelete>
                <app>${basedir}/target/MyProject-integration-test-${project.version}.ear</app> 
                <port>8080</port>
                <configFile>src/test/resources/glassfish/config/domain.xml</configFile>
            </configuration>
            <executions> 
                <execution>
                    <id>start-glassfish</id>
                    <phase>pre-integration-test</phase>
                    <goals>
                        <goal>start</goal>
                    </goals>
                </execution>
                <execution>
                    <id>glassfish-deploy</id>
                    <phase>pre-integration-test</phase>
                    <goals>
                        <goal>deploy</goal>
                    </goals>
                </execution>
                <execution>
                    <id>glassfish-undeploy</id>
                    <phase>post-integration-test</phase>
                    <goals>
                        <goal>undeploy</goal>
                    </goals>
                </execution>

                <execution>
                    <id>stop-glassfish</id>
                    <phase>post-integration-test</phase>
                    <goals>
                        <goal>stop</goal>
                    </goals>
                </execution>
            </executions> 
        </plugin> 
    </plugins>

</build>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T02:30:46+00:00Added an answer on June 10, 2026 at 2:30 am

    Yep, it working now. Turns out the problem was with my domain.xml file. The default domain.xml comes with the port numbers with prefix 2 which should be removed and in embedded glassfish 3.1 < port> 8080 < /port> does not work if < configFile> is set (ref this doco)
    http://embedded-glassfish.java.net/nonav/plugindocs/3.1/stop-mojo.html.

    I just had to set IIOP port in domain.xml to 3700 and in my test

     Properties props = new Properties();  
     props.put("org.omg.CORBA.ORBInitialPort", "3700");
     Context ctx = new InitialContext(props);   
    

    Thanks guys

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want use html5's new tag to play a wav file (currently only supported
I would like to run a str_replace or preg_replace which looks for certain words
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I'm trying to select an H1 element which is the second-child in its group
I need a function that will clean a strings' special characters. I do NOT

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.