试下在hosts这个文件的后添加
127.0.0.1       localhost
192.168.6.242   dbserver//格式 IP  机器名

解决方案 »

  1.   

    真的很奇怪,从来没有碰到过这样的问题,呵呵
    点击apply只是把你的这个jdbc配置的Targets=""指向myserver,即,如果你按了apply,那么在配置文件中,就会出现Targets="myserver",这个其实就是更改xml文件,和weblogic本身没关系的。你也可以不在这里配置,直接找到mydomain下,配置你的config.xml文件,加入一个jdbc标签项就可以了。
    所以不妨你绕过console,直接配置文件,看看情况如何,如果好了,那么就是console的问题,如果有问题,再根据问题来判断哪里不对。
      

  2.   

    楼上的兄弟,我的config.xml内容为:
    <?xml version="1.0" encoding="UTF-8"?>
    <!--If your domain is active, please do not edit the config.xml file. Any changes made to that file while the domain is active will not have any effect on the domain's configuration and are likely to be lost. If your domain is inactive, you may edit this file with an XML editor. If you do so, please refer to the BEA Weblogic Server Configuration Reference  documentation available from http://edocs.bea.com/wls/docs70/config_xml.  In general, we recommend that changes to your configuration file be made through the Administration Console.-->
    <Domain ConfigurationVersion="7.0.0.0" Name="mydomain">
        <Application Deployed="true" Name="DefaultWebApp"
            Path=".\applications" StagedTargets="" TwoPhase="false">
            <WebAppComponent Name="DefaultWebApp" Targets="myserver" URI="DefaultWebApp"/>
        </Application>
        <Application Deployed="true" Name="certificate"
            Path=".\applications" StagedTargets="" TwoPhase="false">
            <WebAppComponent Name="certificate" Targets="myserver" URI="certificate.war"/>
        </Application>
        <ApplicationManager Name="mydomain"/>
        <EmbeddedLDAP
            Credential="{3DES}lHov5be7U33XE8x5nDugp7/Tom/2wheJXSTvLQfi8zI=" Name="mydomain"/>
        <FileRealm Name="wl_default_file_realm"/>
        <JDBCConnectionPool DriverName="oracle.jdbc.driver.OracleDriver"
            Name="MyJDBC Connection Pool"
            Properties="user=system;password=manager;dll=ocijdbc8;protocol=thin"
            TestTableName="tab" URL="jdbc:oracle:thin:@127.0.0.1:1521:orcl"/>
        <JDBCTxDataSource JNDIName="JNDI" Name="MyJDBC Tx Data Source" PoolName="MYJDBC Connection Pool"/>
        <JTA Name="mydomain"/>
        <Log FileName=".\wl-domain.log" Name="mydomain"/>
        <PasswordPolicy Name="wl_default_password_policy"/>
        <Realm FileRealm="wl_default_file_realm" Name="wl_default_realm"/>
        <SNMPAgent Name="mydomain"/>
        <Security GuestDisabled="false" Name="mydomain"
            PasswordPolicy="wl_default_password_policy"
            Realm="wl_default_realm" RealmSetup="true"/>
        <SecurityConfiguration
            Credential="{3DES}7kfX1vCOwQ8JKRZUtsx6VyLFCIN2kTi1IJLSecFThfP5EWJAsfwSMPhVrBQ3+d22CKjN06UDs2MOzpLI/ocl8SusYZrrdOdo" Name="mydomain"/>
        <Server ListenAddress="127.0.0.1" ListenPort="7001" Name="myserver"
            NativeIOEnabled="true" ServerVersion="7.0.0.0">
            <COM Name="myserver"/>
            <ExecuteQueue Name="default" ThreadCount="15"/>
            <IIOP Name="myserver"/>
            <JTAMigratableTarget Cluster="" Name="myserver" UserPreferredServer="myserver"/>
            <KernelDebug Name="myserver"/>
            <Log FileName=".\myserver\myserver.log" Name="myserver"/>
            <SSL Enabled="true" HostnameVerificationIgnored="true"
                ListenPort="7002" Name="myserver"
                ServerCertificateChainFileName="ca.pem"
                ServerCertificateFileName="democert.pem" ServerKeyFileName="demokey.pem"/>
            <ServerDebug Name="myserver"/>
            <ServerStart Name="myserver"/>
            <WebServer DefaultWebApp="DefaultWebApp"
                LogFileName=".\myserver\access.log" LoggingEnabled="true" Name="myserver"/>
        </Server>
    </Domain>
    看有问题不?
    请指点!
      

  3.   

    数据库连接不上!
    请检查以下url和driver设置是否正确?
    URL : jdbc:oracle:thin:@机器名(IP):1521:sid