I have been pulling my hair out trying to get oracle and orion to talk to
each other.  I am sure it is a simple error, but I can't seem to find it.
Here is my problem:

I have installed orion 1.3.8 on a Windows 2000 server with jdk1.2.2,
j2ee1.2.1, jre1.2.2 and oracle8idrivers12_01.zip.  

I copied the tools.jar from the jdk into the c:\orion dir.

I have taken the time to set the following ENV variables based off some
earlier messages:

J2EE_CLASSPATH=c:\orion\lib\oracle8idrivers12_01.zip
J2EE_HOME=c:\j2ee
JAVA_HOME=c:\jdk
PATH=(Original path);c:\jdk

I tried exploding the oracle drivers in the orion/lib dir as well as the
jre/lib/ext dir.

I tried adding the oracle zip file to the library tag in the application.xml
like so:

<library path="../lib/oracle8idrivers12_01.zip;../lib" />

I setup the data-source file like so:

        <data-source
                class="com.evermind.sql.ConnectionDataSource"
                name="Oracle VND Driver"
                location="jdbc/vndCoreDS"
                pooled-location="jdbc/vndPooledDS"
                xa-location="jdbc/xa/vndXADS"
                ejb-location="jdbc/vndDS"
                connection-driver="oracle.jdbc.driver.OracleDriver"
                username="login"
                password="pass"
                schema="./database-schemas/oracle.xml"
                url="jdbc:oracle:thin:@machine:1521:sid"
                inactivity-timeout="120"
        />

I built a simple class that looks like this to run from a remote machine:

import java.sql.*;
import javax.ejb.*;
import javax.sql.DataSource;
import javax.naming.*;
import com.micronpc.db.*;

public class TestConn
{
  Context jndiContext;

  public TestConn()
  {
    try
    {
      jndiContext = new InitialContext();
      DataSource ds = (DataSource)jndiContext.lookup("jdbc/vndPooledDS");
      Connection conn = ds.getConnection();
      Statement s = conn.createStatement();
      String sql = "SELECT * from adv_sub_family_type";
      ResultSet rs = s.executeQuery(sql);
      while(rs != null && rs.next())
      {
        System.out.println("Record:" + rs.getString(1));
      }
    }
    catch(Exception e)
    {
      System.out.println("Got this exception:" + e.getMessage());
      e.printStackTrace();
    }
  }

  public static void main(String[] args)
  {
    TestConn testConn1 = new TestConn();
  }
}

My application-client.xml in the META-INF looks like this(although I am not
trying to use any of these objects yet.):

<?xml version="1.0"?>
<!DOCTYPE application-client PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE
Application Client 1.2//EN"
"http://java.sun.com/j2ee/dtds/application-client_1_2.dtd">
<application-client>
        <ejb-ref>
                <ejb-ref-name>QuoteEntity</ejb-ref-name>
                <ejb-ref-type>Entity</ejb-ref-type>
                <home>com.micronpc.api.configurator.QuoteEntityHome</home>
        
<remote>com.micronpc.api.configurator.QuoteEntityRemote</remote>
        </ejb-ref>
        <ejb-ref>
                <ejb-ref-name>ModelQuoteEntity</ejb-ref-name>
                <ejb-ref-type>Entity</ejb-ref-type>
        
<home>com.micronpc.api.configurator.ModelQuoteEntityHome</home>
        
<remote>com.micronpc.api.configurator.ModelQuoteEntityRemote</remote>
        </ejb-ref>
        <ejb-ref>
                <ejb-ref-name>ProfileEntity</ejb-ref-name>
                <ejb-ref-type>Entity</ejb-ref-type>
                <home>com.micronpc.api.configurator.ProfileEntityHome</home>
        
<remote>com.micronpc.api.configurator.ProfileEntityRemote</remote>
        </ejb-ref>
</application-client>

my jndi.properties looks like this:

java.naming.factory.initial=com.evermind.server.ApplicationClientInitialCont
extFactory
java.naming.provider.url=ormi://ejbtestbox/micron
java.naming.security.principal=admin
java.naming.security.credentials=123

my principales file looke like this:

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

<principals>
        <groups>
                <group name="administrators">
                        <description>administrators</description>
                        <permission name="administration" />
                        <permission
name="com.evermind.server.AdministrationPermission" />
                </group>
                <group name="guests">
                        <description>guests</description>
                </group>
                <group name="users">
                        <description>users</description>
                        <permission name="rmi:login" />
                        <permission
name="com.evermind.server.rmi.RMIPermission" />
                </group>
        </groups>
        <users>
                <user username="admin" password="123">
                        <description>The default administrator</description>
                        <group-membership group="administrators" />
                        <group-membership group="guests" />
                        <group-membership group="users" />
                </user>
                <user username="user" password="456">
                        <description>The default user</description>
                        <group-membership group="guests" />
                        <group-membership group="users" />
                </user>
                <user username="anonymous" password="">
                        <description>The default guest/anonyomous
user</description>
                        <group-membership group="guests" />
                </user>
        </users>
</principals>

if I try to make a connection with a standalone app on the machine it works
fine.  If I try to go through orion I get the following errors.

if I try it as vndPooledDS or vndCoreDS I get the following error:

Got this exception:No suitable driver java.sql.SQLException: No suitable
driver  at java.sql.DriverManager.getConnection(DriverManager.java:477)
at java.sql.DriverManager.getConnection(DriverManager.java:137)         at
com.evermind.sql.DriverManagerDataSource.getConnection(JAX)     at
com.evermind.sql.DriverManagerConnectionPoolDataSource.getPooledConnection(J
AX)     at com.evermind.sql.OrionPooledDataSource.eh(JAX)       at
com.evermind.sql.OrionPooledDataSource.d3(JAX, Compiled Code)   at
com.evermind.sql.OrionPooledDataSource.getConnection(JAX, Compiled Code)
at TestConn.<init>(TestConn.java, Compiled Code)        at
TestConn.main(TestConn.java:44) 

if I try it as vndDS I get the following error:

Got this exception:null java.lang.NullPointerException  at
com.evermind.sql.OrionPooledDataSource.d2(JAX, Compiled Code)   at
com.evermind.sql.OrionPooledDataSource.d3(JAX, Compiled Code)   at
com.evermind.sql.ai.ek(JAX)     at com.evermind.sql.ai.em(JAX)  at
com.evermind.sql.an.createStatement(JAX)        at
TestConn.<init>(TestConn.java, Compiled Code)   at
TestConn.main(TestConn.java:44) 

These exceptions were thrown running the client app from a remote machine.
I also tried the same app on the same machine with a seperate VM.  either
way they boh fail the same. I EJBs I have written that worked well in JRUN
now fail when they try to get a connection.

I realize it must be something simple but I have run out of ideas.  Any
clues?


Thanx

Greg



Reply via email to