javasmartfoxserver

How to fix a NoClassDefFoundError?


I haven't worked with Java in about 10 years, so it's very probable I'm doing something elementary wrong here...

I am writing a "server-side extension" for SmartFoxServer (SFS). In my login script, I need to make a connection to MS SQL Server, which I am attempting to do using JDBC. I have tested the JDBC code in my debug environment, and it works fine.

BUT

When I put the server-side extension in the SFS "extensions" folder (as per spec), I'm getting a NoClassDefFoundError thrown - clearly SFS can't find the required JAR (sqljdbc4.jar). I have tried putting this JAR in my classpath; I tried including it in my Eclipse project - but for some reason, SFS adamantly refuses to accept the existence of this JAR.

What am I doing wrong?


Solution

  • I have no experience with the product you mention but many years of Java experience.

    Have you tried putting the sqljdbc4.jar in the same location as your server-side extension (the extensions 'directory') ? You will likely have to restart SFS after this.