Page 1 of 2
Problems Starting Server
Posted: 12 Dec 2006, 13:18
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.
Posted: 12 Dec 2006, 16:54
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
Posted: 12 Dec 2006, 23:08
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!

Posted: 13 Dec 2006, 09:25
by Lapo
Marraboy wrote:Thanks Lapo. This is probably the issue. I have the server running fine on my Apple Mac.
great

Posted: 14 Dec 2006, 13:06
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.
Posted: 14 Dec 2006, 14:12
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:
what does it say? Is it the 1.5 version?
Posted: 14 Dec 2006, 16:09
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.

Posted: 14 Dec 2006, 16:13
by Lapo
gotcha

Posted: 02 Jan 2007, 10:53
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.
Posted: 02 Jan 2007, 11:32
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
Posted: 02 Jan 2007, 13:42
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.
Posted: 05 Jan 2007, 03:18
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
Posted: 05 Jan 2007, 13:52
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
Posted: 14 Jan 2007, 03:30
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
Posted: 14 Jan 2007, 17:40
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.