java.sql.SQLException: No database selected Error Code: 1046 Call: SELECT id, ADDED_BY_ID, CREATE_TIME, description, guid, impl_class_name, is_enabled, label, name, rb_key_description, rb_key_label, UPDATE_TIME, UPD_BY_ID, version FROM x_service_def WHERE (name = ?) bind => [1 parameter bound] Query: ReadAllQuery(name="XXServiceDef.findByName" referenceClass=XXServiceDef sql="SELECT id, ADDED_BY_ID, CREATE_TIME, description, guid, impl_class_name, is_enabled, label, name, rb_key_description, rb _key_label, UPDATE_TIME, UPD_BY_ID, version FROM x_service_def WHERE (name = ?)")

ranger-dev | Chris Buccella (JIRA) | 2 years 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

    [jira] [Commented] (RANGER-651) install: java patch PatchPasswordEncryption_J10001 failed: No database selected

    ranger-dev | 2 years ago | Chris Buccella (JIRA)
    java.sql.SQLException: No database selected Error Code: 1046 Call: SELECT id, ADDED_BY_ID, CREATE_TIME, description, guid, impl_class_name, is_enabled, label, name, rb_key_description, rb_key_label, UPDATE_TIME, UPD_BY_ID, version FROM x_service_def WHERE (name = ?) bind => [1 parameter bound] Query: ReadAllQuery(name="XXServiceDef.findByName" referenceClass=XXServiceDef sql="SELECT id, ADDED_BY_ID, CREATE_TIME, description, guid, impl_class_name, is_enabled, label, name, rb_key_description, rb _key_label, UPDATE_TIME, UPD_BY_ID, version FROM x_service_def WHERE (name = ?)")
  2. 0

    call a stored procedure using eclipselink Problem...

    Coderanch | 7 years ago | kin lau
    java.sql.SQLException: ORA-00900: invalid SQL statement Error Code: 900 Call: BEGIN NA_CUSTOMER(id=>?, firstname=>?, lastname=>?); END; bind => [=> ID, => FIRSTNAME, => LASTNAME] [Query: ReadAllQuery(name="cus.GenFn" referenceClass=Customer1 )

    Root Cause Analysis

    1. java.sql.SQLException

      No database selected Error Code: 1046 Call: SELECT id, ADDED_BY_ID, CREATE_TIME, description, guid, impl_class_name, is_enabled, label, name, rb_key_description, rb_key_label, UPDATE_TIME, UPD_BY_ID, version FROM x_service_def WHERE (name = ?) bind => [1 parameter bound] Query: ReadAllQuery(name="XXServiceDef.findByName" referenceClass=XXServiceDef sql="SELECT id, ADDED_BY_ID, CREATE_TIME, description, guid, impl_class_name, is_enabled, label, name, rb_key_description, rb _key_label, UPDATE_TIME, UPD_BY_ID, version FROM x_service_def WHERE (name = ?)")

      at org.eclipse.persistence.internal.jpa.QueryImpl.getDetailedException()
    2. EclipseLink (non-OSGi)
      EJBQueryImpl.getSingleResult
      1. org.eclipse.persistence.internal.jpa.QueryImpl.getDetailedException(QueryImpl.java:378)
      2. org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:260)
      3. org.eclipse.persistence.internal.jpa.QueryImpl.getSingleResult(QueryImpl.java:517)
      4. org.eclipse.persistence.internal.jpa.EJBQueryImpl.getSingleResult(EJBQueryImpl.java:400)
      4 frames
    3. org.apache.ranger
      ServiceDBStore$1.doInTransaction
      1. org.apache.ranger.db.XXServiceDefDao.findByName(XXServiceDefDao.java:41)
      2. org.apache.ranger.biz.ServiceDBStore.getServiceDefByName(ServiceDBStore.java:942)
      3. org.apache.ranger.plugin.store.EmbeddedServiceDefsUtil.getOrCreateServiceDef(EmbeddedServiceDefsUtil.java:167)
      4. org.apache.ranger.plugin.store.EmbeddedServiceDefsUtil.init(EmbeddedServiceDefsUtil.java:103)
      5. org.apache.ranger.biz.ServiceDBStore$1.doInTransaction(ServiceDBStore.java:222)
      5 frames
    4. Spring Tx
      TransactionTemplate.execute
      1. org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
      1 frame
    5. org.apache.ranger
      ServiceDBStore.initStore
      1. org.apache.ranger.biz.ServiceDBStore.initStore(ServiceDBStore.java:219)
      1 frame
    6. 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
    7. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:346)
      2. org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:299)
      3. org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:132)
      4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394)
      5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1448)
      6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
      7. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
      8. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
      9. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
      10. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
      11. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
      12. org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:872)
      13. org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:814)
      14. org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:731)
      15. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:485)
      16. org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:92)
      17. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:284)
      18. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1106)
      19. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
      20. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
      21. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
      22. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
      23. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
      24. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
      25. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:605)
      25 frames
    8. Spring Context
      ClassPathXmlApplicationContext.<init>
      1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:925)
      2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:472)
      3. org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
      4. org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
      4 frames
    9. org.apache.ranger
      PatchPasswordEncryption_J10001.main
      1. org.apache.ranger.util.CLIUtil.init(CLIUtil.java:48)
      2. org.apache.ranger.util.CLIUtil.getBean(CLIUtil.java:56)
      3. org.apache.ranger.patch.PatchPasswordEncryption_J10001.main(PatchPasswordEncryption_J10001.java:85)
      3 frames