java.lang.IllegalArgumentException: username cannot be null or empty

Pentaho BI Platform Tracking | Camilo Morales | 7 years ago
  1. 0

    Hi, I configured the BI Server 3.5.2 with Anonymous User following the instructions in http://wiki.pentaho.com/display/ServerDoc2x/Removing+Security , and i get this error when call a report. Report validation failed. I was using the BI Server 3.5.0 without issues with the configuration about Anonymous User. I also check using security and log me in, and the report is generated correctly. Additionals Checks: Using Steel Wheels report, before the execution of the report the user console ask me for a log in, if a log in, the steel wheels reports works, and my custom report works too after the log in . Stack Trace: at java.lang.Thread.run(Thread.java:636) ParentException: java.lang.IllegalArgumentException: username cannot be null or empty at org.springframework.util.Assert.hasLength(Assert.java:136) at org.pentaho.platform.engine.security.userroledao.hibernate.HibernateUserRoleDao.getUser(HibernateUserRoleDao.java:119) at org.pentaho.platform.engine.security.userroledao.userdetailsservice.UserRoleDaoUserDetailsService.loadUserByUsername(UserRoleDaoUserDetailsService.java:62) at org.pentaho.platform.engine.security.userroledao.userrolelistservice.UserRoleDaoUserRoleListService.getAuthoritiesForUser(UserRoleDaoUserRoleListService.java:83) at org.pentaho.platform.engine.security.userrole.UserDetailsRoleListService.getRolesForUser(UserDetailsRoleListService.java:90) at org.pentaho.reporting.platform.plugin.PentahoReportEnvironment.getEnvironmentProperty(PentahoReportEnvironment.java:85) at org.pentaho.reporting.engine.classic.core.ReportEnvironmentDataRow.get(ReportEnvironmentDataRow.java:74) at org.pentaho.reporting.engine.classic.core.states.datarow.GlobalMasterRow.setEnvironmentDataRow(GlobalMasterRow.java:264) at org.pentaho.reporting.engine.classic.core.states.datarow.GlobalMasterRow.createReportRow(GlobalMasterRow.java:102)

    Pentaho BI Platform Tracking | 7 years ago | Camilo Morales
    java.lang.IllegalArgumentException: username cannot be null or empty
  2. 0

    Hi, I configured the BI Server 3.5.2 with Anonymous User following the instructions in http://wiki.pentaho.com/display/ServerDoc2x/Removing+Security , and i get this error when call a report. Report validation failed. I was using the BI Server 3.5.0 without issues with the configuration about Anonymous User. I also check using security and log me in, and the report is generated correctly. Additionals Checks: Using Steel Wheels report, before the execution of the report the user console ask me for a log in, if a log in, the steel wheels reports works, and my custom report works too after the log in . Stack Trace: at java.lang.Thread.run(Thread.java:636) ParentException: java.lang.IllegalArgumentException: username cannot be null or empty at org.springframework.util.Assert.hasLength(Assert.java:136) at org.pentaho.platform.engine.security.userroledao.hibernate.HibernateUserRoleDao.getUser(HibernateUserRoleDao.java:119) at org.pentaho.platform.engine.security.userroledao.userdetailsservice.UserRoleDaoUserDetailsService.loadUserByUsername(UserRoleDaoUserDetailsService.java:62) at org.pentaho.platform.engine.security.userroledao.userrolelistservice.UserRoleDaoUserRoleListService.getAuthoritiesForUser(UserRoleDaoUserRoleListService.java:83) at org.pentaho.platform.engine.security.userrole.UserDetailsRoleListService.getRolesForUser(UserDetailsRoleListService.java:90) at org.pentaho.reporting.platform.plugin.PentahoReportEnvironment.getEnvironmentProperty(PentahoReportEnvironment.java:85) at org.pentaho.reporting.engine.classic.core.ReportEnvironmentDataRow.get(ReportEnvironmentDataRow.java:74) at org.pentaho.reporting.engine.classic.core.states.datarow.GlobalMasterRow.setEnvironmentDataRow(GlobalMasterRow.java:264) at org.pentaho.reporting.engine.classic.core.states.datarow.GlobalMasterRow.createReportRow(GlobalMasterRow.java:102)

    Pentaho BI Platform Tracking | 7 years ago | Camilo Morales
    java.lang.IllegalArgumentException: username cannot be null or empty
  3. 0

    Feb 10, 2010 10:56:51 AM com.sun.xml.ws.server.sei.EndpointMethodHandler invoke SEVERE: username cannot be null or empty java.lang.IllegalArgumentException: username cannot be null or empty at org.springframework.util.Assert.hasLength(Assert.java:136) at org.pentaho.platform.engine.security.userroledao.hibernate.HibernateUserRoleDao.createUser(HibernateUserRoleDao.java:83) at org.pentaho.platform.engine.security.userroledao.ws.UserRoleWebService.createUser(UserRoleWebService.java:94) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sun.xml.ws.api.server.InstanceResolver$1.invoke(InstanceResolver.java:246) at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146) at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257) at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:95) at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:629) at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:588) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:573) at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:470) at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:295) at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:515) at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:285) at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:143) at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:155) at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:189) at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:76) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378) at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175) at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.pentaho.ui.servlet.SystemStatusFilter.doFilter(SystemStatusFilter.java:43) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.pentaho.platform.web.http.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:113) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:595)

    Pentaho BI Platform Tracking | 7 years ago | Golda David
    java.lang.IllegalArgumentException: username cannot be null or empty
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Feb 10, 2010 10:56:51 AM com.sun.xml.ws.server.sei.EndpointMethodHandler invoke SEVERE: username cannot be null or empty java.lang.IllegalArgumentException: username cannot be null or empty at org.springframework.util.Assert.hasLength(Assert.java:136) at org.pentaho.platform.engine.security.userroledao.hibernate.HibernateUserRoleDao.createUser(HibernateUserRoleDao.java:83) at org.pentaho.platform.engine.security.userroledao.ws.UserRoleWebService.createUser(UserRoleWebService.java:94) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sun.xml.ws.api.server.InstanceResolver$1.invoke(InstanceResolver.java:246) at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146) at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257) at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:95) at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:629) at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:588) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:573) at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:470) at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:295) at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:515) at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:285) at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:143) at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:155) at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:189) at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:76) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378) at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175) at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.pentaho.ui.servlet.SystemStatusFilter.doFilter(SystemStatusFilter.java:43) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.pentaho.platform.web.http.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:113) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:595)

    Pentaho BI Platform Tracking | 7 years ago | Golda David
    java.lang.IllegalArgumentException: username cannot be null or empty
  6. 0

    Attached is a file containing several variations of Accept header values that cause Spring to break. There was a prior ticket open for this, which dealt with single-quoted "profile" URLs in Accept headers. That is apparently fixed in 3.2. But these other variations are still broken. The test cases attached are all actual Accept headers we have seen "in the wild" coming from mobile devices. Here are some examples of the types of exceptions we're seeing: {noformat} java.lang.IllegalArgumentException: 'mediaType' must not be empty at org.springframework.util.Assert.hasLength(Assert.java:136) at org.springframework.http.MediaType.parseMediaType(MediaType.java:638) at org.springframework.http.MediaType.parseMediaTypes(MediaType.java:691) at org.springframework.web.servlet.mvc.condition.ProducesRequestCondition.getAcceptedMediaTypes(ProducesRequestCondition.java:214) at org.springframework.web.servlet.mvc.condition.ProducesRequestCondition.access$4(ProducesRequestCondition.java:211) at org.springframework.web.servlet.mvc.condition.ProducesRequestCondition$ProduceMediaTypeExpression.matchMediaType(ProducesRequestCondition.java:283) at org.springframework.web.servlet.mvc.condition.AbstractMediaTypeExpression.match(AbstractMediaTypeExpression.java:63) at org.springframework.web.servlet.mvc.condition.ProducesRequestCondition.getMatchingCondition(ProducesRequestCondition.java:163) at org.springframework.web.servlet.mvc.method.RequestMappingInfo.getMatchingCondition(RequestMappingInfo.java:175) at org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping.getMatchingMapping(RequestMappingInfoHandlerMapping.java:64) at org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping.getMatchingMapping(RequestMappingInfoHandlerMapping.java:1) at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.addMatchingMappings(AbstractHandlerMethodMapping.java:284) at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.lookupHandlerMethod(AbstractHandlerMethodMapping.java:251) at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.getHandlerInternal(AbstractHandlerMethodMapping.java:216) at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.getHandlerInternal(AbstractHandlerMethodMapping.java:1) at org.springframework.web.servlet.handler.AbstractHandlerMapping.getHandler(AbstractHandlerMapping.java:288) at org.springframework.web.servlet.DispatcherServlet.getHandler(DispatcherServlet.java:1063) at org.springframework.web.servlet.DispatcherServlet.getHandler(DispatcherServlet.java:1048) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:886) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) {noformat} Or... {noformat} java.lang.IllegalArgumentException: ";q=0.5" does not contain '/' at org.springframework.http.MediaType.parseMediaType(MediaType.java:648) at org.springframework.http.MediaType.parseMediaTypes(MediaType.java:691) at org.springframework.web.servlet.mvc.condition.ProducesRequestCondition.getAcceptedMediaTypes(ProducesRequestCondition.java:214) at org.springframework.web.servlet.mvc.condition.ProducesRequestCondition.access$4(ProducesRequestCondition.java:211) at org.springframework.web.servlet.mvc.condition.ProducesRequestCondition$ProduceMediaTypeExpression.matchMediaType(ProducesRequestCondition.java:283) ... {noformat}

    Spring JIRA | 4 years ago | Dan Checkoway
    java.lang.IllegalArgumentException: 'mediaType' must not be empty

    1 unregistered visitors
    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.IllegalArgumentException

      username cannot be null or empty

      at org.springframework.util.Assert.hasLength()
    2. Spring Core
      Assert.hasLength
      1. org.springframework.util.Assert.hasLength(Assert.java:136)
      1 frame
    3. org.pentaho.platform
      UserDetailsRoleListService.getRolesForUser
      1. org.pentaho.platform.engine.security.userroledao.hibernate.HibernateUserRoleDao.getUser(HibernateUserRoleDao.java:119)
      2. org.pentaho.platform.engine.security.userroledao.userdetailsservice.UserRoleDaoUserDetailsService.loadUserByUsername(UserRoleDaoUserDetailsService.java:62)
      3. org.pentaho.platform.engine.security.userroledao.userrolelistservice.UserRoleDaoUserRoleListService.getAuthoritiesForUser(UserRoleDaoUserRoleListService.java:83)
      4. org.pentaho.platform.engine.security.userrole.UserDetailsRoleListService.getRolesForUser(UserDetailsRoleListService.java:90)
      4 frames
    4. org.pentaho.reporting
      GlobalMasterRow.createReportRow
      1. org.pentaho.reporting.platform.plugin.PentahoReportEnvironment.getEnvironmentProperty(PentahoReportEnvironment.java:85)
      2. org.pentaho.reporting.engine.classic.core.ReportEnvironmentDataRow.get(ReportEnvironmentDataRow.java:74)
      3. org.pentaho.reporting.engine.classic.core.states.datarow.GlobalMasterRow.setEnvironmentDataRow(GlobalMasterRow.java:264)
      4. org.pentaho.reporting.engine.classic.core.states.datarow.GlobalMasterRow.createReportRow(GlobalMasterRow.java:102)
      4 frames