You Are Here:

Community: Developer Discussion Boards

#1 Old Newbie: Cannot run SNAP server emulator - 2006-06-01, 22:06

Join Date: Jun 2006
Posts: 6
sgouros
Offline
Registered User
Hello everybody

I have just downloaded SNAP SDK, installed succesfully and compiled the HelloWorld MIDlet. However, when I run the emu.bat file which starts the SNAP Server emulator, I get the following output:


C:\Program Files\Nokia\SNAPMobile\tools\ServerEmulator>java -Demulate.VSC=true -
jar sm-emu.jar

VSC emulation is on!

[server started] protocol = http, port = 8080

[archived user] name = test1
[archived user] name = test2
[archived user] name = test3
[archived user] name = test4
[archived user] name = test5
[archived user] name = test6
[archived user] name = test7
[archived user] name = test8
[archived user] name = test9
[archived user] name = test10
[new game class]: name = Test, id = 49152
[archived ranking column] foo, 4 entries
[archived ranking column] bar, 3 entries
[new game class id] = 49152
[new lobby] name = Lobby6
[new lobby] name = Lobby5
[new lobby] name = Lobby4
[new lobby] name = Lobby3
[new lobby] name = Lobby2
[new lobby] name = Lobby1
[new lobby] name = Random
[new lobby] name = Join
[new lobby] name = Sort
[new lobby] name = Challenge
trace host = null
trace port = 0
[sessionreaper] started
Exception in thread "main" java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at com.nokia.sm.emu.Main.<init>(Unknown Source)
at com.nokia.sm.emu.Main.main(Unknown Source)

Note that when I tried to run emu.bat on a different computer, everything went just fine (no exception reported)

Could anybody give me a hint on why the emulator throws an exception on my computer?

I have jdk1.5.0_06 and WTK23 installed on WinXP pro SP2. I also use NetBeans 5.5

Thanks in advance

George
Reply With Quote

#2 Old Re: Newbie: Cannot run SNAP server emulator - 2006-06-02, 22:24

Join Date: Dec 2005
Posts: 1,886
Location: Brazil
Send a message via MSN to juarezjunior Send a message via Skype™ to juarezjunior
juarezjunior's Avatar
juarezjunior
Offline
Forum Nokia Champion
Hi George,

"Exception in thread "main" java.net.BindException: Address already in use: JVM_Bind"

I think this error is happening because a port is being used by another application. I've experienced that a lot of times, when running Java app servers on computers where other software and/or servers (mainly IIS) were using a target port.

This is the description from the Javadocs for BindException:

"Signals that an error occurred while attempting to bind a socket to a local address and port. Typically, the port is in use, or the requested local address could not be assigned."

Use the Control Panel > Administrative Tools > Services option in Windows and check which services are started, try stoping the ones you think could hinder you and try restarting the SNAP server...do it until you get it started properly...

Hope it helps!

BR,

Juarez Junior
Reply With Quote

#3 Old Re: Newbie: Cannot run SNAP server emulator - 2006-06-16, 00:28

Join Date: Jun 2006
Posts: 25
SM Tech
Offline
Registered User
Hi,

Specifically, the way to start the emulator on another port is to edit "emu.bat" in the ServerEmulator directory, and add the following extra argument to the end of the command line (after the %1):

" -port <portnum>"

So, the whole command to launch the emulator on port 8081 should look like:

"java -Demulate.VSC=true -jar sm-emu.jar %1 -port 8081"

Also, be sure to edit the "SNAP-Mobile-Port" parameter in the .jad file of any sample all you want to run against the emulator, to match the new port the emulator is running on.

Hope this helps,
Sam
Reply With Quote

#4 Old Re: Newbie: Cannot run SNAP server emulator - 2006-07-31, 14:56

Join Date: Dec 2005
Posts: 1,886
Location: Brazil
Send a message via MSN to juarezjunior Send a message via Skype™ to juarezjunior
juarezjunior's Avatar
juarezjunior
Offline
Forum Nokia Champion
Hi Sam,

Thanks a lot for sharing this information, it's always good to know the options.

BR,

Juarez Junior
Reply With Quote

#5 Old Cannot run SNAP server emulator SDK 1.3 - 2006-12-12, 09:08

Join Date: Oct 2006
Posts: 2
vimcool
Offline
Registered User
Hi,

Even im facing problem while launching the SNAP emulator environment SDK1.3

I use the following commands to launch

Code:
Command 1 : java -Demulate.VSC=true -jar sm-emu.jar
Command 2 : java -jar sm-emu.jar com.nokia.sm.emu.gui.main
In both the cases it gives me the following error :

Code:
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/nokia/sm/emy/gui/Main <Unspported major.major version 49.0>
	at java.lang.ClassLoader.defineClass0<Native Method>
	at java.lang.ClassLoader.defineClass0<Unknown Source>
	at java.security.SecureClassLoader.defineClass<Unknown Source>
	at java.net.URLClassLoader.defineClass<Unknown Source>
	at java.net.URLClassLoader.access$100<Unknown Source>
	at java.security.AccessController.doPriviledged<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.defineClass<Unknown Source>
	at java.lang.ClassLoader.defineClassinternal<Unknown Source>
Please suggest a solution soon.
Last edited by vimcool : 2006-12-12 at 10:09.
Reply With Quote

#6 Old Re: Newbie: Cannot run SNAP server emulator - 2006-12-14, 18:51

Join Date: Mar 2006
Posts: 59
heihauki's Avatar
heihauki
Offline
Forum Nokia Expert
Which JDK/Java version are you using?

I am able to run the emulator at least with Java 2 Platform Standard Edition binary (1.5.0).

- Heidi
Last edited by heihauki : 2006-12-14 at 20:34.
Reply With Quote

#7 Old Re: Cannot run SNAP server emulator SDK 1.3 - 2007-01-03, 19:19

Join Date: Dec 2005
Posts: 1,886
Location: Brazil
Send a message via MSN to juarezjunior Send a message via Skype™ to juarezjunior
juarezjunior's Avatar
juarezjunior
Offline
Forum Nokia Champion
Hi vimcool,

Check the Javadoc description for this error:

"Thrown when the Java Virtual Machine attempts to read a class file and determines that the major and minor version numbers in the file are not supported."

I think you must change your JSE version (update) in order to run it properly as Heidi has suggested.

Juarez Jr


Juarez Alvares Barbosa Junior - Brazil
Last edited by juarezjunior : 2007-01-03 at 19:29.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Not able to run S60 3rd emulator in console mode sumanta_datta General Symbian C++ 1 2006-05-16 15:56
Newbie - How to Use Python with an Emulator Phil Bartie Python 3 2006-05-05 01:21
SNAP Mobile Development Server access available heihauki Mobile Java Games 0 2006-04-18 20:36
my emulator does not connects to imap server siemensc55 General Symbian C++ 0 2004-09-26 10:48
why this emulator can't run well in SunOne Studio 4for Mobile Edition meflyup Other Programming Discussion 关于其他编程技术的讨论 1 2003-10-26 05:11

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d127641X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZgamesQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ