Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-6182

Java Gateway requires Java 7

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • None
    • Java gateway (J)

      Java Gateway 2.0.4 fail to start with Java 6 now :

      /opt/mycorp/jvm/java-1.6.0-sun-x64/bin/java -server -classpath /usr/lib/zabbix-java-gateway:/usr/lib/zabbix-java-gateway/logback-classic-0.9.27.jar:/usr/lib/zabbix-java-gateway/logback-core-0.9.27.jar:/usr/lib/zabbix-java-gateway/org-json-2010-12-28.jar:/usr/lib/zabbix-java-gateway/slf4j-api-1.6.1.jar:/usr/lib/zabbix-java-gateway/zabbix-java-gateway-2.0.4.jar -Dzabbix.pidFile=/tmp/zabbix_java.pid -Dzabbix.startPollers=30 com.zabbix.gateway.JavaGateway
      Exception in thread "main" java.lang.UnsupportedClassVersionError: com/zabbix/gateway/JavaGateway : Unsupported major.minor version 51.0
      	at java.lang.ClassLoader.defineClass1(Native Method)
      	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
      	at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
      	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
      	at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
      	at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      Could not find the main class: com.zabbix.gateway.JavaGateway.  Program will exit.
      

      It now requires Java 7 but I couldn't find it in documentation.

      I used zabbix-java-gateway from openSUSE 12.2 repo (http://download.opensuse.org/repositories/server:/monitoring/openSUSE_12.2/)
      This may be the root cause if they use openjdk 7 (or other Java 7) to build it.

      BTW, may be worst put a note somewhere in documentation to take care of Java version for pre-built packages and distros.

      Cheers

            Unassigned Unassigned
            hgomez Gomez Henri
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: