Standalone bridges - what am I missing?
happyspaceinvader Jan 3, 2008 2:18 PMI have written a standalone bridge for receiving JMS messages from a Sonic MQ JMS server (unfortunately, there are some extra properties needed to connect to SonicMQ that are not supported by the JMS provider in the ESB config file); however I'm having problems locating all the auxilliary files I need to make this work.
My standalone app is simply getting messages from the Sonic JMS server, converting them into ESB messages and then calling ServiceInvoker to send them to my ESB app, which has an ESB queue configured to handle them. However it all falls apart, when constructing the ServiceInvoker, with the following Exception:
java.lang.NullPointerException at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at org.jboss.soa.esb.util.ClassUtil.forName(ClassUtil.java:65) at org.jboss.soa.esb.services.registry.RegistryFactory.createRegistry(RegistryFactory.java:64) at org.jboss.soa.esb.services.registry.RegistryFactory.getRegistry(RegistryFactory.java:51) at org.jboss.soa.esb.listeners.RegistryUtil.getEprs(RegistryUtil.java:210) at org.jboss.soa.esb.client.ServiceInvoker.loadServiceClusterInfo(ServiceInvoker.java:351) at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:114) at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:137) at net.mycorp.JMSMessageProcessor.process(JMSMessageProcessor.java:33) at net.mycorp.JMSMessageProcessor.run(JMSMessageProcessor.java:67) at net.mycorp.JMSListener.onMessage(JMSListener.java:26) at progress.message.jimpl.Session.deliver(Unknown Source) at progress.message.jimpl.Session.run(Unknown Source) at progress.message.jimpl.Session$SessionThread.run(Unknown Source) org.jboss.soa.esb.listeners.message.MessageDeliverException: Invocation exception. null at org.jboss.soa.esb.client.ServiceInvoker.loadServiceClusterInfo(ServiceInvoker.java:364) at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:114) at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:137) at net.mycorp.JMSMessageProcessor.process(JMSMessageProcessor.java:33) at net.mycorp.JMSMessageProcessor.run(JMSMessageProcessor.java:67) at net.mycorp.JMSListener.onMessage(JMSListener.java:26) at progress.message.jimpl.Session.deliver(Unknown Source) at progress.message.jimpl.Session.run(Unknown Source) at progress.message.jimpl.Session$SessionThread.run(Unknown Source) Caused by: org.jboss.soa.esb.services.registry.RegistryException: Invocation exception. null at org.jboss.soa.esb.services.registry.RegistryFactory.createRegistry(RegistryFactory.java:77) at org.jboss.soa.esb.services.registry.RegistryFactory.getRegistry(RegistryFactory.java:51) at org.jboss.soa.esb.listeners.RegistryUtil.getEprs(RegistryUtil.java:210) at org.jboss.soa.esb.client.ServiceInvoker.loadServiceClusterInfo(ServiceInvoker.java:351) ... 8 more Caused by: java.lang.NullPointerException at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at org.jboss.soa.esb.util.ClassUtil.forName(ClassUtil.java:65) at org.jboss.soa.esb.services.registry.RegistryFactory.createRegistry(RegistryFactory.java:64) ... 11 more
I stepped through the ESB source code in debug and found that the problem occurs at line 58 of org.jboss.soa.esb.services.registry.RegistryFactory (JBoss ESB 4.2.1GA).
String className = Configuration.getRegistryImplementationClass();
This returns null, (when called under my standalone app) thus giving the above Exception. This makes me think I'm missing a vital properties/config file in my standalone app, but that's about as far as I can take it, as I'm very new to JBoss ESB.
Can anyone help?