我已经有大约 10 年没有使用 Java 了,所以很可能我在这里做了一些基本的错误......
我正在为 SmartFoxServer (SFS)。在我的登录脚本中,我需要建立到 MS SQL Server 的连接,我尝试使用 JDBC 来完成此操作。我已经在我的调试环境中测试了 JDBC 代码,并且运行良好。
但是
当我将服务器端扩展放入 SFS“扩展”文件夹中(按照规范)时,我收到了 NoClassDefFoundError
抛出的消息 - 显然 SFS 找不到所需的 JAR (sqljdbc4.jar )。我尝试将这个 JAR 放入我的类路径中;我尝试将它包含在我的 Eclipse 项目中 - 但由于某种原因,SFS 坚决拒绝接受这个 JAR 的存在。
我做错了什么?
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?
发布评论
评论(1)
我对你提到的产品没有任何经验,但有多年的 Java 经验。
您是否尝试过将 sqljdbc4.jar 放在与服务器端扩展相同的位置(扩展“目录”)?此后您可能必须重新启动 SFS。
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.