java.lang.UnsupportedOperationException: null

Google Groups | Linus Nikander | 1 year ago
  1. 0

    Error when changing the admin password

    Google Groups | 1 year ago | Linus Nikander
    java.lang.UnsupportedOperationException: null
  2. 0

    CNNProcessorTest::testCNNInputPreProcessorMnist - SubsamplingLayer params

    GitHub | 1 year ago | EronWright
    java.lang.UnsupportedOperationException: null
  3. 0

    Writing Protobuf as response body doesn't work with default settings because {{ProtobufHttpMessageConverter}} attempt to write HTTP header of read-only {{ServletServerHttpResponse}}. As the result, the following exeception is thrown after HTTP request: {code} java.lang.UnsupportedOperationException: null at java.util.Collections$UnmodifiableMap.put(Collections.java:1517) at org.springframework.http.HttpHeaders.set(HttpHeaders.java:869) at org.springframework.http.converter.protobuf.ProtobufHttpMessageConverter.setProtoHeader(ProtobufHttpMessageConverter.java:196) at org.springframework.http.converter.protobuf.ProtobufHttpMessageConverter.writeInternal(ProtobufHttpMessageConverter.java:182) at org.springframework.http.converter.protobuf.ProtobufHttpMessageConverter.writeInternal(ProtobufHttpMessageConverter.java:60) at org.springframework.http.converter.AbstractHttpMessageConverter.write(AbstractHttpMessageConverter.java:208) at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:153) at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:97) at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.handleReturnValue(RequestResponseBodyMethodProcessor.java:202) at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:71) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:122) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:781) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:721) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:943) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852) at javax.servlet.http.HttpServlet.service(HttpServlet.java:620) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) 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:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:683) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1736) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1695) 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) {code} Current {{ProtobufHttpMessageConverter}} implementation is like: {code:java} @Override protected void writeInternal(Message message, HttpOutputMessage outputMessage) throws IOException, HttpMessageNotWritableException { // ... ommited OutputStreamWriter writer = new OutputStreamWriter(outputMessage.getBody(), charset); // <-- (1) if (MediaType.TEXT_HTML.isCompatibleWith(contentType)) { HtmlFormat.print(message, writer); } // ... ommited else if (PROTOBUF.isCompatibleWith(contentType)) { setProtoHeader(outputMessage, message); // <-- (2) FileCopyUtils.copy(message.toByteArray(), outputMessage.getBody()); } } private void setProtoHeader(HttpOutputMessage response, Message message) { response.getHeaders().set(X_PROTOBUF_SCHEMA_HEADER, message.getDescriptorForType().getFile().getName()); response.getHeaders().set(X_PROTOBUF_MESSAGE_HEADER, message.getDescriptorForType().getFullName()); } {code} At (1) {{outputMessage.getBody()}} makes {{headersWritten}} field {{true}} and {{headers}} field read-only in {{ServletServerHttpResponse}}. At (2) Header is set in spite of the {{headers}} is already read-only. Actually, customized {{ProtobufHttpMessageConverter}} works well like: {code:java} ProtobufHttpMessageConverter protobufHttpMessageConverter = new ProtobufHttpMessageConverter((registry) -> { }) { @Override protected void writeInternal(Message message, HttpOutputMessage outputMessage) throws IOException, HttpMessageNotWritableException { outputMessage.getHeaders().set(X_PROTOBUF_SCHEMA_HEADER, message.getDescriptorForType().getFile().getName()); outputMessage.getHeaders().set(X_PROTOBUF_MESSAGE_HEADER, message.getDescriptorForType().getFullName()); FileCopyUtils.copy(message.toByteArray(), outputMessage.getBody()); } }; {code}

    Spring JIRA | 2 years ago | Toshiaki Maki
    java.lang.UnsupportedOperationException: null
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Bash embedded jar as repackaging option

    GitHub | 2 years ago | aantono
    java.lang.UnsupportedOperationException: null

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.UnsupportedOperationException

      null

      at com.manydesigns.portofino.shiro.AbstractPortofinoRealm.changePassword()
    2. com.manydesigns.portofino
      LoginAction.changePassword2
      1. com.manydesigns.portofino.shiro.AbstractPortofinoRealm.changePassword(AbstractPortofinoRealm.java:166)[portofino-pageactions-4.1.3.jar:4.1.3]
      2. com.manydesigns.portofino.shiro.SecurityGroovyRealm.changePassword(SecurityGroovyRealm.java:148)[portofino-pageactions-4.1.3.jar:4.1.3]
      3. com.manydesigns.portofino.actions.user.LoginAction.changePassword2(LoginAction.java:536)[portofino-base-4.1.3.jar:4.1.3]
      3 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.7.0_80]
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[na:1.7.0_80]
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.7.0_80]
      4. java.lang.reflect.Method.invoke(Method.java:606)[na:1.7.0_80]
      4 frames
    4. Stripes
      ExecutionContext.proceed
      1. net.sourceforge.stripes.controller.DispatcherHelper$6.intercept(DispatcherHelper.java:456)[stripes-1.5.8.jar:1.5.8]
      2. net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:158)[stripes-1.5.8.jar:1.5.8]
      2 frames
    5. com.manydesigns.portofino
      GuardsInterceptor.intercept
      1. com.manydesigns.portofino.interceptors.GuardsInterceptor.intercept(GuardsInterceptor.java:61)[portofino-base-4.1.3.jar:4.1.3]
      1 frame
    6. Stripes
      DispatcherServlet.service
      1. net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)[stripes-1.5.8.jar:1.5.8]
      2. net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:113)[stripes-1.5.8.jar:1.5.8]
      3. net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)[stripes-1.5.8.jar:1.5.8]
      4. net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionContext.java:74)[stripes-1.5.8.jar:1.5.8]
      5. net.sourceforge.stripes.controller.DispatcherHelper.invokeEventHandler(DispatcherHelper.java:454)[stripes-1.5.8.jar:1.5.8]
      6. net.sourceforge.stripes.controller.DispatcherServlet.invokeEventHandler(DispatcherServlet.java:278)[stripes-1.5.8.jar:1.5.8]
      7. net.sourceforge.stripes.controller.DispatcherServlet.service(DispatcherServlet.java:160)[stripes-1.5.8.jar:1.5.8]
      7 frames
    7. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:731)[servlet-api.jar:na]
      1 frame
    8. Stripes
      DynamicMappingFilter.doFilter
      1. net.sourceforge.stripes.controller.DynamicMappingFilter$2.doFilter(DynamicMappingFilter.java:453)[stripes-1.5.8.jar:1.5.8]
      2. net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:260)[stripes-1.5.8.jar:1.5.8]
      3. net.sourceforge.stripes.controller.DynamicMappingFilter.doFilter(DynamicMappingFilter.java:440)[stripes-1.5.8.jar:1.5.8]
      3 frames
    9. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)[catalina.jar:7.0.62]
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)[catalina.jar:7.0.62]
      2 frames
    10. com.manydesigns.portofino
      I18nFilter.doFilter
      1. com.manydesigns.portofino.servlets.I18nFilter.doFilter(I18nFilter.java:60)[portofino-base-4.1.3.jar:4.1.3]
      1 frame
    11. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)[catalina.jar:7.0.62]
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)[catalina.jar:7.0.62]
      2 frames
    12. Stripes
      StripesFilter.doFilter
      1. net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:260)[stripes-1.5.8.jar:1.5.8]
      1 frame
    13. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)[catalina.jar:7.0.62]
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)[catalina.jar:7.0.62]
      2 frames
    14. com.manydesigns.portofino
      CleanupFilter.doFilter
      1. com.manydesigns.portofino.servlets.CleanupFilter.doFilter(CleanupFilter.java:47)[portofino-database-4.1.3.jar:4.1.3]
      1 frame
    15. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)[catalina.jar:7.0.62]
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)[catalina.jar:7.0.62]
      2 frames
    16. com.manydesigns.portofino
      DispatcherFilter.doFilter
      1. com.manydesigns.portofino.servlets.DispatcherFilter.doFilter(DispatcherFilter.java:61)[portofino-pageactions-4.1.3.jar:4.1.3]
      1 frame
    17. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)[catalina.jar:7.0.62]
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)[catalina.jar:7.0.62]
      2 frames
    18. Shiro
      OncePerRequestFilter.doFilter
      1. org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)[shiro-web-1.2.3.jar:1.2.3]
      2. org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)[shiro-web-1.2.3.jar:1.2.3]
      3. org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)[shiro-core-1.2.3.jar:1.2.3]
      4. org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)[shiro-core-1.2.3.jar:1.2.3]
      5. org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)[shiro-core-1.2.3.jar:1.2.3]
      6. org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)[shiro-web-1.2.3.jar:1.2.3]
      7. org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)[shiro-web-1.2.3.jar:1.2.3]
      7 frames
    19. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)[catalina.jar:7.0.62]
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)[catalina.jar:7.0.62]
      2 frames
    20. com.manydesigns.elements
      ElementsFilter.doFilter
      1. com.manydesigns.elements.servlet.ElementsFilter.doHttpFilter(ElementsFilter.java:132)[elements-4.1.3.jar:4.1.3]
      2. com.manydesigns.elements.servlet.ElementsFilter.doFilter(ElementsFilter.java:83)[elements-4.1.3.jar:4.1.3]
      2 frames
    21. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)[catalina.jar:7.0.62]
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)[catalina.jar:7.0.62]
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)[catalina.jar:7.0.62]
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)[catalina.jar:7.0.62]
      5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)[catalina.jar:7.0.62]
      6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)[catalina.jar:7.0.62]
      7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)[catalina.jar:7.0.62]
      8. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)[catalina.jar:7.0.62]
      9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)[catalina.jar:7.0.62]
      10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)[catalina.jar:7.0.62]
      10 frames
    22. Grizzly HTTP
      JIoEndpoint$SocketProcessor.run
      1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)[tomcat-coyote.jar:7.0.62]
      2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)[tomcat-coyote.jar:7.0.62]
      3. org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)[tomcat-coyote.jar:7.0.62]
      3 frames
    23. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[na:1.7.0_80]
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[na:1.7.0_80]
      2 frames
    24. Tomcat Util
      TaskThread$WrappingRunnable.run
      1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)[tomcat-coyote.jar:7.0.62]
      1 frame
    25. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)[na:1.7.0_80]
      1 frame