Not signed in (Sign In)

Categories

Vanilla 1.0.1 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorzipple
    • CommentTimeApr 10th 2008
     
    # java -jar psmonitor.jar config.xml
    Exception in thread "main" java.lang.NoSuchMethodError: java.lang.String.isEmpty()Z
    pat com.portsensor.main.Main.getXML(Main.java:145)# java -jar psmonitor.jar examp
    at com.portsensor.main.Main.main(Main.java:64)

    # cat config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
    <settings>
    <portal_url>http://admin.********.com/portsensor</portal_url>
    <monitor_guid>mon1</monitor_guid>
    <secret_key>testing</secret_key>
    </settings>
    <!--10.0.0.4-->
    <device id="edweb01">
    <sensor>
    <name>HTTP</name>
    <command>#PORT 10.0.0.4 80</command>
    <type>text</type>
    <critical oper="eq" value="DOWN">Critical</critical>
    </sensor>
    <sensor>
    <name>HTTP-SSL</name>
    <command>#PORT 10.0.0.4 443</command>
    <type>text</type>
    <critical oper="eq" value="DOWN">Critical</critical>
    </sensor>
    </device>
    </configuration>

    # java -version
    java version "1.5.0_14"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
    Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_14-b03, mixed mode)

    # uname -a
    Linux edapp01 2.6.18-6-amd64 #1 SMP Sun Feb 10 17:50:19 UTC 2008 x86_64 GNU/Linux

    # cat /etc/debian_version
    4.0


    Any help would be gratefully received.

    - Z
    • CommentAuthorMikeWGM
    • CommentTimeApr 10th 2008
     
    Hi zipple,

    The Java Monitor for PortSensor requires Java version 1.6
    • CommentAuthorzipple
    • CommentTimeApr 11th 2008
     
    Upgraded to 1.6 and now getting a different error :

    # jre/bin/java -version
    java version "1.6.0_05"
    Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
    Java HotSpot(TM) 64-Bit Server VM (build 10.0-b19, mixed mode)

    # jre/bin/java psmonitor.jar config.xml
    Exception in thread "main" java.lang.NoClassDefFoundError: psmonitor/jar
    Caused by: java.lang.ClassNotFoundException: psmonitor.jar
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    • CommentAuthorMikeWGM
    • CommentTimeApr 11th 2008
     
    That's because Java thinks you are trying to run a java class called "psmonitor.jar". To run the jar file you need to remember to type the "-jar" part:

    To setup the configuration file:
    # jre/bin/java -jar psmonitor.jar --config.xml

    To test the configuration:
    # jre/bin/java -jar psmonitor.jar config.xml --test

    And to actually run it, you would just remove the "--test".

PortSensor Homepage | Buy PortSensor | Download PortSensor | PortSensor Development Portal

PortSensor™ is © Copyright 2006, WebGroup Media LLC.