일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
- @RequestBody
- html
- null
- SSL
- 스크립트
- Oracle
- HTML5
- exception
- 이클립스
- 호환성
- 전자정부 표준프레임워크
- jquery
- 웹 플랫폼 설치 관리자
- DB
- 날짜
- RADIO
- php
- 네이버스마트 에디터
- switch
- 톰캣
- 오라클
- java
- json
- 문자열
- MYSQL
- JSTL
- checbox
- maven
- spring form tag
- 한글
- Today
- Total
개인적인 정리
전자정부프레임워크 all-in-one 이클립스 셋팅 본문
전자정부프레임워크 all-in-one 이클립스 셋팅
1. 다운받은 eGovFrameDev-3.7.0-64bit.exe 를 압축을 적당한 곳에 풀어준다.
1. 1 오라클을 적당한 곳에 설치. 원격으로 접속되는지 확인 필요. 로컬에 설치하는 경우에는 원격접속여부를 확인하지 않아도 될 듯.
1. 2 톰캣을 미리 다운받는다.
https://tomcat.apache.org/download-80.cgi 에서 하단 tomcat 을 다운받았다.
zip 버전을 다운받아서 적당한 곳에 압축을 풀어준다.
나는 이클립스 압축 풀어준후에 그 하위에 압축을 풀어줬다.
2. 이클립스 실행환경을 구성한다.
eGovFrameDev-3.7.0은 jdk 1.8이상을 필요로 한다.
- jdk1.8 64비트 버전 설치
- eclipse.ini 설정 변경
3. 이클립스를 실행한다.
- Workspace 경로를 잘 잡아준다.(이클립스 아래 workspace로 잡아줌)
4. Welcome 창이 나오는데 닫아준다.
5. eGov Perspective를 열어준다.
상단의 Windos > Perspective > Open Perspective > Other 를 선택한다.
eGovFrame 을 선택하고 OK
그러면 상단에 eGovFrame 메뉴가 생긴다. 우측에서 Perspective bar(? 용어가 맞는지 모르겠다)가 나타난다.
우측 eGovFrame Perspective bar에서 마우스 오른쪽 버튼을 눌러서
Show Text 를 클릭한다. 그러면 eGovFrame로 바뀐다.
6. egovFrame 프로젝트 생성하기
eGovFrame > Start > New Template Project를 클릭
Commoin All-in-one을 선택하고 Next 클릭
Project name : egovframework-all-in-one
Dynamic Web Module version : 3.1 선택
Group Id : egovframework-all-in-one
Artifact Id : egovframework-all-in-one
Version : 1.0.0
으로 입력... 다르게 입력해도 상관없을 것 같다.
입력후에 Finish 클릭
7. server 추가
왼쪽 빈 공간에서 마우스 오른쪽 버튼 클릭
New > Other 클릭
Select a wizard 창에서 server 라고 쳐넣으면
이 상태로 Next 클릭
Define a New Server에서
조그만 공간의 스크롤을 위로 올려서 Apache 를 더브클릭 후 아래로 내려서
Tomcat v8.0 Server를 찾는다.
Tomcat v8.0 Server를 클릭하면 Server's host name과 Server name 이 변경된다.
Next 클릭
미리 다운받아놓은 Tomcat 경로를 지정해준다.
JRE은 적당히 선택. 현재로서는 의미가 없어보인다.
좌측에서 프로젝트를 클릭하고 Add 버튼을 눌러서 우측으로 이동시킨다.
이 서버에 프로젝트를 추가하였다.
그리고 나서 Finish 를 눌러준다.
서버 추가 완료.
8. Maven Install
Maven이 뭔지는 잘 모른다는 ^^;;;
프로젝트를 선택하고 마우스 오른쪽 버튼 클릭 > Run As > 9 Maven install
Build Success 메세지가 나올 때까지 기다린다.
[INFO] Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-container-default/1.0-alpha-8/plexus-container-default-1.0-alpha-8.pom (8 KB at 25.2 KB/sec)
[INFO] Downloading: https://repo.maven.apache.org/maven2/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar
[INFO] Downloaded: https://repo.maven.apache.org/maven2/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar (37 KB at 99.3 KB/sec)
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.5/plexus-utils-3.0.5.jar
[INFO] Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.5/plexus-utils-3.0.5.jar (226 KB at 733.0 KB/sec)
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-digest/1.0/plexus-digest-1.0.jar
[INFO] Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-digest/1.0/plexus-digest-1.0.jar (12 KB at 35.9 KB/sec)
[INFO] Installing E:\eGovFrameDev-3.7.0-dev\workspace\egovframework-all-in-one\target\egovframework-all-in-one.war to C:\Users\biju\.m2\repository\egovframework\common\3.7.0\common-3.7.0.war
[INFO] Installing E:\eGovFrameDev-3.7.0-dev\workspace\egovframework-all-in-one\pom.xml to C:\Users\biju\.m2\repository\egovframework\common\3.7.0\common-3.7.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:17 min
[INFO] Finished at: 2018-04-17T21:10:58+09:00
[INFO] Final Memory: 48M/1249M
[INFO] ------------------------------------------------------------------------
9. 프로젝트 실행
프로젝트를 선택하고 마우스 오른쪽 버튼을 눌러 Run as > Run on Sever를 클릭한다.
Run On Server 창에서 좀 전에 셋팅한 서버를 선택을 하고 Finish 를 누른다.
그리고 하단에서 console 창을 보면 에러만 우수수 쏟아진다.
10. 실행하고 나니 아래와 같은 에러가 쭉 뜬다.
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/egovframework-all-in-one]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/egovframework-all-in-one]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
... 6 more
Caused by: java.lang.NoClassDefFoundError: Lorg/slf4j/Logger;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
at java.lang.Class.getDeclaredFields(Class.java:1916)
at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:106)
at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:267)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationFilterAnnotations(WebAnnotationSet.java:107)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:66)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:336)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:785)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:307)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5221)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 6 more
Caused by: java.lang.ClassNotFoundException: org.slf4j.Logger
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1335)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1163)
... 20 more
4월 17, 2018 9:17:08 오후 org.apache.catalina.core.ContainerBase startInternal
심각: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:441)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:789)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.startup.Catalina.start(Catalina.java:641)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:349)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:483)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:951)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 6 more
4월 17, 2018 9:17:08 오후 org.apache.catalina.startup.Catalina start
심각: The required Server component failed to start so Tomcat is unable to start.
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
at org.apache.catalina.startup.Catalina.start(Catalina.java:641)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:349)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:483)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:789)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:441)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:951)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 11 more
4월 17, 2018 9:17:08 오후 org.apache.coyote.AbstractProtocol pause
정보: Pausing ProtocolHandler ["http-nio-8080"]
4월 17, 2018 9:17:08 오후 org.apache.coyote.AbstractProtocol pause
정보: Pausing ProtocolHandler ["ajp-nio-8009"]
4월 17, 2018 9:17:08 오후 org.apache.catalina.core.StandardService stopInternal
정보: Stopping service Catalina
4월 17, 2018 9:17:08 오후 org.apache.coyote.AbstractProtocol destroy
정보: Destroying ProtocolHandler ["http-nio-8080"]
4월 17, 2018 9:17:08 오후 org.apache.coyote.AbstractProtocol destroy
심각: Failed to destroy end point associated with ProtocolHandler ["http-nio-8080"]
java.lang.NullPointerException
at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:315)
at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:491)
at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:896)
at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:551)
at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:589)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:879)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
at org.apache.catalina.startup.Catalina.start(Catalina.java:645)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:349)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:483)
4월 17, 2018 9:17:08 오후 org.apache.coyote.AbstractProtocol destroy
정보: Destroying ProtocolHandler ["ajp-nio-8009"]
4월 17, 2018 9:17:08 오후 org.apache.coyote.AbstractProtocol destroy
심각: Failed to destroy end point associated with ProtocolHandler ["ajp-nio-8009"]
java.lang.NullPointerException
at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:315)
at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:491)
at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:896)
at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:551)
at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:589)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:879)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
at org.apache.catalina.startup.Catalina.start(Catalina.java:645)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:349)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:483)
11. maven dependency 를 등록
프로젝트 > 마우스 오른쪽 버튼을 클릭하여 Properties 를 연다.
열어서 Deployment Assembly 를 선택한다.
Add... 를 클릭한다.
Java Build Path Entries 를 더블클릭
Maven Dependencies 를 선택하고 Finish 를 클릭한다.
Maven Dependencies 가 추가 되어 있다.
그리고 Properties 에서 OK 를 클릭한다.
한참을 기다린다~~
12. 다시 9번처럼 Run as > Run on Server 를 한다.
그럼 다시 에러가 나온다.
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_152] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_152] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_152] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_152] at com.mysql.jdbc.Util.handleNewInstance(Util.java:408) ~[mysql-connector-java-5.1.31.jar:?] at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1137) ~[mysql-connector-java-5.1.31.jar:?] at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:356) ~[mysql-connector-java-5.1.31.jar:?] at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2504) ~[mysql-connector-java-5.1.31.jar:?] at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2541) ~[mysql-connector-java-5.1.31.jar:?] at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2323) ~[mysql-connector-java-5.1.31.jar:?] at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:832) ~[mysql-connector-java-5.1.31.jar:?] at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46) ~[mysql-connector-java-5.1.31.jar:?] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_152] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_152] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_152] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_152] at com.mysql.jdbc.Util.handleNewInstance(Util.java:408) ~[mysql-connector-java-5.1.31.jar:?] at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:417) ~[mysql-connector-java-5.1.31.jar:?] at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:344) ~[mysql-connector-java-5.1.31.jar:?] at net.sf.log4jdbc.DriverSpy.connect(DriverSpy.java:728) ~[log4jdbc-1.2.jar:?] at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) ~[commons-dbcp-
Caused by: java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) ~[?:1.8.0_152] at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) ~[?:1.8.0_152] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:1.8.0_152] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:1.8.0_152] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_152] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) ~[?:1.8.0_152] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_152] at java.net.Socket.connect(Socket.java:589) ~[?:1.8.0_152] at java.net.Socket.connect(Socket.java:538) ~[?:1.8.0_152] at java.net.Socket.<init>(Socket.java:434) ~[?:1.8.0_152] at java.net.Socket.<init>(Socket.java:244) ~[?:1.8.0_152] at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:258) ~[mysql-connector-java-5.1.31.jar:?] at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:306) ~[mysql-connector-java-5.1.31.jar:?] at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2504) ~[mysql-connector-java-5.1.31.jar:?] at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2541) ~[mysql-connector-java-5.1.31.jar:?] at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2323) ~[mysql-connector-java-5.1.31.jar:?] at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:832) ~[mysql-connector-java-5.1.31.jar:?] at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46) ~[mysql-connector-java-5.1.31.jar:?] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_152] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_152] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_152] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_152] at com.mysql.jdbc.Util.handleNewInstance(Util.java:408) ~[mysql-connector-java-5.1.31.jar:?] at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:417) ~[mysql-connector-java-5.1.31.jar:?] at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:344) ~[mysql-connector-java-5.1.31.jar:?] at net.sf.log4jdbc.DriverSpy.connect(DriverSpy.java:728) ~[log4jdbc-1.2.jar:?] at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) ~[commons-dbcp-
Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure
.....
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.jdbc.Util.handleNewInstance(Util.java:408) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1137) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:356) at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2504) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2541) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2323) at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:832) at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.jdbc.Util.handleNewInstance(Util.java:408) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:417) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:344) at net.sf.log4jdbc.DriverSpy.connect(DriverSpy.java:728) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556) at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545) ... 92 moreCaused by: java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at java.net.Socket.connect(Socket.java:538) at java.net.Socket.<init>(Socket.java:434) at java.net.Socket.<init>(Socket.java:244) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:258) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:306)
... 109 more
대충 보니 DB 접속 에러 같다.
13. 디비 설정
오라클을 설치했고 클라이언트 프로그램으로 외부에서 연결이 가능한 것을 확인했다.
Ctrl + Shift + R 을 눌러 창을 띄운다음 globals.properties를 연다
globals.properties 를 더블클릭하면 열린다.
열어서 설정을 변경해준다.1) Globals.DbType = mysql --> Globals.DbType = oracle
oracle 을 소문자로 써준다. 대문자로 쓰면 에러가 발생한다.
2)
#mysql
Globals.DriverClassName=net.sf.log4jdbc.DriverSpy
Globals.Url=jdbc:log4jdbc:mysql://localhost:3306/database
주석처리 한다.
#oracle
#Globals.DriverClassName=oracle.jdbc.driver.OracleDriver
#Globals.Url=jdbc:oracle:thin:@127.0.0.1:1521:egovfrm
에 정확한 설정정보를 입력해준다.
#oracle
Globals.DriverClassName=oracle.jdbc.driver.OracleDriver
Globals.Url=jdbc:oracle:thin:@127.0.0.1:1521:orcl
3)
#DB계정 ID/PW설정
Globals.UserName = ID
Globals.Password = PW
에 아이디와 비밀번호를 입력해준다.
그러고 나서 다시
8번처럼 Maven Install 을 해준다.
역시 Build Success가 나올때까지 기다린다.
다시 9번처럼 Run as > Run on Server 를 한다.
14. 다시 에러가 있다.
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver' at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1429) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111) at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77) ... 88 moreCaused by: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1335) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1163)
at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1420)
오라클 driver가 없단다.
프로젝트 > src > main> webapp > WEB-INF > lib 으로 오라클 driver를 복사해서 넣어준다.
오라클 11g를 사용하므로 ojdbc6.jar을 넣어줬다.
다시 9번처럼 Run as > Run on Server 를 한다.
15. 완료
http://localhost:8080/egovframework-all-in-one/
일단 화면을 띄우는 것까지는 이틀에 걸쳐서 하였다.
내가 원하는 건 좀 더 남아서 그건 내일부터 ~~
'전자정부표준프레임워크' 카테고리의 다른 글
자바 디컴파일러 (0) | 2018.06.07 |
---|---|
이클립스에서 xml default editor 변경 (0) | 2018.05.03 |
Maven repository 폴더 위치 변경 (0) | 2018.04.24 |
전자정부프레임워크 all-on-one 이클립스 셋팅 - not maven (0) | 2018.04.21 |
올해 연도 (0) | 2018.01.28 |
java 1.7 다운로드 (0) | 2017.06.12 |
Double to String (0) | 2017.05.08 |
티베로가 사용하는 포트는 8629 (0) | 2017.04.03 |