1

I get a java.lang.ClassNotFoundException when trying to create a websphere mq connection factory through wsadmin.

WASX7015E: Exception running command: "AdminTask.createWMQConnectionFactory(...)"; exception information:
 com.ibm.websphere.management.exception.ConnectorException
org.apache.soap.SOAPException: [SOAPException: faultCode=SOAP-ENV:Client; msg=com.ibm.ws.messaging.admin.command.AdminCommandException
Server stack trace
JMXTransformException java.lang.ClassNotFoundException: com.ibm.ws.messaging.admin.command.AdminCommandException
    at java.lang.Class.forNameImpl(Native Method)
    at java.lang.Class.forName(Class.java:185)
    at com.ibm.ws.util.WsObjectInputStream.loadClass(WsObjectInputStream.java:228)
    at com.ibm.ws.util.WsObjectInputStream.access$000(WsObjectInputStream.java:54)
    ...

I'm using a websphere application server wsadmin thin client, based on this article http://www.ibm.com/developerworks/websphere/library/techarticles/1207_vansickel/1207_vansickel.html.

I probably have to include one or more jars from websphere for this to succeed. Can somebody tell me which ones?

Currently I have these jars on the classpath:

/usr/share/wsadmin/lib/jython/jython.jar
/usr/share/wsadmin/lib/com.ibm.ws.admin.client_7.0.0.jar
/usr/share/wsadmin/lib/com.ibm.ws.security.crypto.jar
/usr/share/wsadmin/lib/batch.jar

I'm using Websphere 7.0.0.

  • Since you use thin client, it is possible that the call throws some other exception and the exception class is absent from thin client, hence you get CNFE. How about running the same command on full WAS? This could help you to find the root cause; after fixing it you should be able to run AdminTask.createWMQConnectionFactory also in thin client. – Marcin Płonka Jan 27 '16 at 19:10
  • When I do this on a full WAS, the same command is executed without any errors. – Pieter Avonts Jan 28 '16 at 18:40

1 Answers1

0

It's odd, but I found a reference to this CNFE occuring when you reference a queue that doesn't exist or whose case differs from the one in your wsadmin invocation. IOW it's some kind of follow-on failure only.

Maybe triple-check any parameters, especially with respect to case.

http://www-01.ibm.com/support/docview.wss?uid=swg21631640

covener
  • 17,402
  • 2
  • 31
  • 45
  • I'm just creating the connection factory here, not yet using it so the names don't really matter. Anyway, the exact same command on a full WAS installation is executed without any errors (connected to the same dmgr). – Pieter Avonts Jan 28 '16 at 18:44