Skip to main content

Error with GenericResource Adapter with Wepsphere MQ 6.0

16 replies [Last post]
marogl
Offline
Joined: 2009-01-19

I have an issue with GlassFish and MQ IBM series.
I have used your guide at https://genericjmsra.dev.java.net/docs/websphere-mq-integration-guide/we....

My application server is on Window Xp .
I think I have an error setting the jndi properties file context
this is my string
"java.naming.factory.url.pkgs\=com.ibm.mq.jms.naming,java.naming.factory.initial\=com.sun.jndi.fscontext.RefFSContextFactory,java.naming.provider.url\=file\:\/C\:\/coda:LogLevel=finest"

the path of binding 's file is C:\coda

the error is

javax.resource.spi.InvalidPropertyException: QCF not found
at com.sun.genericra.util.ExceptionUtils.newInvalidPropertyException(ExceptionUtils.java:42)
at com.sun.genericra.util.ObjectBuilderFactory$JndiObjectBuilder.createObject(ObjectBuilderFactory.java:99)
at com.sun.genericra.util.ObjectBuilder.build(ObjectBuilder.java:99)
at com.sun.genericra.inbound.AbstractConsumer.initializeAdministeredObjects(AbstractConsumer.java:95)
at com.sun.genericra.inbound.AbstractConsumer.(AbstractConsumer.java:63)
at com.sun.genericra.inbound.async.EndpointConsumer.(EndpointConsumer.java:57)
at com.sun.genericra.inbound.EndpointConsumerFactory.createEndpointConsumer(EndpointConsumerFactory.java:45)
at com.sun.genericra.GenericJMSRA.endpointActivation(GenericJMSRA.java:215)

Could you please help ?

Thanks in advance

Maria Rosaria

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
marogl
Offline
Joined: 2009-01-19

Hello again,
I have recreated and redeployed the resource adapter so I am adding the new server log.
It seems to me a little bit clearer

Maria

rampsarathy
Offline
Joined: 2005-11-23

Hi Maria,
In the first parse i see atleast 2 things that have to change

Please remove the "\" in the Jndi properties, see the log statement below, which shows
JndiProperties = java.naming.factory.url.pkgs\=com.ibm.mq.jms.naming,java.naming.factory.initial\=com.sun.jndi.fscontext.RefFSContextFactory,java.naming.provider.url\=

It should be
JndiProperties = java.naming.factory.url.pkgs=com.ibm.mq.jms.naming,java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory,java.naming.provider.url=

If you have entered through admin gui, make the changes appropriately

[#|2009-01-20T11:07:33.761+0100|FINEST|sun-appserver9.1|com.sun.genericjmsra|_ThreadID=10;_ThreadName=main;ClassName=com.sun.genericra.GenericJMSRAProperties;MethodName=setResourceAdapter;_RequestID=f4d1601a-f111-4ebd-ab70-7864679ef084;|setResourceAdapter com.sun.genericra.GenericJMSRA@efe7d783{ConnectionFactoryClassName = null},{QueueConnectionFactoryClassName = null},{TopicConnectionFactoryClassName = null},{XAConnectionFactoryClassName = null},{XAQueueConnectionFactoryClassName = null},{XATopicConnectionFactoryClassName = null},{QueueClassName = null},{TopicClassName = null},{UnifiedDestinationClassName = null},{ConnectionFactoryProperties = null},{JndiProperties = java.naming.factory.url.pkgs\=com.ibm.mq.jms.naming,java.naming.factory.initial\=com.sun.jndi.fscontext.RefFSContextFactory,java.naming.provider.url\=file:/C:/coda},{ProviderIntegrationMode = jndi},{CommonSetterMethodName = null},{SupportsXA = true},{DeliveryType = null},{UseFirstXAForRedelivery = false},|#]^M
^M

Next, the classpath-suffix configuration in domain.xml is not correct, there is a "," separating the ibm jars, the separator should have been a ";" (semi-colon), please correct this

Thanks
-Ramesh

marogl
Offline
Joined: 2009-01-19

Hello,
I did what you suggested but the error is still the same

Looking the JNDI name :QCF
javax.resource.spi.InvalidPropertyException: QCF not found

thanks for the patience :)

Maria

rampsarathy
Offline
Joined: 2005-11-23

Could you please post doman.xml and server.log after the change

marogl
Offline
Joined: 2009-01-19

please find them.

rampsarathy
Offline
Joined: 2005-11-23

please fix this also "file\:\/C\:\/coda" , should look like file:/C:/coda when its printed in logs

Also, now there are 2 ";" in classpath suffix, (one is sufficient), but i doubt that may cause any issue.

marogl
Offline
Joined: 2009-01-19

Hi,
now the application can find QCF!
But I have still an error :)

Registering a endpoint consumer, transaction support :true
javax.resource.ResourceException: MDB is configured to use container managed transaction. But SupportsXA is configured to false in the resource adapter.

thanks a lot for your kind help :) :)

Maria

marogl
Offline
Joined: 2009-01-19

Hello again,
I have changed the SupportXA to true and now I get this kind of error :

Registering a endpoint consumer, transaction support :true
javax.resource.ResourceException: SupportsXA is configured to true , but ConnectionFactory configured is not XA capable.

Is there anything that I need to change ?

Thanks

Maria

rampsarathy
Offline
Joined: 2005-11-23

You have 2 options
If you want XA transaction support, then you have to use xaqcf (created as mentioned in the document) and also ensure that you use XAQueueConnectionFactory while creating mypool

If you do not want XA transaction , then you have to make SupportsXA false, and then ensure that your MDB is not transacted (deployment descriptor should denote no transaction.

-Ramesh

marogl
Offline
Joined: 2009-01-19

now is ok !
I used the first option :)

I have the last error I hope
javax.resource.ResourceException: MQJMS2005: Creazione di MQQueueManager non riuscita per 'localhost:QM1'
at com.sun.genericra.util.ExceptionUtils.newResourceException(ExceptionUtils.java:73)

Creazione di MQQueueManager non riuscita per 'localhost:QM1' means failure in the creation of MQQueueManager fro localhost QM1

have you any suggestion ?

I appreciated a lot your patience

Maria

rampsarathy
Offline
Joined: 2005-11-23

please check if your qm and listener are running (on localhost), and if you have started the listener on a non-default port or the WSMQ is running on a different server then you should configure the QCF appropriately.

-Ramesh

marogl
Offline
Joined: 2009-01-19

Everything is ok now.

thanks for all your help and patience :)

regards
Maria

rashm
Offline
Joined: 2009-01-21

Hi Maria,

Can you please help me?

http://forums.java.net/jive/thread.jspa?threadID=56409&tstart=0

i am trying to subscribe MDB to weblogic messaging...

please see the link above.

Thanks for your time.

marogl
Offline
Joined: 2009-01-19

Hello,
I have just seen your post.
Do you stiil need help ?
In case of yes, what exactly you need ?

Maria

rampsarathy
Offline
Joined: 2005-11-23

Hi Maria,
Should'nt the properties be like this

JndiProperties=java.naming.factory.url.pkgs\\=com.ibm.mq.jms.naming,java.naming.factory.initial\\=com.sun.jndi.fscontext.RefFSContextFactory,java.naming.provider.url\\=
file\:\/C\:\/coda:LogLevel=finest genericra
Also, could you please post the section of domain.xml that has the ra config and also
the server.log
Also, please double check if QCF is defined in C:\coda\.bindings file

-Ramesh

marogl
Offline
Joined: 2009-01-19

hello Ramesh,
thanks a lot for your kind reply.

Please find the domain.xml and the server log .
I have already checked QCF is present in binding file.
I have another question:
I set the property from the GUI of the admin console, could this make the difference ?

Maria