Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Errors when executing maven install with glassfish-embedded-all and arquillian-glassfish-embedded-3.1 artifacts

I'm trying to execute maven install on a pom and the result shown is:

Grave: SEC5054: Certificate has expired

This result appears just after test execution begins. I have been googling over this problem but I've only found solutions that are related to a real glassfish application server. They recommend things like deleting the offending certificates from the folder where they are located and so on (the pages I've seen are mostly like this) or 'unjar' the glassfish-embedded to remove the certification and then jar it again.

Notice that I'm executing a maven install, not an actual deployment on an application server. That's why I cannot take the advice given at many blogs

The pom includes the following dependencies:

 <dependencies>
<dependency>
  <groupId>org.glassfish.main.extras</groupId>
  <artifactId>glassfish-embedded-all</artifactId>
  <version>3.1.2.2</version>
  <scope>provided</scope>
</dependency>
<dependency>
  <groupId>junit</groupId>
  <artifactId>junit</artifactId>
  <version>4.10</version>
  <scope>test</scope>
  <optional>true</optional>
</dependency>
<dependency>
  <groupId>org.jboss.arquillian.junit</groupId>
  <artifactId>arquillian-junit-container</artifactId>
  <version>1.0.0.Final</version>
  <scope>test</scope>
</dependency>
<dependency>
  <groupId>org.jboss.arquillian.container</groupId>
  <artifactId>arquillian-glassfish-embedded-3.1</artifactId>
  <version>1.0.0.CR3</version>
  <scope>test</scope>
</dependency>

like image 534
JPCF Avatar asked Oct 21 '22 23:10

JPCF


1 Answers

This is a known issue at least since Glassfish 3.0.1 and still reported as an Open Issue in Glassfish 3.1.2. Oracle provides some workarounds - that all doesn't apply to your situation. But they also say:

If the instance is not configured this way, ignore the warning. The functionality of the instance is unaffected.

So even if this is a lame answer to a SO question: Don't bother for your test-cases. (Personally I spend far to much time trying to solve the issue.) Either a new version of Glassfish will resolve this issue for us or it will not. Let's stop bothering.

Update:

If you have problems that this triggers a failed build, the following pom works for me without a failed build:

<!--snip-->
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.jboss.arquillian</groupId>
            <artifactId>arquillian-bom</artifactId>
            <version>1.0.3.Final</version>
            <scope>import</scope>
            <type>pom</type>
        </dependency>
    </dependencies>
</dependencyManagement>

<dependencies>
    <dependency>
        <groupId>org.glassfish.main.extras</groupId>
        <artifactId>glassfish-embedded-all</artifactId>
        <version>3.1.2</version>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.11</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.jboss.arquillian.container</groupId>
        <artifactId>arquillian-glassfish-embedded-3.1</artifactId>
        <version>1.0.0.CR4</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.jboss.arquillian.junit</groupId>
        <artifactId>arquillian-junit-container</artifactId>
        <version>1.1.1.Final</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.apache.derby</groupId>
        <artifactId>derbyclient</artifactId>
        <version>10.7.1.1</version>
        <scope>test</scope>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.2</version>
            <configuration>
                <source>1.7</source>
                <target>1.7</target>
            </configuration>
        </plugin>
    </plugins>
</build>
like image 92
xwoker Avatar answered Oct 27 '22 10:10

xwoker