Announcement

Collapse
No announcement yet.

JBoss MQ communication with 1.6

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • JBoss MQ communication with 1.6

    Hello,

    Is there any major differences between 1.5 and 1.6 with regards to JBoss MQ? I've been banging my head against setting up a JMS Writer Destination for two days now. I've successfully done so with 1.5, but I'm having issues with 1.6 (which I'm kinda forced to use since I'm now on Vista). Anyway, here is my config:

    User JNDI: Yes
    Provider URL: jnp://127.0.0.1:1099/
    Initial Context Factory: org.jnp.interfaces.NamingContextFactory
    Connection Factory Name: java:/ConnectionFactory
    Destination: queue/incomingHL7

    The error:

    Caused by: java.net.MalformedURLException: no protocol: Connector
    at java.net.URL.<init>(URL.java:567)
    at java.net.URL.<init>(URL.java:464)
    at java.net.URL.<init>(URL.java:413)
    at sun.rmi.server.LoaderHandler.pathToURLs(LoaderHand ler.java:747)
    at sun.rmi.server.LoaderHandler.loadClass(LoaderHandl er.java:147)
    at java.rmi.server.RMIClassLoader$2.loadClass(RMIClas sLoader.java:620)
    at org.jboss.system.JBossRMIClassLoader.loadClass(JBo ssRMIClassLoader.java:91)
    at java.rmi.server.RMIClassLoader.loadClass(RMIClassL oader.java:247)
    at sun.rmi.server.MarshalInputStream.resolveClass(Mar shalInputStream.java:197)

    If I change the URL to jnp:////127.0.0.1:1099//, I get this error:

    Caused by: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
    at org.jnp.interfaces.NamingContext.discoverServer(Na mingContext.java:1317)
    at org.jnp.interfaces.NamingContext.checkRef(NamingCo ntext.java:1446)
    at org.jnp.interfaces.NamingContext.lookup(NamingCont ext.java:594)
    at org.jnp.interfaces.NamingContext.lookup(NamingCont ext.java:587)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at com.webreach.mirth.connectors.jms.JmsConnector.cre ateConnectionFactory(JmsConnector.java:167)
    at com.webreach.mirth.connectors.jms.JmsConnector.doI nitialise(JmsConnector.java:130)
    ... 26 more
    Caused by: java.net.SocketTimeoutException: Receive timed out
    at java.net.PlainDatagramSocketImpl.receive0(Native Method)
    at java.net.PlainDatagramSocketImpl.receive(Unknown Source)
    at java.net.DatagramSocket.receive(Unknown Source)
    at org.jnp.interfaces.NamingContext.discoverServer(Na mingContext.java:1287)


    I do have all the necessary JBoss jars in lib/custom and I'm able to connect to jnp://127.0.0.1:1099 using HermesJMS.

    Also, I'm using JBoss 4.0.5.

    Thanks.

    Post edited by: wiggum14, at: 08/29/2007 10:46
    Todd Bush

  • #2
    Re:JBoss MQ communication with 1.6

    In 1.6 we added the ability to connect to a JMS server without having to use JNDI. Can you post more of the stacktrace, specifically the Mirth lines?
    Gerald Bortis | Chief Information Officer | Mirth Corporation

    Comment


    • #3
      Re:JBoss MQ communication with 1.6

      Is there any documentation you can point me to on how to configure communication with a JBoss MQ without using JNDI?

      Here is what appears in the log:

      ERROR 2007-08-30 07:31:44,114 [Thread-0] org.apache.commons.digester.Digester: End event threw exception
      java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.apache.commons.beanutils.MethodUtils.invokeMet hod(MethodUtils.java:216)
      at org.apache.commons.digester.SetRootRule.end(SetRoo tRule.java:209)
      at org.apache.commons.digester.Rule.end(Rule.java:230 )
      at org.apache.commons.digester.Digester.endElement(Di gester.java:1130)
      at org.apache.xerces.parsers.AbstractSAXParser.endEle ment(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl.scanEndElement(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl$FragmentContentDispatcher.dispatch(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl.scanDocument(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse (Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse (Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.AbstractSAXParser.parse( Unknown Source)
      at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser .parse(Unknown Source)
      at org.apache.commons.digester.Digester.parse(Digeste r.java:1685)
      at org.mule.config.builders.AbstractDigesterConfigura tion.process(AbstractDigesterConfiguration.java:11 9)
      at org.mule.config.builders.MuleXmlConfigurationBuild er.configure(MuleXmlConfigurationBuilder.java:202)
      at org.mule.config.builders.MuleXmlConfigurationBuild er.configure(MuleXmlConfigurationBuilder.java:194)
      at com.webreach.mirth.server.Mirth.startMule(Mirth.ja va:229)
      at com.webreach.mirth.server.Mirth.restartMule(Mirth. java:186)
      at com.webreach.mirth.server.Mirth.run(Mirth.java:117 )
      Caused by: org.mule.umo.lifecycle.InitialisationException: Failed to create Jms Connector
      at com.webreach.mirth.connectors.jms.JmsConnector.doI nitialise(JmsConnector.java:137)
      at org.mule.providers.AbstractConnector.initialise(Ab stractConnector.java:233)
      at org.mule.MuleManager.registerConnector(MuleManager .java:491)
      ... 24 more
      Caused by: javax.naming.CommunicationException [Root exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
      java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
      java.net.MalformedURLException: no protocol: Connector]
      at org.jnp.interfaces.NamingContext.lookup(NamingCont ext.java:722)
      at org.jnp.interfaces.NamingContext.lookup(NamingCont ext.java:587)
      at javax.naming.InitialContext.lookup(Unknown Source)
      at com.webreach.mirth.connectors.jms.JmsConnector.cre ateConnectionFactory(JmsConnector.java:167)
      at com.webreach.mirth.connectors.jms.JmsConnector.doI nitialise(JmsConnector.java:130)
      ... 26 more
      Caused by: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
      java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
      java.net.MalformedURLException: no protocol: Connector
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastSe rverRef.java:325)
      at sun.rmi.transport.Transport$1.run(Transport.java:1 53)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport. java:149)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages( TCPTransport.java:466)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandl er.run(TCPTransport.java:707)
      at java.lang.Thread.run(Thread.java:595)
      at sun.rmi.transport.StreamRemoteCall.exceptionReceiv edFromServer(Unknown Source)
      at sun.rmi.transport.StreamRemoteCall.executeCall(Unk nown Source)
      at sun.rmi.server.UnicastRef.invoke(Unknown Source)
      at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      at org.jnp.interfaces.NamingContext.lookup(NamingCont ext.java:625)
      ... 30 more
      Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
      java.net.MalformedURLException: no protocol: Connector
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastSe rverRef.java:282)
      at sun.rmi.transport.Transport$1.run(Transport.java:1 53)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport. java:149)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages( TCPTransport.java:466)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandl er.run(TCPTransport.java:707)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: java.net.MalformedURLException: no protocol: Connector
      at java.net.URL.<init>(URL.java:567)
      at java.net.URL.<init>(URL.java:464)
      at java.net.URL.<init>(URL.java:413)
      at sun.rmi.server.LoaderHandler.pathToURLs(LoaderHand ler.java:747)
      at sun.rmi.server.LoaderHandler.loadClass(LoaderHandl er.java:147)
      at java.rmi.server.RMIClassLoader$2.loadClass(RMIClas sLoader.java:620)
      at org.jboss.system.JBossRMIClassLoader.loadClass(JBo ssRMIClassLoader.java:91)
      at java.rmi.server.RMIClassLoader.loadClass(RMIClassL oader.java:247)
      at sun.rmi.server.MarshalInputStream.resolveClass(Mar shalInputStream.java:197)
      at java.io.ObjectInputStream.readNonProxyDesc(ObjectI nputStream.java:1544)
      at java.io.ObjectInputStream.readClassDesc(ObjectInpu tStream.java:1466)
      at java.io.ObjectInputStream.readOrdinaryObject(Objec tInputStream.java:1699)
      at java.io.ObjectInputStream.readObject0(ObjectInputS tream.java:1305)
      at java.io.ObjectInputStream.readObject(ObjectInputSt ream.java:348)
      at javax.naming.CompoundName.readObject(CompoundName. java:554)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at java.io.ObjectStreamClass.invokeReadObject(ObjectS treamClass.java:946)
      at java.io.ObjectInputStream.readSerialData(ObjectInp utStream.java:1809)
      at java.io.ObjectInputStream.readOrdinaryObject(Objec tInputStream.java:1719)
      at java.io.ObjectInputStream.readObject0(ObjectInputS tream.java:1305)
      at java.io.ObjectInputStream.readObject(ObjectInputSt ream.java:348)
      at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRe f.java:290)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastSe rverRef.java:279)
      ... 6 more
      WARN 2007-08-30 07:31:44,210 [Thread-0] com.webreach.mirth.server.Mirth: Error deploying channels.
      org.mule.config.ConfigurationException: Failed to parse configuration resource "C:\Mirth\conf\mule-config.xml" (org.mule.config.ConfigurationException)
      at org.mule.config.builders.MuleXmlConfigurationBuild er.configure(MuleXmlConfigurationBuilder.java:196)
      at com.webreach.mirth.server.Mirth.startMule(Mirth.ja va:229)
      at com.webreach.mirth.server.Mirth.restartMule(Mirth. java:186)
      at com.webreach.mirth.server.Mirth.run(Mirth.java:117 )
      Caused by: org.mule.config.ConfigurationException: Failed to parse configuration resource "C:\Mirth\conf\mule-config.xml"
      at org.mule.config.builders.AbstractDigesterConfigura tion.process(AbstractDigesterConfiguration.java:12 1)
      at org.mule.config.builders.MuleXmlConfigurationBuild er.configure(MuleXmlConfigurationBuilder.java:202)
      at org.mule.config.builders.MuleXmlConfigurationBuild er.configure(MuleXmlConfigurationBuilder.java:194)
      ... 3 more
      Caused by: org.mule.umo.lifecycle.InitialisationException: Failed to create Jms Connector
      at org.apache.commons.digester.Digester.createSAXExce ption(Digester.java:2919)
      at org.apache.commons.digester.Digester.createSAXExce ption(Digester.java:2945)
      at org.apache.commons.digester.Digester.endElement(Di gester.java:1133)
      at org.apache.xerces.parsers.AbstractSAXParser.endEle ment(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl.scanEndElement(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl$FragmentContentDispatcher.dispatch(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl.scanDocument(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse (Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse (Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.AbstractSAXParser.parse( Unknown Source)
      at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser .parse(Unknown Source)
      at org.apache.commons.digester.Digester.parse(Digeste r.java:1685)
      at org.mule.config.builders.AbstractDigesterConfigura tion.process(AbstractDigesterConfiguration.java:11 9)
      ... 5 more


      Thanks (does not appear in the log)
      Todd Bush

      Comment


      • #4
        Re:JBoss MQ communication with 1.6

        Here are some sample properties I grabbed from the Mule docs (the ESB engine in Mirth) for connecting to a JBoss MQ instance:

        JNDI Initial Factory = org.jnp.interfaces.NamingContextFactory
        JNDI Provider URL = jnp://localhost/
        Connection Factory JNDI Name = java:/ConnectionFactory
        Gerald Bortis | Chief Information Officer | Mirth Corporation

        Comment


        • #5
          Re:JBoss MQ communication with 1.6

          Here is a link to the Mule docs for configuring the properties. You won't need to edit any XML, but it gives some examples of connection strings and naming schemes to use when configuring the JMS Writer/Reader:

          http://docs.huihoo.com/mule/1.3/Configuring%20Jms.html
          Gerald Bortis | Chief Information Officer | Mirth Corporation

          Comment


          • #6
            Re:JBoss MQ communication with 1.6

            Thanks for the reference, but I believe I have those properties already in my configuration. I'm not sure why the sample doesn't specify the port in the URL.

            One question, when entering the URL into the Mirth administer do I need to replace every '/' with '//'?

            Thanks again.
            Todd Bush

            Comment


            • #7
              Re:JBoss MQ communication with 1.6

              Also, is a jndi.properties file necessary when setting up a JBoss MQ JMS destination? If not, how do you communicate any "java.naming.factory.url.pkgs" properties?

              Thanks
              Todd Bush

              Comment


              • #8
                Re:JBoss MQ communication with 1.6

                Hi wiggum14!

                Did you solve your problem?

                I'm struggling on a similar JMS write configuration on mirth 1.6.1 deployed as MBean in JBoss 4.2.

                Here is the stacktrace of my config:

                Code:
                ERROR-407: JMS Connector error
                ERROR MESSAGE:	Jms Error
                java.lang.NullPointerException
                	at com.webreach.mirth.connectors.jms.Jms11Support.createSession(Jms11Support.java:74)
                	at com.webreach.mirth.connectors.jms.JmsConnector.getSession(JmsConnector.java:274)
                	at com.webreach.mirth.connectors.jms.JmsConnector.getSession(JmsConnector.java:455)
                	at com.webreach.mirth.connectors.jms.JmsMessageDispatcher.dispatchMessage(JmsMessageDispatcher.java:104)
                	at com.webreach.mirth.connectors.jms.JmsMessageDispatcher.doSend(JmsMessageDispatcher.java:260)
                	at org.mule.providers.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:166)
                	at org.mule.impl.MuleSession.sendEvent(MuleSession.java:191)
                	at org.mule.impl.MuleSession.sendEvent(MuleSession.java:130)
                	at org.mule.routing.outbound.AbstractOutboundRouter.send(AbstractOutboundRouter.java:85)
                	at org.mule.routing.outbound.FilteringMulticastingRouter.route(FilteringMulticastingRouter.java:89)
                	at org.mule.routing.outbound.OutboundMessageRouter$1.doInTransaction(OutboundMessageRouter.java:78)
                	at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:48)
                	at org.mule.routing.outbound.OutboundMessageRouter.route(OutboundMessageRouter.java:82)
                	at org.mule.impl.model.DefaultMuleProxy.onCall(DefaultMuleProxy.java:247)
                	at org.mule.impl.model.seda.SedaComponent.doSend(SedaComponent.java:209)
                	at org.mule.impl.model.AbstractComponent.sendEvent(AbstractComponent.java:277)
                	at org.mule.impl.MuleSession.sendEvent(MuleSession.java:201)
                	at org.mule.routing.inbound.InboundMessageRouter.send(InboundMessageRouter.java:161)
                	at org.mule.routing.inbound.InboundMessageRouter.route(InboundMessageRouter.java:128)
                	at org.mule.providers.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:492)
                	at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:271)
                	at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:230)
                	at com.webreach.mirth.connectors.file.FileMessageReceiver.processFile(FileMessageReceiver.java:223)
                	at com.webreach.mirth.connectors.file.FileMessageReceiver.poll(FileMessageReceiver.java:130)
                	at org.mule.providers.PollingMessageReceiver.run(PollingMessageReceiver.java:118)
                	at org.mule.impl.work.WorkerContext.run(WorkerContext.java:290)
                	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
                	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
                	at java.lang.Thread.run(Thread.java:595)

                Comment


                • #9
                  Re:JBoss MQ communication with 1.6

                  Hola,

                  Nope, I haven't solved it yet. I'm working on the MDB end of the application and using HermesJMS to test it. I'm hoping for a response from the Mirth team with a little more direction. If I figure out a solution, I'll post it.

                  Thanks.

                  PS. My mirth is a stand alone app, not an MBean; but that shouldn't matter for the JMS communication.
                  Todd Bush

                  Comment


                  • #10
                    Re:JBoss MQ communication with 1.6

                    wiggum14 wrote:
                    Hola,

                    Nope, I haven't solved it yet. I'm working on the MDB end of the application and using HermesJMS to test it. I'm hoping for a response from the Mirth team with a little more direction. If I figure out a solution, I'll post it.

                    Thanks.

                    PS. My mirth is a stand alone app, not an MBean; but that shouldn't matter for the JMS communication.
                    In order to avoid problems which are implied when running Mirth as MBean I switched to Mirth standalone to first finish my basic configurations.

                    I posted the problems (and a few solutions) found there in a new thread called "JMS writer to JBossMQ 4.2.1 connection fails ".

                    Please have a look there and write your opinion about the configs I made.

                    Thank you.

                    Comment


                    • #11
                      Re:JBoss MQ communication with 1.6

                      geraldb wrote:
                      In 1.6 we added the ability to connect to a JMS server without having to use JNDI. Can you post more of the stacktrace, specifically the Mirth lines?
                      Please give us an example configuration. How can I connect to JBoss without using JNDI?

                      This would be a great help.

                      Thank you.

                      Regards.

                      Comment


                      • #12
                        Re:JBoss MQ communication with 1.6

                        I have created JIRA issue #525 in order to document the bug.

                        Please vote for the bug if this problem hits you.

                        Thank you.

                        Comment


                        • #13
                          Re:JBoss MQ communication with 1.6

                          Hi,
                          I ran into the same NullPointerException that user 'level420' has reported here when I used Mirth 1.6.1 JMS Writer with ActiveMQ 4.1. Interestingly, the same configuration worked fine for Mirth 1.5

                          - jose mathews

                          Post edited by: josemathews, at: 10/24/2007 22:21

                          Comment


                          • #14
                            Re:JBoss MQ communication with 1.6

                            I noticed yesterday the JIRA bug for this issue has been resolved for 1.7. Any idea when 1.7 is coming out?

                            Post edited by: wiggum14, at: 10/25/2007 05:51
                            Todd Bush

                            Comment


                            • #15
                              Re:JBoss MQ communication with 1.6

                              I did fix this in the trunk, so if you need it immediately you can build the trunk and move over the modified classes. The official 1.7 will likely be released in 2-4 weeks.
                              Jacob Brauer
                              Director, Software Development
                              NextGen Healthcare

                              sigpic

                              Comment

                              Working...
                              X