Please post any problems in this thread. Thanks
JK
Please post any problems in this thread. Thanks
JK
I followed the running SGS in Eclipse guide, and I think I’ve made some progress with it. Right now though I’m stuck because it says it can’t find the /dsdb directory. I have an empty dsdb directory directly inside the root of my project directory (where the sgs jar and all other stuff is also) I also included have another one at Data//dsdb because the demos are set up like that. Neither is working. Is there a location I can specify where this directory should be?
Thanks
-Alkix
EDIT
Scratch that, upon closer examination it’s the second entry in the App.properties file that points to the directory that contains the dsdb folder. Mine was wrong.
First thanks to Jeff for the detailed description how to run 0.9 in eclipse.
Works great now!
Two Pitfalls I encountered:
1.) You must use a unix-style slash (/) in the .properties file for paths (e.g. com.sun.sgs.app.root=data/HelloWorld)
2.) There is a typo in VM arguments, the filenames start with “sgs-” not “sys-”
Thanks, will fix the instructions
JK
I have been trying to get this running in IntelliJ. Setup is very similar to Eclipse.
VM Parameters
-Djava.util.logging.config.file=/Software/sgs/sgs-logging.properties
-Dcom.sun.sgs.config.file=/Software/sgs/sgs-config.properties
-Djava.library.path=/Software/sgs/lib/bdb/win32-x86
Program Parameters
conf/LaneServer.properties
Working Dir C:\Devel\Test\LaneServer
Under that I have two directories data and conf
data/LaneServer/dsdb/
conf/LaneServer.properties
By the way C:\Software\sgs is where the SunGame Server is installed.
Main Class: com.sun.sgs.impl.kernel.Kernel
LaneServer.properties
com.sun.sgs.app.name=LaneServer
com.sun.sgs.app.root=data/LaneServer
com.sun.sgs.app.port=1139
com.sun.sgs.app.listener=com.xpertss.laneserver.LaneServer
I am using IntelliJ 6.04, JDK 1.5.0_11, on WinXP Professional
I have included all of the jars you specified but also the client jar as I am working with both server and client in this project.
When I attempt to start the server I get the following stack trace:
SEVERE: Could not setup service
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at com.sun.sgs.impl.kernel.Kernel.createService(Kernel.java:440)
at com.sun.sgs.impl.kernel.Kernel.setupService(Kernel.java:457)
at com.sun.sgs.impl.kernel.Kernel.startupApplication(Kernel.java:329)
at com.sun.sgs.impl.kernel.Kernel.main(Kernel.java:642)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Caused by: java.lang.UnsatisfiedLinkError: C:\Software\sgs\lib\bdb\win32-x86\libdb_java45.dll: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:993)
at com.sleepycat.db.internal.db_javaJNI.(db_javaJNI.java:35)
at com.sleepycat.db.internal.DbEnv.(DbEnv.java:213)
at com.sleepycat.db.EnvironmentConfig.createEnvironment(EnvironmentConfig.java:932)
at com.sleepycat.db.EnvironmentConfig.openEnvironment(EnvironmentConfig.java:885)
at com.sleepycat.db.Environment.(Environment.java:30)
at com.sun.sgs.impl.service.data.store.DataStoreImpl.getEnvironment(DataStoreImpl.java:553)
at com.sun.sgs.impl.service.data.store.DataStoreImpl.(DataStoreImpl.java:456)
at com.sun.sgs.impl.service.data.DataServiceImpl.(DataServiceImpl.java:205)
… 13 more
I redownloaded the server and replaced the dll just to make sure I didn’t have a corrupted file or anything… Everything works fine under eclipse but not under IntelliJ IDE…
Any guesses??
Yup. This is your problem right here:
Caused by: java.lang.UnsatisfiedLinkError: C:\Software\sgs\lib\bdb\win32-x86\libdb_java45.dll:
The system is not finding the native library.
(1) Make sure you have the above library set however you set native libraries that libraries depend on in IntelliJ
(2) You may also have to set the PATH environment variable to
C:\Other Technologies\BerkleyDB\builds\win32\Release
P.S. If you get it working, please post instructions for the community!
The startup script supports osx-x86, but the native libs for BDB are not included in the distribution. If you need them I built them and they are available here:
http://www.alienos.com/articles/2007/03/16/darkstar-the-missing-osx-libraries
So far the new API looks great!
The startup script supports Linux-x86, but the native db libraries are missing. On Fedora Core, you can install them with:
yum install db4-java
Note that this is version 4.3 and includes its own db.jar, thus change sgs.sh to read:
...
$java -Djava.library.path=/usr/share/java/db.jar \
...
I just pursuaded my Ubuntu installation to upgrade to Feisty, from there a
apt-get installl libdb4.5-java
did the job
Just have to remember to stick /usr/lib in the java.library.classpath
Endolf
After a bit of a fight, I’ve managed to get deadrat RHEL4 playing too. I had to install db4_java with up2date, which puts db4.2 on, I then db4.4 from the ark distribution (rpmfind got me the initial link) here, just picked of the mirror list. extracted it with rpm2cpio and copied the lib and jar to the right places. I’m sure thats not what redhat want you to do
Version 4.2 has API changes that mean SGS won’t start up.
HTH
Endolf
Thanks, we’ll try to get this fixed by the next release. meanwhile I’m going to create stickied thread for this and copy our instructions over!
Again, thanks guys!
JK
Caused by: java.lang.UnsatisfiedLinkError: C:\Software\sgs\lib\bdb\win32-x86\libdb_java45.dll: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem
If you have errors like the above it is because you do not have the .NET Framework 2.0 installed on your machine. For XP users it is MS Update (KB829019). This was not fun to try and find…
By the way. UnsatisfiedLinkError is usually the result of the DLL not being found in the PATH. If however, you get the message about Reinstalling then check your machine for msvcm80.dll via a simple file search. If you don’t have it (WinXP its in C:\WINDOWS\WinSxS) then you’ll need to go to microsoft’s update site.
Okay,
We use NONE of the .net features or APIs.
Can someone explain why then its necessary to install .slow ?
Kind of looks like MSFT is basically just making it impossible to use Windows without installing .net.
JK
Where can i find the post about how to run SGS in eclipse ?
the FAQs section. See the top of the page.
Hello,
I want to make a video game in C++ and using the Darkstar project. But I don’t undersatand how integrate a client C++ in the Darkstar project. I didn’t find any documentation about this.
Have you got a solution for me???
Thank you,
We had a C/C++ API included in the EA release and we fully intend one for the new stack. We just havent had the time to pull that together yet and, to be honest, although we know its important we have a whole bunch of even MORE important thinsg to finish like the multi-node stack.
So your options are:
(1) Call the Java API from C by using JNI. This means running a VM inside of your process. The instructions for this are all in the JNI article in the Java 5 SDK download.
(2) Once we release the open source, port it yourself. The API is pretty thin and the protocol is designed to be easily implementable in other languages such as C.
(3) Wait for us to get the free cycles to do it for you.
I am getting a timeout error when running sgs-0.9.2-r2216 - I running on OpenSolaris w/ java 1.6
bash-3.00$ ls
ClientTutorial.pdf HelloPersistence3.properties SwordWorld.properties
HelloChannels.properties HelloTimer.properties data
HelloEcho.properties HelloUser.properties logging.properties
HelloLogger.properties HelloUser2.properties src
HelloPersistence.properties HelloWorld.properties tutorial.jar
HelloPersistence2.properties ServerAppTutorial.pdf
bash-3.00$ rm -r data/HelloWorld/d*/*
bash-3.00$ java -version
java version “1.6.0”
Java™ SE Runtime Environment (build 1.6.0-b105)
Java HotSpot™ Client VM (build 1.6.0-b105, mixed mode, sharing)
bash-3.00$ which sgs.sh
/export/home/langston/DarkStar/sgs-0.9.2-r2216/sgs.sh
bash-3.00$ pwd
/export/home/langston/DarkStar/sgs-0.9.2-r2216/tutorial
bash-3.00$ ls
ClientTutorial.pdf HelloPersistence3.properties SwordWorld.properties
HelloChannels.properties HelloTimer.properties data
HelloEcho.properties HelloUser.properties logging.properties
HelloLogger.properties HelloUser2.properties src
HelloPersistence.properties HelloWorld.properties tutorial.jar
HelloPersistence2.properties ServerAppTutorial.pdf
bash-3.00$ sgs.sh tutorial.jar HelloWorld.properties
any hints?
Thanks
Jim