java.lang.IllegalArgumentException: Null or empty data center specified for DC-aware policy

DataStax JIRA | Andy Tolbert | 2 years ago
  1. 0

    From the changes in [JAVA-451], it is now no longer possible from the outside to specify a 'null' localDC when creating a DCAwareRoundRobinPolicy and have it figured out the localDC based on contact points, however the [documentation states|http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/policies/DCAwareRoundRobinPolicy.html#DCAwareRoundRobinPolicy(java.lang.String)] that this functionality still works: {quote} localDc - the name of the local datacenter (as known by Cassandra). If this is null, the policy will default to the data-center of the first node connected to. {quote} Passing in a null localDC parameter emits the following error: {noformat} Exception in thread "main" java.lang.IllegalArgumentException: Null or empty data center specified for DC-aware policy at com.datastax.driver.core.policies.DCAwareRoundRobinPolicy.<init>(DCAwareRoundRobinPolicy.java:176) at com.datastax.driver.core.policies.DCAwareRoundRobinPolicy.<init>(DCAwareRoundRobinPolicy.java:138) {noformat} with the following code: {code} Cluster cluster = new Cluster.Builder() .withLoadBalancingPolicy(new DCAwareRoundRobinPolicy(null, 2)) .addContactPoint("127.0.0.1") .build(); {code} Additionally, A user could use the default Constructor for DCAwareRoundRobinPolicy to use the DC the contact points are in, but if they want to control the usedRemoteHostsPerDc / allowRemoteDCsForLocalConsistencyLevel options, they cannot. It seems like we should be able to support this, ([JAVA-652] will take care of this).

    DataStax JIRA | 2 years ago | Andy Tolbert
    java.lang.IllegalArgumentException: Null or empty data center specified for DC-aware policy
  2. 0

    From the changes in [JAVA-451], it is now no longer possible from the outside to specify a 'null' localDC when creating a DCAwareRoundRobinPolicy and have it figured out the localDC based on contact points, however the [documentation states|http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/policies/DCAwareRoundRobinPolicy.html#DCAwareRoundRobinPolicy(java.lang.String)] that this functionality still works: {quote} localDc - the name of the local datacenter (as known by Cassandra). If this is null, the policy will default to the data-center of the first node connected to. {quote} Passing in a null localDC parameter emits the following error: {noformat} Exception in thread "main" java.lang.IllegalArgumentException: Null or empty data center specified for DC-aware policy at com.datastax.driver.core.policies.DCAwareRoundRobinPolicy.<init>(DCAwareRoundRobinPolicy.java:176) at com.datastax.driver.core.policies.DCAwareRoundRobinPolicy.<init>(DCAwareRoundRobinPolicy.java:138) {noformat} with the following code: {code} Cluster cluster = new Cluster.Builder() .withLoadBalancingPolicy(new DCAwareRoundRobinPolicy(null, 2)) .addContactPoint("127.0.0.1") .build(); {code} Additionally, A user could use the default Constructor for DCAwareRoundRobinPolicy to use the DC the contact points are in, but if they want to control the usedRemoteHostsPerDc / allowRemoteDCsForLocalConsistencyLevel options, they cannot. It seems like we should be able to support this, ([JAVA-652] will take care of this).

    DataStax JIRA | 2 years ago | Andy Tolbert
    java.lang.IllegalArgumentException: Null or empty data center specified for DC-aware policy
  3. 0

    GitHub comment 12#109034908

    GitHub | 2 years ago | michael-conway
    java.lang.IllegalArgumentException: null or empty url
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    JDC Tech Tips (10 de Enero de 2002). ProgramaciĆ³n en Castellano.

    programacion.net | 1 year ago
    java.lang.IllegalArgumentException: null or empty filename
  6. 0

    1. Open repository explorere security tab 2. Choose roles and click the add icon to add a role. 3. leave the user name as empty and click the OK button you dont get any error dialog, instead stack in both spoon and tomcat console. 4. Similarly add a user you get a neat error dialgo see attachement. Tomcat May 21, 2010 9:18:37 AM com.sun.xml.ws.server.sei.EndpointMethodHandler invoke SEVERE: name for role cannot be null or empty java.lang.IllegalArgumentException: name for role cannot be null or empty at org.springframework.util.Assert.hasLength(Assert.java:136) at org.pentaho.platform.engine.security.userroledao.hibernate.HibernateUserRoleDao.createRole(HibernateUserRoleDao.java:165) at org.pentaho.platform.engine.security.userroledao.hibernate.UserRoleDaoTransactionDecorator$1.doInTransactionWithoutResult(UserRoleDaoTransactionDecorator.java:60) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128) at org.pentaho.platform.engine.security.userroledao.hibernate.UserRoleDaoTransactionDecorator.createRole(UserRoleDaoTransactionDecorator.java:58) at org.pentaho.platform.engine.security.userroledao.ws.UserRoleWebService.createRole(UserRoleWebService.java:192) 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:597) 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.pentaho.platform.web.http.filters.HttpSessionPentahoSessionIntegrationFilter.doFilter(HttpSessionPentahoSessionIntegrationFilter.java:264) 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(SourceFile: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:619) Caused by: javax.xml.ws.soap.SOAPFaultException: name for role cannot be null or empty at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:189) at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:130) at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:119) at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89) at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:140) at $Proxy50.createRole(Unknown Source) at org.pentaho.di.repository.pur.a.a(SourceFile:211) at org.pentaho.di.repository.pur.b.a(SourceFile:89) at org.pentaho.di.ui.repository.pur.repositoryexplorer.controller.EESecurityController.m(SourceFile:649) at org.pentaho.di.ui.repository.pur.repositoryexplorer.controller.EESecurityController.saveRole(SourceFile:762) ... 51 more Caused by: java.lang.IllegalArgumentException: name for role cannot be null or empty at org.springframework.util.Assert.hasLength(Assert.java:136) at org.pentaho.platform.engine.security.userroledao.hibernate.HibernateUserRoleDao.createRole(HibernateUserRoleDao.java:165) at org.pentaho.platform.engine.security.userroledao.hibernate.UserRoleDaoTransactionDecorator$1.doInTransactionWithoutResult(UserRoleDaoTransactionDecorator.java:60) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128) at org.pentaho.platform.engine.security.userroledao.hibernate.UserRoleDaoTransactionDecorator.createRole(UserRoleDaoTransactionDecorator.java:58) at org.pentaho.platform.engine.security.userroledao.ws.UserRoleWebService.createRole(UserRoleWebService.java:192) 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:597) 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.pentaho.platform.web.http.filters.HttpSessionPentahoSessionIntegrationFilter.doFilter(HttpSessionPentahoSessionIntegrationFilter.java:264) 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(SourceFile: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:619)

    Pentaho BI Platform Tracking | 7 years ago | Golda David
    java.lang.IllegalArgumentException: name for role cannot be null or empty

    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

      Null or empty data center specified for DC-aware policy

      at com.datastax.driver.core.policies.DCAwareRoundRobinPolicy.<init>()
    2. DataStax Java Driver for Apache Cassandra - Core
      DCAwareRoundRobinPolicy.<init>
      1. com.datastax.driver.core.policies.DCAwareRoundRobinPolicy.<init>(DCAwareRoundRobinPolicy.java:176)
      2. com.datastax.driver.core.policies.DCAwareRoundRobinPolicy.<init>(DCAwareRoundRobinPolicy.java:138)
      2 frames