简体   繁体   English

javax.naming.NameNotFoundException:名称java:comp在此上下文中未绑定

[英]javax.naming.NameNotFoundException: Name java:comp is not bound in this Context

I am trying to build a war using the following: 我正在尝试使用以下方法进行战争:

  • Spring Framework 3.0.6 Spring Framework 3.0.6
  • JSF 2.1.6 JSF 2.1.6
  • ICEfaces 3.1 ICEfaces 3.1

the configuration file for spring is in the /conf/rb_conf.xml. spring的配置文件在/conf/rb_conf.xml中。

GRAVE: Exception sending context initialized event to listener instance of class
org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/conf/rb_conf.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Name java:comp is not bound in this Context
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
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:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:567)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:563)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1399)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1500)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:252)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:194)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:879)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:600)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1703)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.naming.NameNotFoundException: Name java:comp is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
...

I have been trying to solve this issue but with no luck, can anyone help? 我一直在尝试解决此问题,但没有运气,有人可以帮忙吗? Any Ideas? 有任何想法吗? Thank you 谢谢

The error is ocurring during the access of some JNDI resource which the name starts with "java:comp", and this resource does not exist in the server. 在访问某些名称以“ java:comp”开头的JNDI资源时发生错误,并且该资源在服务器中不存在。 Are you using a datasource configured in the server? 您是否正在使用服务器中配置的数据源? What server are you using? 您正在使用什么服务器?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 javax.naming.NameNotFoundException:名称[comp / env]未绑定在此Context中 - javax.naming.NameNotFoundException: Name [comp/env] is not bound in this Context 自定义SessionListener,此上下文中未绑定名称,javax.naming.NameNotFoundException - Custom SessionListener, name is not bound in this context, javax.naming.NameNotFoundException @Named批注无法在Servlet中加载Bean-javax.naming.NameNotFoundException:此上下文中未绑定名称学生 - @Named annotation can't load a bean in a Servlet - javax.naming.NameNotFoundException: Name student is not bound in this Context javax.naming.NameNotFoundException:名称[jdbc / skynetdb]未绑定在此Context中。 找不到[jdbc] - javax.naming.NameNotFoundException: Name [jdbc/skynetdb] is not bound in this Context. Unable to find [jdbc] javax.naming.NameNotFoundException:名称[SessionFactory]未绑定在此Context中。 无法找到[SessionFactory] - javax.naming.NameNotFoundException: Name [SessionFactory] is not bound in this Context. Unable to find [SessionFactory] javax.naming.NameNotFoundException: fsmDS 未绑定 - javax.naming.NameNotFoundException: fsmDS not bound JNDI失败,并出现javax.naming.NameNotFoundException:在部署Spring Boot2 Tomcat 9时,此上下文未绑定名称[jdbc / Database] - JNDI fails with javax.naming.NameNotFoundException:Name [jdbc/Database] is not bound in this Context when deploying Spring Boot2 Tomcat 9 NO EMBEDDED 在Hibernate 4.3.5 Final上JNDI查找失败-javax.naming.NameNotFoundException:名称[xxx]在此上下文中未绑定。 找不到[xxx] - JNDI look up fails on Hibernate 4.3.5 final - javax.naming.NameNotFoundException: Name [xxx] is not bound in this Context. Unable to find [xxx] javax.naming.NameNotFoundException:CDIExtension - javax.naming.NameNotFoundException: CDIExtension 创建名称为“ myEmf”的bean时发生错误— javax.naming.NameNotFoundException:myPersistenceUnit - Error creating bean with name 'myEmf' — javax.naming.NameNotFoundException: myPersistenceUnit
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM