NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

javax.naming.NoInitialContextException

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
SreeAurovindh



Joined: 25 Jan 2009
Posts: 9

PostPosted: Tue Mar 03, 2009 8:15 pm    Post subject: javax.naming.NoInitialContextException Reply with quote

I am currently using Glassfish as my application server.In my
application I have a signed applet and I need to perform a JNDI lookup
from that applet in order to access my database.The problem is that i
get the following exception- "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"
.I have added the classes appserv-rt.jar,j2ee.jar to my
classpath.

Here is my Manifest.MF file
Manifest-Version: 1.0
Class-Path: appserv-rt.jar j2ee.jar
Created-By: 1.6.0_11 (Sun Microsystems Inc.)

Name: com/cff/util/SendEmail.class
SHA1-Digest: 2N2rjKFTln42B6lzPf6fdS31c6Y=

Name: usb/windows/Windows$HostImpl.class
SHA1-Digest: ONBjDOPJBwJZ//5U47RSoHuxvnQ=

......

Here is my stack trace for certain debugging information:

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
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.cff.model.DeviceDAO.<init>(DeviceDAO.java:3Cool
at com.cff.model.DeviceService.<init>(DeviceService.java:1Cool
at com.cff.pluggable.AppletUSBController.printUSBStack(AppletUSBController.java:81)
at com.cff.pluggable.AppletUSBController.scanForUSBDevices(AppletUSBController.java:56)
at com.cff.pluggable.AppletUSBController.start(AppletUSBController.java:29)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


Please suggest me on what to add and how to do it.
Thanks a lot

Best regards
Sree Aurovindh
Sun Certified Web Component Developer
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo