Where is class weblogic.jndi.WLInitialContextFactory?

后端 未结 10 1016
无人共我
无人共我 2021-02-13 15:33

when trying to execute my jar file I get an exception:

javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.WLInitialContextFactory 
[         


        
相关标签:
10条回答
  • 2021-02-13 16:16

    For WLS 12.2, where WL_HOME is The BEA home directory of your WebLogic installation

    (as defualt WL_HOME is Middleware\Oracle_Home\wlserver)

    %WL_HOME%\server\lib\wlclient.jar
    %WL_HOME%\server\lib\wls-api.jar 
    %WL_HOME%\server\lib\wls-api-part.jar 
    %WL_HOME%\server\lib\wlthint3client.jar 
    

    all these libs contains the: jar: weblogic\jndi\WLInitialContextFactory.class

    see WLS doc.: https://docs.oracle.com/en/middleware/fusion-middleware/weblogic-server/12.2.1.4/wlprg/overview.html#GUID-FC14CC53-DE49-456F-B54C-D73CC6DBF818

    0 讨论(0)
  • 2021-02-13 16:20

    in version 12c it is located in weblogic-classes.jar in your lib directory:

    C:\wls1213\wlserver\server\lib

    0 讨论(0)
  • 2021-02-13 16:25

    it looks you are doing a JNDI lookup outside of WLS.

    You need to use wlfulclient.jar or if your machine has a WLS installation then add to your classpath project: WL_HOME/server/lib/weblogic.jar

    0 讨论(0)
  • 2021-02-13 16:26

    I faced the same issue and it's fixed now :)

    The fix is, to go to WebLogic server and navigate to /Oracle/Middleware/wlserver_10.3/server/lib/ and execute the below command.

    Command: java -jar wljarbuilder.jar -profile wlfullclient5

    The above command creates a jar file with all the jar's inside WebLogic server /lib folder and place it in your client java code build path Eclipse and craetes runnable JAR file and place this wlfullclient5.jar file in server/lib folder as well.

    Hope this helps! Kindly let me know if you have any issues.

    0 讨论(0)
提交回复
热议问题