You're using thin drivers... these drivers never use the Oracle OCI, and
never ever read tnsnames.ora


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Sábado, 18 de Noviembre de 2000 13:33
To: Orion-Interest
Subject: HELP. Strange Database Connecton error.


OK list i need help.  

This is kind of subtle so please read the whole message before responding.
This
certainly points to something I do not understand about Orion data-source
configuration.

I am getting an error from Oracle upon table creation.  Here is the text of
the
error back from Orion:

Starting Orion
Auto-deploying addressbook (New server version detected)...
Auto-deploying addressbook-ejb.jar (No previous deployment found)... SQL
error:
Connection
refused(DESCRIPTION=(TMP=)(VSNNUM=135286784)(ERR=12505)(ERROR_STACK=(ERROR=(
CODE
=12505)(EMFI=4))))
Warning: Error creating table: Connection
refused(DESCRIPTION=(TMP=)(VSNNUM=135286784)(ERR=12505)(ERROR_STACK=(ERROR=(
CODE
=12505)(EMFI=4))))
done.
Orion/1.3.8 initialized

Looking up ERR=12505, Oracle tells me this is a problem with SID resolution.

tnsnames.ora looks fine, indeed the entry was created by Net8 Easy Config.
In
addition the following JDBC code:

                                                 
public class JT {
    public static void main(String[] args){
        String url = "jdbc:oracle:thin:@zaragoza:1521:oradbb";
        try {
            Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();;
            Connection conn = DriverManager.getConnection(url, "jdev",
"deal");
            Statement stmt = conn.createStatement();
            stmt.execute("create table duff (first varchar(6), 
                                    next varchar(5))"); 
        }
        catch (SQLException ex) {
            System.out.println("SQL Exception.");
            ex.printStackTrace();
        }
        catch (Exception ex) {
            System.out.println("Just a plain bummer.");
            ex.printStackTrace();
        }
    }
}

creates a table just fine using the same SID and tnsnames.ora entry.

To make this all more confusing, I am trying to connect to Oracle on a dual
boot Linux/NT system. The Linux SID is oradba.  The NT SID is oradbb. 
Naturally I am only trying to connect to the NT Oracle when NT is booted and
visa versa.  The Linux side works fine, it is the NT entry that gives the
error.  Both Oracle installations are 8.1.5.  The only difference is that on
the
NT side the user is given DBA privledges and is creating tables in the
system
rollback segment whereas on the Linux side there is a separate "development"
rollback segment.  I have been posting this to the Oracle list (with no
answers forthcoming) until I wrote the JDBC code snippet I post above.  The
fact that this code creates tables where Orion does not tends to make me
think
it is a Orion config issue.  Here are the entries from my Orion config
files.  I
understand that this is not the optimum place for the default-data-source
attribute tag but that is a separate thread.

ORION_HOME/config/server.xml (the default-data-source tag is toggled between
the Linux SID and the NT SID:


<?xml version="1.0"?>
<!DOCTYPE application-server PUBLIC "Orion Application Server Config"
"http://www.orionserver.com/dtds/application-server.dtd">

<application-server
        application-directory="../applications"
        deployment-directory="../application-deployments"
>
        <rmi-config path="./rmi.xml" />
        <!-- JMS-server config link, uncomment to activate the JMS service
-->
        <!-- <jms-config path="./jms.xml" /> -->
        <principals path="./principals.xml" />
        <log>
                <file path="../log/server.log" />
        </log>
        
        <global-application name="default" path="application.xml" />

        <global-web-app-config path="global-web-application.xml" />
        <web-site path="./default-web-site.xml" />

        <!-- Compiler, activate this to specify an alternative compiler such
                as jikes for EJB/JSP compiling. -->
        <!-- <compiler executable="jikes"
classpath="/myjdkdir/jre/lib/rt.jar"
        /> -->
        
        <application name="orion-primer" 
        path="/home/jna/Java/EJB_learn/orion-primer/rel/orion-primer.ear" />
                             
        <!-- CMP Applications on NT -->
        <application name="addressbook"
        path="/home/jna/Java/EJB_learn/addressbook/build/addressbook.ear"
                    default-data-source="jdbc/AndanteOracleNT" />


</application-server>

ORION_HOME/config/data-sources.xml:


<?xml version="1.0"?>
<!DOCTYPE data-sources PUBLIC "Orion data-sources"
"http://www.orionserver.com/dtds/data-sources.dtd">

<data-sources>

        <!--
                An example/default DataSource that uses an ordinary
                JDBC-driver (in this case hsql) to create the connections. 
                This tag creates all the needed kinds
                of data-sources, transactional, pooled and EJB-aware
sources.
                The source generally used in application code is the "EJB"
                one - it provides transactional safety and connection
pooling.
        -->
        
        <data-source
                class="com.evermind.sql.DriverManagerDataSource"
                name="AndanteOracleLinux"
                location="jdbc/AndanteOracleLinuxCoreDS"
                xa-location="jdbc/xa/AndanteOracleLinuxXADS"
                ejb-location="jdbc/AndanteOracleLinuxDS"
                connection-driver="oracle.jdbc.driver.OracleDriver"
                username="jdev"
                password="deal"
                url="jdbc:oracle:thin:@zaragoza:1521:oradba"
                inactivity-timeout="30"
        />
        
        <data-source
                class="com.evermind.sql.DriverManagerDataSource"
                name="AndanteOracleNT"
                location="jdbc/AndanteOracleNTCoreDS"
                xa-location="jdbc/xa/AndanteOracleNTXADS"
                ejb-location="jdbc/AndanteOracleNTDS"
                connection-driver="oracle.jdbc.driver.OracleDriver"
                username="jdev"
                password="deal"
                url="jdbc:oracle:thin:@zaragoza:1521:ORADBB"
                inactivity-timeout="30"
        />
 
        <data-source
                class="com.evermind.sql.DriverManagerDataSource"
                name="Hypersonic"
                location="jdbc/HypersonicCoreDS"
                xa-location="jdbc/xa/HypersonicXADS"
                ejb-location="jdbc/HypersonicDS"
                connection-driver="org.hsql.jdbcDriver"
                username="sa"
                password=""
                url="jdbc:HypersonicSQL:./database/defaultdb"
                inactivity-timeout="30"
        />
 
</data-sources>

All comments welcome.  Could someone please help?
Peace
----------------------------------
E-Mail: [EMAIL PROTECTED]
Date: 18-Nov-00
Time: 10:22:19

This message was sent by XFMail
----------------------------------

Reply via email to