Home Bug Reports

problem in running ice program in ubuntu

rawa qasharawa qasha Member rawaa qashaOrganization: Newcastle universityProject: automatic workflow deployment on cloud infrastruct
hi
I am trying to run a simple server with ice on ubuntu 12.04.
I've set all the environment vars, the server was successfully compiled but when I run it I got the following errors
Exception in thread "main" java.lang.NoClassDefFoundError: Server
Caused by: java.lang.ClassNotFoundException: Server
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
Could not find the main class: Server. Program will exit.

Comments

  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Rawa,

    This error means your Server class file (Server.class) is not in your CLASSPATH; it's not directly related to Ice or Ubuntu.

    Cheers,
    Bernard
  • rawa qasharawa qasha Member rawaa qashaOrganization: Newcastle universityProject: automatic workflow deployment on cloud infrastruct
    thanks for reply Bernard

    I've set JAVA_HOME but now I get these errors
    Exception in thread "main" java.lang.NoClassDefFoundError: Ice/LocalException
    Caused by: java.lang.ClassNotFoundException: Ice.LocalException
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
    Could not find the main class: Server. Program will exit.
    regards
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    The problem is not related to JAVA_HOME but to how Java located classes, usually a NoClassDefFoundError exception means that the CLASSPATH isn't properly configured.

    Read the following sections on the release notes:
Sign In or Register to comment.