Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-01-2008, 07:42 AM
Member
 
Join Date: Jan 2008
Posts: 81
Preethi is on a distinguished road
Problem in JDBC
I'm getting this erro only after downloading JDBC Driver for sqlserver2005.
Can anyone say me how to remove it or how to solve the problem.(I have searched for it in add or remove
programs in control panel,but couldn't find...But i have included mssqlserver.jar,msutil.jar,msbase.jar in my classpath)

Code:
basic: Modality pushed basic: Modality popped basic: Registered modality listener liveconnect: Invoking JS method: document liveconnect: Invoking JS method: URL basic: Referencing classloader: sun.plugin.ClassLoaderInfo@15efa6a, refcount=1 basic: Added progress listener: sun.plugin.util.GrayBoxPainter@14b389 basic: Loading applet ... basic: Initializing applet ... basic: Starting applet ... java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver at sun.applet.AppletClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.applet.AppletClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at xmlTrail.XMLReading.fileParsing(XMLReading.java:86) at xmlTrail.MD2$Imagepanel.prepareData(MD2.java:517) at xmlTrail.MD2$Imagepanel.<init>(MD2.java:139) at xmlTrail.MD2.init(MD2.java:56) at sun.applet.AppletPanel.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.FileNotFoundException: C:\Documents and Settings\com\microsoft\sqlserver\jdbc\SQLServerDriver.class (The system cannot find the path specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(Unknown Source) at java.io.FileInputStream.<init>(Unknown Source) at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source) at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source) at sun.applet.AppletClassLoader.getBytes(Unknown Source) at sun.applet.AppletClassLoader.access$100(Unknown Source) at sun.applet.AppletClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method)
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-01-2008, 09:26 AM
Eku Eku is offline
Senior Member
 
Join Date: May 2008
Location: Makati, Philippines
Posts: 199
Eku is on a distinguished road
have added those jar file in the
..\Java\jdk1.6.0_05\jre\lib\ext\ Folder
__________________
Mind only knows what lies near the heart, it alone sees the depth of the soul.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-01-2008, 09:58 AM
Senior Member
 
Join Date: Jun 2008
Posts: 295
masijade is on a distinguished road
Quote:
Originally Posted by Eku View Post
have added those jar file in the
..\Java\jdk1.6.0_05\jre\lib\ext\ Folder
DON'T add it there. Never add anything to the jre lib directories. That ext folder is for language extensions (the meaning of ext) and a JDBC Driver is far from a language extension. Besides, what happens when you upgrade Java? What happens, when for one app you need a newer version of a Driver, and for an older app you need an older version?

Add the jarfile to your CLASSPATH (not your system classpath as the older/newer version problem still exists there, and most web containers and IDE's won't use that anyway), but rather, if you are using a jarfile, to the manifest, and if you are not using a jarfile, to the command line -cp option, or if you are using a web container/IDE configure it there.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 07-01-2008, 10:03 AM
Senior Member
 
Join Date: Jun 2008
Posts: 295
masijade is on a distinguished road
Ach, and your problem is that you're using an applet. In that case you must provide the Driver classes yourself (unpacked form in the "codebase" directory, or in the jarfile if using a jarfile) or, make url (or RMI or someother remote protocol) to a self-written server that will interface with the db for you and just send you the results.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 07-01-2008, 10:14 AM
Niveditha's Avatar
Senior Member
 
Join Date: May 2008
Posts: 299
Niveditha is on a distinguished road
Send a message via Skype™ to Niveditha
I think it ll be in "SQL-Installation path/Lib", correct me if ia m wrong.
Check this too
HOW TO: Get Started with Microsoft JDBC
__________________
To finish sooner, take your own time....
Nivedithaaaa
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 07-01-2008, 03:02 PM
Member
 
Join Date: Jun 2008
Posts: 1
AnilKanike is on a distinguished road
Hi,

You might have missed out some .jar files to be included. Try to add its corresponding jar files and then try out.
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 07-01-2008, 03:14 PM
Senior Member
 
Join Date: Jun 2008
Posts: 295
masijade is on a distinguished road
To both of the last posters. He is using an Applet. That means that the application itself will be running on a client machine that he may (and probably should) have no control over. That he means, whatever he writes will have access to core java, and core java, only, unless he provides it from the "codebase" he defines in the Applet tag.

@OP: Make sure the Driver is freely distributable, though, otherwise you will be violating license restrictions, and that could become very costly in terms of both money (fines) and time (prison).

Last edited by masijade : 07-01-2008 at 03:17 PM.
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 07-02-2008, 02:39 PM
Member
 
Join Date: Jul 2008
Posts: 1
rajeshbehera is on a distinguished road
for using sqlserver type 4 database you have to download 3 jar files.and keep it in lib folder before running your web application
Bookmark Post in Technorati
Reply With Quote
  #9 (permalink)  
Old 07-02-2008, 06:37 PM
Senior Member
 
Join Date: Jun 2008
Posts: 295
masijade is on a distinguished road
It's not a web application. It's an applet, so he must provide all three of those jarfiles (in unpacked format, as already noted) as part of the "codebase".
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Jdbc problem abhiN Database 1 03-21-2008 06:10 AM
Problem in Servlet with JDBC *New Programer* Java Servlet 2 12-20-2007 10:15 AM
JDBC problem Swamipsn New To Java 1 08-13-2007 07:05 PM
JDBC Driver problem Swamipsn New To Java 3 08-09-2007 04:55 PM
JDBC problem peiceonly Threads and Synchronization 2 08-03-2007 02:42 PM


All times are GMT +3. The time now is 05:58 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org