User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 402,657 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,197 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 524 | Replies: 3 | Solved
Reply
Join Date: May 2008
Posts: 11
Reputation: punitdam is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
punitdam's Avatar
punitdam punitdam is offline Offline
Newbie Poster

extra bytes at the end of file

  #1  
May 5th, 2008
I m trying to connect MYSQL 4.1.1 from JSP using java. and I m getting error as described below.

javax.servlet.ServletException: Extra bytes at the end of class file org/gjt/mm/mysql/Driver
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
org.apache.jsp.Login100408_jsp._jspService(Login100408_jsp.java:697)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

plz help me I m not getting any solution.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2006
Posts: 1,378
Reputation: masijade is a jewel in the rough masijade is a jewel in the rough masijade is a jewel in the rough masijade is a jewel in the rough 
Rep Power: 8
Solved Threads: 120
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Virtuoso

Re: extra bytes at the end of file

  #2  
May 5th, 2008
That is a legacy Driver. It is only around for backwords compatability. Use com.jdbc.mysql.Driver instead.

P.S. No need to change your jarfile (depending on the version of course), just change the String in the Class.forName() or Driver.registerDriver() method call.
Last edited by masijade : May 5th, 2008 at 4:01 am.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote  
Join Date: May 2008
Posts: 11
Reputation: punitdam is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
punitdam's Avatar
punitdam punitdam is offline Offline
Newbie Poster

Re: extra bytes at the end of file

  #3  
May 5th, 2008
its working now thanks.
Reply With Quote  
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,230
Reputation: peter_budo is a jewel in the rough peter_budo is a jewel in the rough peter_budo is a jewel in the rough 
Rep Power: 10
Solved Threads: 270
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: extra bytes at the end of file

  #4  
May 5th, 2008
One thing you should also be aware of, database connection from JSP is out of date. Now JSP is used for presentation purposes (user input, or system data presentation for user) and servlet handle logic, which includes DB connectivity
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JSP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JSP Forum

All times are GMT -4. The time now is 3:26 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC