6 Replies Latest reply on Nov 7, 2009 2:02 AM by davsclaus

    MSMQ Native Library

    esi62

      hi guys

      when I use msqm with activemq under linux (gentoo) I got this exception :

       

       

      java.io.IOException: Unable to find library libmsmq_native_support.so on classpath

           at org.apache.camel.component.msmq.native_support.NativeLibraryLoader.extractResource(NativeLibraryLoader.java:42)

           at org.apache.camel.component.msmq.native_support.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:30)

           at org.apache.camel.component.msmq.native_support.msmq_native_supportJNI.(ResourceXmlApplicationContext.java:52)

           at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:96)

           at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:52)

           at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)

           at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)

           at org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:111)

           at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:73)

           at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)

           at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:129)

           at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)

           at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:79)

           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 org.apache.activemq.console.Main.runTaskClass(Main.java:222)

           at org.apache.activemq.console.Main.main(Main.java:106)

      Failed to execute main task. Reason: java.lang.UnsatisfiedLinkError: org.apache.camel.component.msmq.native_support.msmq_native_supportJNI.MQMSG_DELIVERY_EXPRESS_get()I

        • 1. Re: MSMQ Native Library
          dgreco

          The camel-msmq component was only meant for working under Windows. So, you can only compile the native part of the Camel component only under a Windows box.

          • 2. Re: MSMQ Native Library
            esi62

            Hi

            Tnx for your reply . But I did not found any things to fix that!

            • 3. Re: MSMQ Native Library
              gertv

              L.S.,

               

              You would have to look for a JMS driver to access MSMQ, but I'm not sure there even is a platform-independent API available for accessing MSMQ. 

               

              There are two possible solutions:

              - Microsoft has a protocol for accessing MSMQ over HTTP called SRMP, which is an extension to standard web services technology.  You can probably look at the specs for this protocol and send out the correct XML message to MSMQ using camel-http.

              - Another option is to install a little Fuse Mediation router application on your Windows server that has the MSMQ installed that can just copy messages to/from an FUSE Message Broker instance -- acting as a protocol bridge.

               

              Regards,

               

              Gert

              • 4. Re: MSMQ Native Library
                jadsn003

                hi ..the information was helpful to me tooo... i studied about this after reading your posts guys.......

                 

                 

                _______________________________________________________________________

                Mens Health ____________

                 

                Edited by: jadsn003 on Sep 24, 2008 2:56 AM

                • 5. Re: MSMQ Native Library
                  schwartzfr

                  I am trying to use camel-msmq v. 1.6.1.2 on Windows.  I am getting the following error:

                   

                  smx@root:osgi> Exception in thread "SpringOsgiExtenderThread-72" java.lang.NoClassDefFoundError: Could not initialize class org.apache.camel.component.msmq.native_support.msmq_native_supportConstants

                   

                  What library do I need, and how do I load it?

                   

                  One approach that failed:  I put

                      System.loadLibrary("JNIMSMQ.dll");

                  into a Bundle Activator.  This load call works from a standalone Java program, but causes a not-fully-logged failure in the OSGi bundle.

                   

                  Thank you.

                   

                  Edited by: schwartzfr on Nov 6, 2009 12:57 PM

                  • 6. Re: MSMQ Native Library
                    davsclaus

                    This component is @deprecated and removed in the 2.x line of Camel.

                     

                    There are professional adapters for MS MQ you can use instead.