datatables-thymeleaf:1.1.0 throwing NullPointerException

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

datatables-thymeleaf:1.1.0 throwing NullPointerException

hzendejas
This post was updated on .
I am trying to use datatables with Spring 4.2,  thymeleaf and dandelion datatables-thymeleaf 1.1.0; but I am getting next exception:

:bootRun

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::             (v1.3.0.M2)

2015-08-10 04:04:59.417  INFO 27759 --- [  restartedMain] sca.ScaApplication                       : Starting ScaApplication on Hectors-MacBook-Pro.local with PID 27759 (/Users/hzendejas/my-grails-projects/sie420/sca/build/classes/main started by hzendejas in /Users/hzendejas/my-grails-projects/sie420/sca)
2015-08-10 04:04:59.468  INFO 27759 --- [  restartedMain] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@4ff07362: startup date [Mon Aug 10 04:04:59 CDT 2015]; root of context hierarchy
2015-08-10 04:05:00.278  INFO 27759 --- [  restartedMain] o.s.b.f.s.DefaultListableBeanFactory     : Overriding bean definition for bean 'beanNameViewResolver' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration; factoryMethodName=beanNameViewResolver; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter; factoryMethodName=beanNameViewResolver; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class]]
2015-08-10 04:05:00.761  INFO 27759 --- [  restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$2f36c24e] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2015-08-10 04:05:01.112  INFO 27759 --- [  restartedMain] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2015-08-10 04:05:01.268  INFO 27759 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service Tomcat
2015-08-10 04:05:01.270  INFO 27759 --- [  restartedMain] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.0.23
2015-08-10 04:05:01.338  INFO 27759 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2015-08-10 04:05:01.338  INFO 27759 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1872 ms
2015-08-10 04:05:01.798  INFO 27759 --- [ost-startStop-1] o.s.b.c.e.ServletRegistrationBean        : Mapping servlet: 'dispatcherServlet' to [/]
2015-08-10 04:05:01.803  INFO 27759 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean  : Mapping filter: 'characterEncodingFilter' to: [/*]
2015-08-10 04:05:01.803  INFO 27759 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean  : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2015-08-10 04:05:01.804  INFO 27759 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean  : Mapping filter: 'resourceUrlEncodingFilter' to: [/*]
2015-08-10 04:05:02.008  INFO 27759 --- [  restartedMain] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
2015-08-10 04:05:02.028  INFO 27759 --- [  restartedMain] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
        name: default
        ...]
2015-08-10 04:05:02.101  INFO 27759 --- [  restartedMain] org.hibernate.Version                    : HHH000412: Hibernate Core {5.0.0.CR2}
2015-08-10 04:05:02.102  INFO 27759 --- [  restartedMain] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found
2015-08-10 04:05:02.104  INFO 27759 --- [  restartedMain] org.hibernate.cfg.Environment            : HHH000021: Bytecode provider name : javassist
2015-08-10 04:05:02.141  INFO 27759 --- [  restartedMain] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.0.0.Final}
2015-08-10 04:05:02.573  INFO 27759 --- [  restartedMain] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
2015-08-10 04:05:03.211  INFO 27759 --- [  restartedMain] o.h.h.i.QueryTranslatorFactoryInitiator  : HHH000397: Using ASTQueryTranslatorFactory
2015-08-10 04:05:03.446  INFO 27759 --- [  restartedMain] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
2015-08-10 04:05:03.717  INFO 27759 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@4ff07362: startup date [Mon Aug 10 04:04:59 CDT 2015]; root of context hierarchy
2015-08-10 04:05:03.776  INFO 27759 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/asignatura],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView sca.web.AsignaturaController.index()
2015-08-10 04:05:03.778  INFO 27759 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/asignatura/create]}" onto public org.springframework.web.servlet.ModelAndView sca.web.AsignaturaController.create()
2015-08-10 04:05:03.779  INFO 27759 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/asignatura/save],methods=[POST]}" onto public org.springframework.web.servlet.ModelAndView sca.web.AsignaturaController.save(sca.domain.Asignatura)
2015-08-10 04:05:03.780  INFO 27759 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/asignatura/show/{id}]}" onto public org.springframework.web.servlet.ModelAndView sca.web.AsignaturaController.show(java.lang.Long)
2015-08-10 04:05:03.780  INFO 27759 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/asignatura/edit/{id}]}" onto public org.springframework.web.servlet.ModelAndView sca.web.AsignaturaController.edit(java.lang.Long,org.springframework.ui.Model)
2015-08-10 04:05:03.780  INFO 27759 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/asignatura/update],methods=[POST]}" onto public java.lang.String sca.web.AsignaturaController.update(java.lang.Long,sca.domain.Asignatura,org.springframework.validation.BindingResult)
2015-08-10 04:05:03.780  INFO 27759 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/asignatura/delete],methods=[POST]}" onto public java.lang.String sca.web.AsignaturaController.delete(java.lang.Long)
2015-08-10 04:05:03.785  INFO 27759 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/parametros/]}" onto public java.lang.String sca.web.ParametrosController.index()
2015-08-10 04:05:03.785  INFO 27759 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/parametros/create]}" onto public org.springframework.web.servlet.ModelAndView sca.web.ParametrosController.create()
2015-08-10 04:05:03.785  INFO 27759 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/parametros/save],methods=[POST]}" onto public org.springframework.web.servlet.ModelAndView sca.web.ParametrosController.save(sca.domain.Parametros)
2015-08-10 04:05:03.786  INFO 27759 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/parametros/show/{id}]}" onto public org.springframework.web.servlet.ModelAndView sca.web.ParametrosController.show(java.lang.Long)
2015-08-10 04:05:03.786  INFO 27759 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/parametros/edit/{id}]}" onto public org.springframework.web.servlet.ModelAndView sca.web.ParametrosController.edit(sca.domain.Parametros)
2015-08-10 04:05:03.786  INFO 27759 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/parametros/update],methods=[POST]}" onto public java.lang.String sca.web.ParametrosController.update(java.lang.Long,sca.domain.Parametros)
2015-08-10 04:05:03.786  INFO 27759 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/parametros/delete],methods=[POST]}" onto public java.lang.String sca.web.ParametrosController.delete(java.lang.Long)
2015-08-10 04:05:03.788  INFO 27759 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2015-08-10 04:05:03.788  INFO 27759 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest)
2015-08-10 04:05:03.808  INFO 27759 --- [  restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2015-08-10 04:05:03.808  INFO 27759 --- [  restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2015-08-10 04:05:03.838  INFO 27759 --- [  restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2015-08-10 04:05:04.014  INFO 27759 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
2015-08-10 04:05:04.055  INFO 27759 --- [  restartedMain] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2015-08-10 04:05:04.110  INFO 27759 --- [  restartedMain] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
2015-08-10 04:05:04.115  INFO 27759 --- [  restartedMain] sca.ScaApplication                       : Started ScaApplication in 4.923 seconds (JVM running for 5.557)
2015-08-10 04:05:16.042  INFO 27759 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring FrameworkServlet 'dispatcherServlet'
2015-08-10 04:05:16.043  INFO 27759 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization started
2015-08-10 04:05:16.061  INFO 27759 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization completed in 18 ms
2015-08-10 04:05:16.354 DEBUG 27759 --- [nio-8080-exec-1] c.g.d.d.core.config.ConfigLoader         : No custom configuration. Using default one.
2015-08-10 04:05:16.354 DEBUG 27759 --- [nio-8080-exec-1] c.g.d.d.core.config.ConfigLoader         : Loading default configuration...
2015-08-10 04:05:16.355 DEBUG 27759 --- [nio-8080-exec-1] c.g.d.d.core.config.ConfigLoader         : Default configuration loaded
2015-08-10 04:05:16.356  WARN 27759 --- [nio-8080-exec-1] c.g.d.d.c.o.TableConfigurationFactory    : The Dandelion context doesn't seem to be available. Did you forget to declare the DandelionFilter in your web.xml file?
2015-08-10 04:05:16.357 DEBUG 27759 --- [nio-8080-exec-1] c.g.d.d.core.config.ConfigLoader         : No custom configuration. Using default one.
2015-08-10 04:05:16.357 DEBUG 27759 --- [nio-8080-exec-1] c.g.d.d.core.config.ConfigLoader         : Resolving groups for the locale en_US...
2015-08-10 04:05:16.357 DEBUG 27759 --- [nio-8080-exec-1] c.g.d.d.core.config.ConfigLoader         : 1 groups declared [global].
2015-08-10 04:05:16.357 DEBUG 27759 --- [nio-8080-exec-1] c.g.d.d.core.config.ConfigLoader         : Resolving configurations for the locale en_US...
2015-08-10 04:05:16.358 DEBUG 27759 --- [nio-8080-exec-1] c.g.d.d.core.config.ConfigLoader         : Group 'global' initialized with 1 properties
2015-08-10 04:05:16.370 DEBUG 27759 --- [nio-8080-exec-1] c.g.d.d.core.config.ConfigLoader         : 1 group(s) resolved [global] for the locale en_US
2015-08-10 04:05:16.370 DEBUG 27759 --- [nio-8080-exec-1] c.g.d.d.core.config.ConfigLoader         : No custom configuration. Using default one.
2015-08-10 04:05:16.553 DEBUG 27759 --- [nio-8080-exec-1] c.g.d.d.t.p.e.TableFinalizerElProcessor  : No configuration to apply, i.e. no 'dt:conf' has been found in the current template.
2015-08-10 04:05:16.557 DEBUG 27759 --- [nio-8080-exec-1] c.g.d.d.c.g.DatatableJQueryContent       : Generating the main configuration for the table with id: myTableId
2015-08-10 04:05:16.559 DEBUG 27759 --- [nio-8080-exec-1] c.g.d.d.c.g.DatatableConfigGenerator     : Generating DataTables configuration ..
2015-08-10 04:05:16.560 DEBUG 27759 --- [nio-8080-exec-1] c.g.d.d.c.g.DatatableConfigGenerator     : DataTables configuration generated
2015-08-10 04:05:16.562 DEBUG 27759 --- [nio-8080-exec-1] c.g.d.d.c.g.DatatableJQueryContent       : Loading extensions for the table with id: myTableId
2015-08-10 04:05:16.563 DEBUG 27759 --- [nio-8080-exec-1] c.g.d.d.core.extension.ExtensionLoader   : Scanning for extensions...
2015-08-10 04:05:16.584 DEBUG 27759 --- [nio-8080-exec-1] c.g.d.d.c.g.DatatableJQueryContent       : Transforming configuration to JSON...
2015-08-10 04:05:16.594 ERROR 27759 --- [nio-8080-exec-1] org.thymeleaf.TemplateEngine             : [THYMELEAF][http-nio-8080-exec-1] Exception processing template "asignatura/index1": Error during execution of processor 'com.github.dandelion.datatables.thymeleaf.processor.el.TableFinalizerElProcessor'
2015-08-10 04:05:16.604 ERROR 27759 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateProcessingException: Error during execution of processor 'com.github.dandelion.datatables.thymeleaf.processor.el.TableFinalizerElProcessor'] with root cause

java.lang.NullPointerException: null
        at com.github.dandelion.core.web.AssetRequestContext.get(AssetRequestContext.java:163)
        at com.github.dandelion.datatables.thymeleaf.processor.el.TableFinalizerElProcessor.setupHtml(TableFinalizerElProcessor.java:310)
        at com.github.dandelion.datatables.thymeleaf.processor.el.TableFinalizerElProcessor.doProcessElement(TableFinalizerElProcessor.java:128)
        at com.github.dandelion.datatables.thymeleaf.processor.AbstractElProcessor.processElement(AbstractElProcessor.java:67)
        at org.thymeleaf.processor.element.AbstractElementProcessor.doProcess(AbstractElementProcessor.java:74)
        at org.thymeleaf.processor.AbstractProcessor.process(AbstractProcessor.java:212)
        at org.thymeleaf.dom.Node.applyNextProcessor(Node.java:1017)
        at org.thymeleaf.dom.Node.processNode(Node.java:972)
        at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:695)
        at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:668)
        at org.thymeleaf.dom.Node.processNode(Node.java:990)
        at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:695)
        at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:668)
        at org.thymeleaf.dom.Node.processNode(Node.java:990)
        at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:695)
        at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:668)
        at org.thymeleaf.dom.Node.processNode(Node.java:990)
        at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:695)
        at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:668)
        at org.thymeleaf.dom.Node.processNode(Node.java:990)
        at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:695)
        at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:668)
        at org.thymeleaf.dom.Node.processNode(Node.java:990)
        at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:695)
        at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:668)
        at org.thymeleaf.dom.Node.processNode(Node.java:990)
        at org.thymeleaf.dom.Document.process(Document.java:93)
        at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1155)
        at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1060)
        at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1011)
        at org.thymeleaf.spring4.view.ThymeleafView.renderFragment(ThymeleafView.java:335)
        at org.thymeleaf.spring4.view.ThymeleafView.render(ThymeleafView.java:190)
        at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1244)
        at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1027)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:971)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:969)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:860)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:845)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.springframework.web.servlet.resource.ResourceUrlEncodingFilter.doFilterInternal(ResourceUrlEncodingFilter.java:51)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:617)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1521)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1478)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:745)


--------------------->>>>>>>>>>>>>>>> And, here is my build.gradle:

import groovy.transform.Field

buildscript {
   ext {
      springBootVersion = '1.3.0.M2'
      hibernateVersion = '5.0.0.CR2'
      springLoadedVersion = '1.2.3.RELEASE'

   }
   repositories {
      mavenCentral()
      maven { url "https://repo.spring.io/snapshot" }
      maven { url "https://repo.spring.io/milestone" }
   }
   dependencies {
      classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
      classpath("org.springframework:springloaded:${springLoadedVersion}")
   }
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'spring-boot'

jar {
   baseName = 'sca'
   version = '0.0.1-SNAPSHOT'
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
   mavenCentral()
   maven { url "https://repo.spring.io/snapshot" }
   maven { url "https://repo.spring.io/milestone" }
}

dependencies {
   // compile("org.springframework.boot:spring-boot-starter-web")
   compile("org.springframework.boot:spring-boot-starter-thymeleaf")
   compile("org.hibernate:hibernate-validator")
   compile("org.thymeleaf.extras:thymeleaf-extras-java8time:2.1.0.RELEASE")
   compile("org.springframework.boot:spring-boot-starter-data-jpa")

   compile("org.springframework.boot:spring-boot-devtools")

   compile("com.github.dandelion:datatables-thymeleaf:1.1.0") { transitive = true }
   // compile("com.github.dandelion:dandelion-webjars:1.1.0")
   compile("org.hibernate:hibernate-core:$hibernateVersion") { transitive = true }
   compile "org.hibernate:hibernate-entitymanager:$hibernateVersion"

   runtime("mysql:mysql-connector-java")
   testCompile("org.springframework.boot:spring-boot-starter-test")
}

eclipse {
   classpath {
      containers.remove('org.eclipse.jdt.launching.JRE_CONTAINER')
      containers 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8'
   }
}

task wrapper(type: Wrapper) {
   gradleVersion = '2.3'
}



--------------- >>>>>>>>>> And here is WebApplicationInitializer

package sca.config;

import javax.servlet.FilterRegistration;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRegistration;

import com.github.dandelion.core.web.DandelionFilter;
import com.github.dandelion.core.web.DandelionServlet;
import org.springframework.web.WebApplicationInitializer;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
import org.springframework.web.servlet.DispatcherServlet;

public class SpringWebAppInitializer implements WebApplicationInitializer {

    @Override
    public void onStartup(ServletContext servletContext) throws ServletException {
        AnnotationConfigWebApplicationContext appContext = new AnnotationConfigWebApplicationContext();
        appContext.register(ApplicationContextConfig.class);

        // Register the Dandelion filter
        FilterRegistration.Dynamic dandelionFilter = servletContext.addFilter("dandelionFilter", new DandelionFilter());
        dandelionFilter.addMappingForUrlPatterns(null, false, "/*");

        ServletRegistration.Dynamic dispatcher = servletContext.addServlet(
                "SpringDispatcher", new DispatcherServlet(appContext));
        dispatcher.setLoadOnStartup(1);
        dispatcher.addMapping("/");

        // Register the Dandelion servlet
        ServletRegistration.Dynamic dandelionServlet = servletContext.addServlet("dandelionServlet", new DandelionServlet());
        dandelionServlet.setLoadOnStartup(2);
        dandelionServlet.addMapping("/dandelion-assets/*");

    }
}
 

----------------------------->>>>>>>>>>>>> And my ApplicationContextConfig.java

package sca.config;

import com.github.dandelion.datatables.thymeleaf.dialect.DataTablesDialect;
import com.github.dandelion.thymeleaf.dialect.DandelionDialect;
import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.orm.hibernate5.LocalSessionFactoryBean;
import org.springframework.orm.jpa.JpaVendorAdapter;
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
import org.springframework.orm.jpa.vendor.Database;
import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.servlet.ViewResolver;
import org.thymeleaf.extras.java8time.dialect.Java8TimeDialect;
import org.thymeleaf.spring4.SpringTemplateEngine;
import org.thymeleaf.spring4.view.ThymeleafViewResolver;
import org.thymeleaf.templatemode.StandardTemplateModeHandlers;

import javax.sql.DataSource;

/**
 * Created by hzendejas on 7/18/15.
 */
@Configuration
@ComponentScan("sca.config")
@EnableJpaRepositories(basePackages = "sca.domain")
@EnableTransactionManagement
public class ApplicationContextConfig {

    @Bean
    public LocalSessionFactoryBean sessionFactory(DataSource dataSource) {
        LocalSessionFactoryBean sfb = new LocalSessionFactoryBean();
        sfb.setDataSource(dataSource);
        sfb.setPackagesToScan(new String[]{"sca.domain"});
        return sfb;
    }

    @Bean
    public LocalContainerEntityManagerFactoryBean entityManagerFactory(
            DataSource dataSource, JpaVendorAdapter jpaVendorAdapter) {
        LocalContainerEntityManagerFactoryBean emfb = new LocalContainerEntityManagerFactoryBean();
        emfb.setDataSource(dataSource);
        emfb.setJpaVendorAdapter(jpaVendorAdapter);
        emfb.setPackagesToScan("sca.domain");
        return emfb;
    }

    @Bean
    public JpaVendorAdapter jpaVendorAdapter() {
        HibernateJpaVendorAdapter adapter = new HibernateJpaVendorAdapter();
        adapter.setDatabase(Database.MYSQL);
        adapter.setShowSql(false);
        adapter.setGenerateDdl(false);
        adapter.setDatabasePlatform("org.hibernate.dialect.MySQLDialect");
        return adapter;
    }

    @Bean
    public ViewResolver viewResolver(SpringTemplateEngine templateEngine) {
        templateEngine.addTemplateModeHandler(StandardTemplateModeHandlers.HTML5);
        templateEngine.addDialect(new Java8TimeDialect());
        templateEngine.addDialect(new DataTablesDialect());
        ThymeleafViewResolver viewResolver = new ThymeleafViewResolver();
        viewResolver.setTemplateEngine(templateEngine);
        return viewResolver;
    }

    @Bean
    public MessageSource messageSource() {
        ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource();
        messageSource.setBasename("classpath:/messages");
        messageSource.setUseCodeAsDefaultMessage(true);
        return messageSource;
    }
}


----------------------------->>>>>>>>>>>>> And my html page

<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:tiles="http://www.thymeleaf.org"
      xmlns:ddl="http://www.thymeleaf.org/dandelion"
      xmlns:dt="http://www.thymeleaf.org/dandelion/datatables"
      ddl:bundle-includes="bootstrap3">

<head>
    <title>datatables-thymeleaf-javaconfig</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>

<div class="navbar navbar-fixed-top">
    <div class="navbar-inner">
        <div class="container">
            <a class="btn btn-navbar" data-toggle="collapse" data-target=".navbar-responsive-collapse">
                <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span>
            </a>
            <a class="brand" th:href="@{/}">datatables-thymeleaf-javaconfig</a>

            <div class="nav-collapse collapse navbar-responsive-collapse">
                <ul class="nav">

                </ul>
                <ul class="nav pull-right">
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Help
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a href="http://dandelion.github.io/components/datatables">Documentation</a></li>
                            <li><a href="http://dandelion-forum.48353.x6.nabble.com/">Forum</a></li>
                            <li><a href="https://github.com/dandelion/dandelion-datatables-samples/issues">Report an
                                issue</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>

<div class="container">

    <div class="row-fluid row-intro">
        <div class="span12">
            <h3>Default configuration</h3>

            <p>The following table uses the default configuration.</p>

            <p>Open your browser debugger and take a look at the generated parameters!</p>
        </div>
    </div>

    <div class="row-fluid">
        <div class="span12">

            <table id="myTableId" dt:table="true" class="display">
                <thead>
                <tr>
                    <th>Id</th>
                    <th th:text="#{asignatura.clave.label}"/>
                    <th th:utext="#{asignatura.descripcion.label}"/>
                    <th th:text="#{asignatura.horasSemanales.label}"/>
                    <th th:text="#{asignatura.activoHasta.label}"/>
                </tr>
                </thead>
                <tbody>
                <tr th:each="asignaturaInstance : ${asignaturaInstances}">
                    <div th:if="${asignaturaInstance.activoHasta} == null">
                        <td><a th:href="@{/asignatura/show/{id}(id=${asignaturaInstance.id})}">
                            <span th:text="${asignaturaInstance.id}">!!Error</span></a>
                        </td>
                    </div>
                    <div th:if="${asignaturaInstance.activoHasta} != null">
                        <td th:text="${asignaturaInstance.id}">id</td>
                    </div>
                    <td th:text="${asignaturaInstance.clave}">Clave</td>
                    <td th:text="${asignaturaInstance.descripcion}">Descripcion</td>
                    <td th:text="${asignaturaInstance.horasSemanales}">Horas Semanales</td>
                    <div th:if="${asignaturaInstance.activoHasta} != null">
                        <td th:text="${#temporals.format(asignaturaInstance.localDateTime, 'dd/MM/yyyy HH:mm')}">
                            dd/MM/yyyy HH:mm
                        </td>
                    </div>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
</body>
</html>


------------------------------- >>>>>>>>>>>> bookmarlet output

DataTables debug bookmarlet: jQuery not loaded on this page, therefore no DataTables :-(



Thanks in advance for any help:
Hector
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: datatables-thymeleaf:1.1.0 throwing NullPointerException

Thibault Duchateau
Administrator
Hi Hector,

Thanks for the detailed report!

At first glance, it looks like a wrong configuration of the DandelionFilter. Weird...
I'll try to reproduce ASAP and keep you posted.

Regards,
Thibault.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: datatables-thymeleaf:1.1.0 throwing NullPointerException

Thibault Duchateau
Administrator
In reply to this post by hzendejas
Regarding the second problem, this should help: https://github.com/dandelion/dandelion/issues/68#issuecomment-128070953
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: datatables-thymeleaf:1.1.0 throwing NullPointerException

Thibault Duchateau
Administrator
Moreover, you're using "ddl:bundle-includes="bootstrap3" in the template, but the Dandelion dialect is not configured, at least I can't see it in your configuration.

@Bean 
    public ViewResolver viewResolver(SpringTemplateEngine templateEngine) { 
        templateEngine.addTemplateModeHandler(StandardTemplateModeHandlers.HTML5); 
        templateEngine.addDialect(new Java8TimeDialect()); 
        templateEngine.addDialect(new DandelionDialect());  <=====================
        templateEngine.addDialect(new DataTablesDialect()); 
        ThymeleafViewResolver viewResolver = new ThymeleafViewResolver(); 
        viewResolver.setTemplateEngine(templateEngine); 
        return viewResolver; 
    } 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: datatables-thymeleaf:1.1.0 throwing NullPointerException

hzendejas
In reply to this post by hzendejas
Thanks for your support, but I tried your suggestions without success
Loading...