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 » WebSphere Message Broker (ACE) Support » JMS Input node property issue - 'Cannot instantiate class'

Post new topic  Reply to topic Goto page 1, 2  Next
 JMS Input node property issue - 'Cannot instantiate class' « View previous topic :: View next topic » 
Author Message
sksharma
PostPosted: Wed May 28, 2008 5:20 am    Post subject: JMS Input node property issue - 'Cannot instantiate class' Reply with quote

Apprentice

Joined: 18 Apr 2008
Posts: 28

I am using MB 6.0 and MQ 6.0
Step 1: rummqsc JMSQM < "D:\Program Files\IBM\WebSphere MQ\Java\bin\MQJMS_PSQ.mqsc

Step 2: Created local Queues as INPUTQ and OUTPUTQ

Step 3:
I uncommanded below lines in JMSAdmin
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
PROVIDER_URL=file:/C:/JMSNodes/IBM_WMQ/JNDI

I commanded below lines in JMSAdmin
#INITIAL_CONTEXT_FACTORY=com.sun.jndi.ldap.LdapCtxFactory
#PROVIDER_URL=ldap://polaris/o=ibm,c=us

I copied(MQ_Installation\java\lib*.jar) all MQ jars to
C:\Documents and Settings\All Users\Application Data\IBM\MQSI\shared-classes

Step 4: I created -- C:\JMSNodes\IBM_WMQ\createJNDI.defs

# Define a QueueConnectionFactory
# Only parameters being overridden from their default values are specified.
# This sets up a MQ client binding.
DEF QCF(QCF) +
TRANSPORT(CLIENT) +
QMANAGER(JMSQM) +
HOSTNAME(localhost) +
PORT(1415)

# Define a Queue Destination
DEF Q(INPUTQ) +
QUEUE(INPUTQ) +
QMANAGER(JMSQM)+
#
DEF Q(OUTPUTQ) +
QUEUE(OUTPUTQ) +
QMANAGER(JMSQM)
#
END

Step 5: In command window-- D:\Program Files\IBM\WebSphere MQ\Java\bin>JMSAdmin <C:\JMSNodes\IBM_WMQ\createJNDI.defs

Step 6: First JMSAdmin and after dis ctx
I got folowing objects
Contents of InitCtx

.bindings java.io.File
a INPUTQ com.ibm.mq.jms.MQQueue
a QCF com.ibm.mq.jms.MQQueueConnectionFactory
a OUTPUTQ com.ibm.mq.jms.MQQueue

4 Object(s)
0 Context(s)
4 Binding(s), 3 Administered

end and come out.

Step 7: Created .bindings file as below
C:\JMSNodes\IBM_WMQ\JNDI\.bindings

Step 8: I created a simple flow as JMSInputnode and JMSOutputnode as connected throught wire.
IN Basic, JMSInputnode Properties as below
Initial Contaxt Factory com.sun.jndi.fscontext.RefFSContextFactory
Location JNDI Bindings file:/C:/JMSNodes/IBM_WMQ/JNDI
Connection Factory Name QCF
Backout Destination
Bacout Threshold 0
IN Point to Point, JMSInputnode Properties as below
Source Queue INPUTQ

IN Basic, JMSOutputnode Properties as below
Initial Contaxt Factory com.sun.jndi.fscontext.RefFSContextFactory
Location JNDI Bindings file:/C:/JMSNodes/IBM_WMQ/JNDI
Connection Factory Name QCF
IN Point to Point, JMSInputnode Properties as below
Destination Queue OUTPUTQ

Step 9:While deploying I got following errors in Event Viewer in windows

( BRK.JMS ) WBIMB JMSClient. ''

Broker : BRK
Execution Group : JMS
Message Flow : JMSMQIN_JMSMQOUT
Node : ComIbmJMSClientInputNode::JMSInput >

'' There is a configuration problem with the JNDI Administered objects where: Initial Context Factory = ''''. Location of the bindings = ''file:/C:/JMSNodes/IBM_WMQ/JNDI''. ConnectionFactory Name = ''QCF''. JMS destination = ''INPUTQ''. The JNDI exception text is : ''Cannot instantiate class: ''.

The node could not obtain a JNDI Administered Object because some of the values specified in the node attributes are incorrect

Check the JNDI Administered configuration for the JMS provider used by the node. Either modify the JNDI Administered objects and rebuild the bindings, or change the node attributes and re-deploy the message flow.

Please kindly let me know the issue and give me a resolution for this issue.

Thank in Advance.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed May 28, 2008 2:56 pm    Post subject: Reply with quote

Grand High Poobah

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

Do you really have a qmgr named JMSQM on the box the broker is running on? (localhost 1415)?


_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
AkankshA
PostPosted: Wed May 28, 2008 7:09 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

do you have intercommunication set up between JMSQM and broker's queue manager ??
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
sksharma
PostPosted: Wed May 28, 2008 10:09 pm    Post subject: Reply with quote

Apprentice

Joined: 18 Apr 2008
Posts: 28

Currently, I am using JMSQM only. Before this I used BRKQM as my QueueManager. No intercommunication set up between JMSQM and broker's queue manager.
Back to top
View user's profile Send private message
AkankshA
PostPosted: Wed May 28, 2008 10:32 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

try to set up intercommunication between JMSQM and broker's queue manager and see.
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
sksharma
PostPosted: Wed May 28, 2008 10:34 pm    Post subject: Reply with quote

Apprentice

Joined: 18 Apr 2008
Posts: 28

I created a Queue Manager called JMSQM. After this I followed above steps. And then I created a Broker and Configuration Manager. Finally I deployed the flow. I put input message as 1234 in INPUTQ. I got the below Error.

'' There is a configuration problem with the JNDI Administered objects where: Initial Context Factory = ''''. Location of the bindings = ''file:/C:/JMSNodes/IBM_WMQ/JNDI''. ConnectionFactory Name = ''QCF''. JMS destination = ''INPUTQ''. The JNDI exception text is : ''Cannot instantiate class: ''.

I am giving Initial Context Factory =
com.sun.jndi.fscontext.RefFSContextFactory
. Why is it taking null?
Back to top
View user's profile Send private message
TonyD
PostPosted: Wed May 28, 2008 10:43 pm    Post subject: Reply with quote

Knight

Joined: 15 May 2001
Posts: 540
Location: New Zealand

Its a while since I ran that sample but I seem to remember having problems with the '/' and '\' on the 'Location JNDI Bindings file' property under Windows. Should they all be '/'?
Back to top
View user's profile Send private message Send e-mail
AkankshA
PostPosted: Wed May 28, 2008 10:45 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

TonyD wrote:
Its a while since I ran that sample but I seem to remember having problems with the '/' and '\' on the 'Location JNDI Bindings file' property under Windows. Should they all be '/'?


AFAIK both works for windows but not for unix...
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
sksharma
PostPosted: Wed May 28, 2008 10:55 pm    Post subject: Reply with quote

Apprentice

Joined: 18 Apr 2008
Posts: 28

I am new for MQ and MB. Can you tell how to set up intercommunication between JMSQM and broker's queue manager?
Back to top
View user's profile Send private message
AkankshA
PostPosted: Wed May 28, 2008 11:07 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

intercommunication manual should be of help..


uneed to create channels and queues so that messages can flow across the queue managers...
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
sksharma
PostPosted: Wed May 28, 2008 11:47 pm    Post subject: Reply with quote

Apprentice

Joined: 18 Apr 2008
Posts: 28

Now the time being I created Broker QueueManager as JMSQM using below comments.

mqsicreateconfigmgr JMSConfigMgr -i user -a pw -q JMSQM -w D:\Workpath
mqsicreatebroker BRKJMS -i user -a pw -q JMSQM -n BRKDB -u user -p pw
Broker Name: BRKJMS
Configuration Name:JMSConfigMgr
Still I am facing same below problem.

( BRKJMS.default ) WBIMB JMSClient. ''

Broker : BRKJMS
Execution Group : default
Message Flow : JMSMQIN_JMSMQOUT
Node : ComIbmJMSClientInputNode::JMSInput >

'' There is a configuration problem with the JNDI Administered objects where: Initial Context Factory = ''''. Location of the bindings = ''file:/C:/JMSNodes/IBM_WMQ/JNDI''. ConnectionFactory Name = ''QCF''. JMS destination = ''INPUTQ''. The JNDI exception text is : ''Cannot instantiate class: ''.

The node could not obtain a JNDI Administered Object because some of the values specified in the node attributes are incorrect

Check the JNDI Administered configuration for the JMS provider used by the node. Either modify the JNDI Administered objects and rebuild the bindings, or change the node attributes and re-deploy the message flow.

What can I do?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu May 29, 2008 2:37 am    Post subject: Reply with quote

Grand High Poobah

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

Try :
''file:///C:/JMSNodes/IBM_WMQ/JNDI''
or

''file://localhost/C:/JMSNodes/IBM_WMQ/JNDI''

In any case you should be able to access the TCF/QCF from a sample stand alone JMS program. If you cannot then something is wrong with your setup.


_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
sksharma
PostPosted: Thu May 29, 2008 3:29 am    Post subject: Reply with quote

Apprentice

Joined: 18 Apr 2008
Posts: 28

Hi,

I have one query,
I am giving Initial Context Factory =
com.sun.jndi.fscontext.RefFSContextFactory
Error is throwing like this
Initial Context Factory =""
If I am giving Initial Context Factory =
com.sun.jndi.fscontext.RefFSContextFactory
Error is throwing like this
Initial Context Factory =
""com.sun.jndi.fscontext.RefFSContextFactory""


These things, you can find below. How come like this?

1)
( BRKJMS.default ) WBIMB JMSClient. ''

Broker : BRKJMS
Execution Group : default
Message Flow : JMSMQIN_JMSMQOUT
Node : ComIbmJMSClientInputNode::JMSInput >

'' There is a configuration problem with the JNDI Administered objects where: Initial Context Factory = ''''. Location of the bindings = ''file://localhost/C:/JMSNodes/IBM_WMQ/JNDI''. ConnectionFactory Name = ''QCF''. JMS destination = ''INPUTQ''. The JNDI exception text is : ''Cannot instantiate class: ''.

The node could not obtain a JNDI Administered Object because some of the values specified in the node attributes are incorrect

Check the JNDI Administered configuration for the JMS provider used by the node. Either modify the JNDI Administered objects and rebuild the bindings, or change the node attributes and re-deploy the message flow.

2)
( BRKJMS.default ) WBIMB JMSClient. ''

Broker : BRKJMS
Execution Group : default
Message Flow : JMSMQIN_JMSMQOUT
Node : ComIbmJMSClientInputNode::JMSInput >

'' There is a configuration problem with the JNDI Administered objects where: Initial Context Factory = ''"com.sun.jndi.fscontext.RefFSContextFactory"''. Location of the bindings = ''file://localhost/C:/JMSNodes/IBM_WMQ/JNDI''. ConnectionFactory Name = ''QCF''. JMS destination = ''INPUTQ''. The JNDI exception text is : ''Cannot instantiate class: "com.sun.jndi.fscontext.RefFSContextFactory"''.

The node could not obtain a JNDI Administered Object because some of the values specified in the node attributes are incorrect

Check the JNDI Administered configuration for the JMS provider used by the node. Either modify the JNDI Administered objects and rebuild the bindings, or change the node attributes and re-deploy the message flow.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu May 29, 2008 12:57 pm    Post subject: Reply with quote

Grand High Poobah

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

Can we please have the exact code of how you're defining your initial context?
And how you are doing the lookup?

Thanks
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
TonyD
PostPosted: Thu May 29, 2008 7:24 pm    Post subject: Reply with quote

Knight

Joined: 15 May 2001
Posts: 540
Location: New Zealand

Ran the sample OK with file://C:\JNDI-Directory and file:/C:/JNDI-Directory so was wrong there.

Your queues must be located on the broker QM. The message flow can only read from a local MQ queue and as far as I can tell the broker cannot open a remote queue definition as a JMS queue.

Can you post your .bindings file ... it shouldn't be large.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » JMS Input node property issue - 'Cannot instantiate class'
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.