/home/jeus/jeus8/domains/jeus_domain/config/domain.xml

 

 

 

<max-thread-pool-size>50</max-thread-pool-size>
<min-thread-pool-size>1</min-thread-pool-size>

 

최대 커넥션 수:50개

최소 커넥션 수:50개

 

1. 로컬 저장소의 git 히스토리 삭제

$ rm -rf .git

 

2. 로컬 저장소를 다시 초기화

$ git init

 

3. 저장소 연결 후 푸시

$ git remote add origin <url>

$ git push -u --force origin master

-url은 깃헙 사이트에서 가져올 수 있음

 

 

4. 초기화할 파일을 추가 & 커밋

$ git add .

$ git commit -m "first project commit"

-여기까지 하면 내컴퓨터에 있는 모든 파일이 add 된다

 

5. 스테이징 취소

$ git reset

 

6. 원격 저장소에 있는 소스 내 프로젝트로 가져오기

$ git pull

 

 

 

git 구조

 

 

사진출처:https://haenny.tistory.com/338

 

 

 

 

 

'Tools > 그 외' 카테고리의 다른 글

깃헙 commit, push 과정  (0) 2024.04.11
Notepad++ 세로로 드래그 하기, Notepad++ 세로로 선택  (0) 2024.03.22

주로 Map, List로 받아서 가져울 때 발생하는 오류로,  Map, List 답긴 값의 데이터 타입을 단순히 casting을 (Integer)로 진행하게 되면 발생함

 

해결 방법

변환하려는 오브젝트를 우선 String.valueOf 를 사용하여 String으로 변환 후 Integer.parseInt를 사용하여 Integer로 변환할 수 있다.

 

//오류 발생
int num = (Integer) map.get("bno");

//우선 해당 오브젝트를 String으로 변환한 후 Integer.parseInt
int num = Integer.parseInt(String.valueOf(map.get("bno")));

 

출처:https://ninearies.tistory.com/310

 

'Programming > Java' 카테고리의 다른 글

엑셀 파일 읽어서 데이터베이스에 insert하기  (1) 2024.01.25
Quartz  (0) 2023.10.31
JNDI 란?  (0) 2023.10.30
클래스 정보와 reflection  (0) 2019.11.09
자바 파일삭제  (0) 2019.10.28

Workbench를 통해 mysql에 접속시 아래와 같이 에러가 발생함.

SSL connection error: SSL is requied but the server doesn't soupport it

 

 

 Advanced 탭으로 이동후 Others 내용에

useSSL=0

을 추가하여 접속하면 정상 접속 됨

 

출처:https://sailer.tistory.com/entry/Mysql-Workbench-%EC%A0%91%EC%86%8D-%EC%97%90%EB%9F%AC-ssl-connection-error

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request procesption: Failed to parse multipart servlet request; nested exception is org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. /tmp/tomcat.6245698fb13fe05_00000062.tmp (그런 파일이나 디렉터리가 없습니다)] with root cause


java.io.FileNotFoundException: /tmp/tomcat.6245698832114394963.8080/work/Tomcat/localhost/ROOT/upload_8103f650_6e95_4e3f_9382_e0a8fb13fe05_00000062.tmp (그런 파일이나 디렉터리가 없습니다)

 

해결책

1. 재부팅

2. 여기 댓글을 보면 될 듯 하다 

https://github.com/spring-projects/spring-boot/issues/5009#issuecomment-323646628

 

 

 

댓글 내용

Resurrecting a closed issue, but for anyone who might find it useful, I've used the following with great success (spring boot / elastic beanstalk).

It will exclude the /tmp/tomcat* directories for auto-cleanup.

 

# Prevent the tmpwatch cron job from deleting tomcat tmp files as this causes "Internal Server Errors"
# This script overwrites the existing file (which is backed up in the same directory as tmpwatch.bak)
# 
# Place this in the root of your project under .ebextensions/tmpwatch_cron.config.
# 
# If using elastic beanstalk and spring boot:
# 1) add this to your .ebextensions/ folder with the provided name
# 2) ensure the .ebextensions folder is added as part of the zip that gets uploaded to elastic beanstalk 
#    (hint: maven-assembly-plugin to bundle as zip)
#
# see: https://github.com/spring-projects/spring-boot/issues/5009
files:
  "/etc/cron.daily/tmpwatch" :
    mode: "000755"
    owner: root
    group: root
    content: |
      #! /bin/sh
      flags=-umc
      /usr/sbin/tmpwatch "$flags" -x /tmp/.X11-unix -x /tmp/.XIM-unix \
        -x /tmp/.font-unix -x /tmp/.ICE-unix -x /tmp/.Test-unix \
        -X '/tmp/hsperfdata_*' -X '/tmp/tomcat*' 10d /tmp
      /usr/sbin/tmpwatch "$flags" 30d /var/tmp
      for d in /var/{cache/man,catman}/{cat?,X11R6/cat?,local/cat?}; do
        if [ -d "$d" ]; then
          /usr/sbin/tmpwatch "$flags" -f 30d "$d"
        fi
      done

commands:
  01_tmpwatch_command:
    command: "touch /tmp/$(date '+%F.%T.%N').tmpwatch_cmd_01"

 

 

 

 

 

출처: https://adunhansa.tistory.com/209 [취미개발 블로그와 마음수양:티스토리]

'Server' 카테고리의 다른 글

[JEUS]Connection Pool 설정  (0) 2024.09.02
IP 알아내기, IP 찾기(ping)  (0) 2024.05.02
war파일 압축하기, war파일 압축 풀기  (0) 2024.04.23
AJP  (0) 2023.10.31

ping [사이트 이름]

ex) ping www.naver.com

 

1. war파일 압축하기

 

- 윈도우에서 cmd창을 엽니다

- war 파일을 만들고 싶은 폴더로 이동합니다.

   ex) cd C:\work

- jar cvf [압축할 파일명].war [압축할 대상]

   ex) jar cvf example.war examFolder

- 압축 완료 시 C:\work에 example.war(압축파일)이 생성됩니다.

 

 

2. war파일 압축 풀기

 

- 파일이 있는 경로로 갑니다.

- jar xvf [파일이름].war 로 압축 풀립니다.

 

 

정리

 

- 압축하기

jar cvf [압축할 파일명].war [압축할 대상]

 

- 압축 풀기

jar xvf [파일이름].war

 

 

-f : 아카이브 파일 명 지정
-v : 처리 과정을 화면에 출력
-x : tar 아카이브에서 파일 추출 (파일 해제시 사용)
-d : tar 아카이브와 파일 시스템 간 차이점 검색
-t : 아카이브 파일 안에 있는 파일 목록을 출력
-r : 아카이브의 마지막에 파일들 추가

테스트 코드는 다 정상 작동하는데 톰캣 서버를 이용해서 프로젝트를 실행하고 특정 주소로 접근했는데 오류 발생

 

2024-04-18 09:31:42,909 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'EgovCmmUseService' defined in URL [jar:file:/D:/deploy/ptu/wizard-web-base/WEB-INF/lib/wizard-app-core-7.0.3.0.jar!/egovframework/com/cmm/service/impl/EgovCmmUseServiceImpl.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 
......
org.apache.catalina.core.StandardContext listenerStart 심각: Context initialized 이벤트를 [org.springframework.web.context.ContextLoaderListener] 클래스의 인스턴스인 리스너에 전송하는 동안 예외 발생 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'EgovCmmUseService' defined in URL [jar:file:/D:/deploy/ptu/wizard-web-base/WEB-INF/lib/wizard-app-core-7.0.3.0.jar!/egovframework/com/cmm/service/impl/EgovCmmUseServiceImpl.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'txAdvice': Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in file [D:\deploy\ptu\wizard-web-base\WEB-INF\classes\egovframework\spring\com\context-transaction.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\deploy\ptu\wizard-web-base\WEB-INF\classes\egovframework\spring\com\context-hibernate.xml]: Invocation of init method failed; nested exception is java.lang.AbstractMethodError: oracle.jdbc.driver.T4CConnection.isValid(I)Z at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)

 

 

해결

원인은 ojdbc8.jar이 [Web Deployment Assembly]에 추가되지 않았던 것이었습니다.

 

 

방법

1. Eclipse와 Oracle DB를 연결하기 위해 ojdbc.jar파일을 JDK 설치 디렉터리에 복사해주기

오라클을 설치한 후 ORACLE 경로에 가보면 ojdbc8.jar 파일이 있다. 그것을 JDK 설치 디렉토리/jre/lib/ext/에 복사해준다.

 

2. Eclipse Project에 ojdbc.jar 파일 추가해주기

eclipse projcet에서 오른쪽 마우스 클릭한 후 속성으로 들어가 ojdbc.jar파일을 추가해준다.

 

Properties → Java Build Path → Libraries → 우측 Add External JARs...눌러 ojdbc8.jar 찾아 넣어준다.

(자바 버전 별로 ojdbc버전 다르니 확인. java1.8이라 ojdbc8 받아 추가함)

 

'Tools > eclipse' 카테고리의 다른 글

java.sql.SQLException: No suitable driver found for error 해결  (0) 2024.01.25

+ Recent posts