Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CollectionExists always return false #24

Open
mataide opened this issue Sep 23, 2019 · 4 comments
Open

CollectionExists always return false #24

mataide opened this issue Sep 23, 2019 · 4 comments

Comments

@mataide
Copy link

mataide commented Sep 23, 2019

The following object always return false for the method collectionExists:

{"schemaVersion":"1.0"}
{"id":"66159eb1-ccde-4e23-8870-d313cea4df62","username":"Phoeniiiix","token":"eyJraWQiOiJuek9QejMycnBGYUdrVDlBQ3VzTmc0cXNlYmhBN1NBSzNISmtYZzFNSzBjPSIsImFsZyI6IlJTMjU2In0.eyJjdXN0b206bmF0aW9uYWxpdHlJc28iOiJCUiIsInN1YiI6IjY2MTU5ZWIxLWNjZGUtNGUyMy04ODcwLWQzMTNjZWE0ZGY2MiIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJpc3MiOiJodHRwczpcL1wvY29nbml0by1pZHAudXMtZWFzdC0yLmFtYXpvbmF3cy5jb21cL3VzLWVhc3QtMl83UU9ZOExMVVIiLCJjdXN0b206YXZhdGFyIjoiXC9pbWdcL2F2YXRhclwvYXZhdGFyMTMucG5nIiwiY29nbml0bzp1c2VybmFtZSI6IlBob2VuaWlpaXgiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJwaG9lbml4IiwiYXVkIjoiNmVrc3Fnb2RycWgyYWc4MWVjb3E0dTZ1aHAiLCJ1cGRhdGVkX2F0IjoxNTUzMzYxODE0LCJ0b2tlbl91c2UiOiJpZCIsImN1c3RvbTpuYXRpb25hbGl0eU5hbWUiOiJCcmFzaWwiLCJhdXRoX3RpbWUiOjE1NjkyNDU4MTcsImN1c3RvbTpkaXNwbGF5TmFtZSI6IlBob2VuaXgiLCJleHAiOjE1NjkyNDk0MTcsImlhdCI6MTU2OTI0NTgxNywiZW1haWwiOiJndWluaDk3QGdtYWlsLmNvbSJ9.OKs2-8LwtV_wDRQXqFEtFj-Uluh4GwRAoH5EjWtv-NxZA8HFKdUiOxxAynJLHztTFSI4JwhcUSUEiIWA4fLQcQ0yBPKuK2wIN6bYuKd3uPwAn29MSSiddnQatf76iaaYMhuy3BDnUax915_XdiQTVCL_1HP-jGIsVkt0mTknAvXdHIC7RgF2LVRsRNN5zUF37q-wqYGZQ4fo6IF-0vZ7gaBp3uDOp54XHnZ5KDzJi1aszb10xY7F_qPqBc58u8gBAy_xrbQMn_VzQ7n4eV91WJUWcNSaHSh2HZWqvcFbczMkdOWYngpZhc94jlfccP5reZO2JdngeoiUYYUBoEOZRg","email":"guinh97@gmail.com","birthdate":null,"hmac":null,"displayName":"Phoenix","playerId":null,"avatar":"/img/avatar/avatar13.png","tokenExpiration":1569249417000,"nationalityIsoCode":"BR","nationalityIsoName":"Brasil","emailLogin":true,"tokenRefresh":"eyJjdHkiOiJKV1QiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiUlNBLU9BRVAifQ.NHyj1jh-lufEofDkQhNNKS-C3dRH457MPUiis8u9KwHjcM43txTeVR5gUzccFGAE9pbtObc30Y0DugIaGb-tvGwmtPPk5-cYZaVXAncFRmPtNxtxzg6vTkkaVUDpvlxIeRcxtIM336Ke77F5Dut4-yP_bQipXj22JCZmKtBSOt6Uame23LYvrptsqfr7pnNJbmyaAHeLUQBiIQR-WvjYjE2Z8PwYvDwwSjyjg74R6-XXrzNgFwFhzt-Y0q4_QMSXo5kzIoooMrOLRNLjyoFZCfGTJlXoXVx5QsIofTvtFp0S5BbrKowAgk2n2dqNlPtywYEg4GlJFmvOLLqY9vFz3w.yxqodh37n2Yyhalx.c-i--AE7LSyAjiCUHoxOVSwt6HJYrilLYIoSSslJAtgXbTTysIF2nx2xjgA5ZwHHJRQxXn9oH4hX0ph-XN7hdAU-pMFzEggQR-MIoODGzOqFnkISuzDfoEIMbIfeazLHERuUUHpHO8YF4heApHc_QmeozsIuxxyia-ycJ7nZymcAj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KXS8YbMTE41c85O_tPHaFfS_a-2I-jWZFbzwvb39wWGHKWpN4RP5DPtDmy7D-cDnYaP7Y._GzD-eeiYayIem2CXTXGHQ","cashier":{"id":"2a58e8c6-5e47-4875-a1df-1c6940ce95fe","realMoney":0.0,"bonusMoney":3000.0,"playMoney":0.0,"rakeBack":693,"vipStatus":0,"vipProgress":0.0,"inPlayMoney":1000.0,"inRealMoney":0.0,"userId":"66159eb1-ccde-4e23-8870-d313cea4df62"},"game":{"id":"9ce97aff-16d4-4c05-8e27-10c2efc06ea5","userId":"66159eb1-ccde-4e23-8870-d313cea4df62","lol":null,"dota2":null,"r6s":{"id":"49d2e47d-8b01-4c19-b313-d00aff92fb3c","region":"sbr","isVerified":true,"name":"eMastersR6bot44","iconUrl":"https://ubisoft-avatars.akamaized.net/49d2e47d-8b01-4c19-b313-d00aff92fb3c/default_146_146.png","rank":"unranked","tier":null,"profileId":"49d2e47d-8b01-4c19-b313-d00aff92fb3c","userId":"66159eb1-ccde-4e23-8870-d313cea4df62","winRate":0.0,"url":"https://game-rainbow6.ubi.com/en-us/uplay/player-statistics/49d2e47d-8b01-4c19-b313-d00aff92fb3c/multiplayer","lastTimeChecked":null,"messages":{"free_to_use":true}},"fifa":null,"tft":null,"underlords":null,"valid":true},"avatars":null}
@mataide
Copy link
Author

mataide commented Sep 23, 2019

I found that I am getting this error:

com.math.pro.ak.io.jsondb.io.JsonFileLockException: JsonReader failed to obtain a file lock for file /Users/marcus/Documents/Workspace/proak-desktop/eMasters/Temp/db/lock/User.json.lock

Caused by: java.nio.channels.OverlappingFileLockException: null
	at sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255)
	at sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152)
	at sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:1062)
	at java.nio.channels.FileChannel.lock(FileChannel.java:1053)
	at com.math.pro.ak.io.jsondb.io.JsonReader.<init>(JsonReader.java:81)
	... 39 common frames omitted

@mataide
Copy link
Author

mataide commented Sep 23, 2019

What I found is that "User" has a model "Game", wich has a field valid, wich was missing the setter method.

@FarooqKhan
Copy link
Collaborator

@mataide do you maybe have 2 different issues being reported here.
Seems like you were able to solve the first about collectionExists based on your last update can you update here a confirmation.

About your 2nd update jsondb uses the lock files to ensure a automic update is done to the db files. For this reason it needs to be able to create the lock folder and lock files under it. Can you check the permissions and confirm that the account used to run Jsondb has appropriate permissions under /Users/marcus/Documents/Workspace/proak-desktop/eMasters/Temp/db

@mataide
Copy link
Author

mataide commented Sep 23, 2019

@FarooqKhan, what happened was that I was looking for the collectionExists error inside the library and I accidentally just remove a piece of code that broke the lock logic.

So, I think that should improve the error log and its done.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants