Page 1 of 1
Connect to postgre db
Posted: 30 Mar 2011, 10:55
by nikolaiko
Hi everyone,
I have smartfoxpro 1.6 demo version. And trying to connect to postgre database, I created my own zone and room, added extension to this zone. And then added Database manager tag:
Code: Select all
<DatabaseManager active="true">
<Driver>org.postgresql.Driver</Driver> <ConnectionString>jdbc:postgresql://localhost:5432/db_name</ConnectionString>
<UserName>name</UserName>
<Password>pass</Password>
<TestSQL><![CDATA[SELECT COUNT(*) FROM Users]]></TestSQL>
<OnExhaustedPool>fail</OnExhaustedPool>
<BlockTime>5000</BlockTime>
</DatabaseManager>
And restarted server. But now server is failing to start. If I remove this sector server working fine again. I tryed different combinations of Driver and ConnectionString tags...still doesn't work. In logs server write: Error in configuration files...I checked new section all tags are closed...
I don't know it is con.string wrong or driver...
can anyone help?
Posted: 30 Mar 2011, 20:29
by BigFIsh
Can you please include the entire error code with your next reply.
Posted: 31 Mar 2011, 01:14
by nikolaiko
BigFish, thanks for the answer.
Where I can find full error code?
Posted: 31 Mar 2011, 04:26
by BigFIsh
In your server log file.
Posted: 31 Mar 2011, 04:57
by nikolaiko
INFO | jvm 1 | 2011/03/30 20:59:00 | Zone: openspace
INFO | jvm 1 | 2011/03/30 20:59:00 |
INFO | jvm 1 | 2011/03/30 20:59:00 | Ranch (inside) (id: 34, max: 50, pass:N)
INFO | jvm 1 | 2011/03/30 20:59:00 | Ranch (outside) (id: 35, max: 50, pass:N)
INFO | jvm 1 | 2011/03/30 20:59:00 | Slopes area (id: 36, max: 50, pass:N)
INFO | jvm 1 | 2011/03/30 20:59:00 |
INFO | jvm 1 | 2011/03/30 20:59:00 | java.lang.NullPointerException
INFO | jvm 1 | 2011/03/30 20:59:00 | at it.gotoandplay.smartfoxserver.SmartFoxServer.setupZone(SmartFoxServer.java:1795)
INFO | jvm 1 | 2011/03/30 20:59:00 | at it.gotoandplay.smartfoxserver.lib.ConfigReader.parse_Zones(ConfigReader.java:806)
INFO | jvm 1 | 2011/03/30 20:59:00 | at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig(ConfigReader.java:174)
INFO | jvm 1 | 2011/03/30 20:59:00 | at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFoxServer.java:339)
INFO | jvm 1 | 2011/03/30 20:59:00 | at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:607)
INFO | jvm 1 | 2011/03/30 20:59:00 | Problems in config file: null
INFO | jvm 1 | 2011/03/30 20:59:00 | it.gotoandplay.smartfoxserver.exceptions.ConfigurationException
INFO | jvm 1 | 2011/03/30 20:59:00 | at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig(ConfigReader.java:199)
INFO | jvm 1 | 2011/03/30 20:59:00 | at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFoxServer.java:339)
INFO | jvm 1 | 2011/03/30 20:59:00 | at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:607)
INFO | jvm 1 | 2011/03/30 20:59:00 |
INFO | jvm 1 | 2011/03/30 20:59:00 | Errors found in configuration files.
INFO | jvm 1 | 2011/03/30 20:59:00 | Unable to start the server.
INFO | jvm 1 | 2011/03/30 20:59:00 |
INFO | jvm 1 | 2011/03/30 20:59:00 |
INFO | jvm 1 | 2011/03/30 20:59:00 | Shutting down server...
INFO | jvm 1 | 2011/03/30 20:59:00 |
STATUS | wrapper | 2011/03/30 20:59:02 | <-- Wrapper Stopped
It is last record it wrapper_20110330.txt. You asking about this logs? Or not. I see that zone before my - openspace is installed well, but then it goes to my section I have some exceptions.
Posted: 31 Mar 2011, 08:38
by BigFIsh
It looks like there's a problem parsing your zone. If you like, you can PM me the zone data or send me the config.xml file for me to have a look at.
Posted: 31 Mar 2011, 10:35
by nikolaiko
ok I PM config.xml to you.
Thanks, man.
Posted: 01 Apr 2011, 12:13
by nikolaiko
BigFIsh Did you get my message with link to file?
Posted: 01 Apr 2011, 19:30
by BigFIsh
Replied.
Posted: 02 Apr 2011, 01:35
by nikolaiko
Thanks, problem solved.
