Tecnoteca ha scritto:
L'errore "Uncaught type error: cannot read property '<qualcosa>'
of undefined" è un errore generico di quando l'interprete JavaScript tenta di
accedere a una proprietà di un oggetto inesistente (null o undefined). Le cause possono essere molteplici, per cui è impossibile sapere quale sia la causa senza altre informazioni. La mancata cancellazione della cache dopo un aggiornamento oppure l'utilizzo di server proxy (che sono a loro volta delle cache) è una delle più comuni. Siccome non è questo il caso, ci servono ulteriori informazioni.
A giudicare dal punto in cui si verifica l'errore, sembra che il server non restituisca l'elenco delle lookup oppure che questo elenco sia malformato. Ci servirebbe avere i log di cmbuild (generalmente in $TOMCAT_HOME/logs/cmdbuild.log) dall'avvio dell'applicazione a quando si verifica l'errore JavaScript. Inoltre può tornare utile il messaggio di risposta della seguente richiesta: http://<hostname>/<appname>/services/json/schema/modlookup/tree . Può essere ottenuto tramite firebug oppure direttamente copiandolo sulla barra dell'url dopo aver eseguito il login.
Paolo
Grazie per la risposta. Vi confermo che non ho proxy tra me e il server (sono con il client nella stessa subnet del server) e riporto i log richiesti; per completezza aggiungo che l'applicazione cmdbuild è stata fermata e fatta ripartire tramite manager Tomcat.
cmdbuild.log
---------------
INFO 2012-05-03 17:07:22 [cmdbuild] Loading common configurations for CMDBuild
INFO 2012-05-03 17:07:22 [cmdbuild] Initializing ParameterTransformers
INFO 2012-05-03 17:07:22 [cmdbuild] Transformer for org.apache.commons.fileupload.FileItem: org.cmdbuild.servlets.utils.transformer.FileItemTransformer
INFO 2012-05-03 17:07:22 [cmdbuild] Transformer for org.json.JSONObject: org.cmdbuild.servlets.utils.transformer.JSONObjectTransformer
INFO 2012-05-03 17:07:22 [cmdbuild] Transformer for org.json.JSONArray: org.cmdbuild.servlets.utils.transformer.JSONArrayTransformer
INFO 2012-05-03 17:07:22 [cmdbuild] Initializer custom ParameterBuilders
INFO 2012-05-03 17:07:22 [cmdbuild] Builder for org.cmdbuild.servlets.json.management.ActivityIdentifier: org.cmdbuild.servlets.utils.builder.ActivityIdentifierParameter
INFO 2012-05-03 17:07:22 [cmdbuild] Builder for org.cmdbuild.elements.interfaces.ICard: org.cmdbuild.servlets.utils.builder.CardParameter
INFO 2012-05-03 17:07:22 [cmdbuild] Builder for org.cmdbuild.elements.interfaces.IRelation: org.cmdbuild.servlets.utils.builder.RelationParameter
INFO 2012-05-03 17:07:22 [cmdbuild] Builder for org.cmdbuild.elements.interfaces.ITable: org.cmdbuild.servlets.utils.builder.TableParameter
INFO 2012-05-03 17:07:22 [cmdbuild] Builder for org.cmdbuild.elements.interfaces.BaseSchema: org.cmdbuild.servlets.utils.builder.BaseSchemaParameter
INFO 2012-05-03 17:07:22 [cmdbuild] Builder for org.cmdbuild.elements.interfaces.ProcessType: org.cmdbuild.servlets.utils.builder.ProcessTypeParameter
INFO 2012-05-03 17:07:22 [cmdbuild] Builder for org.cmdbuild.elements.interfaces.IDomain: org.cmdbuild.servlets.utils.builder.DomainParameter
INFO 2012-05-03 17:07:22 [cmdbuild] Builder for org.cmdbuild.elements.interfaces.CardQuery: org.cmdbuild.servlets.utils.builder.CardQueryParameter
INFO 2012-05-03 17:07:22 [cmdbuild] Builder for org.cmdbuild.elements.interfaces.ProcessQuery: org.cmdbuild.servlets.utils.builder.ProcessQueryParameter
INFO 2012-05-03 17:07:22 [cmdbuild] Builder for org.w3c.dom.Document: org.cmdbuild.servlets.utils.builder.XMLDocumentBuilder
INFO 2012-05-03 17:07:22 [cmdbuild] Builder for org.cmdbuild.services.auth.UserContext: org.cmdbuild.servlets.utils.builder.UserContextParameter
INFO 2012-05-03 17:07:22 [cmdbuild] Builder for org.cmdbuild.elements.interfaces.ITableFactory: org.cmdbuild.servlets.utils.builder.factory.TableFactoryParameter
INFO 2012-05-03 17:07:22 [cmdbuild] Builder for org.cmdbuild.elements.interfaces.DomainFactory: org.cmdbuild.servlets.utils.builder.factory.DomainFactoryParameter
INFO 2012-05-03 17:07:22 [cmdbuild] Builder for org.cmdbuild.elements.interfaces.RelationFactory: org.cmdbuild.servlets.utils.builder.factory.RelationFactoryParameter
INFO 2012-05-03 17:07:22 [cmdbuild] Loading scheduled jobs
INFO 2012-05-03 17:07:56 [jsonrpc ] Calling url /utils/gettranslationobject
INFO 2012-05-03 17:07:57 [jsonrpc ] Calling url /schema/setup/getconfiguration
INFO 2012-05-03 17:07:57 [jsonrpc ] Calling url /utils/listavailabletranslations
INFO 2012-05-03 17:08:08 [jsonrpc ] Calling url /utils/gettranslationobject
INFO 2012-05-03 17:08:09 [jsonrpc ] Calling url /schema/setup/getconfiguration
INFO 2012-05-03 17:08:09 [jsonrpc ] Calling url /utils/listavailabletranslations
INFO 2012-05-03 17:08:20 [jsonrpc ] Calling url /login/login
INFO 2012-05-03 17:08:20 [jsonrpc ] Calling url /utils/gettranslationobject
INFO 2012-05-03 17:08:21 [jsonrpc ] Calling url /schema/setup/getconfiguration
INFO 2012-05-03 17:08:21 [jsonrpc ] Calling url /schema/setup/getconfiguration
INFO 2012-05-03 17:08:21 [jsonrpc ] Calling url /schema/setup/getconfiguration
INFO 2012-05-03 17:08:22 [jsonrpc ] Calling url /schema/setup/getconfiguration
INFO 2012-05-03 17:08:22 [jsonrpc ] Calling url /schema/modclass/getallclasses
INFO 2012-05-03 17:08:22 [jsonrpc ] Calling url /schema/modclass/getalldomains
INFO 2012-05-03 17:08:22 [jsonrpc ] Calling url /schema/modmenu/getgroupmenu
INFO 2012-05-03 17:08:22 [jsonrpc ] Calling url /management/modreport/getreporttypestree
INFO 2012-05-03 17:08:22 [jsonrpc ] Calling url /schema/setup/getconfiguration
INFO 2012-05-03 17:08:23 [jsonrpc ] Calling url /schema/modclass/getallwidgets
INFO 2012-05-03 17:08:25 [jsonrpc ] Calling url /schema/modclass/getattributelist
INFO 2012-05-03 17:08:25 [jsonrpc ] Calling url /schema/modclass/getattributelist
INFO 2012-05-03 17:08:26 [jsonrpc ] Calling url /schema/modclass/getfktargetingclass
INFO 2012-05-03 17:08:26 [jsonrpc ] Calling url /management/modcard/getcardlist
A questo punto ho chiamato la URL indicata:
INFO 2012-05-03 17:08:59 [jsonrpc ] Calling url /schema/modlookup/tree
che restituisce nel browser la seguente struttura js:
[{"id":"FlowStatus","text":"FlowStatus","selectable":true,"type":"lookuptype"},{"id":"Sites","text":"Sites","selectable":true,"type":"lookuptype"},{"id":"State","text":"State","selectable":true,"type":"lookuptype"},{"id":"OST","text":"OST","selectable":true,"parent":"Operating System type","type":"lookuptype"},{"id":"Zone","text":"Zone","selectable":true,"parent":"Sites","type":"lookuptype"},{"id":"EmailStatus","text":"EmailStatus","selectable":true,"type":"lookuptype"},{"id":"Use","text":"Use","selectable":true,"parent":"State","type":"lookuptype"}]
Infine, ecco la coda del cmdbuild.log dopo aver richiamato la pagina administration.jsp:
INFO 2012-05-03 17:16:55 [jsonrpc ] Calling url /utils/gettranslationobject
INFO 2012-05-03 17:16:56 [jsonrpc ] Calling url /schema/setup/getconfiguration
INFO 2012-05-03 17:16:57 [jsonrpc ] Calling url /schema/modclass/getattributetypes
INFO 2012-05-03 17:16:57 [jsonrpc ] Calling url /schema/modlookup/tree
INFO 2012-05-03 17:16:57 [jsonrpc ] Calling url /schema/modclass/getallclasses
INFO 2012-05-03 17:16:57 [jsonrpc ] Calling url /schema/modsecurity/getgrouplist
INFO 2012-05-03 17:16:57 [jsonrpc ] Calling url /schema/modclass/getallwidgets
INFO 2012-05-03 17:16:57 [jsonrpc ] Calling url /schema/modreport/menutree
INFO 2012-05-03 17:16:57 [jsonrpc ] Calling url /schema/modclass/getalldomains
INFO 2012-05-03 17:16:57 [jsonrpc ] Calling url /schema/setup/getconfiguration
INFO 2012-05-03 17:16:57 [jsonrpc ] Calling url /schema/setup/getconfiguration
INFO 2012-05-03 17:16:57 [jsonrpc ] Calling url /schema/modsecurity/getuserlist
INFO 2012-05-03 17:16:57 [jsonrpc ] Calling url /management/modreport/getgroups
INFO 2012-05-03 17:16:57 [jsonrpc ] Calling url /schema/modsecurity/getusergrouplist
INFO 2012-05-03 17:16:57 [jsonrpc ] Calling url /gis/geticonslist
INFO 2012-05-03 17:16:57 [jsonrpc ] Calling url /utils/listavailabletranslations
E' possibile che sia questa (o la successiva url, che non arriva ad apparire nel log) la jsp che produce l'errore?
Grazie ancora.
Niccolò