Null Error in SmartFoxServer?

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

User avatar
coolboy714cp
Posts: 323
Joined: 06 Feb 2010, 02:45
Contact:

Null Error in SmartFoxServer?

Postby coolboy714cp » 14 Feb 2012, 02:40

Hello everyone. I am trying to help a friend setup SmartFoxServer with a few extensions that contain database related requests, but when the database manager is activated, the server spits out an error.
Me and him are using the same exact zone settings for simpleChat (which is where the error is occuring).
I know this is where the error is happening because I took out the database manager on that zone, and the server started just fine.

Okay, so this is the error we are getting:

20:32:55.740 - [ INFO ] > Default Buddy List Persister <INITED>
java.lang.NullPointerException
at it.gotoandplay.smartfoxserver.SmartFoxServer.setupZone(SmartFoxServer
.java:1813)
at it.gotoandplay.smartfoxserver.lib.ConfigReader.parse_Zones(ConfigRead
er.java:806)
at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig(ConfigR
eader.java:174)
at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFo
xServer.java:338)
at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:
606)
Problems in config file: null
it.gotoandplay.smartfoxserver.exceptions.ConfigurationException
at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig(ConfigR
eader.java:199)
at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFo
xServer.java:338)
at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:
606)

Errors found in configuration files.
Unable to start the server.


Shutting down server...

Press any key to continue . . .


And here are the two zones I added to the configuration file in which we started noticing the error:

Code: Select all

<Zone name="simpleChat" uCountUpdate="true" buddyList="20" maxUsers="4000" customLogin="true">
         <Rooms>
            <Room name="Graveyard" maxUsers="50" isPrivate="false" isTemp="false" autoJoin="true" uCountUpdate="true" />      
            <!--<Room name="TheForest" maxUsers="50" isPrivate="false" isTemp="false" />
            <Room name="Inside" maxUsers="50" isPrivate="false" isTemp="false" />
            <Room name="Upstairs" maxUsers="50" isPrivate="false" isTemp="false" />-->
         </Rooms>
         
         <DatabaseManager active="true">
            <Driver>org.h2.Driver</Driver>
            <ConnectionString>jdbc:h2:~/vw_users</ConnectionString>
            
            <UserName>sa</UserName>
            <Password></Password>
            
            <TestSQL><![CDATA[SELECT COUNT(*) FROM VW_USERS]]></TestSQL>
            
            <MaxIdle>10</MaxIdle>
            
            <OnExhaustedPool>fail</OnExhaustedPool>
            <BlockTime>5000</BlockTime>
         </DatabaseManager>
         
         <Extensions>
            <!--<extension name="holden_login" className="holden_login.as" type="script" />
            <extension name="holden_modtools" className="holden_modtools.as" type="script" />-->
         </Extensions>
         
         <Moderators status="off">
            <!--<Mod name="modName" pwd="modPass" />-->
         </Moderators>
      </Zone>
      
      <Zone name="simpleChatRegister" uCountUpdate="true" buddyList="20" maxUsers="4000" customLogin="false">
         <Rooms>
            <Room name="register_pool" maxUsers="50" isPrivate="false" isTemp="false" autoJoin="true" uCountUpdate="true" />               
         </Rooms>
         
         <DatabaseManager active="true">
            <Driver>org.h2.Driver</Driver>
            <ConnectionString>jdbc:h2:~/test</ConnectionString>
            
            <UserName>sa</UserName>
            <Password></Password>
            
            <TestSQL><![CDATA[SELECT * FROM TEST]]></TestSQL>
            
            <MaxActive>10</MaxActive>
            <MaxIdle>10</MaxIdle>
                               
            <OnExhaustedPool>fail</OnExhaustedPool>
            <BlockTime>5000</BlockTime>
         </DatabaseManager>
         
         <Extensions>
            <extension name="holden_register" className="holden_register.as" type="script" />
         </Extensions>
         
         <Moderators status="off">
         </Moderators>
      </Zone>


I have the same exact zones in my config file and the server starts with no errors.

I have read the post located at viewtopic.php?t=6284 and I have made sure that there were no other instances of SmartFoxServer running. The service is not installed, and he even restarted his computer just to be sure.

By the way, he is using SmartFoxServer 1.6.9.

Does anyone have any reason why this error might be occuring? If so, please reply ASAP.
User avatar
coolboy714cp
Posts: 323
Joined: 06 Feb 2010, 02:45
Contact:

Postby coolboy714cp » 14 Feb 2012, 22:57

Nevermind about this post, I recoded the config file in a whole new document and took out all the example zones, and it worked fine. Strange. I'm guessing the old config file got corrupted somehow. :)
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Postby rjgtav » 14 Feb 2012, 23:05

Hi.

The config of the DBManager of your SimpleChat zone is missing the <MaxActive> parameter. Does it start up if you add that setting?
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 53 guests