weblogic 中的 NameNotFoundException
NameNotFoundException in weblogic
我有一个用 java.When 编写的 Web 应用程序 我 运行 我的 webLogic 服务器,服务器是 运行ning。但是当我发送 SOAP 请求时,它给出无法解析 'xxx-yyyy-zzz-JNDI'。解决 '';剩余姓名 'xxx-yyyy-zzz-JNDI'.
我测试了我的 jndi 配置,它正在工作(密码和用户名正确)。我意识到在 weblogic 的监视选项卡中没有部署此数据源的实例。我认为问题就在这里。你有什么想法吗?
我的错误代码:Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'efaturaQdbDataSource' defined in class path resource [applicationContext-efatura-data.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Unable to resolve 'xxx-yyyy-zzz-JNDI'. Resolved ''; remaining name 'xxx-yyyy-zzz-JNDI' at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455) 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.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.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322) ... 98 more Caused by: javax.naming.NameNotFoundException: Unable to resolve 'xxx-yyyy-zzz-JNDI'. Resolved ''; remaining name 'xxx-yyyy-zzz-JNDI' at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139) at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:252) at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182) at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206) at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254) at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:393) at javax.naming.InitialContext.lookup(InitialContext.java:392) at org.springframework.jndi.JndiTemplate.doInContext(JndiTemplate.java:154) at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:87) at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:152) at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178) at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:95) at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105) at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:201) at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:187) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452) ... 105 more
非常感谢分享整个堆栈跟踪,现在问题更容易理解了。
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'efaturaQdbDataSource' defined in class path resource [applicationContext-
efatura-data.xml]
我认为您遇到了名为 efaturaQdbDataSource 的数据源问题。因此,您应该先在guide之后创建数据源。完成这些步骤后,您将在 JNDI 树中看到数据源。
根据我的经验,这是管理数据源而不是将其作为应用程序的一部分的最佳方式,为什么?因为您会将数据源的配置及其管理与您的应用程序分开,这在您的应用程序处于生产状态时很有用。
我有一个用 java.When 编写的 Web 应用程序 我 运行 我的 webLogic 服务器,服务器是 运行ning。但是当我发送 SOAP 请求时,它给出无法解析 'xxx-yyyy-zzz-JNDI'。解决 '';剩余姓名 'xxx-yyyy-zzz-JNDI'.
我测试了我的 jndi 配置,它正在工作(密码和用户名正确)。我意识到在 weblogic 的监视选项卡中没有部署此数据源的实例。我认为问题就在这里。你有什么想法吗?
我的错误代码:Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'efaturaQdbDataSource' defined in class path resource [applicationContext-efatura-data.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Unable to resolve 'xxx-yyyy-zzz-JNDI'. Resolved ''; remaining name 'xxx-yyyy-zzz-JNDI' at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455) 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.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.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322) ... 98 more Caused by: javax.naming.NameNotFoundException: Unable to resolve 'xxx-yyyy-zzz-JNDI'. Resolved ''; remaining name 'xxx-yyyy-zzz-JNDI' at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139) at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:252) at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182) at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206) at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254) at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:393) at javax.naming.InitialContext.lookup(InitialContext.java:392) at org.springframework.jndi.JndiTemplate.doInContext(JndiTemplate.java:154) at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:87) at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:152) at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178) at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:95) at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105) at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:201) at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:187) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452) ... 105 more
非常感谢分享整个堆栈跟踪,现在问题更容易理解了。
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'efaturaQdbDataSource' defined in class path resource [applicationContext-
efatura-data.xml]
我认为您遇到了名为 efaturaQdbDataSource 的数据源问题。因此,您应该先在guide之后创建数据源。完成这些步骤后,您将在 JNDI 树中看到数据源。
根据我的经验,这是管理数据源而不是将其作为应用程序的一部分的最佳方式,为什么?因为您会将数据源的配置及其管理与您的应用程序分开,这在您的应用程序处于生产状态时很有用。