java.lang.IllegalArgumentException: expected one element but was: <BlockStatement, BlockStatement>

pmd | bialeckijacek | 6 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Parsing error on APEX class: expected one element but was: <BlockStatement, BlockStatement>

    pmd | 6 months ago | bialeckijacek
    java.lang.IllegalArgumentException: expected one element but was: <BlockStatement, BlockStatement>
  2. 0

    grunt-closure-compiler modules throwing IllegalArgumentException

    Stack Overflow | 1 year ago | Digital-Clouds
    java.lang.IllegalArgumentException: expected one element but was: <test_mod__c, test_mod__d>
  3. 0

    I've set up nexus 3.1.0-04 and set up update path from 2.14.1-01 version update finished successfully, mvn repo (~ 300 Gb size) was synched with hardlink method I am able to deploy artifact to synced repo in nexus 3 Bug when browing repo via "Assets" or "Components", screen hangs and error appears in log: 2016-12-23 18:47:26,654+0300 ERROR [qtp933518986-205] *UNKNOWN org.sonatype.nexus.extdirect.internal.ExtDirectServlet - Failed to invoke action method: coreui_Component.read, java-method: org.sonatype.nexus.coreui.ComponentComponent.read java.lang.IllegalArgumentException: expected one element but was: <null, #-2:0{COUNT:0} v0> at com.google.common.collect.Iterators.getOnlyElement(Iterators.java:317) [com.google.guava:18.0.0] at com.google.common.collect.Iterables.getOnlyElement(Iterables.java:289) [com.google.guava:18.0.0] at org.sonatype.nexus.repository.browse.internal.BrowseServiceImpl.getCount(BrowseServiceImpl.java:204) [na:na] at org.sonatype.nexus.repository.browse.internal.BrowseServiceImpl.browseComponents(BrowseServiceImpl.java:99) [na:na] at org.sonatype.nexus.repository.browse.BrowseService$browseComponents.call(Unknown Source) [na:na] at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) [na:na] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) [na:na] at org.sonatype.nexus.coreui.ComponentComponent.read(ComponentComponent.groovy:126) [na:na] at com.palominolabs.metrics.guice.ExceptionMeteredInterceptor.invoke(ExceptionMeteredInterceptor.java:49) [na:na] at com.palominolabs.metrics.guice.TimedInterceptor.invoke(TimedInterceptor.java:47) [na:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.8.0_111] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [na:1.8.0_111] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [na:1.8.0_111] at java.lang.reflect.Method.invoke(Method.java:498) [na:1.8.0_111] at com.softwarementors.extjs.djn.router.dispatcher.DispatcherBase.invokeJavaMethod(DispatcherBase.java:142) [org.sonatype.nexus.extdirect:3.1.0.04] at com.softwarementors.extjs.djn.router.dispatcher.DispatcherBase.invokeMethod(DispatcherBase.java:133) [org.sonatype.nexus.extdirect:3.1.0.04] at org.sonatype.nexus.extdirect.internal.ExtDirectServlet$3.invokeMethod(ExtDirectServlet.java:221) [org.sonatype.nexus.extdirect:3.1.0.04] at com.softwarementors.extjs.djn.router.dispatcher.DispatcherBase.dispatch(DispatcherBase.java:63) [org.sonatype.nexus.extdirect:3.1.0.04] at com.softwarementors.extjs.djn.router.processor.standard.StandardRequestProcessorBase.dispatchStandardMethod(StandardRequestProcessorBase.java:73) [org.sonatype.nexus.extdirect:3.1.0.04] at com.softwarementors.extjs.djn.router.processor.standard.json.JsonRequestProcessor.processIndividualRequest(JsonRequestProcessor.java:502) [org.sonatype.nexus.extdirect:3.1.0.04] at com.softwarementors.extjs.djn.router.processor.standard.json.JsonRequestProcessor.processIndividualRequestsInThisThread(JsonRequestProcessor.java:150) [org.sonatype.nexus.extdirect:3.1.0.04] at com.softwarementors.extjs.djn.router.processor.standard.json.JsonRequestProcessor.process(JsonRequestProcessor.java:133) [org.sonatype.nexus.extdirect:3.1.0.04] at com.softwarementors.extjs.djn.router.RequestRouter.processJsonRequest(RequestRouter.java:83) [org.sonatype.nexus.extdirect:3.1.0.04] at com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.processRequest(DirectJNgineServlet.java:617) [org.sonatype.nexus.extdirect:3.1.0.04] at com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.doPost(DirectJNgineServlet.java:580) [org.sonatype.nexus.extdirect:3.1.0.04] at org.sonatype.nexus.extdirect.internal.ExtDirectServlet.doPost(ExtDirectServlet.java:127) [org.sonatype.nexus.extdirect:3.1.0.04] at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [javax.servlet-api:3.1.0] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api:3.1.0]

    Sonatype JIRA | 2 months ago | Ilya Martynov
    java.lang.IllegalArgumentException: expected one element but was: <null, #-2:0{COUNT:0} v0>
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Titan 1.0.0 : Error after installing pip + cqlsh or starting cassandra with cassandra -f ??

    GitHub | 10 months ago | zifnab87
    java.lang.IllegalArgumentException: expected one element but was: <com.thinkaurelius.titan.graphdb.types.SchemaSource$Entry@1117a2c1, com.thinkaurelius.titan.graphdb.types.SchemaSource$Entry@53c9ef65>
  6. 0

    Chaining has() When Multiple Keys are Used

    GitHub | 4 years ago | spmallette
    com.thinkaurelius.titan.core.TitanException: Could not call index

    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

      expected one element but was: <BlockStatement, BlockStatement>

      at com.google.common.collect.Iterators.getOnlyElement()
    2. Guava
      Iterables.getOnlyElement
      1. com.google.common.collect.Iterators.getOnlyElement(Iterators.java:317)
      2. com.google.common.collect.Iterables.getOnlyElement(Iterables.java:289)
      2 frames
    3. net.sourceforge.pmd
      AbstractApexRule.apply
      1. net.sourceforge.pmd.lang.apex.rule.apexunit.ApexUnitTestClassShouldHaveAsserts.checkForAssertStatements(ApexUnitTestClassShouldHaveAsserts.java:32)
      2. net.sourceforge.pmd.lang.apex.rule.apexunit.ApexUnitTestClassShouldHaveAsserts.visit(ApexUnitTestClassShouldHaveAsserts.java:27)
      3. net.sourceforge.pmd.lang.apex.ast.ASTMethod.jjtAccept(ASTMethod.java:15)
      4. net.sourceforge.pmd.lang.apex.ast.AbstractApexNode.childrenAccept(AbstractApexNode.java:101)
      5. net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:132)
      6. net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:143)
      7. net.sourceforge.pmd.lang.apex.rule.apexunit.AbstractApexUnitTestRule.visit(AbstractApexUnitTestRule.java:30)
      8. net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visitAll(AbstractApexRule.java:121)
      9. net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.apply(AbstractApexRule.java:115)
      9 frames
    4. PMD
      SourceCodeProcessor.processSourceCode
      1. net.sourceforge.pmd.RuleSet.apply(RuleSet.java:306)
      2. net.sourceforge.pmd.RuleSets.apply(RuleSets.java:125)
      3. net.sourceforge.pmd.SourceCodeProcessor.processSource(SourceCodeProcessor.java:146)
      4. net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:76)
      5. net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:43)
      5 frames
    5. PMD Core
      PmdRunnable.call
      1. net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:79)
      2. net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:25)
      2 frames
    6. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask.run(Unknown Source)
      2. java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      3. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      4. java.lang.Thread.run(Unknown Source)
      4 frames