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 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
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?) ---
java.lang.StringIndexOutOfBoundsException: String index out of range: -1 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
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]
|
- configuring jdbc with oracle... Paul Wilcox
- Re: configuring jdbc with oracle... Rafael Alvarez
- Re: configuring jdbc with oracle... DSmith
- Re: Re: configuring jdbc with oracle... John Hogan
- Re: configuring jdbc with oracle... Alexey_Ryndin/Storactive
- re: configuring jdbc with oracle... Paul Wilcox
- re: configuring jdbc with oracle... Alexey_Ryndin/Storactive
- Re: re: configuring jdbc with oracle... John Hogan
- Fw: configuring jdbc with oracle... Falk Langhammer