I am trying to make a standalone JMS application which is currently working with JBoss work with Glassfish. The GF Im using is a current 4.0 that came as part of the Oracle JEE 7.0 download, running right out of the box with the following additions:
[root@ftgme2 bin]# asadmin list-jms-hosts
default_JMS_host
Command list-jms-hosts executed successfully.
[root@ftgme2 bin]# asadmin list-jms-resources
jms/queue/test1
jms/queue/test2
jms/__defaultConnectionFactory
Command list-jms-resources executed successfully.
[root@ftgme2 bin]#
I have tried getting an InitialContext with and without a jndi.properties file, but I get the same NullPointerException in each case. Here's the jndi.properties:
java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory
java.naming.factory.url.pkgs=com.sun.enterprise.naming
java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl
java.naming.provider.url=java://192.168.3.102:8686
Using Google, I found others with a similar problem who claim to have fixed it by manually including appserv-rt.jar and gf_client.jar from the GF subdirectories. The problem is, I am building the project with Maven, and I don't want to shoehorn a bunch of JARs in manually.
Does anyone have a definitive list of Maven dependencies that will add the needed JARs to a standalone client application ? In searching the Maven repositories with the NetBeans tool, I find several hits for appserv-tr and gf-client, but I can't tell which are correct. When I add the ones I've tried to add, I either continue to get the NPE or else the project byuld fails saying that POMs for 7 or 8 GF JARs are missing.
There certainly enough GF presence in the repositories to indicate that this should be possible. Any assistance appreciated.
The problem seems to be that the included dependencies are requiring older eclipse-persistence dependencies which are no longer available:
------------------------------------------------------------------------
The POM for org.eclipse.persistence:javax.persistence:jar:2.0.4.v201112200901 is missing, no dependency information available
The POM for org.eclipse.persistence:org.eclipse.persistence.core:jar:2.3.2 is missing, no dependency information available
The POM for org.eclipse.persistence:org.eclipse.persistence.jpa:jar:2.3.2 is missing, no dependency information available
The POM for org.eclipse.persistence:org.eclipse.persistence.jpa.modelgen:jar:2.3.2 is missing, no dependency information available
The POM for org.eclipse.persistence:org.eclipse.persistence.moxy:jar:2.3.2 is missing, no dependency information available
The POM for org.eclipse.persistence:org.eclipse.persistence.oracle:jar:2.3.2 is missing, no dependency information available
The POM for org.eclipse.persistence:org.eclipse.persistence.antlr:jar:2.3.2 is missing, no dependency information available
The POM for org.eclipse.persistence:org.eclipse.persistence.asm:jar:2.3.2 is missing, no dependency information available
The POM for org.eclipse.persistence:javax.persistence:jar:2.0.105.v201212201717 is missing, no dependency information available
Downloading: http://repo.maven.apache.org/maven2/org/eclipse/persistence/org.eclipse....
The POM for org.eclipse.persistence:org.eclipse.persistence.antlr:jar:3.2.0.v201206041011 is missing, no dependency information available
Downloading: http://repo.maven.apache.org/maven2/org/eclipse/persistence/org.eclipse....
The POM for org.eclipse.persistence:org.eclipse.persistence.asm:jar:3.3.1.v201206041142 is missing, no dependency information available
Downloading: http://repo.maven.apache.org/maven2/org/eclipse/persistence/org.eclipse....
Downloading: http://repo.maven.apache.org/maven2/org/eclipse/persistence/org.eclipse....
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 4.840s
Finished at: Tue Jun 24 12:16:44 GMT-05:00 2014
Final Memory: 14M/167M
------------------------------------------------------------------------
Failed to execute goal on project dpsrJMS: Could not resolve dependencies for project com.treehouse:dpsrJMS:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: org.eclipse.persistence:org.eclipse.persistence.core:jar:2.3.2, org.eclipse.persistence:org.eclipse.persistence.jpa:jar:2.3.2, org.eclipse.persistence:org.eclipse.persistence.jpa.modelgen:jar:2.3.2, org.eclipse.persistence:org.eclipse.persistence.moxy:jar:2.3.2, org.eclipse.persistence:org.eclipse.persistence.oracle:jar:2.3.2, org.eclipse.persistence:javax.persistence:jar:2.0.105.v201212201717, org.eclipse.persistence:org.eclipse.persistence.antlr:jar:3.2.0.v201206041011, org.eclipse.persistence:org.eclipse.persistence.asm:jar:3.3.1.v201206041142: Failure to find org.eclipse.persistence:org.eclipse.persistence.core:jar:2.3.2 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]