Flux rss
Search : in
By : Relevance Date Username
Statut : Not resolved

Access problem

praveenpr4, on Sunday July 6, 2008 03:16:18 PM
Hello,


Hi i would like to access to my database source i am getting each time a message error can someone check whether i have made a mistake somewhere


JAR files has already been added


Construct an access object.
*/
public access ()
{
try
{
Context ctx = new InitialContext();
ds1 = (DataSource)ctx.lookup(dsName1); // Problem here

} catch (Exception e) {
e.printStackTrace();
}
}
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(N amingManager.java:647)
at javax.naming.InitialContext.getDefaultInitCtx(Init ialContext.java:247)
at javax.naming.InitialContext.getURLOrDefaultInitCtx (InitialContext.java:284)
at javax.naming.InitialContext.lookup(InitialContext. java:351)
at access.<init>(access.java:19)
at access.main(access.java:58)
java.lang.NullPointerException
at access.performread(access.java:34
Configuration: Windows XP
Internet Explorer 6.0
Reply to praveenpr4  Report this message to moderators Go to last message

1


  • This message seems useful, vote!
  • Report this message to moderators
bitboyx, on Sunday July 6, 2008 04:57:56 PM
Try with his command it cound work
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(N amingManager.java:647)
at javax.naming.InitialContext.getDefaultInitCtx(Init ialContext.java:247)
at javax.naming.InitialContext.getURLOrDefaultInitCtx (InitialContext.java:284)
at javax.naming.InitialContext.lookup(InitialContext. java:351)
at access.<init>(access.java:19)
at access.main(access.java:58)
java.lang.NullPointerException
at access.performread(access.java:34

Enable access ( saved )
Reply to bitboyx

2


  • This message seems useful, vote!
  • Report this message to moderators
crazy_devil, on Sunday July 20, 2008 11:20:28 AM
hi praveen,
im straight going to search for an answer and i will soon be back to you with a solution,,,
Reply to crazy_devil

3


  • This message seems useful, vote!
  • Report this message to moderators
 Jon To, on Friday October 17, 2008 12:26:47 AM
you straight searched for an answer but you didn't find one?

What gives?

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(NamingManag­er.java:645)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext­.java:288)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialCo­ntext.java:325)


I'm using hibernate..


<session-factory name="java:comp/hibernate/SessionFactory">

<!-- You need to complete the configuration here. This is just a sample, you should use a connection pool -->
<property name="connection.url">jdbc:oracle:thin:@blah:1521:wah</property>
<property name="connection.username">as</property>
<property name="connection.password">as549</property>
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
Reply to Jon To

Results for

Computer - Random access memory There are generally two broad categories of random access memory: DRAM memories (Dynamic Random Access Module), which are inexpensive. They are used essentially for the computer's main memory SRAM memories (Static Random Access Module), which are... en.kioskea.net/pc/ram.php3
WPA - WiFi Protected Access WPA (WiFi protected Access) WiFi network security solution offered by the WiFi Alliance, in order to fill gaps in WEP. WPA is a "light" version of the 802.11i protocol, which relies on authentication protocols and a strong encryption algorithm:... en.kioskea.net/wifi/wifi-wpa.php3
WiMAX - 802.16 - Worldwide Interoperability for Microwave Access WiMAX is short for Worldwide Interoperability for Microwave Access. It is a metropolitan wireless standard created by the companies Intel and Alvarion in 2002 and ratified by the IEEE (Institute of Electrical and Electronics Engineers) under the name... en.kioskea.net/wimax/wimax-intro.php3

Results for

Access the hidden Administrator Account in Windows VistaAccess the hidden Administrator Account in Windows Vista Why has the Administrator account been disabled in Vista? How to activate the Administrator Account Solution 1: Through User Account Control Solution 2: With Command Prompt Solution... en.kioskea.net/faq/sujet-300-access-the-hidden-administrator-account-in-windows-vista
How to access your BIOS set upHow to access your BIOS set up Depending on your computer model, the way you will access your BIOS set up menu will differ. Here is a list of the most common models used and the access key used for this process. ACER You can make use... en.kioskea.net/faq/sujet-283-how-to-access-your-bios-set-up
Accessing Safe Mode without key F8Accessing Safe Mode without key F8 Introduction Explanation Introduction Safe mode is the windows maintenance mode of a computer operating system. You can access your computer to diagnose problems on your computer. Below is a tips of how... en.kioskea.net/faq/sujet-628-accessing-safe-mode-without-key-f8

Results for

Locked folder in Folder access 2.0.0 (Solved)Hello, I downloaded the free Version of Folder Access 2.0.0 and using it successfully. I locked some folder and while trying to unlock it showed some processing error. I removed that folder by using Remove Button from Folder Access because by using... en.kioskea.net/forum/affich-18256-locked-folder-in-folder-access-2-0-0
Only have access to half the internet??? (Solved)Hello, I'm currently on a laptop running Windows Vista. My ISP is AT&T. Ethernet Cable plugged in. About 60 minutes ago, the online application that I was using, booted me. I have access to some websites (this one included), but others, I get the... en.kioskea.net/forum/affich-26382-only-have-access-to-half-the-internet
Access denied - accessing XP HomeHello, I have two laptops running W2000 with the latest upgrades, and a desktop running XP Home. The Laptops can see each other, and the Desktop, but cannot access the Desktop's shared folders. I have verified names, workgroup name, set up static... en.kioskea.net/forum/affich-10363-access-denied-accessing-xp-home

Results for

Download Firefox Accessibility ExtensionUnder Windows there is already an option of accessibility for the persons with agility reduced or having problems of view. The navigator Firefox also wanted to ameliorate his functions to allow these persons to use at the farthest means on... en.kioskea.net/telecharger/telecharger-540-firefox-accessibility-extension

Results for

YouTube access blocked in China after Tibet clips appearThis file photo dated shows a web page from www.youtube.com displayed on a computer screen in Hong Kong. Access to YouTube in China was denied on Sunday after footage of recent deadly protests in Tibet appeared on the video posting site. Access to... en.kioskea.net/actualites/youtube-access-blocked-in-china-after-tibet-clips-appear-10211-actualite.php3

Results for

WiFi - Data link layer and access methods The data link layer of the 802.11 standard is composed of two sublayers: the Logical Link Control layer (or LLC for short), and the Media Access Control layer (or MAC). The MAC layer defines two different access methods: The CSMA/CA method, which... en.kioskea.net/wifi/wifimac.php3