Ad Widget

Collapse

Java Gateway will not compile

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gougej88
    Junior Member
    • Sep 2012
    • 4

    #1

    Java Gateway will not compile

    Hello,

    I recently was assigned to try and begin monitoring our blackboard tomcat server's using JMX. I have successfully been able to get JMX working and I can connect to the JMX port using JConsole. I see that Zabbix seems to require Java Gateway in order to monitor JMX. I tried just setting the JMX interface to the JMX server and port that I connect to with JConsole, but that doesn't seem to work in zabbix.

    So today I read that the Java Gateway is required to monitor via JMX. I followed the tutorial in the Zabbix Documentation and received an error trying to run both the 'make' and the 'make install' commands.

    Here is my error output:

    Making all in zabbix_java
    make[2]: Entering directory `/home/jgouge/zabbixsource/zabbix-2.0.2/src/zabbix_java'
    javac -d class/src -classpath lib/org-json-2010-12-28.jar:lib/logback-core-0.9.27.jar:lib/logback-classic-0.9.27.jar:lib/slf4j-api-1.6.1.jar src/com/zabbix/gateway/*.java
    ----------
    1. ERROR in src/com/zabbix/gateway/BinaryProtocolSpeaker.java (at line 59)
    throw new ZabbixException("bad protocol header: %02X %02X %02X %02X %02X", data[0], data[1], data[2], data[3], data[4]);
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^
    The constructor ZabbixException(String, byte, byte, byte, byte, byte) is undefined
    ----------
    2. ERROR in src/com/zabbix/gateway/BinaryProtocolSpeaker.java (at line 70)
    throw new ZabbixException("bad data length: %d", length);
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    The constructor ZabbixException(String, long) is undefined
    ----------
    3. ERROR in src/com/zabbix/gateway/BinaryProtocolSpeaker.java (at line 72)
    logger.debug("reading {} bytes of request data", length);
    ^^^^^
    The method debug(String, Object) in the type Logger is not applicable for the arguments (String, long)
    ----------
    ----------
    4. ERROR in src/com/zabbix/gateway/HelperFunctionChest.java (at line 24)
    public static <T> boolean arrayContains(T[] array, T key)
    ^
    Syntax error, type parameters are only available if source level is 5.0
    ----------
    ----------
    5. ERROR in src/com/zabbix/gateway/InternalItemChecker.java (at line 36)
    @Override
    ^^^^^^^^^
    Syntax error, annotations are only available if source level is 5.0
    ----------
    ----------
    6. ERROR in src/com/zabbix/gateway/ItemChecker.java (at line 51)
    protected Vector<String> keys;
    ^^^^^^
    Syntax error, parameterized types are only available if source level is 5.0
    ----------
    ----------
    7. ERROR in src/com/zabbix/gateway/JMXItemChecker.java (at line 76)
    @Override
    ^^^^^^^^^
    Syntax error, annotations are only available if source level is 5.0
    ----------
    8. ERROR in src/com/zabbix/gateway/JMXItemChecker.java (at line 113)
    @Override
    ^^^^^^^^^
    Syntax error, annotations are only available if source level is 5.0
    ----------
    9. ERROR in src/com/zabbix/gateway/JMXItemChecker.java (at line 246)
    private boolean isPrimitiveAttributeType(Class<?> clazz)
    ^
    Syntax error, parameterized types are only available if source level is 5.0
    ----------
    ----------
    10. ERROR in src/com/zabbix/gateway/ZabbixException.java (at line 31)
    public ZabbixException(String message, Object... args)
    ^^^^^^^^^^^^^^
    Syntax error, varargs are only available if source level is 5.0
    ----------
    ----------
    11. ERROR in src/com/zabbix/gateway/ZabbixItem.java (at line 28)
    private Vector<String> args = null;
    ^^^^^^
    Syntax error, parameterized types are only available if source level is 5.0
    ----------
    12. ERROR in src/com/zabbix/gateway/ZabbixItem.java (at line 81)
    private Vector<String> parseArguments(String keyArgs)
    ^^^^^^
    Syntax error, parameterized types are only available if source level is 5.0
    ----------
    12 problems (12 errors)make[2]: *** [bin/zabbix-java-gateway-2.0.2.jar] Error 255
    make[2]: Leaving directory `/home/jgouge/zabbixsource/zabbix-2.0.2/src/zabbix_java'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/jgouge/zabbixsource/zabbix-2.0.2/src'
    make: *** [all-recursive] Error 1


    Please help!

    -Jeff
Working...