Announcement

Collapse
No announcement yet.

JMS writer to JBossMQ 4.2.1 connection fails

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

  • JMS writer to JBossMQ 4.2.1 connection fails

    Hello everybody!

    I'm trying to set up a connector destinations as a JMS JBoss writer. This is for Mirth 1.6.1 standalone to JBoss 4.2.1GA.

    The JMS queue exists on JBoss and is tested via a standalone client.

    I've attached the exported connector to this thread.

    The first hurdle was to configure Mirth to use port 8081 (default 8080) for webstart and port 1097 (default 1099) for jms/rmi. I had to change the values in %MIRTH_HOME%/conf/mirth.properties and %MIRTH_HOME%/conf/mule-boot.xml.

    The second hurdle I struggled was the fact that I needed jnp-client.jar and jboss-common.jar from the JBoss distribution. I placed them in %MIRTH_HOME%/lib.

    Now the connector (mule) is able to resolve the class definitions of org.jnp.interfaces.NamingContextFactory (jnp-client.jar) which in turn needed org.jboss.logging.Logger (jboss-common.jar).

    I used the following settings in Mirth Administrator for the JMSWriter destination:

    Specification: 1.1
    Use JNDI: Yes
    Provider URL: jnp://localhost:1099/
    Inital Context Factory: org.jnp.interfaces.NamingContextFactory
    Connection Factory Name: java:/ConnectionFactory
    Destination: queue/HL7-broadcast

    Deploying this channel fails with the following stacktrace which I copy and pasted from the system event viewer in Mirth administrator:

    Code:
    org.mule.config.ConfigurationException: MuleManager Failed to initialise (org.mule.config.ConfigurationException)
    	at org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleXmlConfigurationBuilder.java:196)
    	at com.webreach.mirth.server.Mirth.startMule(Mirth.java: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: MuleManager Failed to initialise
    	at org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleXmlConfigurationBuilder.java:209)
    	at org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleXmlConfigurationBuilder.java:194)
    	... 3 more
    Caused by: org.mule.umo.lifecycle.InitialisationException: Failed to create Jms Connector
    	at com.webreach.mirth.connectors.jms.JmsConnector.doInitialise(JmsConnector.java:137)
    	at org.mule.providers.AbstractConnector.initialise(AbstractConnector.java:233)
    	at org.mule.MuleManager.initialiseConnectors(MuleManager.java:776)
    	at org.mule.MuleManager.initialise(MuleManager.java:652)
    	at org.mule.MuleManager.start(MuleManager.java:721)
    	at org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleXmlConfigurationBuilder.java:207)
    	... 4 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(NamingContext.java:724)
    	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:589)
    	at javax.naming.InitialContext.lookup(Unknown Source)
    	at com.webreach.mirth.connectors.jms.JmsConnector.createConnectionFactory(JmsConnector.java:167)
    	at com.webreach.mirth.connectors.jms.JmsConnector.doInitialise(JmsConnector.java:130)
    	... 9 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(UnicastServerRef.java:325)
    	at sun.rmi.transport.Transport$1.run(Transport.java:153)
    	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$ConnectionHandler.run(TCPTransport.java:707)
    	at java.lang.Thread.run(Thread.java:595)
    	at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
    	at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
    	at sun.rmi.server.UnicastRef.invoke(Unknown Source)
    	at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
    	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
    	... 13 more
    Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
    	java.net.MalformedURLException: no protocol: Connector
    	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:282)
    	at sun.rmi.transport.Transport$1.run(Transport.java:153)
    	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$ConnectionHandler.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(LoaderHandler.java:747)
    	at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:147)
    	at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
    	at org.jboss.system.JBossRMIClassLoader.loadClass(JBossRMIClassLoader.java:91)
    	at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
    	at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197)
    	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544)
    	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
    	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
    	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
    	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
    	at javax.naming.CompoundName.readObject(CompoundName.java:554)
    	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:585)
    	at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
    	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
    	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
    	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
    	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
    	at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:290)
    	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:279)
    	... 6 more
    Any help would be great.

    Best regards.
    file2jms.xml (3838 bytes)

    Post edited by: level420, at: 09/06/2007 00:47

  • #2
    Re:JMS writer to JBossMQ 4.2.1 connection fails

    I'm experiencing the same stack trace in 1.6.1. I was able to successfully configure a JBoss JMS destination in 1.5, but exporting and reimporting that channel does not create a working channel in 1.6.1.

    Thanks.
    Todd Bush

    Comment


    • #3
      Re:JMS writer to JBossMQ 4.2.1 connection fails

      wiggum14 wrote:
      I'm experiencing the same stack trace in 1.6.1. I was able to successfully configure a JBoss JMS destination in 1.5, but exporting and reimporting that channel does not create a working channel in 1.6.1.

      Thanks.
      Can you please attach your exported channel to this thread so I can have a look into your config? That would be a great help!

      What is your working environment? (OS, Mirth version and JBoss version).

      I tried tu use Mirth 1.5 to connect to JBoss 4.0.5GA and JBoss 4.2.1.GA with no success.

      I event tried to run Mirth on Java 1.5 instead of 1.6 but the results were the same.

      Maybe one of the Mirth admins can have a look into this simple environment with a setup time of max. 30 minutes please.

      Chris or maybe one of the other Mirth gurus: Please, please help!

      I'm afraid that our Mirth evalution fails because of this problems and we have to leave Mirth and find some other solution which would be odd because Mirth looks very promising for us.

      Thanks allot.

      Best regards.

      Comment


      • #4
        Re:JMS writer to JBossMQ 4.2.1 connection fails

        We are definitely looking into the JMS issues, especially with regards to JBoss and will be able to provide updates via the Plugin system in 1.6. We will keep everyone posted as we make progress, but this is priority #1 right now.
        Chris Lang

        Comment


        • #5
          Re:JMS writer to JBossMQ 4.2.1 connection fails

          chrisl wrote:
          We are definitely looking into the JMS issues, especially with regards to JBoss and will be able to provide updates via the Plugin system in 1.6. We will keep everyone posted as we make progress, but this is priority #1 right now.
          Thank you for you answer Chris.

          I've created issue http://www.mirthproject.org/communit...owse/MIRTH-525 for this bug.

          Regards.

          Comment


          • #6
            Re:JMS writer to JBossMQ 4.2.1 connection fails

            chrisl wrote:
            We are definitely looking into the JMS issues, especially with regards to JBoss and will be able to provide updates via the Plugin system in 1.6. We will keep everyone posted as we make progress, but this is priority #1 right now.
            Hi Chris!

            Please give a short statement on the progress of this issue.

            As there doesn't seem to be any activity on the corresponding JIRA entry even a short information would be good to know that the solution is in work.

            Thank you.

            Comment


            • #7
              Re:JMS writer to JBossMQ 4.2.1 connection fails

              Some thoughts lead us back to running Mirth 1.6.1 as a MBean in JBoss 4.2.1GA.

              Surprisingly the JMS-Writer works if Mirth is run as MBean (mirth.sar) under JBoss!!!!

              Maybe this information helps solving this problem.

              Regards.

              Comment


              • #8
                Re:JMS writer to JBossMQ 4.2.1 connection fails

                Is it possible that JBoss is requiring Mirth is in the same JVM in order to connect to it? Try to find an option to turn this requirement off.

                There is an option in the datasource xml files that you may need to change: <use-java-context>false</use-java-context>
                Jacob Brauer
                Director, Software Development
                NextGen Healthcare

                sigpic

                Comment


                • #9
                  Re:JMS writer to JBossMQ 4.2.1 connection fails

                  Is it possible that JBoss is requiring Mirth is in the same JVM in order to connect to it? Try to find an option to turn this requirement off.

                  There is an option in the datasource xml files that you may need to change: <use-java-context>false</use-java-context>
                  Jacob Brauer
                  Director, Software Development
                  NextGen Healthcare

                  sigpic

                  Comment


                  • #10
                    Re:JMS writer to JBossMQ 4.2.1 connection fails

                    jacobb wrote:
                    Is it possible that JBoss is requiring Mirth is in the same JVM in order to connect to it? Try to find an option to turn this requirement off.

                    There is an option in the datasource xml files that you may need to change: <use-java-context>false</use-java-context>
                    I don't think this is the problem, because I've written an external client which is able to send messages to the JBossMQ.

                    And I don't know where I would put the use-java-context property either. Here is my message queue service definition used to install the queue:

                    Code:
                    <?xml version="1.0" encoding="UTF-8" ?> 
                    
                    <server>
                    	<mbean code="org.jboss.mq.server.jmx.Queue" name="jboss.mq.destination:«»service=Queue,name=HL7broadcast">
                    		<depends optional-attribute-name="DestinationManager">jboss.mq:«»service=DestinationManager</depends> 
                    		<attribute name="JNDIName">HL7broadcast</attribute>
                    	</mbean>
                    </server>
                    Has anyone out there a running JBossMQ JMS Writer channel working? If yes: Please give us an idea how you did it.

                    Regards.

                    Comment

                    Working...
                    X