1. <i id='mynaP'><tr id='mynaP'><dt id='mynaP'><q id='mynaP'><span id='mynaP'><b id='mynaP'><form id='mynaP'><ins id='mynaP'></ins><ul id='mynaP'></ul><sub id='mynaP'></sub></form><legend id='mynaP'></legend><bdo id='mynaP'><pre id='mynaP'><center id='mynaP'></center></pre></bdo></b><th id='mynaP'></th></span></q></dt></tr></i><div id='mynaP'><tfoot id='mynaP'></tfoot><dl id='mynaP'><fieldset id='mynaP'></fieldset></dl></div>
    <legend id='mynaP'><style id='mynaP'><dir id='mynaP'><q id='mynaP'></q></dir></style></legend>
    1. <small id='mynaP'></small><noframes id='mynaP'>

      • <bdo id='mynaP'></bdo><ul id='mynaP'></ul>

      <tfoot id='mynaP'></tfoot>
    2. 迁移到 WAS 8.5 和 java 1.7 后的 javax.naming.ConfigurationExceptio

      javax.naming.ConfigurationException after migrating to WAS 8.5 and java 1.7(迁移到 WAS 8.5 和 java 1.7 后的 javax.naming.ConfigurationException)

      <legend id='1K1Gc'><style id='1K1Gc'><dir id='1K1Gc'><q id='1K1Gc'></q></dir></style></legend>
        • <bdo id='1K1Gc'></bdo><ul id='1K1Gc'></ul>
          1. <tfoot id='1K1Gc'></tfoot>

              <small id='1K1Gc'></small><noframes id='1K1Gc'>

                <tbody id='1K1Gc'></tbody>
              <i id='1K1Gc'><tr id='1K1Gc'><dt id='1K1Gc'><q id='1K1Gc'><span id='1K1Gc'><b id='1K1Gc'><form id='1K1Gc'><ins id='1K1Gc'></ins><ul id='1K1Gc'></ul><sub id='1K1Gc'></sub></form><legend id='1K1Gc'></legend><bdo id='1K1Gc'><pre id='1K1Gc'><center id='1K1Gc'></center></pre></bdo></b><th id='1K1Gc'></th></span></q></dt></tr></i><div id='1K1Gc'><tfoot id='1K1Gc'></tfoot><dl id='1K1Gc'><fieldset id='1K1Gc'></fieldset></dl></div>
              • 本文介绍了迁移到 WAS 8.5 和 java 1.7 后的 javax.naming.ConfigurationException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在将我的应用程序从 java 1.5 和 WAS 6.1 迁移到 java 1.7 和 WAS 8.5 我收到以下异常.

                I am migrating my application from java 1.5 and WAS 6.1 to java 1.7 and WAS 8.5 I am getting the following exception.

                [8/20/12 12:01:00:286 EDT] 0000006b SystemErr     R org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xxxDa
                taSource' defined in class path resource [applicationContext-datasources.xml]: Invocation of init method failed; nested exception is javax.naming
                .ConfigurationException: NamingManager.getURLContext cannot find the factory for this scheme: java
                [8/20/12 12:01:00:286 EDT] 0000006b SystemErr     R     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBe
                an(AbstractAutowireCapableBeanFactory.java:1338)
                [8/20/12 12:01:00:286 EDT] 0000006b SystemErr     R     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean
                (AbstractAutowireCapableBeanFactory.java:473)
                [8/20/12 12:01:00:286 EDT] 0000006b SystemErr     R     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(Abstra
                ctAutowireCapableBeanFactory.java:409)
                [8/20/12 12:01:00:286 EDT] 0000006b SystemErr     R     at java.security.AccessController.doPrivileged(AccessController.java:252)
                [8/20/12 12:01:00:286 EDT] 0000006b SystemErr     R     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(A
                bstractAutowireCapableBeanFactory.java:380)
                [8/20/12 12:01:00:286 EDT] 0000006b SystemErr     R     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFac
                tory.java:264)
                [8/20/12 12:01:00:286 EDT] 0000006b SystemErr     R     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(Defau
                ltSingletonBeanRegistry.java:222)
                [8/20/12 12:01:00:286 EDT] 0000006b SystemErr     R     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFacto
                ry.java:261)
                [8/20/12 12:01:00:287 EDT] 0000006b SystemErr     R     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory
                .java:185)
                [8/20/12 12:01:00:287 EDT] 0000006b SystemErr     R     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory
                .java:164)
                [8/20/12 12:01:00:287 EDT] 0000006b SystemErr     R     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingle
                tons(DefaultListableBeanFactory.java:423)
                [8/20/12 12:01:00:287 EDT] 0000006b SystemErr     R     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitializ
                ation(AbstractApplicationContext.java:728)
                [8/20/12 12:01:00:287 EDT] 0000006b SystemErr     R     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicatio
                nContext.java:380)
                [8/20/12 12:01:00:287 EDT] 0000006b SystemErr     R     at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.j
                ava:255)
                [8/20/12 12:01:00:287 EDT] 0000006b SystemErr     R     at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.jav
                a:199)
                [8/20/12 12:01:00:287 EDT] 0000006b SystemErr     R     at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderLis
                tener.java:45)
                [8/20/12 12:01:00:287 EDT] 0000006b SystemErr     R     at scv.cais.cms.jdr.webservice.context.ScvContextLoaderListener.contextInitialized(ScvContex
                tLoaderListener.java:21)
                [8/20/12 12:01:00:287 EDT] 0000006b SystemErr     R     at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1651)
                [8/20/12 12:01:00:287 EDT] 0000006b SystemErr     R     at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:414)
                [8/20/12 12:01:00:287 EDT] 0000006b SystemErr     R     at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
                [8/20/12 12:01:00:287 EDT] 0000006b SystemErr     R     at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
                [8/20/12 12:01:00:287 EDT] 0000006b SystemErr     R     at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:746)
                [8/20/12 12:01:00:287 EDT] 0000006b SystemErr     R     at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)
                [8/20/12 12:01:00:287 EDT] 0000006b SystemErr     R     at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:424)
                [8/20/12 12:01:00:287 EDT] 0000006b SystemErr     R     at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718)
                [8/20/12 12:01:00:287 EDT] 0000006b SystemErr     R     at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1170)
                [8/20/12 12:01:00:288 EDT] 0000006b SystemErr     R     at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedAppl
                icationImpl.java:1370)
                [8/20/12 12:01:00:288 EDT] 0000006b SystemErr     R     at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:638)
                [8/20/12 12:01:00:288 EDT] 0000006b SystemErr     R     at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:9
                68)
                [8/20/12 12:01:00:288 EDT] 0000006b SystemErr     R     at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:
                769)
                [8/20/12 12:01:00:288 EDT] 0000006b SystemErr     R     at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMg
                rImpl.java:1364)
                [8/20/12 12:01:00:288 EDT] 0000006b SystemErr     R     at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2169)
                [8/20/12 12:01:00:288 EDT] 0000006b SystemErr     R     at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:445
                )
                [8/20/12 12:01:00:288 EDT] 0000006b SystemErr     R     at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
                [8/20/12 12:01:00:288 EDT] 0000006b SystemErr     R     at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:388
                )
                [8/20/12 12:01:00:288 EDT] 0000006b SystemErr     R     at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.jav
                a:116)
                [8/20/12 12:01:00:288 EDT] 0000006b SystemErr     R     at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$1.run(CompositionUnitMgrImpl.java:663
                )
                [8/20/12 12:01:00:288 EDT] 0000006b SystemErr     R     at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5339)
                [8/20/12 12:01:00:288 EDT] 0000006b SystemErr     R     at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5555)
                [8/20/12 12:01:00:288 EDT] 0000006b SystemErr     R     at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
                [8/20/12 12:01:00:288 EDT] 0000006b SystemErr     R     at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitM
                grImpl.java:677)
                [8/20/12 12:01:00:288 EDT] 0000006b SystemErr     R     at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitM
                grImpl.java:621)
                [8/20/12 12:01:00:288 EDT] 0000006b SystemErr     R     at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:
                1256)
                [8/20/12 12:01:00:288 EDT] 0000006b SystemErr     R     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                [8/20/12 12:01:00:289 EDT] 0000006b SystemErr     R     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
                [8/20/12 12:01:00:289 EDT] 0000006b SystemErr     R     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
                [8/20/12 12:01:00:289 EDT] 0000006b SystemErr     R     at java.lang.reflect.Method.invoke(Method.java:613)
                [8/20/12 12:01:00:289 EDT] 0000006b SystemErr     R     at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:67)
                [8/20/12 12:01:00:289 EDT] 0000006b SystemErr     R     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                [8/20/12 12:01:00:289 EDT] 0000006b SystemErr     R     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
                [8/20/12 12:01:00:289 EDT] 0000006b SystemErr     R     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
                [8/20/12 12:01:00:289 EDT] 0000006b SystemErr     R     at java.lang.reflect.Method.invoke(Method.java:613)
                [8/20/12 12:01:00:289 EDT] 0000006b SystemErr     R     at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
                [8/20/12 12:01:00:289 EDT] 0000006b SystemErr     R     at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1196)
                [8/20/12 12:01:00:289 EDT] 0000006b SystemErr     R     at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:1060)
                [8/20/12 12:01:00:289 EDT] 0000006b SystemErr     R     at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerIntercepto
                r.java:831)
                [8/20/12 12:01:00:289 EDT] 0000006b SystemErr     R     at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:803)
                [8/20/12 12:01:00:289 EDT] 0000006b SystemErr     R     at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1335)
                [8/20/12 12:01:00:289 EDT] 0000006b SystemErr     R     at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
                [8/20/12 12:01:00:289 EDT] 0000006b SystemErr     R     at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1228)
                [8/20/12 12:01:00:289 EDT] 0000006b SystemErr     R     at com.ibm.ws.management.application.AppManagementImpl._startApplication(AppManagementImpl.j
                ava:1482)
                [8/20/12 12:01:00:289 EDT] 0000006b SystemErr     R     at com.ibm.ws.management.application.AppManagementImpl.startApplication(AppManagementImpl.ja
                va:1371)
                [8/20/12 12:01:00:289 EDT] 0000006b SystemErr     R     at com.ibm.ws.management.application.AppManagementImpl.startApplication(AppManagementImpl.ja
                va:1320)
                [8/20/12 12:01:00:289 EDT] 0000006b SystemErr     R     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                [8/20/12 12:01:00:290 EDT] 0000006b SystemErr     R     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
                [8/20/12 12:01:00:290 EDT] 0000006b SystemErr     R     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
                [8/20/12 12:01:00:290 EDT] 0000006b SystemErr     R     at java.lang.reflect.Method.invoke(Method.java:613)
                [8/20/12 12:01:00:290 EDT] 0000006b SystemErr     R     at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:67)
                [8/20/12 12:01:00:290 EDT] 0000006b SystemErr     R     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                [8/20/12 12:01:00:290 EDT] 0000006b SystemErr     R     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
                [8/20/12 12:01:00:290 EDT] 0000006b SystemErr     R     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
                [8/20/12 12:01:00:290 EDT] 0000006b SystemErr     R     at java.lang.reflect.Method.invoke(Method.java:613)
                [8/20/12 12:01:00:290 EDT] 0000006b SystemErr     R     at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
                [8/20/12 12:01:00:290 EDT] 0000006b SystemErr     R     at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1196)
                [8/20/12 12:01:00:290 EDT] 0000006b SystemErr     R     at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:1060)
                [8/20/12 12:01:00:290 EDT] 0000006b SystemErr     R     at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerIntercepto
                r.java:831)
                [8/20/12 12:01:00:290 EDT] 0000006b SystemErr     R     at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:803)
                [8/20/12 12:01:00:290 EDT] 0000006b SystemErr     R     at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1335)
                [8/20/12 12:01:00:290 EDT] 0000006b SystemErr     R     at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
                [8/20/12 12:01:00:290 EDT] 0000006b SystemErr     R     at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1228)
                [8/20/12 12:01:00:290 EDT] 0000006b SystemErr     R     at com.ibm.ws.management.remote.AdminServiceForwarder.invoke(AdminServiceForwarder.java:346)
                [8/20/12 12:01:00:290 EDT] 0000006b SystemErr     R     at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1458)
                [8/20/12 12:01:00:291 EDT] 0000006b SystemErr     R     at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:100)
                [8/20/12 12:01:00:291 EDT] 0000006b SystemErr     R     at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.j
                ava:1303)
                [8/20/12 12:01:00:291 EDT] 0000006b SystemErr     R     at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.jav
                a:1391)
                [8/20/12 12:01:00:291 EDT] 0000006b SystemErr     R     at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:823)
                [8/20/12 12:01:00:291 EDT] 0000006b SystemErr     R     at javax.management.remote.rmi._RMIConnectionImpl_Tie.invoke(Unknown Source)
                [8/20/12 12:01:00:291 EDT] 0000006b SystemErr     R     at javax.management.remote.rmi._RMIConnectionImpl_Tie._invoke(Unknown Source)
                [8/20/12 12:01:00:291 EDT] 0000006b SystemErr     R     at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:669)
                [8/20/12 12:01:00:291 EDT] 0000006b SystemErr     R     at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:523)
                [8/20/12 12:01:00:291 EDT] 0000006b SystemErr     R     at com.ibm.rmi.iiop.ORB.process(ORB.java:523)
                [8/20/12 12:01:00:291 EDT] 0000006b SystemErr     R     at com.ibm.CORBA.iiop.ORB.process(ORB.java:1575)
                [8/20/12 12:01:00:291 EDT] 0000006b SystemErr     R     at com.ibm.rmi.iiop.Connection.doRequestWork(Connection.java:2992)
                [8/20/12 12:01:00:291 EDT] 0000006b SystemErr     R     at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2875)
                [8/20/12 12:01:00:291 EDT] 0000006b SystemErr     R     at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:64)
                [8/20/12 12:01:00:291 EDT] 0000006b SystemErr     R     at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)
                [8/20/12 12:01:00:291 EDT] 0000006b SystemErr     R     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1783)
                [8/20/12 12:01:00:291 EDT] 0000006b SystemErr     R Caused by: javax.naming.ConfigurationException: NamingManager.getURLContext cannot find the f
                actory for this scheme: java
                [8/20/12 12:01:00:291 EDT] 0000006b SystemErr     R     at com.ibm.ws.naming.util.Helpers.checkForUrlContext(Helpers.java:1631)
                [8/20/12 12:01:00:291 EDT] 0000006b SystemErr     R     at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:160)
                [8/20/12 12:01:00:292 EDT] 0000006b SystemErr     R     at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179)
                [8/20/12 12:01:00:292 EDT] 0000006b SystemErr     R     at org.apache.aries.jndi.DelegateContext.lookup(DelegateContext.java:161)
                [8/20/12 12:01:00:292 EDT] 0000006b SystemErr     R     at javax.naming.InitialContext.lookup(InitialContext.java:422)
                [8/20/12 12:01:00:292 EDT] 0000006b SystemErr     R     at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:155)
                [8/20/12 12:01:00:292 EDT] 0000006b SystemErr     R     at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:88)
                [8/20/12 12:01:00:292 EDT] 0000006b SystemErr     R     at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:153)
                [8/20/12 12:01:00:292 EDT] 0000006b SystemErr     R     at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178)
                [8/20/12 12:01:00:292 EDT] 0000006b SystemErr     R     at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:95)
                [8/20/12 12:01:00:292 EDT] 0000006b SystemErr     R     at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105)
                [8/20/12 12:01:00:292 EDT] 0000006b SystemErr     R     at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.j
                ava:200)
                [8/20/12 12:01:00:292 EDT] 0000006b SystemErr     R     at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.j
                ava:186)
                [8/20/12 12:01:00:292 EDT] 0000006b SystemErr     R     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMe
                thods(AbstractAutowireCapableBeanFactory.java:1369)
                [8/20/12 12:01:00:292 EDT] 0000006b SystemErr     R     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBe
                an(AbstractAutowireCapableBeanFactory.java:1335)
                [8/20/12 12:01:00:292 EDT] 0000006b SystemErr     R     ... 96 more
                

                我在使用 java 1.6 时没有收到此错误

                I don't get this error when I use java 1.6

                这是我用于资源绑定的 web.xml 片段

                Here is the web.xml snippet I used for resource binding

                  <resource-ref id="xxx-data-source">
                            <description>XXX Datasource</description>
                            <res-ref-name>jdbc/xxxDatasource</res-ref-name>
                            <res-type>javax.sql.DataSource</res-type>
                            <res-auth>Container</res-auth>
                            <res-sharing-scope>Shareable</res-sharing-scope>
                        </resource-ref>
                

                当我从我的数据源名称中删除 java:comp/env 前缀时,我能够绕过此错误

                I am able to bypass this error when I remove the java: comp/env prefix from my datasource name

                例如:我正在使用

                jdbc.jdr.datasource=jdbc/XxxDatasource
                

                代替

                jdbc.jdr.datasource=java:comp/env/jdbc/XxxDatasource
                

                但我无法从所有地方(在某些罐子中)删除它.

                But I cannot remove this from all the places(in some jars).

                以前有人遇到过这个问题吗?

                did anyone face this issue before?

                谢谢

                推荐答案

                即使答案来晚了也希望对大家有所帮助.

                Even if the answer comes late I hope that it helps someonoe.

                我也遇到了问题

                javax.naming.ConfigurationException: NamingManager.getURLContext cannot find the factory for this scheme: java
                

                在我的例子中,它的出现是因为我在 web.xml 和 ibm-web-bnd.xmi 描述符中使用了 3.0 版.

                and in my case it arised because I used version 3.0 in my web.xml and an ibm-web-bnd.xmi descriptor.

                当我使用 ibm-web-bnd.xml 描述符时,它起作用了.

                When I used an ibm-web-bnd.xml descriptor instead it worked.

                所以对我来说似乎你应该使用

                So for me it seems that you should use

                • 对于网络应用版本 <= 2.4 ibm-bnd-web.xmi 描述符
                • 对于网络应用版本 >= 2.5 一个 ibm-bnd-web.xml 描述符
                • for web-app version <= 2.4 a ibm-bnd-web.xmi descriptor
                • for web-app version >= 2.5 a ibm-bnd-web.xml descriptor

                我还写了一篇关于我解决这个问题的经验的博客

                I also wrote a blog about my experience with this problem

                https://www.link-intersystems.com/blog/2014/06/15/how-to-fix-ibm-websphere-jndi-exception-cannot-find-the-factory-for-this-scheme-java/

                这篇关于迁移到 WAS 8.5 和 java 1.7 后的 javax.naming.ConfigurationException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Compiling C++ for the JVM(为 JVM 编译 C++)
                Compile to java bytecode (without using Java)(编译成java字节码(不使用Java))
                How to drive C#, C++ or Java compiler to compute 1+2+3+...+1000 at compile time?(如何在编译时驱动 C#、C++ 或 Java 编译器计算 1+2+3+...+1000?)
                Java ClassLoader: load same class twice(Java ClassLoader:两次加载相同的类)
                How to debug .class files in ECLIPSE?(如何在 ECLIPSE 中调试 .class 文件?)
                Java quot;The blank final field may not have been initializedquot; Anonymous Interface vs Lambda Expression(Java“可能尚未初始化空白的最终字段匿名接口与 Lambda 表达式)
                <tfoot id='0fFJY'></tfoot>
                  <tbody id='0fFJY'></tbody>
                <i id='0fFJY'><tr id='0fFJY'><dt id='0fFJY'><q id='0fFJY'><span id='0fFJY'><b id='0fFJY'><form id='0fFJY'><ins id='0fFJY'></ins><ul id='0fFJY'></ul><sub id='0fFJY'></sub></form><legend id='0fFJY'></legend><bdo id='0fFJY'><pre id='0fFJY'><center id='0fFJY'></center></pre></bdo></b><th id='0fFJY'></th></span></q></dt></tr></i><div id='0fFJY'><tfoot id='0fFJY'></tfoot><dl id='0fFJY'><fieldset id='0fFJY'></fieldset></dl></div>

                    • <bdo id='0fFJY'></bdo><ul id='0fFJY'></ul>

                      • <legend id='0fFJY'><style id='0fFJY'><dir id='0fFJY'><q id='0fFJY'></q></dir></style></legend>

                        • <small id='0fFJY'></small><noframes id='0fFJY'>