Re: configuring jdbc with oracle...

2001-02-26 Thread Alexey_Ryndin/Storactive


Paul,
First of all, it may have sense to add schema attribute to your
data-sources.xml file.
At the second hand, try to use
DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/DefaultDS");
instead of
DataSource ds = (DataSource) ctx.lookup("jdbc/DefaultDS");
It may help.
Alexey Ryndin.





re: configuring jdbc with oracle...

2001-02-26 Thread Alexey_Ryndin/Storactive


First of all, schema attribute in your data source file must look like
'schema="database-schemas/oracle.xml"'.
  The second issue I can guess that you must say somewhere in your
  application that you use this particular data-source. I use EJB, but in
  my ejb-jar.xml file I mention resource corresponded to data source to
  use.
  Alexey Ryndin.





Re: configuring jdbc with oracle

2001-02-26 Thread Paul Wilcox




Problem solved!! thank you everyone for your 
help. among other things, there was a problem with the URL.

Thanks again,

Paul Wilcox


Re: re: configuring jdbc with oracle...

2001-02-26 Thread John Hogan

As a sanity check, you may want to make sure you can get the Product 
example running with Oracle first 
(http://www.orionserver.com/docs/ejbexamples/index.html).  There's 
some good by the numbers instructions for editing the xml files ...  
Also, make sure your oracle classes12.zip is in orion\lib dir.  
Here's what a valid datasource def looks like:

data-source
class="com.evermind.sql.DriverManagerDataSource"
name="blahblah"
location="jdbc/OracleCoreDS"
xa-location="jdbc/xa/OracleEJBDS"
ejb-location="jdbc/Oracle"
connection-driver="oracle.jdbc.driver.OracleDriver"
username="blahblah"
password="password"
url="jdbc:oracle:thin:@192.168.100.40:1521:boston"
inactivity-timeout="30"
/


_

Get your free E-mail at http://www.ireland.com




Re: Re: configuring jdbc with oracle...

2001-02-24 Thread John Hogan

are you seeing any errors on Orion startup?

_

Get your free E-mail at http://www.ireland.com




Re: configuring jdbc with oracle...

2001-02-23 Thread Rafael Alvarez

Hello Paul,

A stack trace would be useful. That way it's easier to find the
error.






Re: configuring jdbc with oracle...

2001-02-23 Thread DSmith


It may be that you're using the "ejb-location" name
rather than the "location" name of the data source.
I've used both the standard Orion datasource and
the pooled datasource with Oracle, and it has worked fine.

Good luck,

Doug
--
Doug Smith
http://www.eviciti.com
mailto:[EMAIL PROTECTED]



   
 
"Paul Wilcox"  
 
[EMAIL PROTECTED] To: Orion-Interest   
 
Sent by:  [EMAIL PROTECTED] 
 
owner-orion-interest@orioncc:  
 
server.comSubject: configuring jdbc 
with
  oracle...
 
   
 
02/23/2001 12:49 PM
 
Please respond to  
 
Orion-Interest 
 
   
 
   
 




I am having great problems trying to connect to oracle thru JDBC on orion.
Here is my data-sources file:


//


data-source


class="com.evermind.sql.DriverManagerDataSource"


name="Oracle"


location="jdbc/DefaultCoreDS"


xa-location="jdbc/xa/DefaultXADS"


ejb-location="jdbc/DefaultDS"


connection-driver="oracle.jdbc.driver.OracleDriver"


username="webluser"


password="webluser"


url="jdbc:oracle:thin:@ultra:1521:dual"


inactivity-timeout="30"


/


/


and here is the JSP page I am using to test...





///


%@ page import="java.sql.*, javax.sql.DataSource,
javax.naming.InitialContext" %


%
   InitialContext ctx = new InitialContext();
   DataSource ds = (DataSource) ctx.lookup("jdbc/DefaultDS");
   Connection con = null;
   Statement stmt = null;
   con = ds.getConnection();

   try
   {
 stmt = con.createStatement();
 out.println("statement");
 ResultSet rs = stmt.executeQuery("SELECT * FROM dual");
 out.println("query");
   }
   catch(Exception e)
   {
 out.println("BOOM!!!");
   }
   finally
   {
 con.close();
   }
%





the output from my page is:  BOOM!!!


The line stmt = con.createStatement(); is blowing up, and i cant figure out
why. It seems to make the connection alright, but can see why
createStatement() is expolding?


Any ideas?


Paul Wilcox


[EMAIL PROTECTED]