Class in __lib__ not found

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

User avatar
Whiskey
Posts: 45
Joined: 28 Oct 2010, 06:27
Location: The Netherlands
Contact:

Class in __lib__ not found

Postby Whiskey » 24 May 2011, 08:48

I'm trying to get class serialization to work with the Unity client, for which I created this thread in the Unity forum. While I do not want to cross post, I'm running into an issue which I think is more server side related.

I created a serializable class with an interface and deployed that in __lib__. However, whatever I try, I get a "class not found" in the logs. It seems my jar is never detected/loaded and I do not see any attempts of loading in the logs. Do I need to configure of specify something somewhere for this to work? Where can I start looking to fix this problem? Thanks.
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 24 May 2011, 16:22

If the jar is not broken and has a ".jar" file extension it will be loaded.
In the logs you will never see an attempt to load it, however. This goes down in the guts of the JVM ClassLoader.

Maybe you are overlooking something simple. I'd suggest to retry, double checking the file and restarting the server.
Also double check the names of your classes.
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Whiskey
Posts: 45
Joined: 28 Oct 2010, 06:27
Location: The Netherlands
Contact:

Postby Whiskey » 24 May 2011, 16:58

Thanks, I'll go over it again and see if I missed anything. Good to know I won't get any clues from the log for this.
User avatar
Whiskey
Posts: 45
Joined: 28 Oct 2010, 06:27
Location: The Netherlands
Contact:

Postby Whiskey » 25 May 2011, 08:34

To wrap up this thread nicely, Lightnet solved my mystery by pointing this out:
Lightnet wrote:It took a while, you need package path of model base on the file.cs.

public string GetJavaPackageName ()
{
return "package";
}

So this function provides the name that is used to locate the class.

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 150 guests