CMDBuild Forum

Calendar Widget

Eversince I upgrade to version 2.1.3, I no longer able to run Calendar Widget or create a new one. I upgraded to 2.1.4 still no improvement and finally I upgraded to 2.1.5 and still no joy. Does anybody have any idea. 

 
More detail.
 
When I try to create a Widget two error occur.
 
1. Failure - Class undefined non found
2. Error - An error has occured - Show details
 
When I clicked on the Show details link I get the following error messages
 
Call: services/json/schema/modclass/getattributelist
-----------------------------------------------------
Error: java.lang.NullPointerException
	at org.cmdbuild.servlets.json.schema.ModClass.getAttributeList(ModClass.java:258)
	at sun.reflect.GeneratedMethodAccessor125.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.cmdbuild.servlets.JSONDispatcher.dispatch(JSONDispatcher.java:94)
	at org.cmdbuild.servlets.JSONDispatcher.doGet(JSONDispatcher.java:60)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.cmdbuild.filters.AuthFilter.doFilter(AuthFilter.java:144)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.cmdbuild.filters.PatchManagerFilter.doFilter(PatchManagerFilter.java:33)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.cmdbuild.filters.ConfCheckFilter.doFilter(ConfCheckFilter.java:31)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.cmdbuild.filters.TranslationFilter.doFilter(TranslationFilter.java:39)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
	at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:197)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1805)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:679)


In cmdbuild.log

INFO  2013-11-05 01:48:26 [jsonrpc ] Calling url /modwidget/getallwidgets
INFO  2013-11-05 01:48:27 [jsonrpc ] Calling url /schema/modsecurity/getuserlist
INFO  2013-11-05 01:48:28 [jsonrpc ] Calling url /schema/modclass/getdomainlist
INFO  2013-11-05 01:49:28 [jsonrpc ] Calling url /schema/setup/getconfiguration
INFO  2013-11-05 01:49:31 [jsonrpc ] Calling url /schema/modclass/getdomainlist
INFO  2013-11-05 01:49:35 [jsonrpc ] Calling url /schema/modclass/getdomainlist
INFO  2013-11-05 01:49:46 [jsonrpc ] Calling url /schema/modclass/getattributelist
ERROR 2013-11-05 01:49:46 [jsonrpc ] A java.lang.NullPointerException occurred calling method class org.cmdbuild.servlets.json.schema.ModClass.getAttributeList
 
Hi Zahri,
I confirm the bug.
It will be fixed in the next minor release.
 
Thanks for the report.
Tecnoteca Team
 
 
Previously Zahri wrote:
Eversince I upgrade to version 2.1.3, I no longer able to run Calendar Widget or create a new one. I upgraded to 2.1.4 still no improvement and finally I upgraded to 2.1.5 and still no joy. Does anybody have any idea. 
 
More detail.
 
When I try to create a Widget two error occur.
 
1. Failure - Class undefined non found
2. Error - An error has occured - Show details
 
When I clicked on the Show details link I get the following error messages
 
Call: services/json/schema/modclass/getattributelist
-----------------------------------------------------
Error: java.lang.NullPointerException
	at org.cmdbuild.servlets.json.schema.ModClass.getAttributeList(ModClass.java:258)
	at sun.reflect.GeneratedMethodAccessor125.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.cmdbuild.servlets.JSONDispatcher.dispatch(JSONDispatcher.java:94)
	at org.cmdbuild.servlets.JSONDispatcher.doGet(JSONDispatcher.java:60)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.cmdbuild.filters.AuthFilter.doFilter(AuthFilter.java:144)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.cmdbuild.filters.PatchManagerFilter.doFilter(PatchManagerFilter.java:33)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.cmdbuild.filters.ConfCheckFilter.doFilter(ConfCheckFilter.java:31)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.cmdbuild.filters.TranslationFilter.doFilter(TranslationFilter.java:39)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
	at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:197)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1805)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:679)


In cmdbuild.log

INFO  2013-11-05 01:48:26 [jsonrpc ] Calling url /modwidget/getallwidgets
INFO  2013-11-05 01:48:27 [jsonrpc ] Calling url /schema/modsecurity/getuserlist
INFO  2013-11-05 01:48:28 [jsonrpc ] Calling url /schema/modclass/getdomainlist
INFO  2013-11-05 01:49:28 [jsonrpc ] Calling url /schema/setup/getconfiguration
INFO  2013-11-05 01:49:31 [jsonrpc ] Calling url /schema/modclass/getdomainlist
INFO  2013-11-05 01:49:35 [jsonrpc ] Calling url /schema/modclass/getdomainlist
INFO  2013-11-05 01:49:46 [jsonrpc ] Calling url /schema/modclass/getattributelist
ERROR 2013-11-05 01:49:46 [jsonrpc ] A java.lang.NullPointerException occurred calling method class org.cmdbuild.servlets.json.schema.ModClass.getAttributeList
 

 

I have upgraded to Version 2.1.6. I am able to create and save Calendar Widget. But when I click on the button in Data Management View I only get the blank Calender. I know for fact that in my data for this months I have 21 events. I also visited the demo site. Unfortunately it is still version 2.1.5. I have no problem creating Calendar Widget. But same problem, I cannot see the Events when I open up the Calendar View. Can you confirm if this is a bug? Or if there is something special that I need to do to make the events appear on the calendar widget. When defining the attribute I used the Date Type. I also see time and timestamp type. Did I choose the correct type?
 
Previously Tecnoteca wrote:
Hi Zahri,
I confirm the bug.
It will be fixed in the next minor release.
 
Thanks for the report.
Tecnoteca Team
Dear Zahri,
 
are you able to provide us the configuration (classname, start, end, cql, etc) of the widget?
 
Best regards.
 
-- CMDBuild Team
 
Previously Zahri wrote:
I have upgraded to Version 2.1.6. I am able to create and save Calendar Widget. But when I click on the button in Data Management View I only get the blank Calender. I know for fact that in my data for this months I have 21 events. I also visited the demo site. Unfortunately it is still version 2.1.5. I have no problem creating Calendar Widget. But same problem, I cannot see the Events when I open up the Calendar View. Can you confirm if this is a bug? Or if there is something special that I need to do to make the events appear on the calendar widget. When defining the attribute I used the Date Type. I also see time and timestamp type. Did I choose the correct type?
 
Previously Tecnoteca wrote:
Hi Zahri,
I confirm the bug.
It will be fixed in the next minor release.
 
Thanks for the report.
Tecnoteca Team

 

I will recreate the structure in the CMDB Demo site. And see if the problem is only localized to my instance and will report to you afterward.
 
Previously Tecnoteca wrote:
Dear Zahri,
 
are you able to provide us the configuration (classname, start, end, cql, etc) of the widget?
 
Best regards.
 
-- CMDBuild Team
 
Previously Zahri wrote:
I have upgraded to Version 2.1.6. I am able to create and save Calendar Widget. But when I click on the button in Data Management View I only get the blank Calender. I know for fact that in my data for this months I have 21 events. I also visited the demo site. Unfortunately it is still version 2.1.5. I have no problem creating Calendar Widget. But same problem, I cannot see the Events when I open up the Calendar View. Can you confirm if this is a bug? Or if there is something special that I need to do to make the events appear on the calendar widget. When defining the attribute I used the Date Type. I also see time and timestamp type. Did I choose the correct type?
 
Previously Tecnoteca wrote:
Hi Zahri,
I confirm the bug.
It will be fixed in the next minor release.
 
Thanks for the report.
Tecnoteca Team

 

 

Previously Tecnoteca wrote:

Dear Zahri,
 
are you able to provide us the configuration (classname, start, end, cql, etc) of the widget?
 
Best regards.
 
-- CMDBuild Team

 

Dear Technoteca,
 
Please go to the Demo Site http://demo.cmdbuild.org/cmdbuild/management.jsp and navigate to Class -> Asset -> Computer -> PC. I have changed the Acceptance Date to recent date within this month. I am expecting when I clicked on the Warranty Calendar, a calendar would open and display the calendar items in it but right now the Calendar is totally blank. Only boxes of dates with no event in it. The same thing happen in version 2.1.6. I remember this calender did work in version 2.0.4 and have not been working ever since.

Hi, I have the same problem, do you have solved it? 

 

Solved on  version 2.1.7

 

 

Previously marinella wrote:

Solved on  version 2.1.7

 

 

I will upgrade this weekend and thank you very much.
I would like to report my findings:
 
1. If I use an attribute of type "Date", the calendar display the event but with the time set to 12:00am.
2. If I use an attribute of type "Timestamp", the calendar doesn't display the events.
 
I still consider this a problem with the calendar widget.
 
1. If it were to show time please let the time be meaning full like the exact time set for the event and this can only be achieved by allowing the type "Timestamp" to be displayed correctly.
2. Otherwise, it would be better to remove the time altogether and just show the description like in version 2.0.4 
 
Previously Zahri wrote:
Previously marinella wrote:

Solved on  version 2.1.7

 

 

I will upgrade this weekend and thank you very much.

 

I could not wait any longer for the widget to be fixed to accept DateTime attribute. So after digging through the code and I found out that there is a code segment that process the date. It turned out that the code only take the date and never the time. So, I added some function calls to get also the time information from datetime attribute.

 
Open the file ./cmdb/javascripts/cmdbuild/controller/management/common/widgets/CMCalendarController.js
Goto line 154 and edit the function "function getCMDBuildDateStringFromDateObject(d)"
 
original function
 
function getCMDBuildDateStringFromDateObject(d) {
                // d.getMonth return the month 0-11
                return d.getDate() + "/" + (d.getMonth() + 1) + "/" + d.getFullYear();
        }
 
to 
 
function getCMDBuildDateStringFromDateObject(d) {
                // d.getMonth return the month 0-11
                // zahri add getHours, getMinutes and getSeconds function calls
                return d.getDate() + "/" + (d.getMonth() + 1) + "/" + d.getFullYear() + " " + d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds();
        }
 
Now the widget will accept the DateTime attribute as either begin or end start date time.
Hi Zahri,
we tested your code but it  will modify widget's core behavior so we can't insert it on main distribution core. Anyway we take a note for future improvements about calendar widget.
 
Thanks,
Tecnoteca Team
 
Previously Zahri wrote:
I could not wait any longer for the widget to be fixed to accept DateTime attribute. So after digging through the code and I found out that there is a code segment that process the date. It turned out that the code only take the date and never the time. So, I added some function calls to get also the time information from datetime attribute.
 
Open the file ./cmdb/javascripts/cmdbuild/controller/management/common/widgets/CMCalendarController.js
Goto line 154 and edit the function "function getCMDBuildDateStringFromDateObject(d)"
 
original function
 
function getCMDBuildDateStringFromDateObject(d) {
                // d.getMonth return the month 0-11
                return d.getDate() + "/" + (d.getMonth() + 1) + "/" + d.getFullYear();
        }
 
to 
 
function getCMDBuildDateStringFromDateObject(d) {
                // d.getMonth return the month 0-11
                // zahri add getHours, getMinutes and getSeconds function calls
                return d.getDate() + "/" + (d.getMonth() + 1) + "/" + d.getFullYear() + " " + d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds();
        }
 
Now the widget will accept the DateTime attribute as either begin or end start date time.

 

Okay noted. The solution fit my needs very well. I will keep the maintenance of these solution for my own use. Thank you so much.