Closed LiorBenAmi closed 7 years ago
@noamyft - more details. registration - client side:
2017-06-28 18:54:45 INFO ClientRequestHandler:88 - Client request handler sent request: {"senderID":1,"commandDescriptor":"REGISTER_NEW_CUSTOMER","data":"{\"userName\":\"lior\",\"password\":\"1234\",\"firstName\":\"Lior\",\"lastName\":\"B\",\"phoneNumber\":\"0\",\"emailAddress\":\"1\",\"city\":\"a\",\"street\":\"a\",\"birthdate\":{\"year\":2017,\"month\":6,\"day\":28},\"allergens\":[{\"id\":2,\"name\":\"בטנים\"},{\"id\":4,\"name\":\"גלוטן\"},{\"id\":6,\"name\":\"ביצים\"}],\"forgotPasswordData\":{\"question\":\"What was your childhood nickname?\",\"answer\":\"a\"}}"} 2017-06-28 18:54:45 INFO ClientRequestHandler:70 - Client request handler got respond: {"senderID":0,"resultDescriptor":"SM_OK"} 2017-06-28 18:54:45 INFO ACustomer:68 - Command executed successfully
registration - server side:
2017-06-28 18:54:45 INFO CommandExecuter:941 - Trying to register new customer CustomerProfile [userName=lior, firstName=Lior, lastName=B, phoneNumber=0, emailAddress=1, city=a, street=a, birthdate=2017-06-28, allerganics=[בטנים, גלוטן, ביצים]] to system 2017-06-28 18:54:45 INFO CommandExecuter:967 - Register new customer CustomerProfile [userName=lior, firstName=Lior, lastName=B, phoneNumber=0, emailAddress=1, city=a, street=a, birthdate=2017-06-28, allerganics=[בטנים, גלוטן, ביצים]] to system fini*loshed 2017-06-28 18:54:45 INFO ServerWorkerRunnable:50 - Server process request from port 59164 finished
login client side
2017-06-28 18:57:34 INFO ClientRequestHandler:88 - Client request handler sent request: {"senderID":1,"commandDescriptor":"LOGIN_CUSTOMER","data":"{\"userName\":\"lior\",\"password\":\"1234\"}"} 2017-06-28 18:57:34 INFO ACustomer:68 - Command executed successfully 2017-06-28 18:57:34 INFO ACustomer:237 - Customer Login to server as succeed. Client id is: 507364144
login - server side
2017-06-28 18:57:34 INFO CommandExecuter:128 - Login client command called 2017-06-28 18:57:34 INFO CommandExecuter:159 - Login command succeded with sender ID 507364144 with client type {"userName":"lior","firstName":"Lior","lastName":"B","phoneNumber":"0","emailAddress":"1","city":"a","street":"a","birthdate":{"year":2017,"month":6,"day":28},"allergens":[]} 2017-06-28 18:57:34 INFO CommandExecuter:179 - Login client with User lior finished
the bug is in Customer.login() line 226:
customerProfile = Serialization.deserialize(cmdwrppr.getData(), CustomerProfile.class);
server log:
2017-06-08 15:18:44 INFO CommandExecuter:158 - Login command succeded with sender ID 375768438 with client type {"userName":"li","firstName":"l","lastName":"l","phoneNumber":"0","emailAddress":"l","city":"l","street":"l","birthdate":{"year":2017,"month":6,"day":8},"allergens":[]}
@noamyft - please check why the db doesn't return the allergens when custome login. The register sent with allergerns and worked fine. tnx