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 = ?)")

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web14603

  • => [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 = ?)")
  • via Google Groups by Douglas Myers-Turnbull, 6 months ago
    , Toxicity, Type, Updated, VolumeOfDistribution FROM DrugBank WHERE Id LIKE ? bind => [1 parameter bound] Query: ReadAllQuery(referenceClass=DrugBank sql="SELECT WID, Absorption, CASNumber, Clearance, Created, DataSet_WID, Description, HalfLife, Id
  • Transaction cannot proceed STATUS_COMMITTED Error Code: 0 Call: SELECT id, closed, changeSetID, dfFileVersionID FROM File.CHANGESETFILEVERSION WHERE (changeSetID = ?) bind => [1 parameter bound] Query: ReadAllQuery(name="fileVersions
  • Stack trace

    • 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(QueryImpl.java:378) at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:260) at org.eclipse.persistence.internal.jpa.QueryImpl.getSingleResult(QueryImpl.java:517) at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getSingleResult(EJBQueryImpl.java:400) at org.apache.ranger.db.XXServiceDefDao.findByName(XXServiceDefDao.java:41) at org.apache.ranger.biz.ServiceDBStore.getServiceDefByName(ServiceDBStore.java:942) at org.apache.ranger.plugin.store.EmbeddedServiceDefsUtil.getOrCreateServiceDef(EmbeddedServiceDefsUtil.java:167) at org.apache.ranger.plugin.store.EmbeddedServiceDefsUtil.init(EmbeddedServiceDefsUtil.java:103) at org.apache.ranger.biz.ServiceDBStore$1.doInTransaction(ServiceDBStore.java:222) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130) at org.apache.ranger.biz.ServiceDBStore.initStore(ServiceDBStore.java:219) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:346) at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:299) at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:132) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1448) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:872) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:814) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:731) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:485) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:92) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:284) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1106) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:605) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:925) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:472) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93) at org.apache.ranger.util.CLIUtil.init(CLIUtil.java:48) at org.apache.ranger.util.CLIUtil.getBean(CLIUtil.java:56) at org.apache.ranger.patch.PatchPasswordEncryption_J10001.main(PatchPasswordEncryption_J10001.java:85)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 1 year ago