简体   繁体   English

服务器重启后,Weblogic 12c 数据源从 jndi 树中消失

[英]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.当我每次重新启动 Macmini 服务器时,这对我来说都是非常恼人的问题。

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. EJB 3.1 Beans(包括session bean、singleton bean),是没有web层的纯EJB应用,提供业务逻辑服务于多个web应用。

I follow Oracle JDBC datasource process to build the jdbc datasource from administrator console.我按照 Oracle JDBC 数据源流程从管理员控制台构建 jdbc 数据源。 The config.xml in mydomain/config folder looks like: mydomain/config 文件夹中的 config.xml 如下所示:

<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:在 mydomain/config/jdbc 中有此数据源的链接配置文件显示为:

<?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.似乎这里没有任何问题,但是每次我重新启动 Macmini 时。 suppose my weblogic will auto restart, but I found my EJB application always failed restart in my weblogic context.假设我的 weblogic 将自动重启,但我发现我的 EJB 应用程序在我的 weblogic 上下文中总是无法重启。

When I tried to restart my EJB application, I get datasource not found in jndi exception and my EJB application fail to restart.当我尝试重新启动 EJB 应用程序时,在 jndi 异常中找不到数据源并且我的 EJB 应用程序无法重新启动。

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.当我从我的 weblogic 上下文扩展我的 JNDI 树时,我总是发现我配置的 jdbc 数据源总是消失,我已经删除它并从头开始重建它。 And then my EJB application will be start again.然后我的 EJB 应用程序将再次启动。

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).我在12.2.1.4.0中的 WebLogic 12.2.1.4.0遇到了同样的问题:数据源在 WebLogic 启动时消失了(停止后必需的部分在config.xml )。 Enabling configuration backup solved this trouble.启用配置备份解决了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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