Installation and release of weblogic

The company's products have always been tomcat, and now suddenly they have to be changed to weblogic. Fortunately, this is what I have tossed about in the first three years.
Official download media, install server on linux, create domain, everything seems to be going well.
Then I started tossing and deploying the application of the product. As expected, I reported a bunch of inexplicable errors. It took a week to finally solve the most important problems. The main summary is as follows:

1) The path search error of the configuration file is reported. Basically, the root directory of the web application is obtained by the original method. The value obtained under weblogic is missing a "/" at the end.

2) In the original application of tomcat, the jndi message service used is jboss. The parameters configured in jndi.properties reset the parameter variables of weblogic when the application is initialized, causing weblogic to report the class search when publishing the application. unreachable problem.
Caused By: javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager .java:657)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)

InitialContext ctx = new InitialContext();

This method may load jndi.properties into environment variables.

The solution is to modify your own jndi loading method, modify it to read the configuration file by yourself, and initialize it manually.

.......

Write your own method to get the required parameter variable value set env

ctx = new InitialContext(env);

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327042691&siteId=291194637