amqp doesn't exist as an schema... Artemis doesn't implement the AMQP
protocol itself.

Look at the amqp example, where the proper API / library is used.


it is under:

examples/protocols/amqp/queue/src/main/java/org/apache/activemq/artemis/jms/example


Notice the package name is:

import org.apache.qpid.jms.JmsConnectionFactory;


And that is coming from:


   <dependencies>

      <dependency>

         <groupId>org.apache.qpid</groupId>

         <artifactId>qpid-jms-client</artifactId>

         <version>0.5.0</version>

      </dependency>

   </dependencies>




The example should be all inclusive.


On Wed, Jan 13, 2016 at 2:54 PM, spruitt <steve.pru...@hp.com> wrote:
> Boy, getting a simple client working is a chore.
>
> Properties p = new Properties();
> p.put("java.naming.factory.initial",
> "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
> p.put("connectionFactory.ConnectionFactory", "amqp://localhost:5672");
> p.put("queue.queue/exampleQueue", "exampleQueue");
> initialContext = new InitialContext(p);
>
> Results in:
> java.lang.NullPointerException: Schema amqp not found
>         at
> org.apache.activemq.artemis.utils.uri.URIFactory.newObject(URIFactory.java:56)
>
> atorg.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory.createConnectionFactory(ActiveMQInitialCntextFactory.java:159)
> :
> Exception in thread "main" javax.naming.NamingException: Invalid broker URL
>         at
> org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory.getInitialContext(ActiveMQInitialContexFactory.java:65)
>         at 
> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
>
>
>
> --
> View this message in context: 
> http://activemq.2283324.n4.nabble.com/Schema-amqp-not-found-tp4705950.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
Clebert Suconic

Reply via email to