Problems Starting Server

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Marraboy
Posts: 13
Joined: 11 Dec 2006, 18:19

Problems Starting Server

Post by Marraboy »

Hi

I downloaded the trial version for Windows today. I have not moved any files or changed anything.

When I go to run the server by clicking the icon in the windows start menu I get the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: java/nio/channels/ClosedChannelException

Any help would be appreciated.

Thanks.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

It seems you have an older java runtime. You need at least version 1.4.2 (the latest is 1.5)
You can download the latest runtime from here -> www.java.com
Lapo
--
gotoAndPlay()
...addicted to flash games
Marraboy
Posts: 13
Joined: 11 Dec 2006, 18:19

Post by Marraboy »

Thanks Lapo. This is probably the issue. I have the server running fine on my Apple Mac. Windows is p**s anyway so I'm not too stressed!!!

Good application btw, I have nearly ported one of my games to multiplayer already - Only been programming for 5 hours! Just what I needed. I was going to write my own socket server but this would have taken weeks.

Very easy to use and lots of features. I will be looking to purchase the full version when I have tested my games fully.

Keep up the good work! :)
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Marraboy wrote:Thanks Lapo. This is probably the issue. I have the server running fine on my Apple Mac.
great :)
Lapo
--
gotoAndPlay()
...addicted to flash games
Marraboy
Posts: 13
Joined: 11 Dec 2006, 18:19

Post by Marraboy »

Hi

OK. So I have upgraded the Java Runtime to Version 5 Update 9 and I still get the same error message. Any other ideas?

Thanks.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

You may have some conflicts in your system. Make sure that the "java" command really launches the latest version you have downloaded.

To check if you're running the latest release open a Windows console and type:

Code: Select all

java -version
what does it say? Is it the 1.5 version?
Lapo
--
gotoAndPlay()
...addicted to flash games
Marraboy
Posts: 13
Joined: 11 Dec 2006, 18:19

Post by Marraboy »

Hmm, interesting...

java version "1.3.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01)
Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)

I will take a look at this, thanks for the advice. :D
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

gotcha :D
Lapo
--
gotoAndPlay()
...addicted to flash games
Marraboy
Posts: 13
Joined: 11 Dec 2006, 18:19

Post by Marraboy »

OK, so Im back after another Crimbo and I still can't get this to work - everything works fine on my iMac but my hump of horse sh*t PC won't work.

Basically I do a java -version and it displays an older version of the runtime environment. I have tried uninstalling and re-installing the newer version but it still displays the wrong version.

There must be some way to change this at the command prompt?

Thanks.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Marraboy wrote:OK, so Im back after another Crimbo and I still can't get this to work - everything works fine on my iMac but my hump of horse sh*t PC won't work.
Try a simple thing. Uninstall Java from your windows box and make sure it is really uninstalled.

1. uninstall
2. type java -version

if you're still able to run java you may have more copies of the runtime installed (maybe a jre and a jdk?)

Once you got rid of them all install the latest version

hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
Marraboy
Posts: 13
Joined: 11 Dec 2006, 18:19

Post by Marraboy »

Okay, got it sorted...

Basicaly there was a version of the run-time environment installed with an Oracle Database Client!!!

Uninstalled the DB stuff and it worked fine.
aajames
Posts: 6
Joined: 13 Jul 2006, 20:51

Post by aajames »

Lapo wrote:It seems you have an older java runtime. You need at least version 1.4.2 (the latest is 1.5)
You can download the latest runtime from here -> www.java.com
hello there... just installed on mac osx... i checked, i have java version 1.4.2 running on mac osx 10.3.5

Sounds like I should be ok.. but when i run the server (unchanged from download) i get the same error:

Exception in thread "main" java.lang.NoClassDefFoundError: it/gotoandplay/smartfoxserver/SmartFoxServer

any ideas?
thanks
aajames
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Hi aajames,
Exception in thread "main" java.lang.NoClassDefFoundError: it/gotoandplay/smartfoxserver/SmartFoxServer
This error is weird. It's not what we expected if the JRE version was not right.
How do you launch the server? Do you run the ./start.sh script?

One more thing: the latest PRO 1.5.0 uses a few classes from the JRE 1.5, so it is required that Java version. While it is very simple to upgrade under Linux and Windows, sadly it's not that easy under Mac OS X.
I am not sure if MacOS X 10.3.x supports Java 1.5

In such case I would recommend to download SFS PRO 1.4.0 which is compatible with your java runtime.
You can download it from here
Also you can check a few patches that were added later: http://www.smartfoxserver.com/download/beta/
http://www.smartfoxserver.com/labs/as3/

hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
aajames
Posts: 6
Joined: 13 Jul 2006, 20:51

Post by aajames »

Hello again...
Ok, I have installed osx 10.4...
I have downloaded Java15Release1.dmg and have installed it.
I have both smartfox server 1.4 and 1.5 and they are unaltered.

I go to the terminal and try to start them:
/Users/xehod/Desktop/ffox1.4/Server/./start.sh

for both versions, i get the same response:
Exception in thread "main" java.lang.NoClassDefFoundError: it/gotoandplay/smartfoxserver/SmartFoxServer

when I type 'java -version' i get:
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_07-215)
Java HotSpot(TM) Client VM (build 1.4.2-50, mixed mode)

I am curious if that is still the older version of java even though i installed the new one i downloaded...

Anyhow, I have yet to get the server (older version or new) to startup.

Again, any help is greatly appreciated... as so far I am batting zero. :(

thanks
chris
patso
Posts: 380
Joined: 13 Nov 2006, 13:44
Location: Sofia, Bulgaria

Post by patso »

aajames wrote:when I type 'java -version' i get:
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_07-215)
Java HotSpot(TM) Client VM (build 1.4.2-50, mixed mode)

I am curious if that is still the older version of java even though i installed the new one i downloaded...
I can give one advice since I have many times this problem. When you update java it's just better first to uninstall all older versions and then to install the new one.
Post Reply