아제발요살려주세요
30
2019-09-11 22:54:25
9
231

jsp 로 mysql 테이블을 만드려는데 자꾸 오류가 나요



<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR" import="java.sql.*" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
</head>
<body>

<%


Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/web","root","wow2019");

Statement st = con.createStatement();



String sql="create table if not exist member( "
		+"userid varchar(15)  primary key,"
		+"pwd varchar(15),	"
		+"userirum char(8),"
		+"useremail varchar(20),"
		+"sample4_postcode varchar(100), "
		+"sample4_roadAddress varchar(100), "
		+"userAddress varchar(50),"
		+"usertel varchar(40))";

st.executeUpdate(sql);

con.close();
st.close();

out.print("member 테이블이 생성되었습니다.");
%>
</body>
</html>

9월 11, 2019 10:22:01 오후 org.apache.tomcat.util.digester.SetPropertiesRule begin

WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:webhaji' did not find a matching property.

9월 11, 2019 10:22:01 오후 org.apache.catalina.startup.VersionLoggerListener log

INFO: 서버 버전 이름:        Apache Tomcat/9.0.12

9월 11, 2019 10:22:01 오후 org.apache.catalina.startup.VersionLoggerListener log

INFO: Server 빌드 시각:          Sep 4 2018 22:13:41 UTC

9월 11, 2019 10:22:01 오후 org.apache.catalina.startup.VersionLoggerListener log

INFO: Server 버전 번호:         9.0.12.0

9월 11, 2019 10:22:01 오후 org.apache.catalina.startup.VersionLoggerListener log

INFO: 운영체제 이름:               Windows 10

9월 11, 2019 10:22:01 오후 org.apache.catalina.startup.VersionLoggerListener log

INFO: 운영체제 버전:            10.0

9월 11, 2019 10:22:01 오후 org.apache.catalina.startup.VersionLoggerListener log

INFO: 아키텍처:          amd64

9월 11, 2019 10:22:01 오후 org.apache.catalina.startup.VersionLoggerListener log

INFO: 자바 홈:             C:\Program Files\Java\jdk-12.0.2

9월 11, 2019 10:22:01 오후 org.apache.catalina.startup.VersionLoggerListener log

INFO: JVM 버전:           12.0.2+10

9월 11, 2019 10:22:01 오후 org.apache.catalina.startup.VersionLoggerListener log

INFO: JVM 벤더:            Oracle Corporation

9월 11, 2019 10:22:01 오후 org.apache.catalina.startup.VersionLoggerListener log

INFO: CATALINA_BASE:         E:\webhaji\.metadata\.plugins\org.eclipse.wst.server.core\tmp0

9월 11, 2019 10:22:01 오후 org.apache.catalina.startup.VersionLoggerListener log

INFO: CATALINA_HOME:         C:\Program Files\Apache Software Foundation\Tomcat 9.0

9월 11, 2019 10:22:01 오후 org.apache.catalina.startup.VersionLoggerListener log

INFO: 명령 행 아규먼트: -Dcatalina.base=E:\webhaji\.metadata\.plugins\org.eclipse.wst.server.core\tmp0

9월 11, 2019 10:22:01 오후 org.apache.catalina.startup.VersionLoggerListener log

INFO: 명령 행 아규먼트: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 9.0

9월 11, 2019 10:22:01 오후 org.apache.catalina.startup.VersionLoggerListener log

INFO: 명령 행 아규먼트: -Dwtp.deploy=E:\webhaji\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps

9월 11, 2019 10:22:01 오후 org.apache.catalina.startup.VersionLoggerListener log

INFO: 명령 행 아규먼트: -Dfile.encoding=MS949

9월 11, 2019 10:22:01 오후 org.apache.catalina.core.AprLifecycleListener lifecycleEvent

INFO: 프로덕션 환경들에서 최적의 성능을 제공하는, APR 기반 Apache Tomcat Native 라이브러리가, 다음 java.library.path에서 발견되지 않습니다: [C:\Program Files\Java\jdk-12.0.2\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jdk-12.0.2/bin/server;C:/Program Files/Java/jdk-12.0.2/bin;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files (x86)\Autodesk\Backburner\;C:\Users\zhdeh\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Bandizip\;;C:\WINDOWS\System32;;.]

9월 11, 2019 10:22:01 오후 org.apache.coyote.AbstractProtocol init

INFO: 프로토콜 핸들러 ["http-nio-8080"]을(를) 초기화합니다.

9월 11, 2019 10:22:02 오후 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector

INFO: Using a shared selector for servlet write/read

9월 11, 2019 10:22:02 오후 org.apache.coyote.AbstractProtocol init

INFO: 프로토콜 핸들러 ["ajp-nio-8009"]을(를) 초기화합니다.

9월 11, 2019 10:22:02 오후 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector

INFO: Using a shared selector for servlet write/read

9월 11, 2019 10:22:02 오후 org.apache.catalina.startup.Catalina load

INFO: Initialization processed in 681 ms

9월 11, 2019 10:22:02 오후 org.apache.catalina.core.StandardService startInternal

INFO: 서비스 [Catalina]을(를) 시작합니다.

9월 11, 2019 10:22:02 오후 org.apache.catalina.core.StandardEngine startInternal

INFO: Starting Servlet Engine: Apache Tomcat/9.0.12

9월 11, 2019 10:22:04 오후 org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance

WARNING: Name = mysql Property maxWait is not used in DBCP2 , use maxWaitMillis instead. maxWaitMillis default value is -1. You have set value of "5000" for "maxWait" property, which is being ignored.

9월 11, 2019 10:22:04 오후 org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance

INFO: Name = mysql Ignoring unknown property: value of "10" for "loginTimeout" property

9월 11, 2019 10:22:04 오후 org.apache.jasper.servlet.TldScanner scanJars

INFO: 적어도 하나의 JAR가 TLD들을 찾기 위해 스캔되었으나 아무 것도 찾지 못했습니다. 스캔했으나 TLD가 없는 JAR들의 전체 목록을 보시려면, 로그 레벨을 디버그 레벨로 설정하십시오. 스캔 과정에서 불필요한 JAR들을 건너뛰면, 시스템 시작 시간과 JSP 컴파일 시간을 단축시킬 수 있습니다.

9월 11, 2019 10:22:04 오후 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom

WARNING: [SHA1PRNG] 알고리즘을 사용하여, 세션 ID를 생성하기 위한 SecureRandom 객체를 생성하는데, [158] 밀리초가 소요됐습니다.

9월 11, 2019 10:22:07 오후 org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance

WARNING: Name = mysql Property maxWait is not used in DBCP2 , use maxWaitMillis instead. maxWaitMillis default value is -1. You have set value of "5000" for "maxWait" property, which is being ignored.

9월 11, 2019 10:22:07 오후 org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance

INFO: Name = mysql Ignoring unknown property: value of "10" for "loginTimeout" property

9월 11, 2019 10:22:07 오후 org.apache.jasper.servlet.TldScanner scanJars

INFO: 적어도 하나의 JAR가 TLD들을 찾기 위해 스캔되었으나 아무 것도 찾지 못했습니다. 스캔했으나 TLD가 없는 JAR들의 전체 목록을 보시려면, 로그 레벨을 디버그 레벨로 설정하십시오. 스캔 과정에서 불필요한 JAR들을 건너뛰면, 시스템 시작 시간과 JSP 컴파일 시간을 단축시킬 수 있습니다.

9월 11, 2019 10:22:07 오후 org.apache.coyote.AbstractProtocol start

INFO: 프로토콜 핸들러 ["http-nio-8080"]을(를) 시작합니다.

9월 11, 2019 10:22:07 오후 org.apache.coyote.AbstractProtocol start

INFO: 프로토콜 핸들러 ["ajp-nio-8009"]을(를) 시작합니다.

9월 11, 2019 10:22:07 오후 org.apache.catalina.startup.Catalina start

INFO: Server startup in 5518 ms

Wed Sep 11 22:22:10 KST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

9월 11, 2019 10:22:10 오후 org.apache.catalina.core.StandardWrapperValve invoke

SEVERE: 경로 [/webhaji]의 컨텍스트 내의 서블릿 [jsp]을(를) 위한 Servlet.service() 호출이, 근본 원인(root cause)과 함께, 예외 [행 [33]에서 [createtablemember.jsp]을(를) 처리하는 중 예외 발생


30: +"userAddress varchar(100),"

31: +"usertel varchar(20))";

32: 

33: st.executeUpdate(sql);

34: 

35: con.close();

36: st.close();



Stacktrace:]을(를) 발생시켰습니다.

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 'exist member( userid varchar(15)  primary key,pwd varchar(15), userirum char(8),' at line 1

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)

at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)

at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)

at com.mysql.jdbc.Util.getInstance(Util.java:408)

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3933)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3869)

at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2524)

at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2675)

at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2465)

at com.mysql.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1536)

at com.mysql.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2585)

at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1464)

at org.apache.jsp.createtablemember_jsp._jspService(createtablemember_jsp.java:149)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)

at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:458)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)

at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)

at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)

at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)

at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.base/java.lang.Thread.run(Thread.java:835)


Wed Sep 11 22:49:31 KST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

9월 11, 2019 10:49:31 오후 org.apache.catalina.core.StandardWrapperValve invoke

SEVERE: 경로 [/webhaji]의 컨텍스트 내의 서블릿 [jsp]을(를) 위한 Servlet.service() 호출이, 근본 원인(root cause)과 함께, 예외 [행 [33]에서 [/createtablemember.jsp]을(를) 처리하는 중 예외 발생


30: +"userAddress varchar(100),"

31: +"usertel varchar(20))";

32: 

33: st.executeUpdate(sql);

34: 

35: con.close();

36: st.close();



Stacktrace:]을(를) 발생시켰습니다.

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 'exist member( userid varchar(15)  primary key,pwd varchar(15), userirum char(8),' at line 1

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)

at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)

at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)

at com.mysql.jdbc.Util.getInstance(Util.java:408)

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3933)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3869)

at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2524)

at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2675)

at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2465)

at com.mysql.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1536)

at com.mysql.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2585)

at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1464)

at org.apache.jsp.createtablemember_jsp._jspService(createtablemember_jsp.java:149)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)

at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:458)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)

at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)

at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)

at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)

at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.base/java.lang.Thread.run(Thread.java:835)


Wed Sep 11 22:50:23 KST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

9월 11, 2019 10:50:23 오후 org.apache.catalina.core.StandardWrapperValve invoke

SEVERE: 경로 [/webhaji]의 컨텍스트 내의 서블릿 [jsp]을(를) 위한 Servlet.service() 호출이, 근본 원인(root cause)과 함께, 예외 [행 [33]에서 [/createtablemember.jsp]을(를) 처리하는 중 예외 발생


30: +"userAddress varchar(50),"

31: +"usertel varchar(40))";

32: 

33: st.executeUpdate(sql);

34: 

35: con.close();

36: st.close();



Stacktrace:]을(를) 발생시켰습니다.

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 'exist member( userid varchar(15)  primary key,pwd varchar(15), userirum char(8),' at line 1

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)

at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)

at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)

at com.mysql.jdbc.Util.getInstance(Util.java:408)

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3933)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3869)

at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2524)

at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2675)

at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2465)

at com.mysql.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1536)

at com.mysql.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2585)

at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1464)

at org.apache.jsp.createtablemember_jsp._jspService(createtablemember_jsp.java:149)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)

at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:458)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)

at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)

at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)

at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)

at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.base/java.lang.Thread.run(Thread.java:835)


0
0
  • 답변 9

  • M-170901
    481
    2019-09-11 23:03:11

    exist -> exists

    0
  • M-170901
    481
    2019-09-11 23:39:24

    에러 로그 확인하는 습관 들이시길 바랍니다.


    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 

    'exist member( userid varchar(15)  primary key,pwd varchar(15), userirum char(8),' at line 1

    0
  • 아제발요살려주세요
    30
    2019-09-11 23:51:54

    감사합니다 


    오류 리그 확인해봤는데 다른 오류가 뜨는데  같은 오류인가요?


    HTTP 상태 500 – 내부 서버 오류


    타입 예외 보고

    메시지 행 [34]에서 [createtablemember.jsp]을(를) 처리하는 중 예외 발생

    설명 서버가, 해당 요청을 충족시키지 못하게 하는 예기치 않은 조건을 맞닥뜨렸습니다.

    예외

    org.apache.jasper.JasperException: 행 [34]에서 [createtablemember.jsp]을(를) 처리하는 중 예외 발생
    
    31: 		+"usertel varchar(20))not null"
    32: 		+"primary key(userid))";
    33: 
    34: st.executeUpdate(sql);
    35: 
    36: con.close();
    37: st.close();
    
    
    Stacktrace:
    	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:607)
    	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:481)
    	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
    	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
    

    근본 원인 (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 'member( userid varchar(15) not null,pwd varchar(15) not null,	userirum char(8) n' at line 1
    	org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:667)
    	org.apache.jsp.createtablemember_jsp._jspService(createtablemember_jsp.java:171)
    	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:458)
    	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
    	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
    

    근본 원인 (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 'member( userid varchar(15) not null,pwd varchar(15) not null,	userirum char(8) n' at line 1
    	java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    	java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    	java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
    	java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
    	com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
    	com.mysql.jdbc.Util.getInstance(Util.java:408)
    	com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)
    	com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3933)
    	com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3869)
    	com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2524)
    	com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2675)
    	com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2465)
    	com.mysql.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1536)
    	com.mysql.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2585)
    	com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1464)
    	org.apache.jsp.createtablemember_jsp._jspService(createtablemember_jsp.java:150)
    	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:458)
    	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
    	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
    

    비고 근본 원인(root cause)의 풀 스택 트레이스를, 서버 로그들에서 확인할 수 있습니다.


    Apache Tomcat/9.0.12

    0
  • M-170901
    481
    2019-09-12 00:06:17

    소스에도 없는 n이 왜 튀어나왔는지 알 수 있을까요?

    적어도 소스에서 돌려보기 이전에 DB에서 먼저 테스트하시길 바랍니다.

    'member( userid varchar(15) not null,pwd varchar(15) not null,	userirum char(8) n'
    1
  • M-170901
    481
    2019-09-12 00:29:22 작성 2019-09-12 00:30:11 수정됨

    중간에 쉼표 빠진걸로 보입니다.

    +"usertel varchar(20))not null"
    +"primary key(userid))";

    본문의 create에 not null이 포함돼있지 않은데 다른 create문의 오류를 보여주시면 제가 뭘 보고 어디에 문제가 있는지 알려드릴수 있을지 모르겠네요.

    해답을 원하시면 전체를 정확히 올리시길 바랍니다.

    그리고 댓글 가급적이면 지우시지 마시길 바랍니다.

    1
  • 아제발요살려주세요
    30
    2019-09-12 00:34:32

    코딩초보인데 답변해주셔서 감사합니다

    ㅜㅜ n은 not null 앞부분 잘린것 같아요

    학교에선 이상 없이 되어서 테스트 없이 돌려봤네요,,


    DB에서도 오류가 뜨네요 ,,

    CREATE TABLE member(

    userid varchar(20) not null,

    pwd varchar(20) not null,

    userirum char(8) not null,

    useremail varchar(20) not null,

    sample4_postcode varchar(100),

    sample4_roadAddress varchar(100) ,

    userAddress varchar(100) not null,

    usertel varchar(20) not null,

    PRIMARY KEY (userid)

    );

    ERROR 1064 (42000): 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 'member(

    userid varchar(20) not null,

    pwd varchar(20) not null,

    userirum char(8) ' at line 1

    0
  • 아제발요살려주세요
    30
    2019-09-12 00:35:55
    아 죄송합니다 저도 찾아보면서 해서 계속 수정해야할 부분이 있어서 계속 올렸다 지웠다 했네요 
    0
  • M-170901
    481
    2019-09-12 00:46:29

    CREATE TABLE member(

    userid varchar(20) not null,

    pwd varchar(20) not null,

    userirum char(8) not null,

    useremail varchar(20) not null,

    sample4_postcode varchar(100),

    sample4_roadAddress varchar(100) ,

    userAddress varchar(100) not null,

    usertel varchar(20) not null,

    CONSTRAINT userid_PK PRIMARY KEY (userid)

    );

    1
  • 아제발요살려주세요
    30
    2019-09-12 15:15:34

    정말 감사합니다 ㅠㅜㅜ!

    그 부분 추가로 해도 오류가 계속 나길래

    테이블명만 바꿨더니 아무일도 없는 것처럼 됐네요,,

    답답하셨을 텐데 답변 계속 달아주셔서 감사합니다!

    0
  • 로그인을 하시면 답변을 등록할 수 있습니다.