简体   繁体   中英

Weblogic 12c datasource disappear from the jndi tree after server reboot

This is very annoy issue for me when I every time reboot my Macmini server.

Environments:

Macmini server runs OSX 10.10.3
JDK 1.8.0_45
Weblogic 12c (fusion middleware version)

Application:

EJB 3.1 Beans (include session bean, singleton bean), it is pure EJB application without web-layer to provide business logic to serve multiple web applications.

I follow Oracle JDBC datasource process to build the jdbc datasource from administrator console. The config.xml in mydomain/config folder looks like:

<jdbc-system-resource>
    <name>JDBC Data Source-ozssc-100</name>
    <target>AdminServer</target>
    <descriptor-file-name>jdbc/JDBC_Data_Source-ozssc-100-8091-jdbc.xml</descriptor-file-name>
</jdbc-system-resource>

there is linked configure file for this datasource in mydomain/config/jdbc shows as:

<?xml version='1.0' encoding='UTF-8'?>
<jdbc-data-source xmlns="http://xmlns.oracle.com/weblogic/jdbc-data-source"
    xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/jdbc-data-source 
    http://xmlns.oracle.com/weblogic/jdbc-data-source/1.0/jdbc-data-source.xsd">
    <name>JDBC Data Source-ozssc-100</name>
    <jdbc-driver-params>
        <url>jdbc:postgresql://10.0.1.100:5433/ozssc</url>
        <driver-name>org.postgresql.Driver</driver-name>
        <properties>
            <property>
                <name>user</name>
                <value>tomcat</value>
            </property>
        </properties>
        <password-encrypted>{AES}xluimFDWO5jKhVeZAeuFt+w10T5uHYZo3CCOll3aHeM=</password-encrypted>
    </jdbc-driver-params>
    <jdbc-connection-pool-params>
        <test-table-name>SQL SELECT 1</test-table-name>
    </jdbc-connection-pool-params>
    <jdbc-data-source-params>
        <jndi-name>jdbc/postgres_ozssc_100</jndi-name>
        <global-transactions-protocol>OnePhaseCommit</global-transactions-protocol>
    </jdbc-data-source-params>
</jdbc-data-source>

Seems there is nothing wrong here, but every time I reboot my Macmini. suppose my weblogic will auto restart, but I found my EJB application always failed restart in my weblogic context.

When I tried to restart my EJB application, I get datasource not found in jndi exception and my EJB application fail to restart.

When I extend my JNDI tree from my weblogic context, I always found my configured jdbc datasource always disappear, I have delete it and rebuild it from scratch. And then my EJB application will be start again.

Any idea with this situation??

Any suggestion and advice are welcome!!

Appreciated! Good weekend!

I've got same issue with WebLogic 12.2.1.4.0 in docker: datasource dissappeared on WebLogic start (required part was inside of config.xml after stopping). Enabling configuration backup solved this trouble.

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