ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » cannot access javax.resource.spi.ConnectionManager

Post new topic  Reply to topic
 cannot access javax.resource.spi.ConnectionManager « View previous topic :: View next topic » 
Author Message
rahoor
PostPosted: Thu Aug 09, 2007 9:51 am    Post subject: cannot access javax.resource.spi.ConnectionManager Reply with quote

Apprentice

Joined: 21 Jul 2003
Posts: 34

This occurs on an AIX 5.2, running Java 1.4 and MQ 6.0.2.1

I am attempting to specify a channel table file for the URL, but get an error during creating the MQQueueManager object:

Quote:
$ /usr/java14_64/bin/javac jmsFailover.java
jmsFailover.java:27: cannot access javax.resource.spi.ConnectionManager
file javax/resource/spi/ConnectionManager.class not found
MQQueueManager qMgr = new MQQueueManager(argv[1], CCDT1 );


The same code compiles, if I exclude the second paramter, CCDT1, from above:
MQQueueManager qMgr = new MQQueueManager(argv[1] );

I have looked in all the jars, and there is indeed no javax.resource/spi/ConnectionManager.class. The question is which package should it be in and where to I dowload it from?

Any suggestions on how to resolve would be appreciated.

Code:
import com.ibm.mq.*;
import java.io.*;
import java.net.*;
import java.util.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class jmsFailover
{
  public static void main(String[] argv)
   throws MQException,java.io.IOException
  {

    if ( argv.length < 1 ) {
     System.out.println("Usage: host QMGR Queue Channel port ");
     System.out.println("EXAMPLE:");
     System.out.println("java jmsClient.class tswbi01 TSWBI01 BD1HA01_SRV SYSTEM.AUTO.SVRCONN 1440");
     System.exit(1);
    }
    java.net.URL CCDT1 = new URL("file://var/mqm/qmgrs/"+ Qmgr + "/@ipcc/AMQCLCHL.TAB");
    MQEnvironment.hostname = argv[0];
    MQEnvironment.channel = argv[3];
    MQEnvironment.port=Integer.parseInt(argv[4].trim());
    String qName = argv[2];
    //MQEnvironment.userID="password";
    //MQEnvironment.password="userid";
    MQQueueManager qMgr = new MQQueueManager(argv[1], CCDT1 );
    //MQQueueManager qMgr = new MQQueueManager(argv[1] );
    int openOptions = MQC.MQOO_INPUT_AS_Q_DEF|
      MQC.MQOO_OUTPUT|MQC.MQOO_INQUIRE;
    MQQueue q = qMgr.accessQueue( qName, openOptions,null,null,null);

    MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY,
    MQC.TRANSPORT_MQSERIES);

    System.out.println("hello");

    MQMessage msg = new MQMessage();
    msg.writeUTF("A Message from  jmsFailover!");
    MQPutMessageOptions pmo = new MQPutMessageOptions();
    MQGetMessageOptions gmo = new MQGetMessageOptions();
    q.put(msg,pmo);
    int d=q.getCurrentDepth();
    System.out.println("Put one message, "+ qName + " Q Depth is:"+d);
    q.get(msg,gmo);
    d=q.getCurrentDepth();
    System.out.println("Got one message, "+ qName + " Q Depth is:"+d);

    q.close();
    qMgr.disconnect();
  }
}
    Quote:
    Back to top
    View user's profile Send private message
    fjb_saper
    PostPosted: Thu Aug 09, 2007 4:08 pm    Post subject: Reply with quote

    Grand High Poobah

    Joined: 18 Nov 2003
    Posts: 20756
    Location: LI,NY

    What are the MQ jar files on your class path?
    _________________
    MQ & Broker admin
    Back to top
    View user's profile Send private message Send e-mail
    rahoor
    PostPosted: Fri Aug 10, 2007 9:28 am    Post subject: Reply with quote

    Apprentice

    Joined: 21 Jul 2003
    Posts: 34

    fjb_saper wrote:
    What are the MQ jar files on your class path?


    I sure did miss that! Had not added /usr/mqm/java/lib/connector.jar to CLASSPATH and had also missed finding that class in the /usr/mqm/java/lib/connector.jar.
    Thanks
    Back to top
    View user's profile Send private message
    Display posts from previous:   
    Post new topic  Reply to topic Page 1 of 1

    MQSeries.net Forum Index » IBM MQ Java / JMS » cannot access javax.resource.spi.ConnectionManager
    Jump to:  



    You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot vote in polls in this forum
    Protected by Anti-Spam ACP
     
     


    Theme by Dustin Baccetti
    Powered by phpBB © 2001, 2002 phpBB Group

    Copyright © MQSeries.net. All rights reserved.