EasyCFM.COM ColdFusion Forums / ColdFusion Server / javax.naming.NoInitialContextException

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: javax.naming.NoInitialContextException

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

00Travis
04-29-2005 @ 10:37 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 7
Joined: Apr 2005

coldfusion 6 is installed and running on my windows 2000 pro box, however it can not find the datasource. i know how to setup a datasource and have retraced my steps several times. the error that i get along with "could not find your datasource is found at macromedia.com (http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_17625) and do a search for "javax.naming.NoInitialContextException" that is the exact error and it gives the solution but i really do not understand what that means in lay mans terms for how to solve my problem. macromedia has this for that answer:
------------------------
error message:
javax.naming.NoInitialContextException: Cannot instantiate class: [Root exception is java.lang.ClassNotFoundException: ]

cause:
The client could not retrieve a Context Factory.

resolution:
Refer to /jrun/samples/sample1a/client/EjbClient.java to see how to get a Context Factory.
properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "allaire.ejipt.ContextFactory");
----------------------

does anyone know what that resolution means? Thanks for taking the time to help me solve this!

sincerely befuddled,

Travis

maquiladoras
04-29-2005 @ 10:44 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 2073
Joined: Dec 2002

when you installed coldfusion
did you deploy it as an EJB or WAR file
or as a Jrun app?

-
"There is no justice, There is Just Us"
-

00Travis
04-29-2005 @ 10:58 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 7
Joined: Apr 2005

well i am running blue dragon 6.2 free edition for windows, and ran the install exe and chose the server and built in web server configurations, just following the next buttons.

00Travis
04-29-2005 @ 11:06 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 7
Joined: Apr 2005

this is interesting: http://java.sun.com/j2se/1.3/docs/api/javax/naming/NoInitialContextException.html

maquiladoras
04-29-2005 @ 11:12 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 2073
Joined: Dec 2002

your error resembles something like this yeah?

Type  Database
Tag Context   CFQUERY: Line=1; Column=1
Detail   The datasource <yourdsn> could not be found or was invalid
Extended Info    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial


-
"There is no justice, There is Just Us"
-

00Travis
04-29-2005 @ 11:17 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 7
Joined: Apr 2005

EXACTLY!

my error:

Type     Database
Detail     The datasource pbcoldfusiondsn could not be found or was invalid
Extended Info     javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
Tag Context     CFQUERY: Line=3; Column=1

00Travis
04-29-2005 @ 11:41 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 7
Joined: Apr 2005

ok...ok, i feel really stupid for missing this. the answer is when i defined my datasource name in the blue dragon datasource admin. i put a ".mdb" at the end of the datasource name when it did <b>NOT</b> need to know the extension, just the datasources name without the extension. wow! and i thought i know what i was doing after 2 years of this stuff, i guess everyone makes mistakes, or at least i hope i'm not the only one!...hehe Smile  SPECIAL THANKS TO maquiladoras FOR THE RESPONSES! i love easycfm.com!!

thanks all


Website Designed and Developed by Pablo Varando.