It possible I had made some many cuts and pastes and changes to my files that they were a bit messed up.
I copied “servoy_server.sh” and “Servoy” startup item directory to the remote server and it worked ![Smile :-)]()
Maybe the .tcshrc stuff mentioned in my last post wasn’t needed.
Unfortunately, I have not been able to get this to work, and I am not a Unix geek. To summarize what i have done so far.
I have amended the servoy_server.sh as per Jan’s post. (I cut from the browser window and paste into text editor). I have also chmod this file as per swingman’s post.
I have amended Servoy exec as per Jan’s post. (I cut from the browser window and paste into text editor). I have also chmod this file as per swingman’s post.
#!/bin/sh
. /etc/rc.common
StartService ()
{
ConsoleMessage “Starting Servoy Application server”
su Clive -c ‘/Applications/Servoy/servoy_server.sh’ &
}
StopService()
{
ConsoleMessage “In the future Stop Servoy here”
}
RestartService ()
{
M- M- StopService
M- M- StartService
}
RunService “$1”
I have the servoy_server.sh file in the Applications/Servoy directory, and the Servoy directory (Includes Servoy exec + Resources folder + StartupParameters.plist) in the System/Library/StartuipItems folder.
#!/bin/sh
cd /Applications/Servoy
/usr/bin/java -Djava.awt.headless=true -classpath .:lib/commons-collections.jar:lib/commons-dbcp.jar:lib/commons-pool.jar:lib/activation.jar:lib/antlr.jar:lib/j2db.jar:lib/j2dbdev.jar:lib/compat141.jar:lib/jh.jar:lib/jndi.jar:lib/js.jar:lib/jta.jar:lib/mail.jar:lib/jug.jar:lib/jdbc2_0-stdext.jar:lib/naming-common.jar:lib/naming-resources.jar:lib/servlet.jar:lib/xerces.jar:lib/server-bootstrap.jar:lib/commons-fileupload-1.0.jar:lib/commons-logging.jar:lib/hibernate2.jar com.servoy.j2db.server.ApplicationServer > server.log 2>&1
I have restarted the server (several times) and tried to access Servoy using Servoy client on another PC in the network, which results in ‘Repository not found’.
If I go into into terminal, cd into the Applications/Servoy folder and then then enter
./servoy_server.sh I can then successfully start the Servoy client.[/code]
what do you get if you do this on a terminal:
sudo /sbin/SystemStarter start Servoy
Last login: Tue Mar 23 14:15:11 on console
Welcome to Darwin!
development:~ clive$ sudo /sbin/SystemStarter start Servoy
Password:
Welcome to Macintosh.
Malformatted parameters file /System/Library/StartupItems/Servoy/StartupParameters.plist.
Unknown service: Servoy
Hangup
development:~ clive$
The content of the .plist is:
{
Description = “Servoy”;
Provides = (“Application Server”);
Requires = “”;
Uses = “”;
OrderPreference = “None”;
}
Clive Sanders:
The content of the .plist is:
{
Description = “Servoy”;
Provides = (“Application Server”);
Requires = “”;
Uses = “”;
OrderPreference = “None”;
}
I changed mine to:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Description</key>
<string>Servoy Server</string>
<key>OrderPreference</key>
<string>None</string>
<key>Provides</key>
<array>
<string>Servoy Server</string>
</array>
</dict>
</plist>
Tried that, and got the following:
Last login: Tue Mar 23 15:32:00 on console
Welcome to Darwin!
development:~ clive$ sudo /sbin/SystemStarter start Servoy
Password:
Welcome to Macintosh.
2004-03-23 15:34:06.194 SystemStarter[629] CFLog (0):
CFPropertyListCreateFromXMLData(): plist parse failed; the data is not proper UTF-8. The file name for this data could be:
/System/Library/CoreServices/SystemStarter/SystemStarterResources.bundle/Resources/English.lproj/Localizable.strings
The parser will retry as in 10.2, but the problem should be corrected in the plist.
Malformatted parameters file /System/Library/StartupItems/Servoy/StartupParameters.plist.
Unknown service: Servoy
Hangup
development:~ clive$
Just wonder if you have a problem with line endings.. which application did you use to save the file?
TextEdit on Mac OSX Server 10.3
Can you try extracting the file below to you Startupitems directory. It should create a Servoy directory. In it you only need to change the line:
su Servoy -c '/Applications/Servoy/servoy_server.sh' &
change Servoy into the user that runs Servoy on your machine.
Yippee. It now works.
I downloaded/unzipped the file, and this time I edited the file using pico.
Thanks everybody for their help.