java.lang.NoSuchMethodError: com.quikdo.hub.app.SiteTenantConfig$PersonRequestConfig.destroy()V {code} call stack: {code}

Spring JIRA | Hendy Irawan | 3 years ago
  1. 0

    {code} 18:59:42.985 | WARN | Thread-24 | o.s.b.f.s.DisposableBeanAdapter | ry.support.DisposableBeanAdapter 247 | Invocation of destroy method failed on bean with name 'siteTenantConfig.PersonRequestConfig': java.lang.NoSuchMethodError: com.quikdo.hub.app.SiteTenantConfig$PersonRequestConfig.destroy()V {code} call stack: {code} at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:247) at org.springframework.beans.factory.support.DisposableBeanAdapter.run(DisposableBeanAdapter.java:214) at org.springframework.web.context.request.AbstractRequestAttributes.executeRequestDestructionCallbacks(AbstractRequestAttributes.java:91) at org.springframework.web.context.request.AbstractRequestAttributes.requestCompleted(AbstractRequestAttributes.java:47) at org.soluvas.commons.shell.ExtCommandSupport.execute(ExtCommandSupport.java:62) at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35) at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477) at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403) {code} It results from the following @Configuration : {code} @Configuration @Scope(value="request") @Import(TenantDataConfig.class) public class SiteTenantConfig { @Inject @DataFolder private String dataFolder; @Inject private TenantRef tenant; @Inject private Environment env; @Bean @Scope("request") public PermalinkCatalog permalinkCatalog() { return new StaticXmiLoader<PermalinkCatalog>(SitePackage.eINSTANCE, dataFolder + "/common/custom.PermalinkCatalog.xmi").get(); } @Bean @Scope("request") public PermalinkManager permalinkMgr() { return new PermalinkManagerImpl(permalinkCatalog()); } @Bean(name="cDbCon") @Scope("request") @Deprecated public CouchDbConnector cDbCon() throws MalformedURLException { final HttpClient httpClient = new StdHttpClient.Builder() .url(env.getRequiredProperty("couchDbUrl")) .username(env.getRequiredProperty("couchDbUsername")) .password(env.getRequiredProperty("couchDbPassword")) .build(); final String dbNameCouchDb = tenant.getTenantId() + "_" + tenant.getTenantEnv(); final StdCouchDbInstance stdCouchDbInstance = new StdCouchDbInstance(httpClient); final StdCouchDbConnector cDbCon = new StdCouchDbConnector(dbNameCouchDb, stdCouchDbInstance); cDbCon.createDatabaseIfNotExists(); return cDbCon; } @Bean @Scope("request") public DelegatingSupplier<SecurityCatalog> securityCatalogSupplier() { return new AggregatingSupplier<SecurityCatalog>(SecurityFactory.eINSTANCE, SecurityPackage.Literals.SECURITY_CATALOG, ImmutableList.<Supplier<SecurityCatalog>>of()); } @Bean @Scope("request") public SupplierXmiClasspathScanner<SecurityCatalog> securitySecurityCatalogScanner() { return new SupplierXmiClasspathScanner<>(SecurityPackage.eINSTANCE, SecurityCatalog.class, securityCatalogSupplier(), SecurityPackage.class); } @Bean @Scope(value="request", proxyMode=ScopedProxyMode.TARGET_CLASS) public Realm shiroRealm() throws MalformedURLException { return new SoluvasCouchDbRealm(securityCatalogSupplier(), cDbCon()); } @Configuration @Lazy public static class PersonConfig { private static final Logger log = LoggerFactory .getLogger(SiteTenantConfig.PersonConfig.class); private Map<String, CouchDbPersonRepository> personRepoMap; @Inject private Environment env; @Inject private ClientConnectionManager connMgr; @Resource(name="sysConfigMap") private Map<String, QuikdoSysConfig> sysConfigMap; @PostConstruct public void init() { log.info("Initializing {} CouchDB Person repositories: {}", sysConfigMap.size(), Iterables.limit(sysConfigMap.keySet(), 10)); final ImmutableMap.Builder<String, CouchDbPersonRepository> builder = ImmutableMap.builder(); final String tenantEnv = env.getRequiredProperty("tenantEnv"); for (QuikdoSysConfig sysConfig : sysConfigMap.values()) { final CouchDbPersonRepository personRepo = new CouchDbPersonRepository(connMgr, sysConfig.getCouchDbUri(), sysConfig.getTenantId() + "_" + tenantEnv); builder.put(sysConfig.getTenantId(), personRepo); } personRepoMap = builder.build(); } @PreDestroy public void destroy() { log.info("Shutting down {} CouchDB Person repositories: {}", personRepoMap.size(), Iterables.limit(personRepoMap.keySet(), 10)); for (CouchDbPersonRepository personRepo : personRepoMap.values()) { personRepo.destroy(); } } @Bean public Map<String, CouchDbPersonRepository> personRepoMap() { return personRepoMap; } } @Configuration @Lazy @Scope("request") public static class PersonRequestConfig { @Inject private TenantRef tenant; @Resource(name="personRepoMap") private Map<String, PersonRepository> personRepoMap; @Bean(name={"personRepo", "personLookup"}) @Scope(value="request", proxyMode=ScopedProxyMode.INTERFACES) public PersonRepository personRepo() { return personRepoMap.get(tenant.getTenantId()); } } } {code} PersonRequestConfig is @Configuration @Lazy @Scope("request") that has no destroy method. So even if Spring tries to call one (which it shouldn't in the first place), the log should be DEBUG. And how did it determine the "destroy()" method name?

    Spring JIRA | 3 years ago | Hendy Irawan
    java.lang.NoSuchMethodError: com.quikdo.hub.app.SiteTenantConfig$PersonRequestConfig.destroy()V {code} call stack: {code}
  2. 0

    {code} 18:59:42.985 | WARN | Thread-24 | o.s.b.f.s.DisposableBeanAdapter | ry.support.DisposableBeanAdapter 247 | Invocation of destroy method failed on bean with name 'siteTenantConfig.PersonRequestConfig': java.lang.NoSuchMethodError: com.quikdo.hub.app.SiteTenantConfig$PersonRequestConfig.destroy()V {code} call stack: {code} at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:247) at org.springframework.beans.factory.support.DisposableBeanAdapter.run(DisposableBeanAdapter.java:214) at org.springframework.web.context.request.AbstractRequestAttributes.executeRequestDestructionCallbacks(AbstractRequestAttributes.java:91) at org.springframework.web.context.request.AbstractRequestAttributes.requestCompleted(AbstractRequestAttributes.java:47) at org.soluvas.commons.shell.ExtCommandSupport.execute(ExtCommandSupport.java:62) at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35) at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477) at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403) {code} It results from the following @Configuration : {code} @Configuration @Scope(value="request") @Import(TenantDataConfig.class) public class SiteTenantConfig { @Inject @DataFolder private String dataFolder; @Inject private TenantRef tenant; @Inject private Environment env; @Bean @Scope("request") public PermalinkCatalog permalinkCatalog() { return new StaticXmiLoader<PermalinkCatalog>(SitePackage.eINSTANCE, dataFolder + "/common/custom.PermalinkCatalog.xmi").get(); } @Bean @Scope("request") public PermalinkManager permalinkMgr() { return new PermalinkManagerImpl(permalinkCatalog()); } @Bean(name="cDbCon") @Scope("request") @Deprecated public CouchDbConnector cDbCon() throws MalformedURLException { final HttpClient httpClient = new StdHttpClient.Builder() .url(env.getRequiredProperty("couchDbUrl")) .username(env.getRequiredProperty("couchDbUsername")) .password(env.getRequiredProperty("couchDbPassword")) .build(); final String dbNameCouchDb = tenant.getTenantId() + "_" + tenant.getTenantEnv(); final StdCouchDbInstance stdCouchDbInstance = new StdCouchDbInstance(httpClient); final StdCouchDbConnector cDbCon = new StdCouchDbConnector(dbNameCouchDb, stdCouchDbInstance); cDbCon.createDatabaseIfNotExists(); return cDbCon; } @Bean @Scope("request") public DelegatingSupplier<SecurityCatalog> securityCatalogSupplier() { return new AggregatingSupplier<SecurityCatalog>(SecurityFactory.eINSTANCE, SecurityPackage.Literals.SECURITY_CATALOG, ImmutableList.<Supplier<SecurityCatalog>>of()); } @Bean @Scope("request") public SupplierXmiClasspathScanner<SecurityCatalog> securitySecurityCatalogScanner() { return new SupplierXmiClasspathScanner<>(SecurityPackage.eINSTANCE, SecurityCatalog.class, securityCatalogSupplier(), SecurityPackage.class); } @Bean @Scope(value="request", proxyMode=ScopedProxyMode.TARGET_CLASS) public Realm shiroRealm() throws MalformedURLException { return new SoluvasCouchDbRealm(securityCatalogSupplier(), cDbCon()); } @Configuration @Lazy public static class PersonConfig { private static final Logger log = LoggerFactory .getLogger(SiteTenantConfig.PersonConfig.class); private Map<String, CouchDbPersonRepository> personRepoMap; @Inject private Environment env; @Inject private ClientConnectionManager connMgr; @Resource(name="sysConfigMap") private Map<String, QuikdoSysConfig> sysConfigMap; @PostConstruct public void init() { log.info("Initializing {} CouchDB Person repositories: {}", sysConfigMap.size(), Iterables.limit(sysConfigMap.keySet(), 10)); final ImmutableMap.Builder<String, CouchDbPersonRepository> builder = ImmutableMap.builder(); final String tenantEnv = env.getRequiredProperty("tenantEnv"); for (QuikdoSysConfig sysConfig : sysConfigMap.values()) { final CouchDbPersonRepository personRepo = new CouchDbPersonRepository(connMgr, sysConfig.getCouchDbUri(), sysConfig.getTenantId() + "_" + tenantEnv); builder.put(sysConfig.getTenantId(), personRepo); } personRepoMap = builder.build(); } @PreDestroy public void destroy() { log.info("Shutting down {} CouchDB Person repositories: {}", personRepoMap.size(), Iterables.limit(personRepoMap.keySet(), 10)); for (CouchDbPersonRepository personRepo : personRepoMap.values()) { personRepo.destroy(); } } @Bean public Map<String, CouchDbPersonRepository> personRepoMap() { return personRepoMap; } } @Configuration @Lazy @Scope("request") public static class PersonRequestConfig { @Inject private TenantRef tenant; @Resource(name="personRepoMap") private Map<String, PersonRepository> personRepoMap; @Bean(name={"personRepo", "personLookup"}) @Scope(value="request", proxyMode=ScopedProxyMode.INTERFACES) public PersonRepository personRepo() { return personRepoMap.get(tenant.getTenantId()); } } } {code} PersonRequestConfig is @Configuration @Lazy @Scope("request") that has no destroy method. So even if Spring tries to call one (which it shouldn't in the first place), the log should be DEBUG. And how did it determine the "destroy()" method name?

    Spring JIRA | 3 years ago | Hendy Irawan
    java.lang.NoSuchMethodError: com.quikdo.hub.app.SiteTenantConfig$PersonRequestConfig.destroy()V {code} call stack: {code}
  3. 0

    problem with XSQL 9.2.0.2 installation with Jrun 3.1

    Oracle Community | 1 decade ago | 145824
    java.lang.NoSuchMethodError: org.w3c.dom.Node: method normalize()V not found at oracle.xml.xsql.XSQLConfigManager.reloadConfigFile(Compiled Code)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Lombok annotation handler class lombok.javac.handlers.HandleData failed

    Stack Overflow | 1 year ago | Mital Awachat
    java.lang.NoSuchMethodError: com.sun.tools.javac.code.Type.<init>(ILcom/sun/tools/javac/code/Symbol$TypeSymbol;)V
  6. 0

    Problems configuring for xdk9.2.0.2.0

    Oracle Community | 1 decade ago | 195386
    java.lang.NoSuchMethodError: org.w3c.dom.Node: method normalize()V not found at oracle.xml.xsql.XSQLConfigManager.reloadConfigFile(Compiled Code)

    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.NoSuchMethodError

      com.quikdo.hub.app.SiteTenantConfig$PersonRequestConfig.destroy()V {code} call stack: {code}

      at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy()
    2. Spring Beans
      DisposableBeanAdapter.run
      1. org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:247)
      2. org.springframework.beans.factory.support.DisposableBeanAdapter.run(DisposableBeanAdapter.java:214)
      2 frames
    3. Spring
      AbstractRequestAttributes.requestCompleted
      1. org.springframework.web.context.request.AbstractRequestAttributes.executeRequestDestructionCallbacks(AbstractRequestAttributes.java:91)
      2. org.springframework.web.context.request.AbstractRequestAttributes.requestCompleted(AbstractRequestAttributes.java:47)
      2 frames
    4. org.soluvas.commons
      ExtCommandSupport.execute
      1. org.soluvas.commons.shell.ExtCommandSupport.execute(ExtCommandSupport.java:62)
      1 frame
    5. Apache Karaf :: Shell :: Console
      AbstractCommand.execute
      1. org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)
      1 frame
    6. Apache Felix Gogo Runtime
      Closure.executeStatement
      1. org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
      2. org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
      2 frames