java.lang.RuntimeException: deluser for notPresent failed

Apereo Issues | James Wennmacher | 2 years ago
  1. 0

    When a user does not exist, ant deluser fails with an adequate error message, but a stack trace is not really needed. Looks like the code handled it more gracefully at one point, but now spring throws an exception. Catch exception and return graceful error message. [java] Exception in thread "main" java.lang.RuntimeException: deluser for notPresent failed [java] at org.jasig.portal.shell.PortalShellBuildHelperImpl.deleteUser(PortalShellBuildHelperImpl.java:341) [java] at org.jasig.portal.shell.PortalShellBuildHelper$deleteUser.call(Unknown Source) [java] at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) [java] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) [java] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120) [java] at upshell_191544890.run(upshell_191544890.groovy:3) [java] at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:257) [java] at groovy.lang.GroovyShell.run(GroovyShell.java:220) [java] at org.jasig.portal.shell.PortalShell.main(PortalShell.java:86) [java] Caused by: org.springframework.dao.EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0 [java] at org.springframework.dao.support.DataAccessUtils.requiredSingleResult(DataAccessUtils.java:71) [java] at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:730) [java] at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:745) [java] at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:776) [java] at org.jasig.portal.RDBMUserIdentityStore$2.doInTransactionWithoutResult(RDBMUserIdentityStore.java:164) [java] at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) [java] at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130) [java] at org.jasig.portal.RDBMUserIdentityStore.removePortalUID(RDBMUserIdentityStore.java:157) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [java] at java.lang.reflect.Method.invoke(Method.java:606) [java] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319) [java] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196) [java] at com.sun.proxy.$Proxy123.removePortalUID(Unknown Source) [java] at org.jasig.portal.shell.PortalShellBuildHelperImpl.deleteUser(PortalShellBuildHelperImpl.java:338) [java] ... 8 more

    Apereo Issues | 2 years ago | James Wennmacher
    java.lang.RuntimeException: deluser for notPresent failed
  2. 0

    When a user does not exist, ant deluser fails with an adequate error message, but a stack trace is not really needed. Looks like the code handled it more gracefully at one point, but now spring throws an exception. Catch exception and return graceful error message. [java] Exception in thread "main" java.lang.RuntimeException: deluser for notPresent failed [java] at org.jasig.portal.shell.PortalShellBuildHelperImpl.deleteUser(PortalShellBuildHelperImpl.java:341) [java] at org.jasig.portal.shell.PortalShellBuildHelper$deleteUser.call(Unknown Source) [java] at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) [java] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) [java] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120) [java] at upshell_191544890.run(upshell_191544890.groovy:3) [java] at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:257) [java] at groovy.lang.GroovyShell.run(GroovyShell.java:220) [java] at org.jasig.portal.shell.PortalShell.main(PortalShell.java:86) [java] Caused by: org.springframework.dao.EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0 [java] at org.springframework.dao.support.DataAccessUtils.requiredSingleResult(DataAccessUtils.java:71) [java] at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:730) [java] at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:745) [java] at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:776) [java] at org.jasig.portal.RDBMUserIdentityStore$2.doInTransactionWithoutResult(RDBMUserIdentityStore.java:164) [java] at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) [java] at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130) [java] at org.jasig.portal.RDBMUserIdentityStore.removePortalUID(RDBMUserIdentityStore.java:157) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [java] at java.lang.reflect.Method.invoke(Method.java:606) [java] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319) [java] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196) [java] at com.sun.proxy.$Proxy123.removePortalUID(Unknown Source) [java] at org.jasig.portal.shell.PortalShellBuildHelperImpl.deleteUser(PortalShellBuildHelperImpl.java:338) [java] ... 8 more

    Apereo Issues | 2 years ago | James Wennmacher
    java.lang.RuntimeException: deluser for notPresent failed
  3. 0

    hello: I get the following error trying to remove a user from the 4.x db who does not currently exist in the database: This user does exist in an exported copy of the 3.2 database : ant up-shell -Dscript=/home/billbrown/export/2012-04-13/reinit.groovy billbrown@piglet:~/export/2012-04-13$ more reinit.groovy def count=0, MAXSIZE=100 new File("/home/billbrown/export/2012-04-13/users.txt").withReader { reader -> while ((user = reader.readLine()) != null) { portalShellBuildHelper.deleteUser("deluser", user); } } uPortal.war to /home/billbrown/.m2/repository/org/jasig/portal/uportal-war/4.0.5-SNAPSHOT/uportal-war-4.0.5-SNAPSHOT.war [copy] Copying 1 file to /home/billbrown/uPortal/target [java] INFO Creating new lazily initialized GenericApplicationContext for the portal [java] INFO HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect [java] INFO HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect [java] ERROR HHH015011: Unable to locate static metamodel field : org.jasig.portal.events.aggr.dao.jpa.BaseAggregatedDimensionConfigImpl_#entityVersion [java] ERROR HHH015011: Unable to locate static metamodel field : org.jasig.portal.events.aggr.dao.jpa.BaseAggregatedDimensionConfigImpl_#entityVersion [java] INFO HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect [java] INFO Adding destruction callback singleton for bean 'scopedTarget.sessionAttributesOverridesMap' [java] INFO Created new lazily initialized GenericApplicationContext for the portal in 14462ms [java] INFO [java] INFO [java] Exception in thread "main" java.lang.RuntimeException: deluser for aabbas failed [java] at org.jasig.portal.shell.PortalShellBuildHelper.deleteUser(PortalShellBuildHelper.java:269) [java] at org.jasig.portal.shell.PortalShellBuildHelper$deleteUser.call(Unknown Source) [java] at reinit$_run_closure1.doCall(reinit.groovy:5) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:597) [java] at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) [java] at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) [java] at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) [java] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) [java] at groovy.lang.Closure.call(Closure.java:412) [java] at groovy.lang.Closure.call(Closure.java:425) [java] at org.codehaus.groovy.runtime.DefaultGroovyMethods.withReader(DefaultGroovyMethods.java:16264) [java] at org.codehaus.groovy.runtime.DefaultGroovyMethods.withReader(DefaultGroovyMethods.java:15877) [java] at org.codehaus.groovy.runtime.dgm$901.invoke(Unknown Source) [java] at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271) [java] at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53) [java] at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) [java] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) [java] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) [java] at reinit.run(reinit.groovy:2) [java] at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:266) [java] at groovy.lang.GroovyShell.run(GroovyShell.java:229) [java] at org.jasig.portal.shell.PortalShell.main(PortalShell.java:84) [java] Caused by: org.springframework.dao.EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0 [java] at org.springframework.dao.support.DataAccessUtils.requiredSingleResult(DataAccessUtils.java:71) [java] at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:730) [java] at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:745) [java] at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:776) [java] at org.jasig.portal.RDBMUserIdentityStore$2.doInTransactionWithoutResult(RDBMUserIdentityStore.java:163) [java] at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) [java] at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130) [java] at org.jasig.portal.RDBMUserIdentityStore.removePortalUID(RDBMUserIdentityStore.java:156) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:597) [java] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318) [java] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196) [java] at $Proxy86.removePortalUID(Unknown Source) [java] at org.jasig.portal.shell.PortalShellBuildHelper.deleteUser(PortalShellBuildHelper.java:266) [java] ... 24 more [java] INFO [java] INFO BUILD FAILED /home/billbrown/uPortal/build.xml:430: The following error occurred while executing this line: /home/billbrown/uPortal/build.xml:1278: The following error occurred while executing this line: /home/billbrown/uPortal/build.xml:1251: The following error occurred while executing this line: /home/billbrown/uPortal/build.xml:1254: The following error occurred while executing this line: /home/billbrown/uPortal/build.xml:1281: The following error occurred while executing this line: /home/billbrown/uPortal/build.xml:439: Java returned: 1

    Apereo Issues | 5 years ago | Bill Brown
    java.lang.RuntimeException: deluser for aabbas failed
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    hello: I get the following error trying to remove a user from the 4.x db who does not currently exist in the database: This user does exist in an exported copy of the 3.2 database : ant up-shell -Dscript=/home/billbrown/export/2012-04-13/reinit.groovy billbrown@piglet:~/export/2012-04-13$ more reinit.groovy def count=0, MAXSIZE=100 new File("/home/billbrown/export/2012-04-13/users.txt").withReader { reader -> while ((user = reader.readLine()) != null) { portalShellBuildHelper.deleteUser("deluser", user); } } uPortal.war to /home/billbrown/.m2/repository/org/jasig/portal/uportal-war/4.0.5-SNAPSHOT/uportal-war-4.0.5-SNAPSHOT.war [copy] Copying 1 file to /home/billbrown/uPortal/target [java] INFO Creating new lazily initialized GenericApplicationContext for the portal [java] INFO HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect [java] INFO HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect [java] ERROR HHH015011: Unable to locate static metamodel field : org.jasig.portal.events.aggr.dao.jpa.BaseAggregatedDimensionConfigImpl_#entityVersion [java] ERROR HHH015011: Unable to locate static metamodel field : org.jasig.portal.events.aggr.dao.jpa.BaseAggregatedDimensionConfigImpl_#entityVersion [java] INFO HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect [java] INFO Adding destruction callback singleton for bean 'scopedTarget.sessionAttributesOverridesMap' [java] INFO Created new lazily initialized GenericApplicationContext for the portal in 14462ms [java] INFO [java] INFO [java] Exception in thread "main" java.lang.RuntimeException: deluser for aabbas failed [java] at org.jasig.portal.shell.PortalShellBuildHelper.deleteUser(PortalShellBuildHelper.java:269) [java] at org.jasig.portal.shell.PortalShellBuildHelper$deleteUser.call(Unknown Source) [java] at reinit$_run_closure1.doCall(reinit.groovy:5) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:597) [java] at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) [java] at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) [java] at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) [java] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) [java] at groovy.lang.Closure.call(Closure.java:412) [java] at groovy.lang.Closure.call(Closure.java:425) [java] at org.codehaus.groovy.runtime.DefaultGroovyMethods.withReader(DefaultGroovyMethods.java:16264) [java] at org.codehaus.groovy.runtime.DefaultGroovyMethods.withReader(DefaultGroovyMethods.java:15877) [java] at org.codehaus.groovy.runtime.dgm$901.invoke(Unknown Source) [java] at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271) [java] at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53) [java] at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) [java] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) [java] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) [java] at reinit.run(reinit.groovy:2) [java] at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:266) [java] at groovy.lang.GroovyShell.run(GroovyShell.java:229) [java] at org.jasig.portal.shell.PortalShell.main(PortalShell.java:84) [java] Caused by: org.springframework.dao.EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0 [java] at org.springframework.dao.support.DataAccessUtils.requiredSingleResult(DataAccessUtils.java:71) [java] at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:730) [java] at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:745) [java] at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:776) [java] at org.jasig.portal.RDBMUserIdentityStore$2.doInTransactionWithoutResult(RDBMUserIdentityStore.java:163) [java] at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) [java] at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130) [java] at org.jasig.portal.RDBMUserIdentityStore.removePortalUID(RDBMUserIdentityStore.java:156) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:597) [java] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318) [java] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196) [java] at $Proxy86.removePortalUID(Unknown Source) [java] at org.jasig.portal.shell.PortalShellBuildHelper.deleteUser(PortalShellBuildHelper.java:266) [java] ... 24 more [java] INFO [java] INFO BUILD FAILED /home/billbrown/uPortal/build.xml:430: The following error occurred while executing this line: /home/billbrown/uPortal/build.xml:1278: The following error occurred while executing this line: /home/billbrown/uPortal/build.xml:1251: The following error occurred while executing this line: /home/billbrown/uPortal/build.xml:1254: The following error occurred while executing this line: /home/billbrown/uPortal/build.xml:1281: The following error occurred while executing this line: /home/billbrown/uPortal/build.xml:439: Java returned: 1

    Apereo Issues | 5 years ago | Bill Brown
    java.lang.RuntimeException: deluser for aabbas failed
  6. 0

    How to deal with EmptyResultDataAccessException when using JdbcTemplate to retrieve data from database?

    Stack Overflow | 2 years ago | Nisman
    org.springframework.dao.EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0

  1. marcbouvierdav 4 times, last 1 month ago
  2. eilonreshef 1 times, last 8 months ago
4 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. org.springframework.dao.EmptyResultDataAccessException

    Incorrect result size: expected 1, actual 0

    at org.springframework.dao.support.DataAccessUtils.requiredSingleResult()
  2. Spring Tx
    DataAccessUtils.requiredSingleResult
    1. org.springframework.dao.support.DataAccessUtils.requiredSingleResult(DataAccessUtils.java:71)
    1 frame
  3. Spring Framework
    JdbcTemplate.queryForInt
    1. org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:730)
    2. org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:745)
    3. org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:776)
    3 frames
  4. org.jasig.portal
    RDBMUserIdentityStore$2.doInTransactionWithoutResult
    1. org.jasig.portal.RDBMUserIdentityStore$2.doInTransactionWithoutResult(RDBMUserIdentityStore.java:164)
    1 frame
  5. Spring Tx
    TransactionTemplate.execute
    1. org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)
    2. org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
    2 frames
  6. org.jasig.portal
    RDBMUserIdentityStore.removePortalUID
    1. org.jasig.portal.RDBMUserIdentityStore.removePortalUID(RDBMUserIdentityStore.java:157)
    1 frame
  7. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:606)
    4 frames
  8. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)
    2 frames
  9. com.sun.proxy
    $Proxy123.removePortalUID
    1. com.sun.proxy.$Proxy123.removePortalUID(Unknown Source)
    1 frame
  10. org.jasig.portal
    PortalShellBuildHelper$deleteUser.call
    1. org.jasig.portal.shell.PortalShellBuildHelperImpl.deleteUser(PortalShellBuildHelperImpl.java:338)
    2. org.jasig.portal.shell.PortalShellBuildHelper$deleteUser.call(Unknown Source)
    2 frames
  11. Groovy
    AbstractCallSite.call
    1. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    2. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    3. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
    3 frames
  12. Unknown
    upshell_191544890.run
    1. upshell_191544890.run(upshell_191544890.groovy:3)
    1 frame
  13. Groovy
    GroovyShell.run
    1. groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:257)
    2. groovy.lang.GroovyShell.run(GroovyShell.java:220)
    2 frames
  14. org.jasig.portal
    PortalShell.main
    1. org.jasig.portal.shell.PortalShell.main(PortalShell.java:86)
    1 frame