can you look it up from from a servlet or jsp page (ie with no Context
Properties)?
<%
InitialContext ctx = new InitialContext();
ctx.lookup("java:comp/env/jdbc/Oracle");
%>
-----Original Message-----
From: Minal Thakkar [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 12, 2001 3:24 PM
To: JRun-Talk
Subject: jrun and oracle driver
I am running jrun3.1 on windows 2000. I am getting the following error
whenever I try to access the database.
Exception: [17:07:54] javax.ejb.EJBException, caused by:
[522] javax.naming.NameNotFoundException: java:comp/env/jdbc/Oracle not
found
[523] at
allaire.ejipt._NamingContext.lookup(allaire/ejipt/_NamingContext.java:115)
[524] at
allaire.ejipt._ClientContext.lookup(allaire/ejipt/_ClientContext.java:147)
[525] at javax.naming.InitialContext.lookup(InitialContext.java:350)
[526] at
examples.ejb.beans.session.GenStorage.getDBConnection(GenStorage.java:170)
[527] at
examples.ejb.beans.session.GenStorage.getAllValues(GenStorage.java:49)
[528] at
examples.ejb.beans.session.RMSBean.getAllValues(RMSBean.java:44)
[529] at java.lang.reflect.Method.invoke(Native Method)
[530] at
allaire.ejipt._BeanMethod._invoke(allaire/ejipt/_BeanMethod.java:166)
[531] at
allaire.ejipt._SessionObject._invoke(allaire/ejipt/_SessionObject.java:182)
[532] at
allaire.ejipt._CallableObject.call(allaire/ejipt/_CallableObject.java:101)
[533] at
allaire.ejipt._CallableStub._call(allaire/ejipt/_CallableStub.java:199)
[534] at
examples.ejb.beans.session.RMSObject_Stub.getAllValues(RMSObject_Stub.java:3
86)
[535] at RMS.JSP.getAllCategories(JSP.java:175)
[536] at
jrun__projSearchInfo2ejsp13._jspService(jrun__projSearchInfo2ejsp13.java:60)
[537] at
allaire.jrun.jsp.HttpJSPServlet.service(../jsp/HttpJSPServlet.java:39)
[538] at
allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:228)
[539] at
allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:196)
[540] at
allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1416)
[541] at
allaire.jrun.session.JRunSessionService.service(../session/JRunSessionServic
e.java:1082)
[542] at
allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:1270)
[543] at
allaire.jrun.servlet.JRunRequestDispatcher.forward(../servlet/JRunRequestDis
patcher.java:89)
[544] at
allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1552)
[545] at
allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1542)
[546] at
allaire.jrun.servlet.JvmContext.dispatch(../servlet/JvmContext.java:364)
[547] at
allaire.jrun.http.WebEndpoint.run(../http/WebEndpoint.java:115)
[548] at allaire.jrun.ThreadPool.run(../ThreadPool.java:272)
[549] at allaire.jrun.WorkerThread.run(../WorkerThread.java:75)
[550] java.rmi.RemoteException: System exception/error caught by
container; nested exception is:
[551] javax.ejb.EJBException
[552] javax.ejb.EJBException
[553] at
examples.ejb.beans.session.GenStorage.getDBConnection(GenStorage.java:179)
[554] at
examples.ejb.beans.session.GenStorage.getAllValues(GenStorage.java:49)
[555] at
examples.ejb.beans.session.RMSBean.getAllValues(RMSBean.java:44)
[556] at java.lang.reflect.Method.invoke(Native Method)
[557] at
allaire.ejipt._BeanMethod._invoke(allaire/ejipt/_BeanMethod.java:166)
[558] at
allaire.ejipt._SessionObject._invoke(allaire/ejipt/_SessionObject.java:182)
[559] at
allaire.ejipt._CallableObject.call(allaire/ejipt/_CallableObject.java:101)
[560] at
allaire.ejipt._CallableStub._call(allaire/ejipt/_CallableStub.java:199)
[561] at
examples.ejb.beans.session.RMSObject_Stub.getAllValues(RMSObject_Stub.java:3
86)
[562] at RMS.JSP.getAllCategories(JSP.java:175)
[563] at
jrun__projSearchInfo2ejsp13._jspService(jrun__projSearchInfo2ejsp13.java:60)
[564] at
allaire.jrun.jsp.HttpJSPServlet.service(../jsp/HttpJSPServlet.java:39)
[565] at
allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:228)
[566] at
allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:196)
[567] at
allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1416)
[568] at
allaire.jrun.session.JRunSessionService.service(../session/JRunSessionServic
e.java:1082)
[569] at
allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:1270)
[570] at
allaire.jrun.servlet.JRunRequestDispatcher.forward(../servlet/JRunRequestDis
patcher.java:89)
[571] at
allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1552)
[572] at
allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1542)
[573] at
allaire.jrun.servlet.JvmContext.dispatch(../servlet/JvmContext.java:364)
[574] at
allaire.jrun.http.WebEndpoint.run(../http/WebEndpoint.java:115)
[575] at allaire.jrun.ThreadPool.run(../ThreadPool.java:272)
[576] at allaire.jrun.WorkerThread.run(../WorkerThread.java:75)
but when i start the server it gives the following
06/12 17:06:32 info (JRun) Loading jdbc
[1275] 06/12 17:06:32 info (JRun) (Oracle) Initializing JDBC connection
pool with 0 connections
[1276] 06/12 17:06:32 info (jdbc) Successfully bound
java:comp/env/jdbc/Oracle
[1277] 06/12 17:06:32 info (jdbc) Successfully bound
java:comp/env/jdbc/taglib
[1278] 06/12 17:06:32 info (jdbc) Successfully bound
java:comp/env/jdbc/sample9b
my code is
Properties properties = new Properties();
properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"allaire.ejipt.ContextFactory");
properties.setProperty(Context.PROVIDER_URL, "ejipt://localhost:2323");
ctx = new InitialContext(properties);
DataSource ds = (javax.sql.DataSource)
ctx.lookup("java:comp/env/jdbc/Oracle");
System.out.println("ds " + ds);
return ds.getConnection();
I read in one of the postings that I should have entries in my
deploy.properties. I don't have any jdbc entries in there.
The database connection test using the JMC is successful.
my ejb-jar.xml has the following:
<resource-ref>
<description>A description for ResourceRefName</description>
<res-ref-name>Oracle</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
Can anyone let me know where am i going wrong.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists