Kaskus

Tech

pepellzAvatar border
TS
pepellz
[ASK] Error pada JSP
gan ini source codenya
Spoiler for source code:


ini errornya gan
Code:
type Exception report

message An exception occurred processing JSP page /InputData.jsp at line 30

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: An exception occurred processing JSP page /InputData.jsp at line 30

27: }
28: String kueri = "INSERT INTO mahasiswa VALUES ('"+Nim+"','"+Nama+"','"+Tgl_lahir+"','"+Fakultas+"','"+Departemen+"','"+Alamat+"','"+E_mail+")";
29: Statement st = con.createStatement();
30: int IsiTabel = st.executeUpdate(kueri);
31:
32: st.close();
33: con.close();


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:568)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause

javax.servlet.ServletException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '')' at line 1
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:912)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:841)
org.apache.jsp.InputData_jsp._jspService(InputData_jsp.java:125)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '')' at line 1
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
com.mysql.jdbc.Util.getInstance(Util.java:386)
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1053)
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4096)
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4028)
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2490)
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2651)
com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2728)
com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1811)
com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1725)
org.apache.jsp.InputData_jsp._jspService(InputData_jsp.java:93)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.30 logs.


mohon bantuannya gan, gimana buat gak jadi error , mohon bimbingannya
Diubah oleh pepellz 14-01-2013 14:21
0
3.7K
20
GuestAvatar border
Komentar yang asik ya
Mari bergabung, dapatkan informasi dan teman baru!
Programmer Forum
Programmer Forum
KASKUS Official
20.2KThread5KAnggota
Urutkan
Terlama
GuestAvatar border
Komentar yang asik ya
Ikuti KASKUS di
© 2026 KASKUS, PT Darta Media Indonesia. All rights reserved.