Starting on Linux

2003-10-17
2003-12-11
  • Hi. Im having problems starting Server or FlashServer. This is the way Im doing it:

    At setenv.sh I have this line:
    JAVA_HOME=/usr/java/j2sdk1.4.2_01
    (thats th path of J2SDK at my server)

    I try to execute runFlashServer this way, and get the following error:

    /usr/java/j2sdk1.4.2_01/bin/java /home/admin/chat/bin/runFlashServer
    Exception in thread "main" java.lang.NoClassDefFoundError: /home/admin/chat/bin/runFlashServer

    If I run it with
    /home/admin/chat/bin/runFlashServer

    I get "permission denied", even if i am root.

    Any ideas about this problem?
    Thank you very much.

     
    • Hi Jose,

      you must not use runFlashServer as the java-class in your command. runFlashServer is a shellscript to start the chatserver. The class would be com.ajdigital.chat.server.remote.FlashChatServer, as you can see if you open the script in an editor.

      You do not have to start the chat-server directly, the shell scripts should do this for you. Check if runFlashServer, runServer, setenv and runSwingClient (these are the four scripts for linux) are set as "executable" (ls -l should show you an "x" for every script).

      If this does not help please post the results of "ls -l" here.

      Sebastian

       
    • Ok, but still not working.

      This is the result:

      [root@cleo bin]# ls -l
      total 28
      -rw-r--r--    1 admin    admin         149 Oct 16 19:16 loadtest
      -rw-r--r--    1 admin    admin         550 Oct 16 19:16 nfcpasswd
      -rw-r--r--    1 admin    admin         259 Oct 16 19:16 runClient
      -rwxr-xr-x    1 admin    admin         363 Oct 16 19:16 runFlashServer
      -rwxr-xr-x    1 admin    admin         249 Oct 16 19:16 runServer
      -rwxr-xr-x    1 admin    admin         327 Oct 16 19:16 runSwingClient
      -rwxr-xr-x    1 admin    admin        1027 Oct 17 17:37 setenv.sh
      [root@cleo bin]# /home/admin/chat/bin/runFlashServer
      bash: /home/admin/chat/bin/runFlashServer: No such file or directory

       
      • Could it be that you are using the wrong directory? Your promt is "root@cleo bin", so i would think the directory is: /home/root/chat/bin.

        Try to simply use ./runFlashServer when you are in the bin-dir.

         
        • Thank you, but I still get the error:

          [root@cleo bin]# ./runFlashServer
          bash: ./runFlashServer: No such file or directory

          I'm sure I'm at the right dir.

           
          • Sorry, then i don't have any idea what might be the problem... ? I guess if you issue "ls runFlashServer" before starting with ./runFlashServer you also get a file-not-found-error?

            You can try another way to start the server by setting the env-vars manually. The scripts setenv.sh (use "cat setenv.sh" to view the content or any editor) can be replaced by entering the following commands in the shell:

            export NFC_HOME=<enter your path to the nfc-dir here>
            export CLASSPATH=$NFC_HOME/lib/chatserver.jar:$NFC_HOME/lib/chatserver_flash.jar:$NFC_HOME/lib/chatclient_full.jar:$NFC_HOME:$NFC_HOME/lib/jms.jar:$NFC_HOME/lib/jndi.jar

            java -DNFC_HOME=$NFC_HOME com.ajdigital.chat.server.remote.FlashChatServer

            if you wnat to start the normal server, use com.lyrisoft.chat.server.remote.ChatServer.

            Weird, but maybe this works.... ;-)

             
            • This is really annoying. The file is there. I can list it, but I get "not found" error when I execute it. What's going on here?

              [root@cleo bin]# ls runFlashServer
              runFlashServer
              [root@cleo bin]# ./run
              runFlashServer  runServer       runSwingClient 
              [root@cleo bin]# ./runFlashServer
              bash: ./runFlashServer: No such file or directory

              I followed your "plan B" indications and they worked, but Id like to insist with the original way of doing it.

              Any other ideas? Thank you in advance!

               
    • Ahh, "export" and "CLASSPATH..." should be in the same line of course...

       
    • Daniel Tahin
      Daniel Tahin
      2003-12-11

      Hello everybody!

      I would like to make a private chat, but I the server is not constant (f.g: at
      thuesday the server is:  chat.mysite.com,  and on an other day: other.x.com).
      Now I made a site with a cgi script, that allows to get and update the current
      server name.
      I seen, that the applet-client allows to set the host parameter, but if it is
      different that the name of the server, from where you can download this
      applet, I get some Java errors: "java.security.AccessControlException: access
      denied
      (java.net.SocketPermission x.site.com resolve)". And I can't connect to
      x.site.com.
      Is it possible to download the applet from chat.mysite.com and connect f.g: to
      other.x.com?  (so the host parameter would be in this case other.x.com)

      I would be very thankful for your answer.
      Daniel