3 Replies Latest reply on Feb 17, 2014 5:10 AM by Frank Becker

    NPE at io.undertow.servlet.spec.HttpServletResponseImpl.setContentType

    Frank Becker Newbie

      Hello,

       

      I deployed a grails 2.3.5 war to wildfly to give it a try. The Application is working as expected, with one exception thrown while trying to access twitter bootstrap resource files ( glyphicons-halflings-regular.woff and glyphicons-halflings-regular.ttf ).

       

      2014-02-17 08:46:14,478 ERROR [io.undertow.request] (default task-3) UT005023: Exception handling request to /jaw-0.2/static/plugins/twitter-bootstrap-3.1.0/fonts/glyphicons-halflings-regular.woff: java.lang.NullPointerException
          at io.undertow.servlet.spec.HttpServletResponseImpl.setContentType(HttpServletResponseImpl.java:366) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_51]
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_51]
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_51]
          at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_51]
          at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) [groovy-all-2.1.9.jar:2.1.9]
          at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) [groovy-all-2.1.9.jar:2.1.9]
          at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:2529) [groovy-all-2.1.9.jar:2.1.9]
          at groovy.lang.ExpandoMetaClass.setProperty(ExpandoMetaClass.java:1170) [groovy-all-2.1.9.jar:2.1.9]
          at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:3465) [groovy-all-2.1.9.jar:2.1.9]
          at org.codehaus.groovy.runtime.InvokerHelper.setProperty(InvokerHelper.java:196) [groovy-all-2.1.9.jar:2.1.9]
          at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.setProperty(ScriptBytecodeAdapter.java:480) [groovy-all-2.1.9.jar:2.1.9]
          at org.grails.plugin.resource.ResourceProcessor.processModernResource(ResourceProcessor.groovy:321) [classes:]
          at org.grails.plugin.resource.ResourceProcessor$processModernResource$28.call(Unknown Source)
          at org.grails.plugin.resource.ProcessingFilter.doFilter(ProcessingFilter.groovy:39) [classes:]
          at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:56) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
          at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) [spring-web-3.2.6.RELEASE.jar:3.2.6.RELEASE]
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-3.2.6.RELEASE.jar:3.2.6.RELEASE]
          at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) [spring-web-3.2.6.RELEASE.jar:3.2.6.RELEASE]
          at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) [spring-web-3.2.6.RELEASE.jar:3.2.6.RELEASE]
          at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:56) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
          at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
          at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
          at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
          at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.server.Connectors.executeRootHandler(Connectors.java:168) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
          at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:687) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
          at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
      

       

      Second exception looks identical ( shortened it ):

       

      2014-02-17 08:46:14,521 ERROR [io.undertow.request] (default task-4) UT005023: Exception handling request to /jaw-0.2/static/plugins/twitter-bootstrap-3.1.0/fonts/glyphicons-halflings-regular.ttf: java.lang.NullPointerException
          at io.undertow.servlet.spec.HttpServletResponseImpl.setContentType(HttpServletResponseImpl.java:366) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_51]
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_51]
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_51]
          at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_51]
          at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) [groovy-all-2.1.9.jar:2.1.9]
          at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) [groovy-all-2.1.9.jar:2.1.9]
          at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:2529) [groovy-all-2.1.9.jar:2.1.9]
          at groovy.lang.ExpandoMetaClass.setProperty(ExpandoMetaClass.java:1170) [groovy-all-2.1.9.jar:2.1.9]
          at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:3465) [groovy-all-2.1.9.jar:2.1.9]
          at org.codehaus.groovy.runtime.InvokerHelper.setProperty(InvokerHelper.java:196) [groovy-all-2.1.9.jar:2.1.9]
          at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.setProperty(ScriptBytecodeAdapter.java:480) [groovy-all-2.1.9.jar:2.1.9]
          at org.grails.plugin.resource.ResourceProcessor.processModernResource(ResourceProcessor.groovy:321) [classes:]
          at org.grails.plugin.resource.ResourceProcessor$processModernResource$28.call(Unknown Source)
          at org.grails.plugin.resource.ProcessingFilter.doFilter(ProcessingFilter.groovy:39) [classes:]
          at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:56) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]