Signup Assistance - MSSQL Support

Post here your suggestions for new possible features in SmartFoxServer 2X.

Moderators: Lapo, Bax

Zanpher
Posts: 96
Joined: 05 Oct 2009, 23:15

Signup Assistance - MSSQL Support

Postby Zanpher » 07 Nov 2013, 04:25

Currently, I do not believe the Signup Assistance is compatible with MSSQL.

The following error happens with the correct table format. Please note that the record is created in MSSQL just fine, even though the server throws the following error message:

18:51:51,773 INFO [main] v2.SmartFoxServer - SmartFoxServer 2X (2.7.0) READ
Y!
18:52:31,048 INFO [SocketReader] sessions.DefaultSessionManager - Session c
reated: { Id: 1, Type: DEFAULT, Logged: No, IP: 127.0.0.1:6111 } on Server port:
9933 <---> 6111
18:52:31,087 INFO [pool-1-thread-3] api.SFSApi - User login: { Zone: Osinia
}, ( User Name: Guest#0, Id: 0, Priv: 0, Sess: 127.0.0.1:6111 ) , Type: Unity
18:52:31,119 WARN [com.smartfoxserver.v2.controllers.ExtensionController-1] sig
nup.SignUpAssistant - java.lang.ClassCastException:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Exception: java.lang.ClassCastException
Message: java.math.BigDecimal cannot be cast to java.lang.Long
Description: Unexpected exception occurred during the SignUp process
User info: ( User Name: Guest#0, Id: 0, Priv: 0, Sess: 127.0.0.1:6111 )
+--- --- ---+
Stack Trace:
+--- --- ---+
com.smartfoxserver.v2.components.signup.SignUpAssistantComponent.writeToDatabase
(SignUpAssistantComponent.java:454)
com.smartfoxserver.v2.components.signup.SignUpAssistantComponent.handleSubmit(Si
gnUpAssistantComponent.java:318)
com.smartfoxserver.v2.components.signup.SignUpAssistantComponent.handleClientReq
uest(SignUpAssistantComponent.java:152)
com.smartfoxserver.v2.extensions.SFSExtension.handleClientRequest(SFSExtension.j
ava:208)
com.smartfoxserver.v2.controllers.ExtensionController.processRequest(ExtensionCo
ntroller.java:143)
com.smartfoxserver.bitswarm.controllers.AbstractController.run(AbstractControlle
r.java:96)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Zanpher
Posts: 96
Joined: 05 Oct 2009, 23:15

Re: Signup Assistance - MSSQL Support

Postby Zanpher » 12 Nov 2013, 22:20

Hello,

I was wondering if these modules (signup assistance, verification) will have MSSQL support, or will we need to code our own?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Signup Assistance - MSSQL Support

Postby Lapo » 13 Nov 2013, 08:33

I have already replied to you in another thread.
I suggested to change the database key type to a regular integer (INT). Only 32 and 64 bit Integers are supported, "BigDecimal" is not. None of the "Big"-Something are.
Please do that and report your findings.
Thanks

( For the record my previous reply was here: viewtopic.php?p=71463#p71463 )
Lapo
--
gotoAndPlay()
...addicted to flash games
Zanpher
Posts: 96
Joined: 05 Oct 2009, 23:15

Re: Signup Assistance - MSSQL Support

Postby Zanpher » 16 Nov 2013, 04:00

Only regular INT are used in my code and database. I double checked just now at home.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Signup Assistance - MSSQL Support

Postby Lapo » 16 Nov 2013, 08:14

The fact that there's an error caused by the conversion of a BigDecimal is indicative that a key with the wrong type is returned.
Maybe there are several keys in the DB table and the Component expects the record ID to be the first one.
Can you show me a structure dump of the table?
Lapo

--

gotoAndPlay()

...addicted to flash games
Zanpher
Posts: 96
Joined: 05 Oct 2009, 23:15

Re: Signup Assistance - MSSQL Support

Postby Zanpher » 17 Nov 2013, 19:24

No problem:

Code: Select all

CREATE TABLE [dbo].[account](
   [accountId] [int] IDENTITY(1,1) NOT NULL,
   [email] [varchar](50) NOT NULL,
   [password] [varchar](50) NOT NULL,
   [createdDate] [datetime] NOT NULL,
   [lastDate] [datetime] NOT NULL,
   [username] [varchar](50) NOT NULL,
 CONSTRAINT [PK_account] PRIMARY KEY CLUSTERED
(
   [accountId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Signup Assistance - MSSQL Support

Postby Lapo » 17 Nov 2013, 21:02

Thanks. The reason why a BigDecimal is returned is beyond me. I am not an MSSQL expert either, but this kind of problem seems to arise at the JDBC driver level.
I'll see if I can install a local MSSQL instance and get to the bottom of it.
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “2X Features Wish List”

Who is online

Users browsing this forum: No registered users and 10 guests