7 Replies Latest reply on Nov 22, 2013 4:00 AM by simoncigoj

    jboss2nagios does not work well

    helenwu

      Hi Manish,

      I downloaded latest collector.sar, and deployed it on my jboss 7.1.1 server.

      create the following folder under modules, com/jboss/jboss2nagios/main

       

      [jboss@hfqasywmkapp1 main]$ pwd

      /usr/local/jboss7.1/modules/com/jboss/jboss2nagios/main

      [jboss@hfqasywmkapp1 main]$

       

      I have jboss-common.jar  module.xml under main.

      [jboss@hfqasywmkapp1 main]$ ls

      jboss-common.jar  module.xml

       

      In module.xml, it has

      [jboss@hfqasywmkapp1 main]$ more module.xml
      <?xml version="1.0" encoding="UTF-8"?>

      <module xmlns="urn:jboss:module:1.0" name="com.jboss.jboss2nagios">
          <resources>
        <resource-root path="jboss-common.jar"/>
          </resources>
          <dependencies/>
      </module>

       

      In the standalone.xml, it has

         <property name="org.jboss.osgi.system.modules.extra">

                          com.jboss.jboss2nagios

                      </property>

                      <property name="org.osgi.framework.startlevel.beginning">

                          3

                      </property>

                      <property name="org.osgi.framework.system.packages.extra">

                          org.jboss.util

                      </property>

       

      The jvm is able to start, but when we try to run test from nagio server, in jvm server.log, it complains:

      10:37:42,823 ERROR [stderr] (Collector request /157.241.195.225:47218) Exception in thread "Collector request /157.241.195.225:47218" java.lang.NoClassDefFoundError: org/jboss/util/StringPropertyReplacer

       

      Why this class can not be found?  It's jobss-common.jar.

       

      Can you please help?

      Thanks.

       

      Helen

        • 1. Re: jboss2nagios does not work well
          jamezp

          There is probably a conflict with jboss-common-core. Try removing the jboss-common.jar you have in your module directory and add a dependency to org.jboss.common.core to your module.xml.

           

          --

          James R. Perkins

          • 2. Re: jboss2nagios does not work well
            helenwu

            Hi James,

            Thank you for the reply.

            Can you please give more detailed information? How to add a dependency to org.jboss.common.core to your module.xml?

             

            <module xmlns="urn:jboss:module:1.0" name="com.jboss.jboss2nagios">
                <resources>
              <resource-root path=" "/>
                </resources>
                <dependencies/>
            </module>

            • 3. Re: jboss2nagios does not work well
              jamezp

              Should look something like:

               

              <?xml version="1.0" encoding="UTF-8"?> 
              
              <module xmlns="urn:jboss:module:1.0" name="com.jboss.jboss2nagios">
                  <resources>
                      <resource-root path="your-jar.jar"/>
                  </resources> 
              
                  <dependencies>
                      <module name="org.jboss.common-core"/>
                  </dependencies>
              </module>
              

               

               

              --

              James R. Perkins

              • 4. Re: jboss2nagios does not work well
                helenwu

                I removed jboss-common.jar from main directory,  should I put

                jboss-common-core-2.2.17.GA.jar under main and put <resource-root path="jboss-common-core-2.2.17.GA.jar"/> in module.xml?

                • 5. Re: jboss2nagios does not work well
                  jamezp

                  No that's what the <dependencies/> section is for. It looks like nagios uses a collection.sar which should probably be in a <resource-root/>. To be honest though I'm not sure if a SAR can be a module. I'm not that familiar with them at all.

                   

                  --

                  James R. Perkins

                  • 6. Re: jboss2nagios does not work well
                    helenwu

                    Can somebody help on this issue?

                    I still can not make it work.

                     

                    Thanks.

                     

                    Helen

                    • 7. Re: jboss2nagios does not work well
                      simoncigoj

                      you probably nead to configure right the osgi subsystem ... my configuration looks like :

                       

                      <subsystem xmlns="urn:jboss:domain:osgi:1.2" activation="lazy">

                                  <properties>

                                      <property name="org.jboss.osgi.system.modules.extra">

                                          com.jboss.jboss2nagios

                                      </property>

                                      <property name="org.osgi.framework.startlevel.beginning">

                                          1

                                      </property>

                                      <property name="org.osgi.framework.system.packages.extra">

                                          org.jboss.util,org.jboss.util.StringPropertyReplacer

                                      </property>

                       

                      I had to add the two bolded properties to make it work.