I am not getting any errors at startup of Orion. I have tried all suggestions, but am still unable to connect.
Here are some of the errors that I get. 
//////////////////////////////////////////////////////////////////////////
Using DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/DefaultDS");
instead of DataSource ds = (DataSource) ctx.lookup("jdbc/DefaultDS"); (or jdbc/DefaultCoreDS)
---------------
javax.naming.NameNotFoundException: jdbc/DefaultDS not found in defaultWebApp

at com.evermind.util.t.lookup(JAX)
at com.evermind.server.hm.f4(JAX)
at com.evermind.server.hm.lookup(JAX)
at javax.naming.InitialContext.lookup(InitialContext.java:354)
at /testpages/ping/newdb.jsp._jspService(/testpages/ping/newdb.jsp.java:31) (JSP page line 6)
at com.orionserver.http.OrionHttpJspPage.service(JAX)
at com.evermind.server.http.HttpApplication.xj(JAX)
at com.evermind.server.http.JSPServlet.service(JAX)
at com.evermind.server.http.d3.sw(JAX, Compiled Code)
at com.evermind.server.http.d3.su(JAX)
at com.evermind.server.http.ef.s1(JAX, Compiled Code)
at com.evermind.server.http.ef.do(JAX, Compiled Code)
at com.evermind.util.f.run(JAX, Compiled Code)
 
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
I get this next error if i configure data-sources this way:
I believe this error has to do with the URL statement (what is the last portion of the URL statement supposed to be? is it a table or something else?)
---

<data-source

class="com.evermind.sql.DriverManagerDataSource"

name="Oracle"

schema="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"

inactivity-timeout="30"

/>

-----

 
java.lang.StringIndexOutOfBoundsException: String index out of range: -1

at java.lang.String.substring(String.java, Compiled Code)
at oracle.sqlnet.SQLnet.Connect(SQLnet.java, Compiled Code)
at oracle.jdbc.ttc7.TTC7Protocol.connect(TTC7Protocol.java:1021)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:186)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:127)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:170)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:148)
at com.evermind.sql.DriverManagerDataSource.getConnection(JAX)
at com.evermind.sql.DriverManagerConnectionPoolDataSource.getPooledConnection(JAX)
at com.evermind.sql.OrionPooledDataSource.dz(JAX)
at com.evermind.sql.ai.dz(JAX)
at com.evermind.sql.OrionPooledDataSource.getConnection(JAX, Compiled Code)
at com.evermind.sql.DriverManagerXADataSource.eu(JAX)
at com.evermind.sql.al.ep(JAX)
at com.evermind.sql.ap.createStatement(JAX)
at com.evermind.sql.ap.createStatement(JAX)
at /testpages/ping/newdb.jsp._jspService(/testpages/ping/newdb.jsp.java:40) (JSP page line 15)
at com.orionserver.http.OrionHttpJspPage.service(JAX)
at com.evermind.server.http.HttpApplication.xj(JAX)
at com.evermind.server.http.JSPServlet.service(JAX)
at com.evermind.server.http.d3.sw(JAX, Compiled Code)
at com.evermind.server.http.d3.su(JAX)
at com.evermind.server.http.ef.s1(JAX, Compiled Code)
at com.evermind.server.http.ef.do(JAX, Compiled Code)
at com.evermind.util.f.run(JAX, Compiled Code)
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
If i give a table as the last portion of the URL, i still do not get a connoection, but at least the JSP page will load.
 
here is data-sources.xml
 
//////////////////////////////////////////////////

<data-source

class="com.evermind.sql.DriverManagerDataSource"

name="Oracle"

schema="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:account_type"

inactivity-timeout="30"

/>

//////////////////////////////////////
 
and the JSP page:
 
<%@ page import="java.sql.*, javax.sql.DataSource, javax.naming.InitialContext" %>
 
<%
      InitialContext ctx = new InitialContext();
      DataSource ds = (DataSource) ctx.lookup("jdbc/DefaultCoreDS");
      Connection con = null;
   Statement stmt = null;
  
  
   try
   {
     con = ds.getConnection();  
   out.println("here");
        stmt = con.createStatement();
     out.println("statement");
   ResultSet rs = stmt.executeQuery("SELECT * FROM dual");
   out.println("query");
  
    }
   catch(SQLException e)
   {
  out.println("BOOM!!!!!!!");
  e.printStackTrace();
   }
   finally
   {
    if(con!=null)
     con.close();
   }
%>
 
with this setup, e.printStackTrace() prints a sql exception to the command window
////////////////
 
java.sql.SQLException: Refused:ROR=(CODE=12505)(EMFI=4))))
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:134)
.............
 
//////////////
 
I more interesting thing, in my previous email i said that the con.createStatement() command was blowing up. If i use the "ejb-location", this is true.
If i use the "location" (ie jdbc/DefaultCoreDS), than the getConnection() command blows up instead.
 
 
Thanks all
 
Paul Wilcox
[EMAIL PROTECTED]

Reply via email to