users@genericjmsra.java.net

Connecting to Queues in Tibco using JNDI

From: Srinivasan Rajagopalan <reachsrini_at_gmail.com>
Date: Mon, 10 Jan 2011 23:42:57 -0800

Hi Nigel



 As per your suggestion , I wrote a simple java client and it is working
fine . I am able to look up without any issues. I verified escape characters
also . Can you pls check whether the following ones are correct.


./asadmin create-resource-adapter-config --threadpools threadpool-1
--property
SupportsXA=false:ProviderIntegrationMode=jndi:JndiProperties=java.naming.factory.url.pkgs\\=com.tibco.tibjms.naming,java.naming.factory.initial\\=com.sun.jndi.ldap.LdapCtxFactory,java.naming.provider.url\\=ldap\\://dsxstage.cisco.com:LogLevel=FINEST
genericra

./asadmin deploy --name genericra
/users/profiler/SDK/lib/addons/resourceadapters/genericjmsra/genericra.rar

./asadmin create-connector-connection-pool --raname genericra
--connectiondefinition javax.jms.QueueConnectionFactory --property
ConnectionFactoryJndiName=CN\\=stage\\,OU\\=profiler\\,OU\\=ConnectionFactory\\,OU\\=profiler\\.queue\\.input\\,OU\\=jmsObjects\\,OU\\=jms\\,OU\\=Apps\\,O\\=
cco.cisco.com inpool

./asadmin create-connector-resource --poolname inpool
jms/inputConnectionFactory

./asadmin create-admin-object --raname genericra --restype javax.jms.Queue
--property
DestinationJndiName=CN\\=stage\\,OU\\=Destination\\,OU\\=profiler\\.queue\\.input\\,OU\\=jmsObjects\\,OU\\=jms\\,OU\\=Apps\\,O\\=
cco.cisco.com jms/input








The stack trace shows the underlying cause to be a NullPointerException in
the JNDI client, probably because the JNDI name you're supplying for the
connection factory or destination is invalid and it can't be parsed
correctly. Check the JNDI names being used (perhaps you could try looking
them up from a simple Java client to make sure they work), and that you are
using escape characters correctly.





Hi,



In our project we are using Glass Fish Application Server 9.1.2 and we need
to connect to the queue in Tibco . We have a MDB which needs to listen to
the queue in the Tibco. We created the Generic Resource Adapter and we are
getting the following error in the server log.



[#|2011-01-05T02:31:03.896-0600|WARNING|sun-appserver9.1|com.sun.genericjmsra|_ThreadID=10;_ThreadName=main;_RequestID=5382983d-0d54-4496-a70f-9ff50c8b73ae;|The
log message is null.

javax.resource.spi.InvalidPropertyException

        at
com.sun.genericra.util.ExceptionUtils.newInvalidPropertyException(ExceptionUtils.java:42)

        at
com.sun.genericra.util.ObjectBuilderFactory$JndiObjectBuilder.createObject(ObjectBuilderFactory.java:100)

        at com.sun.genericra.util.ObjectBuilder.build(ObjectBuilder.java:99)

        at
com.sun.genericra.inbound.EndpointConsumer.initializeAdministeredObjects(EndpointConsumer.java:333)

        at
com.sun.genericra.inbound.EndpointConsumer.<init>(EndpointConsumer.java:74)

        at
com.sun.genericra.inbound.EndpointConsumer.<init>(EndpointConsumer.java:79)

        at
com.sun.genericra.GenericJMSRA.getXAResources(GenericJMSRA.java:278)

        at
com.sun.enterprise.resource.ResourceInstaller.recoverInboundTransactions(ResourceInstaller.java:896)

        at
com.sun.enterprise.resource.ResourceInstaller.recoverXAResources(ResourceInstaller.java:334)

        at
com.sun.enterprise.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:205)

        at
com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:442)

        at
com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:120)

        at com.sun.enterprise.server.PEMain.run(PEMain.java:411)

        at com.sun.enterprise.server.PEMain.main(PEMain.java:338)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)

Caused by: java.lang.NullPointerException

        at javax.naming.InitialContext.getURLScheme(InitialContext.java:269)

        at
javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:318)

        at javax.naming.InitialContext.lookup(InitialContext.java:392)

        at
com.sun.genericra.util.ObjectBuilderFactory$JndiObjectBuilder.createObject(ObjectBuilderFactory.java:98)

        ... 17 more



We are not sure which property is invalid .