2

I'm writing a standalone client for an ejb application deployed to jboss wildfly 9.0.1.Final. The documentation I've reviewed suggests there is a readme file (readme-ejb-jms.txt) in the wildfly directory. This file contained the following suggestion for the maven dependencies:

<dependencies>
    <dependency>
        <groupId>org.jboss.as</groupId>
        <artifactId>jboss-as-ejb-client-bom</artifactId>
        <type>pom</type>
    </dependency>
    <dependency>
        <groupId>org.jboss.as</groupId>
        <artifactId>jboss-as-jms-client-bom</artifactId>
        <type>pom</type>
    </dependency>
</dependencies>

If I use this I get an error saying version is required so I modified the dependencies to look like this:

    <dependency>
        <groupId>org.jboss.as</groupId>
        <artifactId>jboss-as-ejb-client-bom</artifactId>
        <version>9.0.1.Final</version>
        <type>pom</type>
    </dependency>
    <dependency>
        <groupId>org.jboss.as</groupId>
        <artifactId>jboss-as-jms-client-bom</artifactId>
        <version>9.0.1.Final</version>
        <type>pom</type>
    </dependency>

When I run mvn clean install with the above I get this error:

The following artifacts could not be resolved: 
org.jboss.as:jboss-as-ejb-client-bom:pom:9.0.1.Final, 
org.jboss.as:jboss-as-jms-client-bom:pom:9.0.1.Final: 
Failure to find org.jboss.as:jboss-as-ejb-client-bom:pom:9.0.1.Final 

The full output from mvn clean install is shown below:

C:\_WORKSPACE\workspace\_myapp\myappjbosswildflyclient>mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building myappjbosswildflyclient 4.3.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.jboss.as:jboss-as-ejb-client-bom:pom:9.0.1.Final is missing, no dependency information available
[WARNING] The POM for org.jboss.as:jboss-as-jms-client-bom:pom:9.0.1.Final is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.957s
[INFO] Finished at: Tue Aug 04 17:17:04 EDT 2015
[INFO] Final Memory: 5M/118M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project myappjbosswildflyclient: Could not resolve dependencies for project mycompany-myapp:myappjbosswildflyclient:jar:4.3.0-SNAPSHOT: The following artifacts could not be resolved: org.jboss.as:jboss-as-ejb-client-bom:pom:9.0.1.Final, org.jboss.as:jboss-as-jms-client-bom:pom:9.0.1.Final: Failure to find org.jboss.as:jboss-as-ejb-client-bom:pom:9.0.1.Final in http://downl
oad.java.net/maven/2 was cached in the local repository, resolution will not be reattempted until the update interval of java.net2 has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
C:\_WORKSPACE\workspace\_myapp\myappjbosswildflyclient>

What should I be using for these dependencies?

John
  • 3,458
  • 4
  • 33
  • 54
  • I get the same error if I run mvn clean install -U – John Aug 04 '15 at 21:34
  • I'm still having no luck with getting this to work. I have found many, many version of how the dependency should look but copy and pasting these into my pom.xml file all give similar errors. Some of the things that did not work: http://mvnrepository.com/artifact/org.wildfly/wildfly-client-all/9.0.1.Final, Tried several of these with no luck: http://mvnrepository.com/artifact/org.wildfly/wildfly-ejb-client-bom, http://mvnrepository.com/artifact/org.wildfly/wildfly-ejb-client-bom/9.0.1.Final, etc. – John Aug 05 '15 at 14:16

4 Answers4

4

This works fine for me:

<dependency>
    <groupId>org.wildfly</groupId>
    <artifactId>wildfly-ejb-client-bom</artifactId>
    <type>pom</type>
    <version>9.0.1.Final</version>
</dependency>
<dependency>
    <groupId>org.wildfly</groupId>
    <artifactId>wildfly-jms-client-bom</artifactId>
    <type>pom</type>
    <version>9.0.1.Final</version>
</dependency>
Tea Curran
  • 2,923
  • 2
  • 18
  • 22
  • I get the following errors using the above (I'm on java 1.7.0-51) `[ERROR] error: error reading C:\Users\jgresh\.m2\repository\org\jboss\jboss-ejb-client\2.1.1.Final\jboss-ejb-client-2.1.1.Final.jar; invalid CEN header (bad signature)...` – John Aug 05 '15 at 15:21
  • I deleted my jboss dir in my .m2 repository and this version works now. Thanks for the help! – John Aug 05 '15 at 15:31
1

It looks like you don't have access to the maven repository or could have disconnected while retrieving the dependency jars. You can manually delete your local repo and retry the build

TTM
  • 21
  • 3
1

Your dependencies must be of type POM.

<type>pom</type>
Ermal
  • 441
  • 5
  • 19
0

I found this post and followed the suggestions it provided:

https://developer.jboss.org/thread/237382

My dependencies look like this:

    <dependency>
        <groupId>org.wildfly</groupId>
        <artifactId>wildfly-ejb-client-bom</artifactId>
        <type>pom</type>
        <version>8.0.0.Final</version>
        <scope>import</scope>
    </dependency>
    <dependency>
        <groupId>org.wildfly</groupId>
        <artifactId>wildfly-jms-client-bom</artifactId>
        <type>pom</type>
        <version>8.0.0.Final</version>
        <scope>import</scope>
    </dependency>

I am now able to build the project and create the initial context for the ejb look up.

I Tried using 9.0.1.Final and 9.0.0.Final for the versions with no luck.

I am very uncomfortable with the fact that the versions do not match and with the fact that the dependencies documented in the README-EJB-JMS.txt file provided with the distribution does not work.

John
  • 3,458
  • 4
  • 33
  • 54