Closed roddet closed 11 years ago
huuum...pas évident ce bug..il n'y pas de raison évidente pour laquelle les données ne seraient pas insérées. As-ton la possibilité d'écrire sur le file système sous cloudbees? dans ce cas on pourrait configurer un Appender de type File pour l'appli et avoir plus d'infos
Reproduis-tu ce bug en local ? Pour ta question, oui on a accès aux logs avec du log standard Play.
Ci-dessous les logs. N'y a t-il pas un cache mis en place ? Il se peut que le cache soit chargé avant la mise à jour du référentiel.
:
Play server process ID is 13274 2013-05-10 07:11:18,730 - [INFO] - from application in main JCertif Backend Application running
2013-05-10 07:11:18,733 - [INFO] - from application in main Initialisation des données de référence
2013-05-10 07:11:18,736 - [INFO] - from application in main Enter MongoDB()
2013-05-10 07:11:18,739 - [DEBUG] - from application in main dbhost=linus.mongohq.com, dbname=tufw9szJxEZ0qJkeuwanXw, user=jcertif, password=***, dbport=10056
2013-05-10 07:11:18,810 - [INFO] - from application in main Enter getDBOptions()
2013-05-10 07:11:18,827 - [INFO] - from application in main Exit getDBOptions()
2013-05-10 07:11:19,092 - [INFO] - from application in main Exit MongoDB()
2013-05-10 07:11:19,092 - [INFO] - from application in main Enter loadDbWithData(referentiel.js)
2013-05-10 07:11:19,110 - [INFO] - from application in main Exit getDBOptions()
2013-05-10 07:11:19,119 - [INFO] - from play in main Application started (Prod)
2013-05-10 07:11:19,314 - [INFO] - from play in main Listening for HTTP on /0.0.0.0:8655
2013-05-10 07:11:25,386 - [INFO] - from application in play-akka.actor.default-dispatcher-4 JCertif Backend onHandlerNotFound Global Handler
2013-05-10 07:11:28,606 - [INFO] - from application in play-akka.actor.default-dispatcher-5 JCertif Backend onHandlerNotFound Global Handler
non il n'y a pas de cache mais la log "JCertif Backend onHandlerNotFound Global Handler" indique un problème de routage....Peux tu me copier/coller la log autour de l'appel à l'url /ref/title/list? Pour info je ne reproduit pas en local
Ce que je t'ai fourni représente l'intégralité des logs :) Pour aider au diagnostique, pourrais-tu ajouter des traces et commiter ?
Alors?..a-t-on plus de logs?
Play server process ID is 30498 [[37minfo[0m] application - JCertif Backend Application running [[37minfo[0m] application - Initialisation des données de référence [[37minfo[0m] application - Enter MongoDB() [[36mdebug[0m] application - dbhost=linus.mongohq.com, dbname=tufw9szJxEZ0qJkeuwanXw, user=jcertif, password=***, dbport=10056 [[37minfo[0m] application - Enter getDBOptions() [[37minfo[0m] application - Exit getDBOptions() [[37minfo[0m] application - Exit MongoDB() [[37minfo[0m] application - Enter loadDbWithData(referentiel.js) [[37minfo[0m] application - Exit getDBOptions() [[37minfo[0m] play - Application started (Prod) [[37minfo[0m] play - Listening for HTTP on /0.0.0.0:8764 [[37minfo[0m] application - JCertif Backend onHandlerNotFound Global Handler [[37minfo[0m] application - JCertif Backend onHandlerNotFound Global Handler [[36mdebug[0m] application - Requested URL : /ref/sponsorlevel/list [[36mdebug[0m] application - list(collectionName=sponsor_level, query={ "deleted" : "false"}) [[37minfo[0m] application - JCertif Backend onHandlerNotFound Global Handler [[36mdebug[0m] application - Requested URL : / [[36mdebug[0m] application - Requested URL : /session/list [[36mdebug[0m] application - list(collectionName=session, query={ "deleted" : "false"}) [[36mdebug[0m] application - Requested URL : /participant/list [[36mdebug[0m] application - list(collectionName=participant, query={ "deleted" : "false"}) [[36mdebug[0m] application - Requested URL : /speaker/list [[36mdebug[0m] application - list(collectionName=speaker, query={ "deleted" : "false"}) [[36mdebug[0m] application - Requested URL : /ref/sessionstatus/list [[36mdebug[0m] application - Requested URL : /ref/category/list [[36mdebug[0m] application - list(collectionName=session_status, query={ "deleted" : "false"}) [[36mdebug[0m] application - list(collectionName=category, query={ "deleted" : "false"}) [[36mdebug[0m] application - Requested URL : /ref/title/list [[36mdebug[0m] application - list(collectionName=title, query={ "deleted" : "false"}) [[36mdebug[0m] application - Requested URL : /ref/sponsorlevel/list [[36mdebug[0m] application - list(collectionName=sponsor_level, query={ "deleted" : "false"}) [[37minfo[0m] application - titles : [] [[36mdebug[0m] application - Requested URL : /ref/category/list [[36mdebug[0m] application - list(collectionName=category, query={ "deleted" : "false"}) [[36mdebug[0m] application - Requested URL : /login/oauth/v2/authorize [[36mdebug[0m] application - readOne(collectionName=client, query={ "client_id" : "backoffice" , "deleted" : "false"}) [[37minfo[0m] application - state : xyz [[37minfo[0m] application - redirect_uri : http://localhost:9000/backoffice/home [[37minfo[0m] application - scope : user,admin [[36mdebug[0m] application - Requested URL : /login/oauth/v2/authorize [[36mdebug[0m] application - readOne(collectionName=client, query={ "client_id" : "backoffice" , "deleted" : "false"}) [[37minfo[0m] application - state : xyz [[37minfo[0m] application - redirect_uri : http://localhost:9000/backoffice/home [[37minfo[0m] application - scope : user,admin [[37minfo[0m] application - JCertif Backend onHandlerNotFound Global Handler [[36mdebug[0m] application - Requested URL : /ref/category/list [[36mdebug[0m] application - list(collectionName=category, query={ "deleted" : "false"}) [[37minfo[0m] application - JCertif Backend onHandlerNotFound Global Handler [[36mdebug[0m] application - Requested URL : /ref/title/list [[36mdebug[0m] application - list(collectionName=title, query={ "deleted" : "false"}) [[37minfo[0m] application - titles : [] [[37minfo[0m] application - JCertif Backend onHandlerNotFound Global Handler
A priori la recherche ne remonte rien...soit elle est boguée soit rien n'a est inséré dans la base au démarrage de l'appli..peux tu m'envoyer par mail le login/pwd de la base?
La recherche de données n'est pas bogué, c'est l'initialisation via la fonction mongo $eval qui na marche pas..il faut que je refasse un peu de lecture mais de souvenir cette fonction ne marche pas dans une certaine configuration de base (quand elle est shardé je pense)...
Effectivement le $eval doit être désactivé en mode production de MongoDB. Il faut donc injecter les données proprement. Peut-être ne mettre que du JSON dans le fichier et le récupérer puis l'exécuter au démarrage de l'application.
Cela serait pas mal d'initier aussi à l'occasion un jeu de données complémentaire au referentiel.js que l'on n'exécuterait pas en production et qui contiendrait les données sur les sponsors, les speakers et l'agenda. Le site web en cours de développement en a besoin assez rapidement.
Au démarrage de l'appli, une class (DBInitializer) lit le contenu du fichier referentiel.js et crée les objet java correspondant aux insertion à effectuer puis les sauvegarde en base. http://jcertif-backend.msomda.cloudbees.net/ref/title/list Les données complémentaires concernant les sponsors, salles, agenda etc arrivent..
Lorsque l'application démarre les données référentiels du fichier conf/referentiel.js ne sont pas accessibles via l'application.
Exemple : Ce fichier contient les données concernant les civilités mais lorsqu'on intéroge le service côté intégration, une liste vide est renvoyée : http://jcertif-backend.roddet.cloudbees.net/ref/title/list