简体   繁体   中英

JNDI lookup in weblogic 12c

I have a legacy code with JNDI template which is:

<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
    <property name="environment">
        <props>
            <prop key="java.naming.factory.initial">${java.naming.factory.initial}</prop>
            <prop key="java.naming.provider.url">${java.naming.provider.url}</prop>
        </props>
    </property>
</bean>

and java.naming.factory.initial is weblogic.jndi.WLInitialContextFactory and java.naming.provider.url is t3://localhost:7001 . In weblogic 10.3.6.0 everything work fine, but in weblogic 12.2.1.3.0 I'm getting the following exception:

java.lang.ClassNotFoundException: weblogic.jndi.WLInitialContextFactory

Here is an exert of classpath:

CLASSPATH=C:\PROGRA~1\Java\JDK18~1.0_1\lib\tools.jar;D:\Oracle\MIDDLE~1\ORACLE~1\wlserver\server\lib\weblogic.jar;

WebLogic server 12c brings some change in its classpath. The class weblogic.jndi.WLInitialContextFactory is located under D:\\Oracle\\MIDDLE~1\\ORACLE~1\\wlserver\\server\\lib\\wlthint3client.jar

weblogic.jar is now "manifest only" and should not be used on the client side.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM